211 lines
8.7 KiB
HTML
211 lines
8.7 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
|
|
<div id="app" class="platform" v-cloak>
|
|
<guava ref="guava" padding="0">
|
|
<template>
|
|
<!-- <el-card shadow="never">
|
|
<div class="search">
|
|
|
|
|
|
<div class="search-item">
|
|
<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"
|
|
|
|
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
|
|
|
|
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-input placeholder="请输入内容" v-model="pageForm.searchKeyword" clearable="true">
|
|
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询"
|
|
style="width: 100px;">
|
|
<el-option label="工号" value="us.loginname"></el-option>
|
|
<el-option label="姓名" value="us.username"></el-option>
|
|
</el-select>
|
|
</el-input>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="search-query">
|
|
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
|
</div>
|
|
|
|
</div>
|
|
</el-card>-->
|
|
|
|
<search v-model="pageForm" @search="doSearch">
|
|
<template #before>
|
|
<div class="search-item">
|
|
<div class="search-item-label">年度:</div>
|
|
<div class="search-item-option">
|
|
<el-date-picker
|
|
v-model="pageForm.aidFundMemberJoinTime"
|
|
type="year"
|
|
value-format="yyyy" style="width: 100%"
|
|
placeholder="选择年">
|
|
</el-date-picker>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</search>
|
|
|
|
|
|
<el-card shadow="never" class="mt10">
|
|
<table-tool label="人员列表" :app="this">
|
|
<template #func>
|
|
|
|
<el-button icon="el-icon-s-promotion" class="m10" type="primary" size="small"
|
|
:loading="submitLoading" plain
|
|
@click="BatchSettings">批量设置
|
|
</el-button>
|
|
</template>
|
|
</table-tool>
|
|
|
|
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
|
ref="multipleTable"
|
|
v-loading="tableLoading" :size="tableSize" class="vi-table"
|
|
@selection-change="handleSelectionChange">
|
|
<el-table-column :reserve-selection="true"
|
|
type="selection"
|
|
:selectable='checkboxT'
|
|
width="55" disabled>
|
|
</el-table-column>
|
|
<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"
|
|
show-overflow-tooltip
|
|
:label="column.label"
|
|
:prop="column.prop"
|
|
:sortable="column.sortable"
|
|
>
|
|
|
|
</el-table-column>
|
|
</el-table>
|
|
|
|
|
|
<!--#include("/layouts/pagination.html"){}#-->
|
|
</el-card>
|
|
|
|
|
|
</template>
|
|
</guava>
|
|
</div>
|
|
|
|
<script>
|
|
const vue = new Vue({
|
|
el: '#app',
|
|
mixins: [initTableMixins],
|
|
data() {
|
|
return {
|
|
selection: [],
|
|
unions: [],
|
|
units: [],
|
|
pageForm: {
|
|
searchName: "username",
|
|
aidFundMemberJoinTime: new Date().getFullYear() + "",
|
|
isRetirement: 1,
|
|
},
|
|
tableColumns: [
|
|
{prop: 'loginname', label: '工号'},
|
|
{prop: 'username', label: '姓名'},
|
|
{prop: 'sex', label: '性别'},
|
|
{prop: 'mobile', label: '电话'},
|
|
{prop: 'unionname', label: '工会', sortable: true},
|
|
{prop: 'unitname', label: '单位', sortable: true},
|
|
{prop: 'userState', label: '在职状态', sortable: true},
|
|
],
|
|
}
|
|
},
|
|
components: {
|
|
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
|
'search': httpVueLoader('/components/diseaseaid/aidfund/Search.vue?v=1.0.0'),
|
|
},
|
|
methods: {
|
|
checkboxT(row) {
|
|
if (row.stateId) {
|
|
/* console.log(row)
|
|
if (row.stateId == 3013 || row.stateId == 3015 || row.stateId == 3025 || (row.aidFundMemberQuitTime && row.stateId == 3030)) {
|
|
return true;
|
|
}*/
|
|
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
|
|
},
|
|
BatchSettings() {
|
|
if (!this.selection.length) {
|
|
this.$notify({
|
|
title: '警告',
|
|
message: '请先勾选需要设置的用户!',
|
|
type: 'warning'
|
|
});
|
|
return
|
|
}
|
|
this.$confirm('是否将已勾选的人员设置为基金会员?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(async () => {
|
|
this.submitLoading = true
|
|
const resp = await $.post(loc() + "/BatchSettings", {userId: JSON.stringify(this.selection.map(v => v.id))})
|
|
requestLaterMsgFun(this, resp, () => {
|
|
this.pageData()
|
|
this.$refs.multipleTable.clearSelection();
|
|
}, null, () => {
|
|
this.submitLoading = false
|
|
})
|
|
|
|
})
|
|
},
|
|
handleSelectionChange(val) {
|
|
this.selection = val
|
|
},
|
|
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 created() {
|
|
this.pageData();
|
|
this.unions = await getUnions()
|
|
this.flushUnits()
|
|
}
|
|
})
|
|
</script>
|
|
<!--#
|
|
}
|
|
#-->
|