Files
UNION_NSI/target/classes/views/platform/evaluate/summary.html
T
2026-09-08 19:49:21 +08:00

337 lines
15 KiB
HTML

<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-select {
width: 100%;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<div class="btn-group tool-button">
<div class="block">
<el-date-picker
style="width: 100px"
v-model="pageForm.year"
type="year" @change="getEvaluateByYear()"
value-format="yyyy"
placeholder="年度">
</el-date-picker>
</div>
</div>
<div class="btn-group tool-button">
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword" clearable>
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
style="width: 100px;">
<el-option label="工号" value="us.loginname"></el-option>
<el-option label="姓名" value="us.username"></el-option>
</el-select>
</el-input>
</div>
<div class="btn-group tool-button">
<el-select placeholder="评优评先名称" v-model="pageForm.evaluateId" style="width: 100%;"
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"
v-if="pageForm.honorType=== HonorApi.honor_single_id">
<div class="btn-group tool-button">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button">
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</div>
<div class="btn-group tool-button" v-if="pageForm.honorType !== HonorApi.honor_single_id">
<el-select placeholder="请选择申报协会" v-model="pageForm.clubId"
style="width: 100%;"
clearable
filterable>
<el-option v-for="item in clubs"
:label="item.name"
:value="item.stid"></el-option>
</el-select>
</div>
<!-- <div class="btn-group tool-button">-->
<!-- <el-radio-group v-model="pageForm.honorType" @change="(o) => {radioChange(o)}">-->
<!-- <el-radio-button v-for="v in honorTypeList" :label="v.id">{{v.name}}-->
<!-- </el-radio-button>-->
<!-- </el-radio-group>-->
<!-- </div>-->
<div class="btn-group tool-button">
<el-button type="primary" @click="doSearch" icon="el-icon-search"></el-button>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<vi-title2 title="申请列表">
<template #func>
<el-button type="primary" @click="exportExcel" size="small">一键导出excel表</el-button>
<el-button type="primary" @click="exportTableAll" size="small">一键导出登记表</el-button>
<!-- <el-button type="primary" @click="exportResult" size="small">导出公示结果</el-button>-->
</template>
</vi-title2>
<el-table :data="tableData">
<el-table-column align="center" header-align="center" label="序号" type="index"
width="80px"></el-table-column>
<el-table-column align="center" header-align="center" label="评优评先名称"
prop="evaluateName"
show-overflow-tooltip></el-table-column>
<el-table-column
align="center"
header-align="center"
v-for="column in tableColumns"
:label="column.label"
:prop="column.prop" :sortable="column.sortable"
:sortable="column.sortable" show-overflow-tooltip>
<template v-if="column.prop=='unionClub'" scope="{row}">
{{row.pxxmlx===1?row.unionName:row.clubName}}
</template>
</el-table-column>
<template v-if="pageForm.honorType !== HonorApi.honor_single_id">
<el-table-column align="center" header-align="center" label="工会/协会"
prop="applyTime"
show-overflow-tooltip>
<template slot-scope="{row}">
<template v-if="row.pxxmlx===1">
{{row.applyUnionName}}
</template>
<template v-if="row.pxxmlx===2">
{{row.clubName}}
</template>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="工会主席/协会会长"
prop="applyTime"
show-overflow-tooltip>
<template slot-scope="{row}">
<template v-if="row.pxxmlx===1">
{{row.unionLeader}}
</template>
<template v-if="row.pxxmlx===2">
{{row.clubLeader}}
</template>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="会员人数"
prop="applyTime"
show-overflow-tooltip>
<template slot-scope="{row}">
<template v-if="row.pxxmlx===1">
{{row.memberNumber}}
</template>
<template v-if="row.pxxmlx===2">
{{row.clubNumber}}
</template>
</template>
</el-table-column>
</template>
<el-table-column align="center" header-align="center" label="评选项目类型"
prop="applyTime"
show-overflow-tooltip>
<template slot-scope="{row}">
{{row.pxxmlx===1?'工会':'协会'}}
</template>
</el-table-column>
<el-table-column label="申请时间" prop="applyTime" sortable header-align="center"
align="center"></el-table-column>
<el-table-column align="center" header-align="center" label="审核状态" prop="year"
show-overflow-tooltip>
<template slot-scope="{row}">
<span :style="'color: ' + row.stateColor">{{row.stateName}}</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="250px">
<template scope="{row}">
<el-button size="mini" @click="openView(row)" type="primary">
查看
</el-button>
<el-button size="mini" @click="exportTable(row)" type="primary">
导出登记表
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<evaluate-info ref="info"></evaluate-info>
</template>
</guava>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
clubs: [],
units: [],
unions: [],
evaluateList: [],
pageForm: {
year: '',
isAudit: false,
searchName: 'us.username',
honorType: '',
honorLevel: '',
evaluateId: '',
unionId: '',
unitId: '',
},
honorTypeList: [],
tableColumns: [
{prop: 'userName', label: '申请人姓名', sortable: true},
{prop: 'loginname', label: '工号', sortable: true},
{prop: 'userSex', label: '性别', sortable: true},
{prop: 'unitName', label: '单位', sortable: true},
{prop: 'political', label: '政治面貌', sortable: true},
// {prop: 'joinTime', label: '加入工会时间', sortable: true},
{prop: 'position', label: '担任职务'},
{prop: 'unionClub', label: '工会/协会'},
],
}
},
components: {
'evaluate-info': httpVueLoader('/components/evaluate/evaluateInfo.vue'),
},
methods: {
exportTableAll() {
window.location.href = "/platform/evaluate/summary/exportTableAll?year=" + this.pageForm.year +
"&evaluateId=" + this.pageForm.evaluateId +
"&unionId=" + this.pageForm.unionId +
"&unitId=" + this.pageForm.unitId +
"&honorType=" + this.pageForm.honorType
},
exportExcel() {
if (!this.pageForm.year) {
this.$message({
type: 'error',
message: '请选择年份'
});
return
}
window.open(loc() + '/exportExcel?year='+ this.pageForm.year )
},
exportTable(row) {
window.location.href = "/platform/evaluate/summary/exportTable?id=" + row.id
},
exportResult() {
window.location.href = "/platform/evaluate/summary/exportResult?data=" + JSON.stringify(this.pageForm)
},
openView(data) {
this.$refs.info.getInfo(data.id)
this.$refs.guava.view()
},
radioChange() {
if (this.pageForm.honorType === HonorApi.honor_single_id) {
this.tableColumns = [
{prop: 'userName', label: '申请人姓名', sortable: true},
{prop: 'loginname', label: '工号', sortable: true},
{prop: 'userSex', label: '性别', sortable: true},
{prop: 'unitName', label: '单位', sortable: true},
{prop: 'unionName', label: '工会', sortable: true},
// {prop: 'joinTime', label: '加入工会时间', sortable: true},
{prop: 'position', label: '担任职务'},
]
} else {
this.tableColumns = [
/* {prop: 'evaluateName', label: '评优评先名称', sortable: true},
{prop: 'applyUnionName', label: '申报院级工会', sortable: true},
{prop: 'unionLeader', label: '工会主席', sortable: true},
{prop: 'memberNumber', label: '会员人数', sortable: true},
{prop: 'unionGroupNumber', label: '工会小组数', sortable: true},*/
]
}
this.doSearch()
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
async pageData() {
const res = await $.post('/platform/evaluate/summary/pageData', this.pageForm)
if (res.code === 0) {
this.tableData = res.data.list;
this.pageForm.totalCount = res.data.totalCount;
}
},
async getEvaluateByYear() {
const {data} = await $.post('/platform/evaluate/apply/getEvaluateByYear', {year: this.pageForm.year})
this.evaluateList = data
}
},
async created() {
this.honorTypeList = await HonorApi.getHonorType()
if (this.honorTypeList) {
this.$set(this.pageForm, "honorType", this.honorTypeList[0].id)
}
await this.getEvaluateByYear()
this.unions = await getUnions(null)
this.clubs = await getClubsByRole()
this.flushUnits()
this.pageData()
}
})
</script>
<!--#
}
#-->