first commit

This commit is contained in:
2026-09-23 09:38:39 +08:00
commit 98a8b8cace
6257 changed files with 1266718 additions and 0 deletions
@@ -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>
<!--#
}
#-->