This commit is contained in:
2026-09-09 16:16:22 +08:00
parent ebffbab428
commit ba3a985c40
3749 changed files with 29 additions and 608551 deletions
@@ -1,177 +0,0 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava>
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">年度:</div>
<div class="search-item-option">
<el-date-picker
placeholder="选择年度"
style="width: 100%"
type="year"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">变更类型:</div>
<div class="search-item-option">
<el-select v-model="pageForm.changeType" style="width: 100%" clearable>
<el-option v-for="item in changeTypes" :label="item.desc" :value="item.code"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">姓名工号:</div>
<div class="search-item-option">
<el-input v-model="pageForm.searchKeyword" clearable maxlength="20"></el-input>
</div>
</div>
<div class="search-item"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}">
<div class="search-item-label">所属工会:</div>
<div class="search-item-option">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">所属单位:</div>
<div class="search-item-option">
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</div>
<div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
</div>
</div>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="退休人员" :app="this"></table-tool>
<el-table :data="tableData" style="width: 100%" stripe border
:header-cell-style="{background:'#FAFAFA'}" row-key="id" @sort-change="pageOrder"
v-loading="tableLoading">
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
width="80px"></el-table-column>
<el-table-column
align="center"
header-align="center"
v-for="column in tableColumns"
:key="column.prop"
show-overflow-tooltip
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
>
<template v-if="column.prop==='unitname'" scope="{row}">
{{isDisPlayCode?''+row.unitcode+'':null}}{{row.unitname}}
</template>
<template v-else-if="column.prop==='unionname'" scope="{row}">
{{isDisPlayCode?''+row.unioncode+'':null}}{{row.unionname}}
</template>
<template v-else-if="column.prop==='changeType'" scope="{row}">
{{changeTypes.find(v=>v.code===row.changeType).desc}}
</template>
</el-table-column>
<!--<el-table-column align="center" header-align="center" label="操作" width="200px">
<template scope="{row}">
<el-button size="mini" @click="openView(row.id)">查看</el-button>
</template>
</el-table-column>-->
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</guava>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
unions: [],
units: [],
tableColumns: [
{prop: 'loginname', label: '工号'},
{prop: 'username', label: '姓名'},
{prop: 'sex', label: '性别'},
{prop: 'birthday', label: '出生年月', sortable: true},
{prop: 'mobile', label: '联系电话'},
{prop: 'idcard', label: '身份证号', width: 170},
{prop: 'position', label: '职务', sortable: true, checked: 0},
{prop: 'jobTitle', label: '职称', sortable: true, checked: 0},
{prop: 'personType', label: '人员类型', sortable: true},
{prop: 'userState', label: '在职状态', sortable: true},
{prop: 'unionname', label: '所属工会', sortable: true},
{prop: 'unitname', label: '所属单位', sortable: true},
{prop: 'campusName', label: '所属校区', sortable: true, checked: 0},
{prop: 'nation', label: '民族', checked: 0},
{prop: 'political', label: '政治面貌', checked: 0},
{prop: 'changeType', label: '变更类型'}
],
changeTypes: [],
pageForm: {
year: (new Date().getFullYear()).toString()
}
}
},
methods: {
async flushUnits() {
this.$set(this.pageForm, "unitId", null)
if (${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}) {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
openChange(row) {
this.$confirm('您确定要将' + row.username + '设为死亡吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async res => {
const resp = await $.post(loc() + '/changeToDie', {userId: row.id})
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.doSearch()
} else {
this.notifyWarning(resp.msg)
}
})
}
},
async created() {
this.pageData()
this.changeTypes = await getEnumOptions('RetiredUserChangeType')
this.unions = await getUnions(null)
this.flushUnits()
}
})
</script>
<!--#
}
#-->
@@ -1,245 +0,0 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava>
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">关键字:</div>
<div class="search-item-option">
<el-input clearable maxlength="20" v-model.trim="pageForm.searchKeyword"></el-input>
</div>
</div>
<div class="search-item"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}">
<div class="search-item-label">所属工会:</div>
<div class="search-item-option">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">所属单位:</div>
<div class="search-item-option">
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</div>
<div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
</div>
</div>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="退休人员" :app="this">
<template #func>
<el-button size="small" type="primary" @click="openAdd">新增退休人员</el-button>
</template>
</table-tool>
<el-table :data="tableData" style="width: 100%" stripe border
:header-cell-style="{background:'#FAFAFA'}" row-key="id" @sort-change="pageOrder"
v-loading="tableLoading">
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
width="80px"></el-table-column>
<el-table-column
align="center"
header-align="center"
v-for="column in tableColumns"
:key="column.prop"
show-overflow-tooltip
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
>
<template v-if="column.prop==='unitname'" scope="{row}">
{{isDisPlayCode?''+row.unitcode+'':null}}{{row.unitname}}
</template>
<template v-else-if="column.prop==='unionname'" scope="{row}">
{{isDisPlayCode?''+row.unioncode+'':null}}{{row.unionname}}
</template>
<template v-else-if="column.prop==='memberJoinTime'" scope="{row}">
{{moment(row.memberJoinTime).format('YYYY-MM-DD')}}
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" width="200px">
<template scope="{row}">
<el-button size="mini" @click="openView(row.id)">查看</el-button>
<el-button size="mini" type="primary" @click="openChange(row)">去世</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<el-drawer title="新增退休人员" :visible.sync="retireUserAddDialogVisible" size="70%">
<el-timeline>
<el-timeline-item timestamp="" placement="top">
<el-input placeholder="请输入内容" clearable v-model="nonRetiredUserPageForm.searchKeyword"
@keyup.enter.native="nonRetiredUserPageForm.pageNumber=1;nonRetiredUserPageData()"
style="width: 300px">
<el-select v-model="nonRetiredUserPageForm.searchName" slot="prepend" style="width: 80px;">
<el-option label="姓名" value="username"></el-option>
<el-option label="工号" value="loginname"></el-option>
</el-select>
</el-input>
<el-button type="primary" icon="el-icon-search"
@click="nonRetiredUserPageForm.pageNumber=1;nonRetiredUserPageData()"></el-button>
</el-timeline-item>
<el-timeline-item timestamp="" placement="top">
<el-table :data="nonRetiredUserTableData" style="width: 100%" row-key="id"
ref="nonRetiredUserTable">
<el-table-column type="selection" reserve-selection></el-table-column>
<el-table-column label="工号" prop="loginname" align="center"></el-table-column>
<el-table-column label="姓名" prop="username" align="center"></el-table-column>
<el-table-column label="性别" prop="sex" align="center"></el-table-column>
<el-table-column label="电话" prop="mobile" align="center"></el-table-column>
<el-table-column label="在职状态" prop="userState" align="center"></el-table-column>
<el-table-column label="人员类型" prop="personType" align="center"></el-table-column>
<el-table-column label="单位" prop="unitname" align="center"></el-table-column>
<el-table-column label="工会" prop="unionname" align="center"></el-table-column>
</el-table>
<el-row class="el-pagination-container">
<el-pagination
@size-change="(val)=>{nonRetiredUserPageForm.pageSize=val;nonRetiredUserPageData()}"
@current-change="(val)=>{nonRetiredUserPageForm.pageNumber=val;nonRetiredUserPageData()}"
:current-page="nonRetiredUserPageForm.pageNumber"
:page-size="nonRetiredUserPageForm.pageSize"
layout="total, prev, pager, next"
:total="nonRetiredUserPageForm.totalCount">
</el-pagination>
</el-row>
</el-timeline-item>
</el-timeline>
<span style="position: absolute;bottom: 20px;right: 20px">
<el-button @click="retireUserAddDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="doBatchJoinRetire">确定</el-button>
</span>
</el-drawer>
</guava>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
retireUserAddDialogVisible: false,
unions: [],
units: [],
tableColumns: [
{prop: 'loginname', label: '工号'},
{prop: 'username', label: '姓名'},
{prop: 'sex', label: '性别'},
{prop: 'birthday', label: '出生年月', sortable: true},
{prop: 'mobile', label: '联系电话'},
{prop: 'idcard', label: '身份证号', width: 170},
{prop: 'position', label: '职务', sortable: true, checked: 0},
{prop: 'jobTitle', label: '职称', sortable: true, checked: 0},
{prop: 'personType', label: '人员类型', sortable: true},
{prop: 'userState', label: '在职状态', sortable: true},
{prop: 'unionname', label: '所属工会', sortable: true},
{prop: 'unitname', label: '所属单位', sortable: true},
{prop: 'threeUnitName', label: '所在科室', sortable: true},
{prop: 'unionGroupName', label: '工会小组', sortable: true},
{prop: 'campusName', label: '所属校区', sortable: true, checked: 0},
{prop: 'nation', label: '民族', checked: 0},
{prop: 'political', label: '政治面貌', checked: 0},
],
nonRetiredUserPageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0
},
nonRetiredUserTableData: []
}
},
methods: {
openAdd() {
this.retireUserAddDialogVisible = true
this.nonRetiredUserPageForm.pageNumber = 1
this.nonRetiredUserPageData()
if (this.$refs.nonRetiredUserTable) {
this.$refs.nonRetiredUserTable.clearSelection()
}
},
async nonRetiredUserPageData() {
const resp = await $.post(loc() + '/nonRetiredUserPageData', this.nonRetiredUserPageForm)
if (resp.code === 0) {
this.nonRetiredUserTableData = resp.data.list
this.nonRetiredUserPageForm.totalCount = resp.data.totalCount
} else {
this.notifyWarning(resp.msg)
}
},
async doBatchJoinRetire() {
const selection = this.$refs.nonRetiredUserTable.selection
if (!selection.length) {
this.notifyWarning("请先勾选需要设置为退休的人员")
return
}
const resp = await $.post(loc() + "/doBatchJoinRetire", {userIds: JSON.stringify(selection.map(v => v.id))})
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.retireUserAddDialogVisible = false
this.doSearch()
} else {
this.notifyWarning(resp.msg)
}
},
async flushUnits() {
this.$set(this.pageForm, "unitId", null)
if (${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}) {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
openChange(row) {
this.$confirm('您确定要将' + row.username + '设为死亡吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async res => {
const resp = await $.post(loc() + '/changeToDie', {userId: row.id})
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.doSearch()
} else {
this.notifyWarning(resp.msg)
}
})
}
},
async created() {
this.pageData()
this.unions = await getUnions(null)
this.flushUnits()
}
})
</script>
<!--#
}
#-->
@@ -1,159 +0,0 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava>
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">关键字:</div>
<div class="search-item-option">
<el-input clearable maxlength="20" v-model.trim="pageForm.searchKeyword"></el-input>
</div>
</div>
<div class="search-item"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}">
<div class="search-item-label">所属工会:</div>
<div class="search-item-option">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">所属单位:</div>
<div class="search-item-option">
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</div>
<div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
</div>
</div>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="退休人员" :app="this"></table-tool>
<el-table :data="tableData" style="width: 100%" stripe border
:header-cell-style="{background:'#FAFAFA'}" row-key="id" @sort-change="pageOrder"
v-loading="tableLoading">
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
width="80px"></el-table-column>
<el-table-column
align="center"
header-align="center"
v-for="column in tableColumns"
:key="column.prop"
show-overflow-tooltip
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
>
<template v-if="column.prop==='unitname'" scope="{row}">
{{isDisPlayCode?''+row.unitcode+'':null}}{{row.unitname}}
</template>
<template v-else-if="column.prop==='unionname'" scope="{row}">
{{isDisPlayCode?''+row.unioncode+'':null}}{{row.unionname}}
</template>
<template v-else-if="column.prop==='memberJoinTime'" scope="{row}">
{{moment(row.memberJoinTime).format('YYYY-MM-DD')}}
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" width="200px">
<template scope="{row}">
<el-button size="mini" @click="openView(row.id)">查看</el-button>
<el-button size="mini" type="primary" @click="openChange(row)">去世</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<el-dialog title="退休人员变更" :visible.sync="retireUserChangeDialogVisible" width="50%"
:close-on-click-modal="false">
</el-dialog>
</guava>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
retireUserChangeDialogVisible: false,
unions: [],
units: [],
tableColumns: [
{prop: 'loginname', label: '工号'},
{prop: 'username', label: '姓名'},
{prop: 'sex', label: '性别'},
{prop: 'birthday', label: '出生年月', sortable: true},
{prop: 'mobile', label: '联系电话'},
{prop: 'idcard', label: '身份证号', width: 170},
{prop: 'position', label: '职务', sortable: true, checked: 0},
{prop: 'jobTitle', label: '职称', sortable: true, checked: 0},
{prop: 'personType', label: '人员类型', sortable: true},
{prop: 'userState', label: '在职状态', sortable: true},
{prop: 'unionname', label: '所属工会', sortable: true},
{prop: 'unitname', label: '所属单位', sortable: true},
{prop: 'threeUnitName', label: '所在科室', sortable: true},
{prop: 'unionGroupName', label: '工会小组', sortable: true},
{prop: 'campusName', label: '所属校区', sortable: true, checked: 0},
{prop: 'nation', label: '民族', checked: 0},
{prop: 'political', label: '政治面貌', checked: 0},
],
}
},
methods: {
async flushUnits() {
this.$set(this.pageForm, "unitId", null)
if (${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}) {
this.units = await getUnits(this.pageForm.unionId)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
openChange(row) {
this.$confirm('您确定要将' + row.username + '设为死亡吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async res => {
const resp = await $.post(loc() + '/changeToDie', {userId: row.id})
if (resp.code === 0) {
this.notifySuccess(resp.msg)
this.doSearch()
} else {
this.notifyWarning(resp.msg)
}
})
}
},
async created() {
// this.pageData()
this.unions = await getUnions(null)
this.flushUnits()
}
})
</script>
<!--#
}
#-->