commit
This commit is contained in:
@@ -1,178 +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"
|
||||
:clearable="false"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</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-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-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,196 +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 v-model="pageForm.year" value-format="yyyy" format="yyyy" type="year" :clearable="false"></el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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-item">
|
||||
<div class="search-item-label">所属小组:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属小组" v-model="pageForm.retiredGroupId" style="width: 100%;"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in retiredGroupOption" :label="item.groupName" :value="item.id"
|
||||
:key="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.retiredPartyBranchId" style="width: 100%;"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in retiredPartyBranchOption" :label="item.partyBranchName"
|
||||
:value="item.id" :key="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="100px">
|
||||
<template scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item>
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</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, checked: 0},
|
||||
{prop: 'position', label: '职务', sortable: true, checked: 0},
|
||||
{prop: 'jobTitle', label: '职称', sortable: true, checked: 0},
|
||||
{prop: 'personType', label: '人员类型', sortable: true, checked: 0},
|
||||
{prop: 'userState', label: '在职状态', sortable: true, checked: 0},
|
||||
{prop: 'political', label: '政治面貌'},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
{prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
{prop: 'unionGroupName', label: '工会小组', sortable: true, checked: 0},
|
||||
{prop: 'retiredGroupName', label: '退休小组', sortable: true},
|
||||
{prop: 'retiredPartyBranchName', label: '退休党支部', sortable: true},
|
||||
{prop: 'campusName', label: '所属校区', sortable: true, checked: 0},
|
||||
{prop: 'nation', label: '民族', checked: 0},
|
||||
],
|
||||
|
||||
retiredGroupOption: [],
|
||||
retiredPartyBranchOption: [],
|
||||
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + ''
|
||||
}
|
||||
}
|
||||
},
|
||||
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()}")
|
||||
}
|
||||
},
|
||||
async getRetiredGroup() {
|
||||
const resp = await $.post(loc() + '/retiredGroup')
|
||||
this.retiredGroupOption = resp.data
|
||||
},
|
||||
async getRetiredPartyBranch() {
|
||||
const resp = await $.post(loc() + '/retiredPartyBranch')
|
||||
this.retiredPartyBranchOption = resp.data
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
this.unions = await getUnions(null)
|
||||
this.flushUnits()
|
||||
this.getRetiredGroup()
|
||||
this.getRetiredPartyBranch()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,369 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="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-item">
|
||||
<div class="search-item-label">所属小组:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属小组" v-model="pageForm.retiredGroupId" style="width: 100%;"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in retiredGroupOption" :label="item.groupName" :value="item.id"
|
||||
:key="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.retiredPartyBranchId" style="width: 100%;"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in retiredPartyBranchOption" :label="item.partyBranchName"
|
||||
:value="item.id" :key="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>
|
||||
<el-button size="small" type="primary" @click="backUp">备份为历史数据</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="100px">
|
||||
<template scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{action:openView,value:row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<!-- <el-dropdown-item>-->
|
||||
<!-- 编辑-->
|
||||
<!-- </el-dropdown-item>-->
|
||||
<el-dropdown-item :command="{action:openChange,value:row}">
|
||||
变更
|
||||
</el-dropdown-item>
|
||||
<!-- <el-dropdown-item>-->
|
||||
<!-- 删除-->
|
||||
<!-- </el-dropdown-item>-->
|
||||
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
|
||||
|
||||
<!-- <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>
|
||||
|
||||
<template #view>
|
||||
<user-info :id="userId"></user-info>
|
||||
</template>
|
||||
|
||||
<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"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="工会" prop="unionname" align="center"
|
||||
show-overflow-tooltip></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>
|
||||
|
||||
<el-dialog title="设置去世信息" :visible.sync="deadDialogVisible" width="50%">
|
||||
<el-form :model="deathFormData" ref="deathForm" label-width="120px">
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="deathFormData.username" readonly></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="工号">
|
||||
<el-input v-model="deathFormData.loginname" readonly></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位">
|
||||
<el-input v-model="deathFormData.unitname" readonly></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="去世日期" prop="deathDate"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-date-picker format="yyyy-MM-dd" value-format="yyyy-MM-dd"
|
||||
v-model="deathFormData.deathDate"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="deadDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="setUserDeathInfo">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'user-info': httpVueLoader('/components/retiredUser/userInfo.vue'),
|
||||
},
|
||||
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, checked: 0},
|
||||
{prop: 'position', label: '职务', sortable: true, checked: 0},
|
||||
{prop: 'jobTitle', label: '职称', sortable: true, checked: 0},
|
||||
{prop: 'personType', label: '人员类型', sortable: true, checked: 0},
|
||||
{prop: 'userState', label: '在职状态', sortable: true, checked: 0},
|
||||
{prop: 'political', label: '政治面貌'},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
{prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
{prop: 'unionGroupName', label: '工会小组', sortable: true, checked: 0},
|
||||
{prop: 'retiredGroupName', label: '退休小组', sortable: true},
|
||||
{prop: 'retiredPartyBranchName', label: '退休党支部', sortable: true},
|
||||
{prop: 'campusName', label: '所属校区', sortable: true, checked: 0},
|
||||
{prop: 'nation', label: '民族', checked: 0},
|
||||
],
|
||||
|
||||
nonRetiredUserPageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0
|
||||
},
|
||||
nonRetiredUserTableData: [],
|
||||
|
||||
deadDialogVisible: false,
|
||||
deathFormData: {},
|
||||
|
||||
retiredGroupOption: [],
|
||||
retiredPartyBranchOption: [],
|
||||
|
||||
userId: null
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
backUp() {
|
||||
this.$confirm('确定把当前数据备份吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const resp = await $.post(loc() + '/backUp')
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
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.deadDialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.deathFormData = {...row}
|
||||
})
|
||||
},
|
||||
setUserDeathInfo() {
|
||||
this.$refs['deathForm'].validate(async valid => {
|
||||
if (valid) {
|
||||
const {id: userId, deathDate} = this.deathFormData
|
||||
const resp = await $.post(loc() + '/changeToDie', {userId, deathDate})
|
||||
if (resp.code === 0) {
|
||||
this.deadDialogVisible = false
|
||||
this.notifySuccess(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async getRetiredGroup() {
|
||||
const resp = await $.post(loc() + '/retiredGroup')
|
||||
this.retiredGroupOption = resp.data
|
||||
},
|
||||
async getRetiredPartyBranch() {
|
||||
const resp = await $.post(loc() + '/retiredPartyBranch')
|
||||
this.retiredPartyBranchOption = resp.data
|
||||
},
|
||||
|
||||
async openView(row) {
|
||||
this.userId = row.id
|
||||
this.$refs.guava.view()
|
||||
}
|
||||
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
this.unions = await getUnions(null)
|
||||
this.flushUnits()
|
||||
this.getRetiredGroup()
|
||||
this.getRetiredPartyBranch()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,185 +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"
|
||||
placeholder="请输入工号或者姓名查询"></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-item">
|
||||
<div class="search-item-label">所属小组:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属小组" v-model="pageForm.retiredGroupId" style="width: 100%;"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in retiredGroupOption" :label="item.groupName" :value="item.id"
|
||||
:key="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.retiredPartyBranchId" style="width: 100%;"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in retiredPartyBranchOption" :label="item.partyBranchName"
|
||||
:value="item.id" :key="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="100px">
|
||||
<template scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item>
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</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, checked: 0},
|
||||
{prop: 'position', label: '职务', sortable: true, checked: 0},
|
||||
{prop: 'jobTitle', label: '职称', sortable: true, checked: 0},
|
||||
{prop: 'personType', label: '人员类型', sortable: true, checked: 0},
|
||||
{prop: 'userState', label: '在职状态', sortable: true, checked: 0},
|
||||
{prop: 'political', label: '政治面貌'},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
{prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
{prop: 'unionGroupName', label: '工会小组', sortable: true, checked: 0},
|
||||
{prop: 'retiredGroupName', label: '退休小组', sortable: true},
|
||||
{prop: 'retiredPartyBranchName', label: '退休党支部', sortable: true},
|
||||
{prop: 'campusName', label: '所属校区', sortable: true, checked: 0},
|
||||
{prop: 'nation', label: '民族', checked: 0},
|
||||
],
|
||||
|
||||
retiredGroupOption: [],
|
||||
retiredPartyBranchOption: [],
|
||||
}
|
||||
},
|
||||
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()}")
|
||||
}
|
||||
},
|
||||
async getRetiredGroup() {
|
||||
const resp = await $.post(loc() + '/retiredGroup')
|
||||
this.retiredGroupOption = resp.data
|
||||
},
|
||||
async getRetiredPartyBranch() {
|
||||
const resp = await $.post(loc() + '/retiredPartyBranch')
|
||||
this.retiredPartyBranchOption = resp.data
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
this.unions = await getUnions(null)
|
||||
this.flushUnits()
|
||||
this.getRetiredGroup()
|
||||
this.getRetiredPartyBranch()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user