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,304 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.table_fixed {
table-layout: fixed !important;
}
.btn-group {
margin-right: 6px;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<div class="search">
<div class="btn-group tool-button">
<el-date-picker
placeholder="选择年度"
type="year"
@change="doSearch"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
<div class="btn-group tool-button">
<el-select placeholder="评优评先名称" v-model="pageForm.evaluateId" style="width: 100%;"
@change="doSearch"
clearable="true" filterable="true">
<el-option v-for="item in evaluateList" :label="item.evaluateName"
:value="item.evaluateId"></el-option>
</el-select>
</div>
<!-- <div class="btn-group tool-button">-->
<!-- <el-radio-group v-model="pageForm.honorType" @change="doSearch();getEvaluateByYear()">-->
<!-- <el-radio-button v-for="v in honorTypeList" :label="v.id">{{v.name}}-->
<!-- </el-radio-button>-->
<!-- </el-radio-group>-->
<!-- </div>-->
<div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary"></el-button>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder">
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
width="80px"></el-table-column>
<el-table-column align="center" header-align="center" label="年度" prop="year" show-overflow-tooltip
sortable>
<template slot-scope="{row}">
{{moment(row.startTime).format('YYYY')}}
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="名称" prop="name"
show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="类型" prop="honorName"
show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="荣誉类型" prop="type" show-overflow-tooltip
sortable>
<template slot-scope="{row}">
{{row.directions ? '集体荣誉' : '个人荣誉'}}
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="申请时间" prop="startTime"
show-overflow-tooltip
sortable>
<template slot-scope="{row}">
{{moment(row.startTime).format('YYYY-MM-DD') + ' 至 ' +
moment(row.endTime).format('YYYY-MM-DD')}}
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="参加活动范围" prop="groupName"
show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="状态" prop="startTime" show-overflow-tooltip
sortable>
<template slot-scope="{row}">
<span :class="getStatus(row).class">{{getStatus(row).name}}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="150px">
<template scope="{row}">
<el-dropdown>
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="openCode(row.id)">
活动二维码
</el-dropdown-item>
<el-dropdown-item @click.native="sendMsg(row)">
通知
</el-dropdown-item>
<el-dropdown-item @click.native="openView(row)">
查看
</el-dropdown-item>
<el-dropdown-item @click.native="openEdit(row)">
编辑
</el-dropdown-item>
<el-dropdown-item @click.native="deleteDo(row)"
v-if="moment().unix() <= moment(row.endTime).unix()">
删除
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #view>
<el-tabs>
<el-tab-pane label="评优评先活动信息">
<el-descriptions :column="2" border class="table_fixed">
<el-descriptions-item :span="2" label="名称">
{{viewData.name}}
</el-descriptions-item>
<el-descriptions-item label="年度">
{{moment(viewData.startTime).format('YYYY')}}
</el-descriptions-item>
<el-descriptions-item label="申请时间">
{{viewData.startTime + ' ~ ' + viewData.endTime}}
</el-descriptions-item>
<el-descriptions-item :span="2" label="参加人员范围">
{{viewData.groupName}}
</el-descriptions-item>
<el-descriptions-item :span="2" label="评选条件">
<div v-html="viewData.conditions"></div>
</el-descriptions-item>
<el-descriptions-item label="评选表彰程序">
<div v-html="viewData.program"></div>
</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="名额分配信息">
<el-table v-if="!viewData.directions" :data="viewData.unionLimit">
<el-table-column prop="unionname" label="分工会"></el-table-column>
<el-table-column prop="teacherCount" label="人数"></el-table-column>
<el-table-column prop="ratio" label="比例(%)"></el-table-column>
<el-table-column prop="limitCount" label="分配人数"></el-table-column>
</el-table>
<template v-if="viewData.directions">
<div style="float: left">评选名额:</div>
<el-input type="textarea" v-model="viewData.directions" rows="4" maxlength="500"
style="width: 94%" readonly=""></el-input>
</template>
</el-tab-pane>
</el-tabs>
</template>
<send-msg ref="sendMsg" :url="url"></send-msg>
<open-qr-code ref="openQRCode" :url="url"></open-qr-code>
</guava>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
pageForm: {
year: moment().format('YYYY'),
},
viewData: {},
viewDataTable: [],
activityGroupList: [],
evaluateList: [],
url: '',
honorTypeList: [],
}
},
components: {
'open-qr-code': httpVueLoader('/components/plugins/OpenQRCode.vue'),
'send-msg': httpVueLoader('/components/plugins/SendMsgByGroupId.vue'),
},
methods: {
sendMsg(row) {
this.url = `<a href="` + (APP_DOMAIN + "/platform/evaluate/apply") + `">点击参与</a>`
this.$refs.sendMsg.openDialog(row.groupId)
},
openCode(id) {
this.$refs.openQRCode.openCode("/platform/evaluate/apply")
},
pageOrder(column) {//按字段排序
this.pageForm.pageOrderName = column.prop;
this.pageForm.pageOrderBy = column.order;
this.pageData();
},
async deleteDo(row) {
const resp = await $.post('/platform/evaluate/getApplyData', {id: row.id})
if(resp.data && resp.data.length > 0) {
this.$notify({title: '提示', message: '此评优评先活动已有申请记录,不能删除!', type: 'warning'})
return
}
this.$confirm('您确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: (a, b) => {
if ("confirm" == a) {
$.post("/platform/evaluate/doDelete", {id: row.id}, (data) => {
if (data.code == 0) {
this.$message.success(resp.msg)
this.pageData();
} else {
this.$message.warning(resp.msg)
}
}, "json");
}
}
});
},
async getEvaluateByYear() {
const {data} = await $.post('/platform/evaluate/apply/getEvaluateByYear', {year: this.pageForm.year,type:this.pageForm.honorType})
this.evaluateList = data
},
getStatus(row) {
const now = new Date().getTime()
const hdkssj = moment(row.startTime.valueOf())
const hdjssj = moment(row.endTime.valueOf())
if (now < hdkssj) {
return {
class: 'text-info',
name: '活动未开始'
}
} else if (now > hdkssj && now < hdjssj) {
return {
class: 'text-success',
name: '活动进行中'
}
} else if (now > hdjssj) {
return {
class: 'text-danger',
name: '活动已截止'
}
}
},
async openView(row) {
const {id} = row
const resp = await $.get('/platform/evaluate/findOne', {id})
if (resp.code === 0) {
this.viewData = resp.data.evaluate
if (!this.viewData.directions) {
const {data} = await $.post('/platform/evaluate/getUnions')
data.map(v => {
const fpmeGh = resp.data.fpme.find(o => o.unionId === v.id)
this.viewDataTable.push({
id: fpmeGh ? fpmeGh.id : '',
ghid: v.id,
unionname: v.unionname,
number: fpmeGh ? fpmeGh.number : 0,
unioncode: v.unioncode,
membercount: v.membercount
})
})
}
this.$refs['guava'].view()
}
},
openEdit(row) {
sublime.jumpPagePjax('/platform/evaluate/add?id=' + row.id)
},
async pageData() {
const res = await $.post('/platform/evaluate/pageData', this.pageForm)
if (res.code === 0) {
this.tableData = res.data.list;
this.pageForm.totalCount = res.data.totalCount;
}
},
async getActivityGroup() {
const resp = await $.get('/platform/activity/basic/scope/getActivityUserScopeGroup')
this.activityGroupList = resp.data
},
},
async created() {
this.honorTypeList = await HonorApi.getHonorType()
if (this.honorTypeList) {
this.$set(this.pageForm, "honorType", this.honorTypeList[0].id)
}
await this.getActivityGroup()
await this.getEvaluateByYear()
this.pageData()
}
})
</script>
<!--#
}
#-->