Files
UNION_NJUST/target/classes/views/platform/evaluate/summary.html
T
2026-09-23 09:38:39 +08:00

223 lines
9.4 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
@change="getEvaluateByYear()"
placeholder="年度"
style="width: 100px" type="year"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="btn-group tool-button" v-if="pageForm.honorType=='101'">
<div>
<el-input clearable placeholder="请输入内容" v-model="pageForm.searchKeyword">
<el-select placeholder="查询类型" slot="prepend" style="width: 100px;"
v-model="pageForm.searchName">
<el-option label="工号" value="us.loginname"></el-option>
<el-option label="姓名" value="us.username"></el-option>
</el-select>
</el-input>
</div>
</div>
<div class="btn-group tool-button">
<el-select clearable="true" filterable="true" placeholder="评优评先名称"
style="width: 100%;" v-model="pageForm.evaluateId">
<el-option :label="item.evaluateName" :value="item.evaluateId"
v-for="item in evaluateList"></el-option>
</el-select>
</div>
<div class="btn-group tool-button">
<el-select @change="flushUnits" @clear="flushUnits" clearable="true"
filterable="true"
placeholder="所属工会" style="width: 100%;"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}"
v-model="pageForm.unionId">
<el-option :label="item.unionname" :value="item.id" v-for="item in unions"></el-option>
</el-select>
</div>
<div class="btn-group tool-button">
<el-select clearable="true" filterable="true" placeholder="所属单位"
style="width: 100%;"
v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id" v-for="item in units"></el-option>
</el-select>
</div>
<div class="btn-group tool-button">
<el-radio-group @change="(o) => {radioChange(o)}" v-model="pageForm.honorType">
<el-radio-button :label="v.id" v-for="v in honorTypeList">{{v.name}}
</el-radio-button>
</el-radio-group>
</div>
<div class="btn-group tool-button">
<el-button @click="doSearch" icon="el-icon-search" type="primary"></el-button>
</div>
<div class="pull-right offscreen-right">
<el-button @click="exportResult" type="primary">导出公示结果</el-button>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<el-table :data="tableData">
<el-table-column align="center" header-align="center" label="序号" type="index"
width="80px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:sortable="column.sortable"
align="center" header-align="center"
show-overflow-tooltip v-for="column in tableColumns">
</el-table-column>
<el-table-column align="center" header-align="center" label="申请时间" prop="applyTime"
sortable></el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="150px">
<template scope="{row}">
<el-button @click="openView(row)" size="mini">
查看
</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>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
units: [],
unions: [],
evaluateList: [],
pageForm: {
year: new Date().getFullYear() + "",
isAudit: false,
searchName: 'us.username',
honorType: '',
honorLevel: ''
},
honorTypeList: [],
tableColumns: [{prop: 'username', label: '申请人姓名', sortable: true},
{prop: 'evaluateName', label: '评优评先名称', sortable: true},
{prop: 'loginname', label: '工号', sortable: true},
{prop: 'userSex', label: '性别', sortable: true},
{prop: 'political', label: '政治面貌', sortable: true},
{prop: 'jobTitle', label: '职称', sortable: true},
{prop: 'unitName', label: '单位', sortable: true},
{prop: 'unionName', label: '工会', sortable: true},]
}
},
components: {
'evaluate-info': httpVueLoader('/components/evaluate/evaluateInfo.vue'),
},
methods: {
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: 'evaluateName', label: '评优评先名称', sortable: true},
{prop: 'loginname', label: '工号', sortable: true},
{prop: 'userSex', label: '性别', sortable: true},
{prop: 'political', label: '政治面貌', sortable: true},
{prop: 'jobTitle', label: '职称', sortable: true},
{prop: 'unitName', label: '单位', sortable: true},
{prop: 'unionName', label: '工会', sortable: true}
]
} else {
this.tableColumns = [
{prop: 'unitName', label: '申请单位', sortable: true},
{prop: 'evaluateName', label: '评优评先名称', sortable: true},
{prop: 'unitLeader', label: '负责人', sortable: true},
{prop: 'unitPeopleNum', label: '单位人数', sortable: true},
{prop: 'unitFemalePeopleNum', label: '单位女职工人数', sortable: true},
{prop: 'memberNum', 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.flushUnits()
this.pageData()
}
})
</script>
<!--#
}
#-->