工会关系人员
This commit is contained in:
@@ -81,8 +81,8 @@ module.exports = {
|
||||
clearInterval(signatureInterval)
|
||||
const ts = new Date().getTime() + (Math.floor(Math.random() * (1000 - 1 + 1)) + 1).toString()
|
||||
console.log(ts)
|
||||
this.postAddress = location.protocol + '//' + location.host + '/signature?prefix=' + this.prefix + '&id=' + ts + "&is_value_base64=" + this.is_value_base64
|
||||
//this.postAddress = 'https://zhgh.hmc.edu.cn/signature?prefix=' + this.prefix + '&id=' + ts + "&is_value_base64=" + this.is_value_base64
|
||||
// this.postAddress = location.protocol + '//' + location.host + '/signature?prefix=' + this.prefix + '&id=' + ts + "&is_value_base64=" + this.is_value_base64
|
||||
this.postAddress = 'https://zhgh.hmc.edu.cn/signature?prefix=' + this.prefix + '&id=' + ts + "&is_value_base64=" + this.is_value_base64
|
||||
|
||||
this.showQrCode = true
|
||||
|
||||
|
||||
@@ -0,0 +1,482 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">姓名/工号</div>
|
||||
<div class="search-item-option">
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="flushUnits" @clear="flushUnits" clearable filterable
|
||||
placeholder="所属工会" style="width: 100%;" v-model="pageForm.unionId">
|
||||
<el-option :key="item.id" :label="item.unionname" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属单位</div>
|
||||
<div class="search-item-option">
|
||||
<el-select clearable filterable placeholder="请选择" style="width: 100%"
|
||||
v-model="pageForm.unitId">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属类型</div>
|
||||
<div class="search-item-option">
|
||||
<dict-select v-model="pageForm.specialStaffType" placeholder="特别人员所属类型" @change="doSearch"
|
||||
style="width: 100%" code="SPECIAL_STAFF_TYPE"></dict-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">在职状态</div>
|
||||
<div class="search-item-option">
|
||||
<dict-select v-model="pageForm.userState" placeholder="在职状态" @change="doSearch"
|
||||
style="width: 100%" code="UserState"></dict-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">人员类型</div>
|
||||
<div class="search-item-option">
|
||||
<dict-select v-model="pageForm.personType" placeholder="人员类型" @change="doSearch"
|
||||
style="width: 100%" code="UserType"></dict-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :app="this" label="人员列表" ref="tableTool">
|
||||
<template #func>
|
||||
<el-button size="small" type="primary" @click="personnelAdd">新增人员</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table ref="table" :data="tableData" :size="tableSize" row-key="id"
|
||||
style="width: 100%" @sort-change="pageOrder">
|
||||
<el-table-column :index="indexMethod" header-align="center" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column v-for="column in tableColumns"
|
||||
:key="column.prop"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
header-align="center"
|
||||
show-overflow-tooltip>
|
||||
<template scope="{row}" v-if="column.prop==='personnelRelationUnionName'">
|
||||
<el-tag effect="plain">
|
||||
{{row.personnelRelationUnionName || '无工会'}}
|
||||
</el-tag>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop==='unionRelationUnionName'">
|
||||
<el-tag>
|
||||
{{row.unionRelationUnionName || '无工会'}}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作">
|
||||
<template scope="scope">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button plain size="mini">
|
||||
<i class="el-icon-s-tools"></i>
|
||||
<i class="el-icon-arrow-down"></i>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'view',data:scope.row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'edit',data:scope.row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',data:scope.row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
<template #edit_func>
|
||||
<el-button v-if="!isView" style="width: 100px" type="primary" class="submit-btn" @click="doSubmit">提交</el-button>
|
||||
</template>
|
||||
|
||||
<el-dialog :title="specialStaffTitle" :visible.sync="specialStaffDialog"
|
||||
:close-on-click-modal="false" width="50%">
|
||||
<el-form ref="form" :model="formData" :rules="formRules" label-width="145px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工号" prop="userId">
|
||||
<el-select v-model="formData.userId"
|
||||
:remote-method="queryUser"
|
||||
filterable
|
||||
remote
|
||||
:disabled="isView"
|
||||
reserve-keyword
|
||||
placeholder="请输入工号或者姓名查找"
|
||||
style="width: 100%"
|
||||
@change="getUserInfo">
|
||||
<el-option v-for="item in users"
|
||||
:key="item.id"
|
||||
:label="item.username+'('+item.loginname+')' + '--' + (item.unionName || '无工会') + '('+item.unitName + ')'"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
<!-- <el-input v-model="formData.userName" :disabled="formData.userId!=null" placeholder="工号"></el-input>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="姓名" prop="username">
|
||||
<el-input v-model="formData.username" placeholder="请输入工号查询,查询后自动读取" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属单位(人事关系)" prop="personnelRelationUnitName">
|
||||
<el-input v-model="formData.personnelRelationUnitName" placeholder="请输入工号或姓名查询,查询后自动读取" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属工会(人事关系)" prop="personnelRelationUnionName">
|
||||
<el-input v-model="formData.personnelRelationUnionName" placeholder="请输入工号或姓名查询,查询后自动读取" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<template v-if="isThreeUnit">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属科室(人事关系)" prop="personnelRelationThreeUnitName">
|
||||
<el-input v-model="formData.personnelRelationThreeUnitName" placeholder="请输入工号或姓名查询,查询后自动读取" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工会小组(人事关系)" prop="personnelRelationUnionGroupName">
|
||||
<el-input v-model="formData.personnelRelationUnionGroupName" placeholder="请输入工号或姓名查询,查询后自动读取" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="特殊人员类型" prop="specialStaffType">
|
||||
<dict-select v-model="formData.specialStaffType" placeholder="特别人员所属类型" @change="changeType"
|
||||
style="width: 100%" :disabled="isView" code="SPECIAL_STAFF_TYPE"></dict-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<template v-if="formData.isManyUnit">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span=12>
|
||||
<el-form-item label="所属单位(工会关系)" prop="unionRelationUnitId">
|
||||
<el-select
|
||||
v-model="formData.unionRelationUnitId"
|
||||
filterable
|
||||
clearable
|
||||
:disabled="isView"
|
||||
placeholder="请选择工会关系单位"
|
||||
style="width: 100%"
|
||||
@change="unionRelationUnitChange">
|
||||
<el-option v-for="unit in units" :key="unit.id"
|
||||
:label="unit.name" :value="unit.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span=12>
|
||||
<el-form-item label="所属工会(工会关系)" prop="unionRelationUnionName">
|
||||
<el-input v-model="formData.unionRelationUnionName" placeholder="请选择工会关系单位查询,查询后自动读取" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<template v-if="isThreeUnit">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span=12>
|
||||
<el-form-item label="所属科室(工会关系)" prop="unionRelationThreeUnitId">
|
||||
<el-select
|
||||
v-model="formData.unionRelationThreeUnitId"
|
||||
filterable
|
||||
clearable
|
||||
:disabled="isView"
|
||||
placeholder="请选择工会关系所属科室"
|
||||
style="width: 100%"
|
||||
@change="unionRelationThreeUnitChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="unit in threeUnits"
|
||||
:key="unit.id"
|
||||
:label="unit.name"
|
||||
:value="unit.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span=12>
|
||||
<el-form-item label="工会小组(工会关系)" prop="unionRelationUnionGroupName">
|
||||
<el-input :value="formData.unionRelationUnionGroupName" placeholder="请选择工会关系所属科室,查询后自动读取" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
|
||||
<!-- 杭州医学院多单位人员 -->
|
||||
<template v-if="formData.specialStaffType == 'HMC_RELATION'">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="所属工会(工会关系)" prop="unionRelationUnionId">
|
||||
<el-select v-model="formData.unionRelationUnionId" filterable
|
||||
:disabled="isView" @change="unionRelationUnionChange"
|
||||
clearable placeholder="请选择工会关系所属工会" style="width: 100%">
|
||||
<el-option v-for="item in unionRelationUnionOptions" :key="item.id"
|
||||
:label="item.unionname" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-row :gutter="10">
|
||||
<el-col :span=24>
|
||||
<el-form-item label="备注" prop="specialStaffRemark">
|
||||
<el-input type="textarea" :rows="3" placeholder="请输入人员备注"
|
||||
v-model="formData.specialStaffRemark" maxlength="200" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row v-if="!isView" :gutter="10" style="text-align: right">
|
||||
<el-button class="submit-btn" @click="specialStaffDialog = false">关闭</el-button>
|
||||
<el-button class="submit-btn" @click="doSubmit" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return{
|
||||
isView: true,
|
||||
isThreeUnit: false,
|
||||
tableColumns: [
|
||||
{ prop: 'loginname', label: '工号' },
|
||||
{ prop: 'username', label: '姓名' },
|
||||
{ prop: 'sex', label: '性别' },
|
||||
{ prop: 'mobile', label: '联系电话' },
|
||||
{ prop: 'personType', label: '人员类型', sortable: true },
|
||||
{ prop: 'userState', label: '在职状态', sortable: true },
|
||||
{ prop: 'personnelRelationUnionName', label: '人事关系工会', sortable: true, width: 150 },
|
||||
{ prop: 'personnelRelationUnitName', label: '人事关系单位', sortable: true },
|
||||
{ prop: 'unionRelationUnionName', label: '工会关系工会', sortable: true, width: 150 },
|
||||
{ prop: 'distSpecialStaffType', label: '特别人员类型', sortable: true },
|
||||
// { prop: 'specialStaffRemark', label: '多单位人员备注', sortable: true, checked: 0 }
|
||||
],
|
||||
unions: [],
|
||||
units: [],
|
||||
threeUnits: [],
|
||||
formData: {
|
||||
personnelRelationThreeUnitName: '',
|
||||
personnelRelationUnionGroupName: '',
|
||||
},
|
||||
specialStaffTypeList: [],
|
||||
users: [],
|
||||
formRules: {
|
||||
userId: [{ required: true, message: "请输入工号", trigger: "change" }],
|
||||
specialStaffType: [{ required: true, message: "请选择人员类型", trigger: "change" }],
|
||||
unionRelationUnionId: [{ required: true, message: "请选择工会关系所属工会", trigger: "change" }],
|
||||
specialStaffRemark: [{ required: true, message: "请填写多单位人员备注", trigger: "change" }]
|
||||
},
|
||||
|
||||
specialStaffDialog: false,
|
||||
specialStaffTitle: '',
|
||||
// HMC工会关系工会
|
||||
unionRelationUnionOptions: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
unionRelationUnionChange(val){
|
||||
const unionInfo = this.unionRelationUnionOptions.find(v=> v.id === val)
|
||||
this.formData.unionRelationUnionName = unionInfo.unionname
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const { type, data } = command
|
||||
if (type === 'view') {
|
||||
this.openView(data.userId)
|
||||
} else if (type === 'edit') {
|
||||
this.openEdit(data.userId)
|
||||
} else if (type === 'delete') {
|
||||
this.doDelete(data)
|
||||
}
|
||||
},
|
||||
doDelete(obj) {
|
||||
this.$confirm('确定要删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
$.post('/platform/staff/special/manage/removeSpecialStaff', {userId:obj.userId}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.pageData()
|
||||
this.$message.success(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
openEdit(userId) {
|
||||
this.isView = false
|
||||
this.formData = {}
|
||||
this.getUserInfo(userId)
|
||||
// this.$refs.guava.edit()
|
||||
this.specialStaffDialog = true
|
||||
this.specialStaffTitle = "修改人员"
|
||||
},
|
||||
openView(userId) {
|
||||
this.isView = true
|
||||
this.formData = {}
|
||||
this.getUserInfo(userId)
|
||||
// this.$refs.guava.edit()
|
||||
this.specialStaffDialog = true
|
||||
this.specialStaffTitle = "查看人员信息"
|
||||
},
|
||||
personnelAdd() {
|
||||
this.isView = false
|
||||
this.formData = {}
|
||||
// this.$refs.guava.edit()
|
||||
this.specialStaffDialog = true
|
||||
this.specialStaffTitle = "新增人员"
|
||||
},
|
||||
getUserInfo(id) {
|
||||
if (!id && !this.formData.userId) {
|
||||
return
|
||||
}
|
||||
const url = !this.formData.userId
|
||||
? "/platform/staff/special/manage/getSpecialStaffUserInfo"
|
||||
: "/platform/staff/special/manage/getUserInfo"
|
||||
const param = id ? id : this.formData.userId
|
||||
$.post(url, { userId: param }).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.formData = resp.data
|
||||
if (resp.data && resp.data.unionRelationThreeUnitId) {
|
||||
this.getThreeUnits(resp.data.unionRelationUnitId)
|
||||
}
|
||||
this.queryUser(this.formData.loginname)
|
||||
}
|
||||
})
|
||||
},
|
||||
changeType() {
|
||||
const data = this.specialStaffTypeList.find((v) => v.code === this.formData.specialStaffType)
|
||||
if (data && data.code === "MANY_UNIT") {
|
||||
this.formData.isManyUnit = true
|
||||
}
|
||||
},
|
||||
unionRelationUnitChange(v) {
|
||||
this.$set(this.formData, 'unionRelationThreeUnitId', null)
|
||||
this.$set(this.formData, 'unionRelationUnionGroupName', null)
|
||||
this.threeUnits = []
|
||||
if (v) {
|
||||
this.getThreeUnits(v)
|
||||
}
|
||||
const unit = this.units.find((item) => item.id === v)
|
||||
if (unit) {
|
||||
this.$set(this.formData, "unionRelationUnitId", unit.id)
|
||||
this.$set(this.formData, "unionRelationUnitName", unit.name)
|
||||
this.$set(this.formData, "unionRelationUnionId", unit.unionid)
|
||||
this.$set(this.formData, "unionRelationUnionName", unit.unionname)
|
||||
} else {
|
||||
this.$set(this.formData, "unionRelationUnionId", null)
|
||||
this.$set(this.formData, "unionRelationUnionName", null)
|
||||
}
|
||||
},
|
||||
unionRelationThreeUnitChange(val) {
|
||||
if (val) {
|
||||
const threeUnit = this.threeUnits.find(v => v.id === val)
|
||||
const groupName = threeUnit.groupname ? threeUnit.groupname : null
|
||||
this.$set(this.formData, 'unionRelationThreeUnitId', threeUnit.id)
|
||||
this.$set(this.formData, 'unionRelationThreeUnitName', threeUnit.name)
|
||||
this.$set(this.formData, 'unionRelationUnionGroupId', threeUnit.uniongroupid)
|
||||
this.$set(this.formData, 'unionRelationUnionGroupName', groupName)
|
||||
} else {
|
||||
this.$set(this.formData, 'unionRelationUnionGroupName', null)
|
||||
}
|
||||
},
|
||||
async getThreeUnits(val) {
|
||||
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(val)
|
||||
},
|
||||
queryUser(keyWord) {
|
||||
if (!keyWord) {
|
||||
return
|
||||
}
|
||||
$.post("/platform/staff/special/manage/queryUser", { keyWord }).then((res) => {
|
||||
this.users = res.data
|
||||
})
|
||||
},
|
||||
doSubmit() {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
$.post("/platform/staff/special/manage/addSpecialStaff", {
|
||||
data: JSON.stringify(this.formData)
|
||||
})
|
||||
.then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.formData = {}
|
||||
this.specialStaffDialog = false
|
||||
this.pageData()
|
||||
// this.$refs.guava.index()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.units = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.unions = await getUnions()
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
// if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}") {
|
||||
// this.unions = await getUnions(this.pageForm.unionId)
|
||||
// this.units = await getUnits()
|
||||
// } else {
|
||||
// const unionId = "${@shiro.getPrincipalProperty('unit').getUnionid()}"
|
||||
// this.unions = await getUnions(unionId)
|
||||
// this.units = await this.getUnits(unionId)
|
||||
// }
|
||||
this.unionRelationUnionOptions = await getUnions()
|
||||
|
||||
this.specialStaffTypeList = await getDictByCode('SPECIAL_STAFF_TYPE')
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.isThreeUnit = await getConfigKey('isThreeUnit') === 'true'
|
||||
this.initData()
|
||||
this.pageData()
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -112,7 +112,7 @@ layout("/layouts/platform.html"){
|
||||
type="primary">按品牌导出全部(蛋糕券)
|
||||
</el-button>-->
|
||||
|
||||
<template v-if="judgmentAuthority || ${@shiro.hasRole('H04') || @shiro.hasRole('gh12')}">
|
||||
<template v-if="judgmentAuthority || ${@shiro.hasRole('H04') || @shiro.hasRole('gh01') || @shiro.hasRole('gh12')}">
|
||||
<el-button :disabled="!pageForm.projectId"
|
||||
@click="exportReceiveDetail(true)"
|
||||
icon="el-icon-printer"
|
||||
|
||||
Reference in New Issue
Block a user