first commit
This commit is contained in:
@@ -0,0 +1,373 @@
|
||||
<!--#
|
||||
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">
|
||||
<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" 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 @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}}({{v.num}})
|
||||
</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-radio-group @change="doSearch" v-model="pageForm.isAudit">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
|
||||
<vi-title2 title="申请列表"></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
|
||||
: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" 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" fixed="right" header-align="center" label="操作" width="220px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button @click="rollback(row)" size="mini" type="danger"
|
||||
v-if="pageForm.isAudit === true && row.stateId <= 1800">
|
||||
撤回
|
||||
</el-button>
|
||||
<el-button @click="openEdit(row)" size="mini" type="primary" v-if="row.stateId == 1700">
|
||||
审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
|
||||
</el-card>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<evaluate-info :handle="true" :panes="[2, 3, 4]" label="院级党组织审核" ref="info2">
|
||||
<template #handle>
|
||||
<vi-title title="审核信息"></vi-title>
|
||||
<el-form :model="formData" :rules="formRules" label-position="right" label-width="120px"
|
||||
ref="form"
|
||||
style="padding: 20px 0">
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人员" prop="username">
|
||||
<el-input disabled
|
||||
v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" prop="time">
|
||||
<el-input disabled v-model="formData.auditTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
<el-form-item label="审核意见" prop="opinion">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4" type="textarea"
|
||||
v-model="formData.auditOpinion"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button @click="doReview(false)">拒
|
||||
绝
|
||||
</el-button>
|
||||
<el-button @click="returnBack()" type="danger">退
|
||||
回
|
||||
</el-button>
|
||||
<el-button @click="doReview(true)" type="primary">通
|
||||
过
|
||||
</el-button>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</evaluate-info>
|
||||
</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: [],
|
||||
honorLevelList: [],
|
||||
honorTypeList: [],
|
||||
evaluateList: [],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + "",
|
||||
isAudit: false,
|
||||
searchName: 'us.username',
|
||||
honorType: '',
|
||||
honorLevel: ''
|
||||
},
|
||||
rowData: {},
|
||||
tableColumns: [{prop: 'username', 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: {
|
||||
rollback(row) {
|
||||
this.$confirm('确定要撤回吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: async (a, b) => {
|
||||
if ("confirm" == a) {//确认后再执行
|
||||
const resp = await $.post('/platform/evaluate/audit/party/rollback', {
|
||||
id: row.id,
|
||||
type: row.honorTypeId === HonorApi.honor_single_id,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success({title: '成功', message: '撤回成功'});
|
||||
await this.getHonorNum()
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$notify.warning({title: '错误', message: '撤回失败'});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
returnBack() {
|
||||
this.formData.id = this.rowData.id
|
||||
this.formData.type = this.rowData.honorTypeId === HonorApi.honor_single_id
|
||||
this.formData.userId = this.rowData.userId
|
||||
this.$confirm('确定要退回吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: async (a, b) => {
|
||||
if ("confirm" == a) {//确认后再执行
|
||||
const resp = await $.post('/platform/evaluate/audit/party/returnBack', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success({title: '成功', message: '退回成功'});
|
||||
await this.getHonorNum()
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
} else {
|
||||
this.$notify.warning({title: '错误', message: '退回失败'});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
radioChange(o) {
|
||||
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: '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: 'unitLeader', label: '负责人', sortable: true},
|
||||
{prop: 'unitPeopleNum', label: '单位人数', sortable: true},
|
||||
{prop: 'unitFemalePeopleNum', label: '单位女职工人数', sortable: true},
|
||||
{prop: 'memberNum', label: '单位会员人数', sortable: true},
|
||||
]
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type == 'view') {
|
||||
this.openView(data)
|
||||
} else if (type == 'edit') {
|
||||
this.openEdit(data)
|
||||
}
|
||||
},
|
||||
async doReview(flag) {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.formData.pass = flag
|
||||
|
||||
const resp = await $.post(loc() + "/doReview", this.formData)
|
||||
requestLaterMsgFun(vue, resp, () => {
|
||||
this.pageData()
|
||||
this.getHonorNum()
|
||||
this.$refs.guava.index()
|
||||
}, null, (v) => {
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(data) {
|
||||
this.$refs.info.getInfo(data.id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
openEdit(data) {
|
||||
this.rowData = data
|
||||
this.formData = {
|
||||
id: data.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
}
|
||||
|
||||
this.$refs.info2.getInfo(data.id)
|
||||
this.$refs.guava.edit()
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
},
|
||||
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 getHonorNum() {
|
||||
const evaluateNum = await HonorApi.getEvaluateNum(1700)
|
||||
this.honorTypeList.map(v => {
|
||||
if (v.code === "H1100") {
|
||||
v.num = evaluateNum.gr
|
||||
} else {
|
||||
v.num = evaluateNum.jt
|
||||
}
|
||||
})
|
||||
this.$forceUpdate();
|
||||
},
|
||||
async getEvaluateByYear() {
|
||||
const {data} = await $.post('/platform/evaluate/apply/getEvaluateByYear', {year: this.pageForm.year})
|
||||
this.evaluateList = data
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.honorLevelList = await HonorApi.getHonorLevel()
|
||||
this.honorTypeList = await HonorApi.getHonorType()
|
||||
if (this.honorTypeList) {
|
||||
await this.getHonorNum()
|
||||
this.$set(this.pageForm, "honorType", this.honorTypeList[0].id)
|
||||
}
|
||||
await this.getEvaluateByYear()
|
||||
this.unions = await getUnions(null)
|
||||
this.flushUnits()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,396 @@
|
||||
<!--#
|
||||
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">
|
||||
<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" 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 @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}}({{v.num}})
|
||||
</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-radio-group @change="doSearch" v-model="pageForm.isAudit">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
|
||||
<vi-title2 title="申请列表">
|
||||
<template #func>
|
||||
<el-button @click="exportTableData" size="small" type="primary">导出汇总表</el-button>
|
||||
<el-button @click="exportFiles" size="small" type="primary">一键导出附件</el-button>
|
||||
</template>
|
||||
</vi-title2>
|
||||
|
||||
<el-table :data="tableData" @selection-change="handleSelectionChange" ref="multipleTable">
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<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" 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" fixed="right" header-align="center" label="操作" width="220px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button @click="rollback(row)" size="mini" type="danger"
|
||||
v-if="pageForm.isAudit === true && row.stateId <= 1850">
|
||||
撤回
|
||||
</el-button>
|
||||
<el-button @click="openEdit(row)" size="mini" type="primary" v-if="row.stateId == 1800">
|
||||
审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
|
||||
</el-card>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<evaluate-info :handle="true" :panes="[2, 3, 4, 5]" label="校工会审核" ref="info2">
|
||||
<template #handle>
|
||||
<vi-title title="审核信息"></vi-title>
|
||||
<el-form :model="formData" :rules="formRules" label-position="right" label-width="120px"
|
||||
ref="form"
|
||||
style="padding: 20px 0">
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人员" prop="username">
|
||||
<el-input disabled
|
||||
v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" prop="time">
|
||||
<el-input disabled v-model="formData.auditTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
<el-form-item label="审核意见" prop="opinion">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4" type="textarea"
|
||||
v-model="formData.auditOpinion"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button @click="doReview(false)">拒
|
||||
绝
|
||||
</el-button>
|
||||
<el-button @click="returnBack()" type="danger">退
|
||||
回
|
||||
</el-button>
|
||||
<el-button @click="doReview(true)" type="primary">通
|
||||
过
|
||||
</el-button>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</evaluate-info>
|
||||
</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: [],
|
||||
honorLevelList: [],
|
||||
evaluateList: [],
|
||||
honorTypeList: [],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + "",
|
||||
isAudit: false,
|
||||
searchName: 'us.username',
|
||||
honorType: '',
|
||||
honorLevel: ''
|
||||
},
|
||||
rowData: {},
|
||||
tableColumns: [{prop: 'username', 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},],
|
||||
multipleSelection: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'evaluate-info': httpVueLoader('/components/evaluate/evaluateInfo.vue'),
|
||||
},
|
||||
methods: {
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
exportFiles() {
|
||||
if (this.multipleSelection.length === 0) {
|
||||
this.$notify.warning({title: '提示', message: '请在左侧多选框中选择再进行此操作!'});
|
||||
return
|
||||
}
|
||||
const ids = this.multipleSelection.map(o => o.id)
|
||||
window.location.href = "/platform/evaluate/audit/school/downloadAnnex?ids=" + JSON.stringify(ids)
|
||||
},
|
||||
exportTableData() {
|
||||
this.pageForm.honorTypeBoolean = this.pageForm.honorType === HonorApi.honor_single_id
|
||||
window.location.href = "/platform/evaluate/audit/school/exportTableData?data=" + JSON.stringify(this.pageForm)
|
||||
},
|
||||
rollback(row) {
|
||||
this.$confirm('确定要撤回吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: async (a, b) => {
|
||||
if ("confirm" == a) {//确认后再执行
|
||||
const resp = await $.post('/platform/evaluate/audit/school/rollback', {
|
||||
id: row.id,
|
||||
type: row.honorTypeId === HonorApi.honor_single_id,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success({title: '成功', message: '撤回成功'});
|
||||
await this.getHonorNum()
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$notify.warning({title: '错误', message: '撤回失败'});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
returnBack() {
|
||||
this.formData.id = this.rowData.id
|
||||
this.formData.type = this.rowData.honorTypeId === HonorApi.honor_single_id
|
||||
this.formData.userId = this.rowData.userId
|
||||
this.$confirm('确定要退回吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: async (a, b) => {
|
||||
if ("confirm" == a) {//确认后再执行
|
||||
const resp = await $.post('/platform/evaluate/audit/school/returnBack', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success({title: '成功', message: '退回成功'});
|
||||
await this.getHonorNum()
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
} else {
|
||||
this.$notify.warning({title: '错误', message: '退回失败'});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
radioChange(o) {
|
||||
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: '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: 'unitLeader', label: '负责人', sortable: true},
|
||||
{prop: 'unitPeopleNum', label: '单位人数', sortable: true},
|
||||
{prop: 'unitFemalePeopleNum', label: '单位女职工人数', sortable: true},
|
||||
{prop: 'memberNum', label: '单位会员人数', sortable: true},
|
||||
]
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type == 'view') {
|
||||
this.openView(data)
|
||||
} else if (type == 'edit') {
|
||||
this.openEdit(data)
|
||||
}
|
||||
},
|
||||
async doReview(flag) {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.formData.pass = flag
|
||||
|
||||
const resp = await $.post(loc() + "/doReview", this.formData)
|
||||
requestLaterMsgFun(vue, resp, () => {
|
||||
this.pageData()
|
||||
this.getHonorNum()
|
||||
this.$refs.guava.index()
|
||||
}, null, (v) => {
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(data) {
|
||||
this.$refs.info.getInfo(data.id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
openEdit(data) {
|
||||
this.rowData = data
|
||||
this.formData = {
|
||||
id: data.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
}
|
||||
|
||||
this.$refs.info2.getInfo(data.id)
|
||||
this.$refs.guava.edit()
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
},
|
||||
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 getHonorNum() {
|
||||
const evaluateNum = await HonorApi.getEvaluateNum(1800)
|
||||
this.honorTypeList.map(v => {
|
||||
if (v.code === "H1100") {
|
||||
v.num = evaluateNum.gr
|
||||
} else {
|
||||
v.num = evaluateNum.jt
|
||||
}
|
||||
})
|
||||
this.$forceUpdate();
|
||||
},
|
||||
async getEvaluateByYear() {
|
||||
const {data} = await $.post('/platform/evaluate/apply/getEvaluateByYear', {year: this.pageForm.year})
|
||||
this.evaluateList = data
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.honorLevelList = await HonorApi.getHonorLevel()
|
||||
this.honorTypeList = await HonorApi.getHonorType()
|
||||
|
||||
if (this.honorTypeList) {
|
||||
await this.getHonorNum()
|
||||
this.$set(this.pageForm, "honorType", this.honorTypeList[0].id)
|
||||
}
|
||||
await this.getEvaluateByYear()
|
||||
this.unions = await getUnions(null)
|
||||
this.flushUnits()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,371 @@
|
||||
<!--#
|
||||
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">
|
||||
<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" 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 @change="flushUnits" @clear="flushUnits" clearable="true"
|
||||
filterable="true"
|
||||
placeholder="所属工会" style="width: 100%;"
|
||||
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
|
||||
|
||||
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}}({{v.num}})
|
||||
</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-radio-group @change="doSearch" v-model="pageForm.isAudit">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
|
||||
<vi-title2 title="申请列表"></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
|
||||
: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" 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" fixed="right" header-align="center" label="操作" width="220px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button @click="rollback(row)" size="mini" type="danger"
|
||||
v-if="pageForm.isAudit === true && row.stateId <= 1700">
|
||||
撤回
|
||||
</el-button>
|
||||
<el-button @click="openEdit(row)" size="mini" type="primary" v-if="row.stateId == 1600">
|
||||
审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
|
||||
</el-card>
|
||||
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<evaluate-info :handle="true" :panes="[2, 3]" label="部门工会审核" ref="info2">
|
||||
<template #handle>
|
||||
<vi-title title="审核信息"></vi-title>
|
||||
<el-form :model="formData" :rules="formRules" label-position="right" label-width="120px"
|
||||
ref="form"
|
||||
style="padding: 20px 0">
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人员" prop="username">
|
||||
<el-input disabled
|
||||
v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" prop="time">
|
||||
<el-input disabled v-model="formData.auditTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
<el-form-item label="审核意见" prop="opinion">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4" type="textarea"
|
||||
v-model="formData.auditOpinion"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button @click="doReview(false)">拒
|
||||
绝
|
||||
</el-button>
|
||||
<el-button @click="returnBack()" type="danger">退
|
||||
回
|
||||
</el-button>
|
||||
<el-button @click="doReview(true)" type="primary">通
|
||||
过
|
||||
</el-button>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</evaluate-info>
|
||||
</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: [],
|
||||
honorLevelList: [],
|
||||
evaluateList: [],
|
||||
honorTypeList: [],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + "",
|
||||
isAudit: false,
|
||||
searchName: 'us.username',
|
||||
honorType: '',
|
||||
honorLevel: ''
|
||||
},
|
||||
rowData: {},
|
||||
tableColumns: [{prop: 'username', 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: {
|
||||
async getEvaluateByYear() {
|
||||
const {data} = await $.post('/platform/evaluate/apply/getEvaluateByYear', {year: this.pageForm.year})
|
||||
this.evaluateList = data
|
||||
},
|
||||
rollback(row) {
|
||||
this.$confirm('确定要撤回吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: async (a, b) => {
|
||||
if ("confirm" == a) {//确认后再执行
|
||||
const resp = await $.post('/platform/evaluate/audit/union/rollback', {
|
||||
id: row.id,
|
||||
type: row.honorTypeId === HonorApi.honor_single_id,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success({title: '成功', message: '撤回成功'});
|
||||
await this.getHonorNum()
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$notify.warning({title: '错误', message: '撤回失败'});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
returnBack() {
|
||||
this.formData.id = this.rowData.id
|
||||
this.formData.type = this.rowData.honorTypeId === HonorApi.honor_single_id
|
||||
this.formData.userId = this.rowData.userId
|
||||
this.$confirm('确定要退回吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: async (a, b) => {
|
||||
if ("confirm" == a) {//确认后再执行
|
||||
const resp = await $.post('/platform/evaluate/audit/union/returnBack', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success({title: '成功', message: '退回成功'});
|
||||
await this.getHonorNum()
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
} else {
|
||||
this.$notify.warning({title: '错误', message: '退回失败'});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
radioChange(o) {
|
||||
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: '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: 'unitLeader', label: '负责人', sortable: true},
|
||||
{prop: 'unitPeopleNum', label: '单位人数', sortable: true},
|
||||
{prop: 'unitFemalePeopleNum', label: '单位女职工人数', sortable: true},
|
||||
{prop: 'memberNum', label: '单位会员人数', sortable: true},
|
||||
]
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type == 'view') {
|
||||
this.openView(data)
|
||||
} else if (type == 'edit') {
|
||||
this.openEdit(data)
|
||||
}
|
||||
},
|
||||
async doReview(flag) {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.formData.pass = flag
|
||||
|
||||
const resp = await $.post(loc() + "/doReview", this.formData)
|
||||
requestLaterMsgFun(vue, resp, () => {
|
||||
this.pageData()
|
||||
this.getHonorNum()
|
||||
this.$refs.guava.index()
|
||||
}, null, (v) => {
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(data) {
|
||||
this.$refs.info.getInfo(data.id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
openEdit(data) {
|
||||
this.rowData = data
|
||||
this.formData = {
|
||||
id: data.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
}
|
||||
|
||||
this.$refs.info2.getInfo(data.id)
|
||||
this.$refs.guava.edit()
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
} else {
|
||||
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
},
|
||||
async getHonorNum() {
|
||||
const evaluateNum = await HonorApi.getEvaluateNum(1600)
|
||||
this.honorTypeList.map(v => {
|
||||
if (v.code === "H1100") {
|
||||
v.num = evaluateNum.gr
|
||||
} else {
|
||||
v.num = evaluateNum.jt
|
||||
}
|
||||
})
|
||||
this.$forceUpdate();
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.honorLevelList = await HonorApi.getHonorLevel()
|
||||
this.honorTypeList = await HonorApi.getHonorType()
|
||||
if (this.honorTypeList) {
|
||||
await this.getHonorNum()
|
||||
this.$set(this.pageForm, "honorType", this.honorTypeList[0].id)
|
||||
}
|
||||
await this.getEvaluateByYear()
|
||||
this.unions = await getUnions(null)
|
||||
this.flushUnits()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,339 @@
|
||||
<!--#
|
||||
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="年度" type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="btn-group tool-button">
|
||||
<el-select v-model="pageForm.honorLevel" placeholder="请选择级别" style="width: 200px"
|
||||
@change="doSearch"
|
||||
clearable>
|
||||
<el-option v-for="o in honorLevelList"
|
||||
:key="o.id"
|
||||
:label="o.name"
|
||||
:value="o.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
|
||||
</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" 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-radio-group @change="doSearch" 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-radio-group @change="doSearch" v-model="pageForm.isAudit">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
|
||||
<vi-title2 title="申请列表"></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="username"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="工号" prop="loginname"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="性别" prop="userSex"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="政治面貌" prop="political"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="职称" prop="jobTitle"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="单位" prop="unitName"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="工会" prop="unionName"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="申请时间" prop="applyTime"
|
||||
show-overflow-tooltip></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" fixed="right" header-align="center" label="操作" width="220px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button @click="rollback(row)" size="mini" type="danger"
|
||||
v-if="pageForm.isAudit === true && row.stateId <= 1600">
|
||||
撤回
|
||||
</el-button>
|
||||
<el-button @click="openEdit(row)" size="mini" type="primary" v-if="row.stateId==1500">
|
||||
审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
|
||||
</el-card>
|
||||
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<evaluate-info :handle="true" :panes="[2]" label="单位审核" ref="info2">
|
||||
<template #handle>
|
||||
<vi-title title="审核信息"></vi-title>
|
||||
<el-form :model="formData" :rules="formRules" label-position="right" label-width="120px"
|
||||
ref="form"
|
||||
style="padding: 20px 0">
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人员" prop="username">
|
||||
<el-input disabled
|
||||
v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" prop="time">
|
||||
<el-input disabled v-model="formData.auditTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
<el-form-item label="审核意见" prop="opinion">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4" type="textarea"
|
||||
v-model="formData.auditOpinion"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button @click="doReview(false)">拒
|
||||
绝
|
||||
</el-button>
|
||||
<el-button @click="returnBack()" type="danger">退
|
||||
回
|
||||
</el-button>
|
||||
<el-button @click="doReview(true)" type="primary">通
|
||||
过
|
||||
</el-button>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</evaluate-info>
|
||||
</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: [],
|
||||
honorLevelList: [],
|
||||
honorTypeList: [],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + "",
|
||||
isAudit: false,
|
||||
searchName: 'us.username',
|
||||
honorType: '',
|
||||
honorLevel: ''
|
||||
},
|
||||
rowData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'evaluate-info': httpVueLoader('/components/evaluate/evaluateInfo.vue'),
|
||||
},
|
||||
methods: {
|
||||
async getEvaluateByYear() {
|
||||
const {data} = await $.post('/platform/evaluate/apply/getEvaluateByYear', {year: this.pageForm.year})
|
||||
this.evaluateList = data
|
||||
},
|
||||
rollback(row) {
|
||||
this.$confirm('确定要撤回吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: async (a, b) => {
|
||||
if ("confirm" == a) {//确认后再执行
|
||||
const resp = await $.post('/platform/evaluate/audit/unit/rollback', {
|
||||
id: row.id,
|
||||
type: row.honorTypeId === HonorApi.honor_single_id,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success({title: '成功', message: '撤回成功'});
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$notify.warning({title: '错误', message: '撤回失败'});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
returnBack() {
|
||||
this.formData.id = this.rowData.id
|
||||
this.formData.type = this.rowData.honorTypeId === HonorApi.honor_single_id
|
||||
this.formData.userId = this.rowData.userId
|
||||
this.$confirm('确定要退回吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: async (a, b) => {
|
||||
if ("confirm" == a) {//确认后再执行
|
||||
const resp = await $.post('/platform/evaluate/audit/unit/returnBack', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success({title: '成功', message: '退回成功'});
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
} else {
|
||||
this.$notify.warning({title: '错误', message: '退回失败'});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type == 'view') {
|
||||
this.openView(data)
|
||||
} else if (type == 'edit') {
|
||||
this.openEdit(data)
|
||||
}
|
||||
},
|
||||
async doReview(flag) {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.formData.pass = flag
|
||||
|
||||
const resp = await $.post(loc() + "/doReview", this.formData)
|
||||
requestLaterMsgFun(vue, resp, () => {
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
}, null, (v) => {
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(data) {
|
||||
this.$refs.info.getInfo(data.id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
openEdit(data) {
|
||||
this.rowData = data
|
||||
this.formData = {
|
||||
id: data.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
}
|
||||
|
||||
this.$refs.info2.getInfo(data.id)
|
||||
this.$refs.guava.edit()
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
},
|
||||
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 created() {
|
||||
await this.getEvaluateByYear()
|
||||
this.honorLevelList = await HonorApi.getHonorLevel()
|
||||
const honorTypeList = await HonorApi.getHonorType()
|
||||
this.unions = await getUnions(null)
|
||||
this.flushUnits()
|
||||
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,644 @@
|
||||
<!--#
|
||||
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="年度" type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</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 evaluateOptions"></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="applyEvaluate" size="medium" type="primary">申请评优评先</el-button>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
|
||||
<template #vi-title>
|
||||
<vi-title title="申请列表"></vi-title>
|
||||
</template>
|
||||
|
||||
<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"
|
||||
show-overflow-tooltip></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" fixed="right" header-align="center" label="操作" width="150px">
|
||||
<template scope="{row}">
|
||||
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<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 :command="{type:'view',data:row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'edit',data:row}"
|
||||
:disabled="row.stateId>1400">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
|
||||
<!--#if(@shiro.hasRole('sysadmin')){#-->
|
||||
<el-dropdown-item :command="{type:'delete',data:row}"
|
||||
:loading="row.delLoading">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
<!--#}else{#-->
|
||||
<el-dropdown-item :command="{type:'delete',data:row}"
|
||||
:disabled="row.stateId>1400"
|
||||
:loading="row.delLoading">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
<!--#}#-->
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
|
||||
<template #header>
|
||||
<el-row justify="space-between" type="flex">
|
||||
<h3>{{isEdit?'修改数据':'添加数据'}}</h3>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-form :model="formData" :rules="formRules" label-width="120px" ref="form">
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="评优评先名称" prop="evaluateId">
|
||||
<el-select :disabled="isEdit" @change="evaluateChange" v-model="formData.evaluateId">
|
||||
<el-option :key="o.id"
|
||||
:label="o.name"
|
||||
:value="o.id"
|
||||
v-for="o in evaluateList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="荣誉类型" prop="honorType">
|
||||
<el-input readonly v-model="formData.honorType"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<vi-title title="基础信息"></vi-title>
|
||||
|
||||
<template
|
||||
v-if="formData.honorTypeId === undefined || formData.honorTypeId === HonorApi.honor_single_id">
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="申请人" prop="userId">
|
||||
<el-select
|
||||
:disabled="isEdit"
|
||||
:loading="userLoading"
|
||||
:remote-method="userRemoteMethod"
|
||||
@change="userChange"
|
||||
filterable
|
||||
placeholder="请输入姓名或工号查找"
|
||||
remote
|
||||
reserve-keyword
|
||||
style="width: 100%"
|
||||
v-model="formData.userId">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.username"
|
||||
:value="item.id"
|
||||
v-for="item in userOptions">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工号" prop="loginname">
|
||||
<el-input v-model="formData.loginname"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="性别" prop="userSex">
|
||||
<el-radio-group :disabled="isEdit" v-model="formData.userSex">
|
||||
<el-radio-button label="男"></el-radio-button>
|
||||
<el-radio-button label="女"></el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="民族" prop="nation">
|
||||
<el-select filterable placeholder="民族" style="width: 100%"
|
||||
v-model="formData.nation">
|
||||
<el-option :key="nation" :label="nation" :value="nation"
|
||||
v-for="nation in nationOptions"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="职务" prop="position">
|
||||
<el-input v-model="formData.position"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="职称" prop="jobTitle">
|
||||
<el-input v-model="formData.jobTitle"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="政治面貌" prop="political">
|
||||
<el-input v-model="formData.political"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="在职状态" prop="userState">
|
||||
<el-input v-model="formData.userState"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属单位" prop="unitId">
|
||||
<el-select :disabled="isEdit" filterable="true"
|
||||
placeholder="所属单位"
|
||||
style="width: 100%;"
|
||||
v-model="formData.unitId">
|
||||
<el-option :label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属工会" prop="unionId">
|
||||
<el-select :disabled="isEdit" filterable="true"
|
||||
placeholder="所属工会"
|
||||
style="width: 100%;"
|
||||
v-model="formData.unionId">
|
||||
<el-option :label="item.unionname"
|
||||
:value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="获奖单位" prop="unitName">
|
||||
<el-select :disabled="isEdit" allow-create
|
||||
filterable
|
||||
placeholder="获奖单位"
|
||||
style="width: 100%;"
|
||||
v-model="formData.unitName">
|
||||
<el-option :label="item.name"
|
||||
:value="item.name"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属工会" prop="unionId">
|
||||
<el-select :disabled="isEdit" filterable="true"
|
||||
placeholder="所属工会"
|
||||
style="width: 100%;"
|
||||
v-model="formData.unionId">
|
||||
<el-option :label="item.unionname"
|
||||
:value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位负责人" prop="unitLeader">
|
||||
<el-input v-model="formData.unitLeader"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位人数" prop="unitPeopleNum">
|
||||
<el-input-number :max="2000" :min="0"
|
||||
style="width: 100%" v-model="formData.unitPeopleNum"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="会员人数" prop="memberNum">
|
||||
<el-input-number :max="2000" :min="0"
|
||||
style="width: 100%" v-model="formData.memberNum"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="女职工人员" prop="unitFemalePeopleNum">
|
||||
<el-input-number
|
||||
:max="2000" :min="0"
|
||||
style="width: 100%"
|
||||
v-model.number="formData.unitFemalePeopleNum"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</template>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="曾受何种奖励" prop="award">
|
||||
<el-input placeholder="如有多种奖励,请用 / 隔开" rows="4" type="textarea"
|
||||
v-model="formData.award"></el-input>
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
trigger="click"
|
||||
v-model="popover"
|
||||
width="600">
|
||||
<el-table :data="gridData" @selection-change="handleSelectionChange" ref="multipleTable"
|
||||
row-key="id"
|
||||
size="mini" style="width: 100%; max-height: 300px; overflow-y: auto">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column label="奖项" property="prizeName"></el-table-column>
|
||||
<el-table-column label="授予时间" property="grantDate" sortable></el-table-column>
|
||||
</el-table>
|
||||
<div style="text-align: right; margin-top: 10px">
|
||||
<el-button @click="multipleSelection = []; popover = false" size="mini">取消
|
||||
</el-button>
|
||||
<el-button @click="popoverOK" size="mini" type="primary">确定</el-button>
|
||||
</div>
|
||||
<el-button size="mini" slot="reference" type="primary">调用已录入荣誉</el-button>
|
||||
</el-popover>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="主要事迹" prop="deeds">
|
||||
<el-input rows="4" type="textarea" v-model="formData.deeds"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<vi-title title="获奖信息"></vi-title>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附件" prop="files">
|
||||
<file-upload :files.sync="formData.files">
|
||||
<template #el-upload__tip>
|
||||
<div class="el-upload__tip" slot="tip">
|
||||
图片类请上传jpg/png/jpeg等格式,文档类请上传doc/docx/xls/xlsx/pdf等格式
|
||||
</div>
|
||||
</template>
|
||||
</file-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
|
||||
<el-row class="m20 text-right">
|
||||
<el-button @click="saveForm" type="primary">保存</el-button>
|
||||
<el-button @click="doSubmit" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<evaluate-info ref="info"></evaluate-info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<!--<el-dialog title="荣誉列表" :visible.sync="addDialogVisible">
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="addDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doAdd">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>-->
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
popover: false,
|
||||
multipleSelection: [],
|
||||
honorTypeList: [],
|
||||
evaluateList: [],
|
||||
evaluateOptions: [],
|
||||
gridData: [],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + "",
|
||||
honorType: '',
|
||||
honorLevel: ''
|
||||
},
|
||||
tableData: [],
|
||||
isEdit: false,
|
||||
formData: {
|
||||
evaluateId: '',
|
||||
award: '',
|
||||
deeds: '',
|
||||
},
|
||||
userLoading: false,
|
||||
userOptions: [],
|
||||
nationOptions: nation,
|
||||
units: [],
|
||||
unions: [],
|
||||
formRules: {
|
||||
evaluateId: [{required: true, message: '请选择评优评先', trigger: ['blur', 'change']}],
|
||||
},
|
||||
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: {
|
||||
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
|
||||
'evaluate-info': httpVueLoader('/components/evaluate/evaluateInfo.vue'),
|
||||
},
|
||||
methods: {
|
||||
async saveForm() {
|
||||
const valid = await this.$refs.form.validate()
|
||||
if (!valid) return
|
||||
|
||||
this.formData.files = JSON.stringify(this.formData.files)
|
||||
const resp = await $.post('/platform/evaluate/apply/saveForm', this.formData)
|
||||
requestLaterFun(resp, () => {
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
}, () => {
|
||||
this.$notify.error({title: '失败', message: resp.msg});
|
||||
})
|
||||
},
|
||||
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 getEvaluateByYear() {
|
||||
const {data} = await $.post('/platform/evaluate/apply/getEvaluateByYear', {year: this.pageForm.year})
|
||||
this.evaluateOptions = data
|
||||
},
|
||||
popoverOK() {
|
||||
if (this.multipleSelection) {
|
||||
let str = '';
|
||||
this.multipleSelection.forEach(item => {
|
||||
str += moment(item.grantDate).format('YYYY') + '-' + item.prizeName + '\n'
|
||||
})
|
||||
str = str.substring(0, str.length - 1)
|
||||
this.formData.award = str
|
||||
this.popover = false
|
||||
}
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type == 'view') {
|
||||
this.openView(data)
|
||||
} else if (type == 'edit') {
|
||||
this.openEdit(data)
|
||||
} else if (type == 'delete') {
|
||||
this.doDelete(data)
|
||||
}
|
||||
},
|
||||
openView(data) {
|
||||
this.$refs.info.getInfo(data.id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
doDelete(row) {
|
||||
this.$confirm('确定要删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: async (a, b) => {
|
||||
if ("confirm" == a) {//确认后再执行
|
||||
this.$set(row, "delLoading", true)
|
||||
const resp = await $.post('/platform/evaluate/apply/doDelete', {id: row.id})
|
||||
requestLaterMsgFun(vue, resp, async () => {
|
||||
this.pageData()
|
||||
}, () => {
|
||||
}, () => {
|
||||
this.$set(row, "delLoading", false)
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
openEdit(data) {
|
||||
this.isEdit = true
|
||||
this.findData(data)
|
||||
this.$refs.guava.edit()
|
||||
},
|
||||
async findData(data) {
|
||||
this.formData = {}
|
||||
this.formData = clone(data)
|
||||
if (this.formData.userId && this.formData.userId !== '') {
|
||||
const user = await queryUserById(this.formData.userId)
|
||||
this.setFormData(user)
|
||||
} else {
|
||||
this.$set(this.formData, 'userName', this.formData.userName)
|
||||
}
|
||||
this.$set(this.formData, "political", data.political)
|
||||
this.$set(this.formData, "position", data.position)
|
||||
this.$set(this.formData, "honorType", data && data.honorTypeId === HonorApi.honor_single_id ? '个人荣誉' : '集体荣誉')
|
||||
if (data.files && data.files.length > 0) this.$set(this.formData, "files", JSON.parse(data.files))
|
||||
},
|
||||
async userChange() {
|
||||
const user = await queryUserById(this.formData.userId)
|
||||
this.setFormData(user)
|
||||
},
|
||||
setFormData(user) {
|
||||
this.$set(this.formData, "userSex", user[0].sex)
|
||||
this.$set(this.formData, "userName", user[0].username)
|
||||
this.$set(this.formData, "loginname", user[0].loginname)
|
||||
this.$set(this.formData, "unitId", user[0].unitid)
|
||||
this.$set(this.formData, "unionId", user[0].unionid)
|
||||
this.$set(this.formData, "birthday", user[0].birthday)
|
||||
this.$set(this.formData, "jobTitle", user[0].jobTitle)
|
||||
this.$set(this.formData, "position", user[0].position)
|
||||
this.$set(this.formData, "unionName", user[0].unionname)
|
||||
this.$set(this.formData, "unitName", user[0].unitname)
|
||||
this.$set(this.formData, "userState", user[0].userState)
|
||||
this.$set(this.formData, "political", user[0].political)
|
||||
this.$set(this.formData, "nation", user[0].nation)
|
||||
},
|
||||
async userRemoteMethod(query) {
|
||||
if (query) {
|
||||
this.userLoading = true
|
||||
this.userOptions = await searchUser(query)
|
||||
this.userLoading = false
|
||||
}
|
||||
},
|
||||
async applyEvaluate() {
|
||||
const {data} = await $.post('/platform/evaluate/apply/getHonor')
|
||||
this.gridData = data
|
||||
this.initData()
|
||||
this.$refs.guava.edit()
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
},
|
||||
evaluateChange(val) {
|
||||
const evaluate = this.evaluateList.find(o => o.id === val)
|
||||
this.formData.honorType = evaluate && evaluate.honorTypeId === HonorApi.honor_single_id ? '个人荣誉' : '集体荣誉'
|
||||
this.formData.honorTypeId = evaluate.honorTypeId
|
||||
this.formData.honorId = evaluate.honorId
|
||||
},
|
||||
async doSubmit() {
|
||||
|
||||
const valid = await this.$refs.form.validate()
|
||||
if (!valid) return
|
||||
|
||||
this.formData.files = JSON.stringify(this.formData.files)
|
||||
const resp = await $.post('/platform/evaluate/apply/doSubmit', this.formData)
|
||||
requestLaterFun(resp, () => {
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
}, () => {
|
||||
this.$notify.error({title: '失败', message: resp.msg});
|
||||
})
|
||||
},
|
||||
async initData() {
|
||||
|
||||
const {data} = await $.post('/platform/evaluate/getEvaluateList')
|
||||
this.evaluateList = data
|
||||
|
||||
this.units = await getUnits(null)
|
||||
this.unions = await getUnions(null)
|
||||
|
||||
await this.userRemoteMethod("${@shiro.getPrincipalProperty('loginname')}")
|
||||
this.$set(this.formData, "userId", this.userOptions[0].id)
|
||||
await this.userChange()
|
||||
},
|
||||
async pageData() {
|
||||
const res = await $.post('/platform/evaluate/apply/pageData', this.pageForm)
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list;
|
||||
this.pageForm.totalCount = res.data.totalCount;
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
async created() {
|
||||
this.honorTypeList = await HonorApi.getHonorType()
|
||||
if (this.honorTypeList) {
|
||||
this.$set(this.pageForm, "honorType", this.honorTypeList[0].id)
|
||||
}
|
||||
await this.initData()
|
||||
await this.getEvaluateByYear()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,242 @@
|
||||
<!--#
|
||||
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"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</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="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">
|
||||
<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="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="year" 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="year" 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="300px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||
<el-button @click="deleteDo(row)" size="mini"
|
||||
type="danger" v-if="moment().unix() < moment(row.startTime).unix()">删除
|
||||
</el-button>
|
||||
</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 :data="viewDataTable" v-if="!viewData.directions">
|
||||
<el-table-column label="部门工会" prop="unionname"></el-table-column>
|
||||
<el-table-column label="会员人数" prop="membercount"></el-table-column>
|
||||
<el-table-column label="名额" prop="number"></el-table-column>
|
||||
</el-table>
|
||||
<template v-if="viewData.directions">
|
||||
<div style="float: left">评选名额:</div>
|
||||
<el-input maxlength="500" readonly="" rows="4" style="width: 94%"
|
||||
type="textarea" v-model="viewData.directions"></el-input>
|
||||
</template>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: moment().format('YYYY'),
|
||||
},
|
||||
viewData: {},
|
||||
viewDataTable: [],
|
||||
activityGroupList: [],
|
||||
evaluateList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
deleteDo(row) {
|
||||
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.$notify({title: '成功', message: '删除成功!', type: 'success'})
|
||||
this.pageData();
|
||||
} else {
|
||||
this.$notify({title: '警告', message: '删除失败!', type: 'warning'})
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
async getEvaluateByYear() {
|
||||
const {data} = await $.post('/platform/evaluate/apply/getEvaluateByYear', {year: this.pageForm.year})
|
||||
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() {
|
||||
await this.getActivityGroup()
|
||||
await this.getEvaluateByYear()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,193 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<!--#include("/platform/evaluate/include_evaluate_edit.html"){}#-->
|
||||
</el-card>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
let E = window.wangEditor
|
||||
const editors = {}
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
components: {},
|
||||
data() {
|
||||
let validProgram = (rule, value, callback) => {
|
||||
if (!this.formData.program || !dd3s.html2txt(this.formData.program)) {
|
||||
callback(new Error('请填写评选表彰程序'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
stepActive: 0,
|
||||
formData: {
|
||||
time: [],
|
||||
},
|
||||
formRules: {
|
||||
honor: [{required: true, message: '请填写评优评先名称', trigger: ['blur', 'change']}],
|
||||
time: [{required: true, message: '请选择申请时间', trigger: ['blur', 'change']}],
|
||||
groupId: [{required: true, message: '请选择参加人员范围', trigger: ['blur', 'change']}],
|
||||
conditions: [{required: true, message: '请填写评选条件', trigger: ['blur', 'change']}],
|
||||
program: [{validator: validProgram, trigger: ['blur', 'change']}],
|
||||
},
|
||||
unions: [],
|
||||
unionTableData: [],
|
||||
activityGroupList: [],
|
||||
honorOptions: [],
|
||||
radioActive: '直接分配',
|
||||
rate: 0,
|
||||
honor: {},
|
||||
fpme: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
cascaderChange(o) {
|
||||
for (const item of this.honorOptions) {
|
||||
this.honor = item.children.find(x => {
|
||||
return x.value === o
|
||||
})
|
||||
if (this.honor) {
|
||||
this.formData.honorTypeId = item.value
|
||||
return
|
||||
}
|
||||
}
|
||||
},
|
||||
initEditor() {
|
||||
|
||||
let keys = ['program']
|
||||
keys.forEach(key => {
|
||||
$("#" + key).html("")
|
||||
editors[key] = new E('#' + key)
|
||||
editors[key].config.onchange = (html) => {
|
||||
this.formData[key] = html
|
||||
}
|
||||
editors[key].create()
|
||||
if (this.formData[key]) {
|
||||
editors[key].txt.html(this.formData[key])
|
||||
}
|
||||
})
|
||||
},
|
||||
async initData() {
|
||||
const id = GetQueryString("id")
|
||||
this.id = id
|
||||
if (id) {
|
||||
const resp = await $.post('/platform/evaluate/findOne', {id})
|
||||
if (resp.code === 0) {
|
||||
this.formData = resp.data.evaluate
|
||||
this.$set(this.formData, 'time', [this.formData.startTime, this.formData.endTime])
|
||||
this.formData.honor = this.formData.honorId
|
||||
this.fpme = resp.data.fpme
|
||||
this.cascaderChange(this.formData.honorId)
|
||||
this.$nextTick(() => {
|
||||
this.initEditor()
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
async next() {
|
||||
this.unionTableData = []
|
||||
this.$refs.form.validate(async (valid) => {
|
||||
if (valid) {
|
||||
const {data} = await $.post('/platform/evaluate/getUnions')
|
||||
this.unions = data
|
||||
if (!this.id || !this.fpme) {
|
||||
this.unions.map(v => {
|
||||
this.unionTableData.push({
|
||||
ghid: v.id,
|
||||
unionname: v.unionname,
|
||||
number: 0,
|
||||
unioncode: v.unioncode,
|
||||
membercount: v.membercount
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.unions.map(v => {
|
||||
const fpmeGh = this.fpme.find(o => o.unionId === v.id)
|
||||
this.unionTableData.push({
|
||||
id: fpmeGh ? fpmeGh.id : '',
|
||||
ghid: v.id,
|
||||
unionname: v.unionname,
|
||||
number: fpmeGh ? fpmeGh.number : 0,
|
||||
unioncode: v.unioncode,
|
||||
membercount: v.membercount
|
||||
})
|
||||
})
|
||||
}
|
||||
this.stepActive = 1
|
||||
} else {
|
||||
this.$notify({title: '警告', message: '存在未填的必填项', type: 'warning'})
|
||||
}
|
||||
});
|
||||
},
|
||||
async doAdd() {
|
||||
this.formData.startTime = this.formData.time[0]
|
||||
this.formData.endTime = this.formData.time[1]
|
||||
this.formData.honorId = this.honor.value
|
||||
this.formData.name = this.honor.label
|
||||
|
||||
if (this.honor.parentName === '集体荣誉' && !this.formData.directions) {
|
||||
this.$notify({title: '警告', message: '请填写评选名额的说明', type: 'warning'})
|
||||
return
|
||||
}
|
||||
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '努力操作中。。。',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
const resp = await $.post('/platform/Evaluate/doHandle', {
|
||||
evaluate: JSON.stringify(this.formData),
|
||||
data: this.honor.parentName === '个人荣誉' ? JSON.stringify(this.unionTableData) : []
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
loading.close();
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: resp.msg,
|
||||
type: 'success',
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
sublime.jumpPagePjax('/platform/evaluate/manage')
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
async getActivityGroup() {
|
||||
const resp = await $.get('/platform/activity/basic/scope/getActivityUserScopeGroup')
|
||||
this.activityGroupList = resp.data
|
||||
},
|
||||
async getHonor() {
|
||||
const resp = await $.get('/platform/Evaluate/getHonor')
|
||||
this.honorOptions = resp.data
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const self = this
|
||||
setTimeout(function () {
|
||||
self.initEditor()
|
||||
}, 100)
|
||||
await this.getActivityGroup()
|
||||
await this.getHonor()
|
||||
await this.initData()
|
||||
},
|
||||
watch: {
|
||||
'rate'(o) {
|
||||
this.unionTableData.forEach(item => {
|
||||
item.number = Math.round(item.membercount * o / 100)
|
||||
})
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,130 @@
|
||||
<style>
|
||||
|
||||
.editor .el-form-item__label:before {
|
||||
content: '*';
|
||||
color: #F56C6C;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<el-row style="padding: 0 10%;">
|
||||
|
||||
<el-steps :active="stepActive" finish-status="success" simple>
|
||||
<el-step description="" title="活动信息">
|
||||
|
||||
</el-step>
|
||||
<el-step description="" title="名额分配">
|
||||
|
||||
</el-step>
|
||||
</el-steps>
|
||||
|
||||
<div class="transition-box" style="margin-top: 20px;" v-show="stepActive === 0">
|
||||
<el-form :model="formData" :rules="formRules" label-width="120px" ref="form">
|
||||
|
||||
<el-form-item label="评优评先名称" prop="honor">
|
||||
<el-cascader :options="honorOptions" :props="{ emitPath: false }" :show-all-levels="false"
|
||||
@change="cascaderChange" clearable filterable style="width: 100%"
|
||||
v-model="formData.honor"></el-cascader>
|
||||
</el-form-item>
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="申请时间" label-width="120px" prop="time">
|
||||
<el-date-picker
|
||||
align="right"
|
||||
end-placeholder="结束日期"
|
||||
start-placeholder="开始日期"
|
||||
style="width: 100%"
|
||||
type="datetimerange"
|
||||
v-model="formData.time"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="参加人员范围" prop="groupId">
|
||||
<el-select clearable filterable placeholder="请选择参加人员范围"
|
||||
style="width: 100%;"
|
||||
v-model="formData.groupId">
|
||||
<el-option :label="item.groupName" :value="item.groupId"
|
||||
v-for="item in activityGroupList"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="评选条件" prop="conditions">
|
||||
<el-input maxlength="500" placeholder="请填写评选条件" rows="4" type="textarea"
|
||||
v-model="formData.conditions"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<div class="editor">
|
||||
<el-form-item class="is-required" label="评选表彰程序" prop="program">
|
||||
<div id="program"></div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
</el-form>
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button @click="next" type="primary">下一步</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="transition-box" style="margin-top: 20px;" v-show="stepActive === 1">
|
||||
|
||||
<template v-if="honor.parentName === '个人荣誉'">
|
||||
<div style="text-align: center;">
|
||||
<el-radio-group v-model="radioActive">
|
||||
<el-radio-button label="直接分配"></el-radio-button>
|
||||
<el-radio-button label="按比例"></el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-input-number :max="100" :min="0" controls-position="right" placeholder="请输入分配比例值"
|
||||
style="top: 1px" v-if="radioActive === '按比例'"
|
||||
v-model="rate"></el-input-number>
|
||||
<span v-if="radioActive === '按比例'">%</span>
|
||||
</div>
|
||||
<el-table :data="unionTableData" height="70vh" size="medium">
|
||||
<el-table-column align="center" header-align="center" label="序号"
|
||||
type="index"></el-table-column>
|
||||
|
||||
<el-table-column label="部门工会" prop="unionname" sortable>
|
||||
<template scope="{row}">
|
||||
{{isDisPlayCode?'('+row.unioncode+')':null}}{{row.unionname}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="会员人数" prop="membercount" sortable></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="名额" prop="number"
|
||||
width="200px">
|
||||
<template scope="scope">
|
||||
<el-input-number :max="1000" :min="0"
|
||||
controls-position="right" placeholder="请填写名额数"
|
||||
v-model="scope.row.number"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
|
||||
<template v-if="honor.parentName === '集体荣誉'">
|
||||
|
||||
<el-form label-width="120px">
|
||||
<el-form-item label="评选名额" prop="conditions">
|
||||
<el-input maxlength="500" placeholder="请填写评选名额的说明" rows="4" type="textarea"
|
||||
v-model="formData.directions"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
</template>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button @click="stepActive = 0">上一步</el-button>
|
||||
<el-button @click="doAdd()" type="primary">提
|
||||
交
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
</template>
|
||||
@@ -0,0 +1,223 @@
|
||||
<!--#
|
||||
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>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user