first commit

This commit is contained in:
2026-09-08 19:49:21 +08:00
commit ebffbab428
7320 changed files with 1477614 additions and 0 deletions
@@ -0,0 +1,392 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
</style>
<div id="app" class="platform" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">&emsp;&emsp;</div>
<div class="search-item-option">
<el-date-picker
v-model="pageForm.year"
type="year"
value-format="yyyy" style="width: 100%"
placeholder="选择年">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">活动名称</div>
<div class="search-item-option">
<!--<el-input v-model="pageForm.name" placeholder="请输入活动名称" clearable></el-input>-->
<el-select v-model="pageForm.activityId" placeholder="请选择活动名称"
filterable clearable
style="width: 100%">
<el-option
v-for="item in activities"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">活动级别</div>
<div class="search-item-option">
<!-- <el-select v-model="pageForm.gameStyle" placeholder="请选择活动类型" filterable clearable
style="width: 100%">
<el-option
v-for="(k,v) in activity.school.gameStyle"
:key="v"
:label="k"
:value="v">
</el-option>
</el-select>-->
<el-select v-model="pageForm.activityLevel" placeholder="请选择活动级别"
clearable
style="width: 100%">
<el-option
v-for="item in activityTypeList"
:key="item.code"
:label="item.name"
:value="item.code">
</el-option>
</el-select>
</div>
</div>
<div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
</el-button>
</div>
<div class="search-item" style="width: 80vw">
<div class="search-item-label">一键查询</div>
<div class="search-item-option">
<el-radio-group v-model="pageForm.query" @change="doSearch">
<el-radio-button v-for="it in queryOptions" :label="it.key"
:key="it.key">
{{it.value}}
</el-radio-button>
</el-radio-group>
</div>
</div>
</div>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="活动列表" :app="this">
<template #func>
<el-button type="primary" icon="el-icon-edit-outline" size="small"
@click="openAdd">
创建活动
</el-button>
</template>
</table-tool>
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px" row-key="id"
@sort-change="pageOrder" v-loading="tableLoading" :size="tableSize"
class="vi-table">
<el-table-column align="center" header-align="center" type="index"
:index="indexMethod" label="序号"
width="80px"></el-table-column>
<el-table-column
align="center"
header-align="center"
v-for="column in tableColumns"
:label="column.label"
:prop="column.prop"
show-overflow-tooltip
:sortable="column.sortable">
<template v-if="column.prop=='events'" scope="{row}">
<span>{{row.allName}}</span>
</template>
<template v-else-if="column.prop=='gameStyle'" scope="{row}">
<span>{{activity.school.gameStyle[row.gameStyle]}}</span>
</template>
<template v-else-if="column.prop=='foundUnit'" scope="{row}">
<span v-if="row.activityLevel===40001">校工会</span>
<span v-if="row.activityLevel===40002">{{row.unionname}}</span>
<span v-if="row.activityLevel===40003">{{row.clubName}}</span>
</template>
<template v-else-if="column.prop=='startTime'" scope="{row}">
{{moment(row.startTime).format('YYYY-MM-DD')}} -
{{moment(row.endTime).format('YYYY-MM-DD')}}
</template>
<template v-else-if="column.prop=='state'"
scope="{row:{close,applyStartTime,applyEndTime,startTime,endTime,isSave}}">
<div v-html="activity.school.getStatus(close,applyStartTime,applyEndTime,startTime,endTime,isSave)"></div>
</template>
</el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center"
label="操作" width="150px">
<template scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button size="mini" :loading="row.loading">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'sendMsg',row}">
通知
</el-dropdown-item>
<el-dropdown-item :command="{type:'openCode',row}">
二维码
</el-dropdown-item>
<el-dropdown-item :command="{type:'view',row}">
查看
</el-dropdown-item>
<!-- <el-dropdown-item :command="{type:'export',row}">
导出名单docx
</el-dropdown-item>-->
<el-dropdown-item :command="{type:'exportXlsx',row}">
导出名单
</el-dropdown-item>
<el-dropdown-item :command="{type:'edit',row}">
编辑
</el-dropdown-item>
<el-dropdown-item :command="{type:'delete',row}">
删除
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit_func>
<el-button type="primary" @click="doSave">保 存</el-button>
<el-button type="primary" @click="doOperate">提 交</el-button>
</template>
<template #edit>
<add-activity :form="formData" ref="activity" @flip="flip" @flush="flush"
:is_club="is_club"
:is_union="is_union" :is_sysadmin="is_sysadmin" :is_a06="is_A06"
:is_h10="is_h10"
:unionid="'${@shiro.getPrincipalProperty('unit').getUnionid()}'"></add-activity>
</template>
<template #view>
<info ref="info"></info>
</template>
<send-msg ref="sendMsg" :url="url"></send-msg>
<open-qr-code ref="openQRCode" :url="url"></open-qr-code>
</guava>
</div>
<script>
let E = window.wangEditor
const editors = {}
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
is_club: false,
is_union: false,
is_sysadmin: false,
is_A06: false,
is_h10: false,
activities: [],
unitOptions: [],
activityTypeList: [],
planList: [],
typeList: [],
types: [],
events: [],
submitDisabled: false,
formData: {
activityGroupId: null,
personType: 1,
activityLevel: 1,
gameStyle: 1,
applyWay: [2],
awardsMode: [],
combinationMethod: []
},
tableColumns: [
{prop: 'name', label: '活动名称'},
{prop: 'activityCode', label: '活动编号', sortable: true},
{prop: 'address', label: '活动地点'},
{prop: 'foundUnit', label: '创建单位', sortable: true},
{prop: 'activityLevelName', label: '活动级别', sortable: true},
{prop: 'startTime', label: '活动日期', sortable: true},
{prop: 'state', label: '活动状态', sortable: true},
{prop: 'applyNum', label: '已报名人数', sortable: true},
{prop: 'foundDate', label: '创建时间', sortable: true},
],
pageForm: {
query: 'zero'
},
queryOptions: [
{key: 'zero', value: '全部'},
{key: 'one', value: '正在报名'},
{key: 'two', value: '报名结束'},
{key: 'three', value: '活动进行中'},
{key: 'four', value: '活动已结束'},
],
url: '',
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'info': httpVueLoader('/components/activity/school/Info.vue?v=' + new Date().getTime()),
'add-activity': httpVueLoader('/components/activity/school/AddActivity.vue?v=' + new Date().getTime()),
'send-msg': httpVueLoader('/components/plugins/SendMsgByGroupId.vue'),
'open-qr-code': httpVueLoader('/components/plugins/OpenQRCode.vue'),
},
methods: {
flip() {
this.pageData()
this.$refs.guava.index()
},
flush() {
this.pageData()
},
dropdownCommand(command) {
const {type, row} = command
if (type === 'view') {
this.openView(row)
} else if (type === 'edit') {
this.openEdit(row)
} else if (type === 'delete') {
this.doDelete(row)
} else if (type === 'export') {
window.open("/platform/activity/common/export?id=" + row.id)
} else if (type === 'exportXlsx') {
location.href = "/platform/activity/common/exportXlsx?id=" + row.id
} else if (type == 'sendMsg') {
this.sendMsg(row)
} else if (type === 'openCode') {
this.openCode(row)
}
},
openCode(row) {
this.$refs.openQRCode.openCode("/mobile/activity/Sports/list/activityList?id=" + row.id + "&signUpMethod=" + row.signUpMethod)
},
sendMsg(row) {
this.url = `<a href="` + (APP_DOMAIN + "/mobile/activity/Sports/list/activityList") + `">点击参与</a>`
this.$refs.sendMsg.openDialog(row.activityGroupId)
},
openView(row) {
const {id} = row
this.$refs.guava.view()
setTimeout(() => {
this.$refs.info.getInfo(id)
}, 500)
},
async openAdd() {
this.$refs.guava.edit()
setTimeout(() => {
this.$refs.activity.openAdd()
}, 500)
},
async openEdit(row) {
const {id, applyStartTime, isSave} = row
this.formData.id = id
const now = moment().valueOf()
this.$refs.guava.edit()
setTimeout(() => {
this.$refs.activity.openEdit(row, true)
}, 500)
},
doDelete(row) {
const {id} = row
this.$confirm('确定要删除该活动吗?', '提示', {type: 'warning'}).then(async () => {
this.$set(row, "loading", true)
const resp = await $.post(loc() + "/doDelete", {id});
this.$set(row, "loading", false)
if (resp.code === 0) {
this.pageData()
} else {
this.notifyWarning(resp.msg)
}
}
);
},
async getActivitys() {
const {data} = await $.get("/platform/activity/remind/getActivitys")
return data;
},
async getActivityTypeList(code) {
const {data} = await $.get("/platform/activity/basic/basic/settings/getActivityTwoLevelType", {code: code})
return data;
},
async doOperate() {
await this.$refs.activity.operate()
},
async doSave() {
this.$refs.activity.doSave()
},
pageData() {//加载分页数据
sublime.showLoadingbar();//显示loading
$.post(loc() + "/pageData", this.pageForm, (data) => {
sublime.closeLoadingbar();//关闭loading
if (data.code == 0) {
this.tableData = data.data.list;
this.pageForm.totalCount = data.data.totalCount;
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}, "json");
},
},
async created() {
if ("${@shiro.hasRole('club01')}" === "true") {
this.is_club = true
}
if ("${@shiro.hasRole('H04')}" === "true" || "${@shiro.hasRole('ghzl')}" === "true") {
this.is_union = true
}
if ("${@shiro.hasRole('sysadmin')}" === "true") {
this.is_sysadmin = true
}
if ("${@shiro.hasRole('A06')}" === "true") {
this.is_A06 = true
}
if ("${@shiro.hasRole('H10')}" === "true") {
this.is_h10 = true
}
this.pageData()
this.activities = await this.getActivitys()
this.unitOptions = await getUnits(null)
this.activityTypeList = await this.getActivityTypeList("40000")
}
})
</script>
<!--#
}
#-->