会员整改

This commit is contained in:
=
2026-04-11 16:41:11 +08:00
parent 0902cd4613
commit c121492ce1
28 changed files with 1799 additions and 47 deletions
@@ -30,6 +30,14 @@ const COMMON_QUERY = {
<dict-select v-model="pageForm.preparedBys" placeholder="请选择编制类别" @change="doSearch"
code="USER_PREPARED_BY_TYPE" multiple collapse-tags></dict-select>
</search-item>
<search-item label="人员分类">
<dict-select v-model="pageForm.aidFundMemberUserType" placeholder="请选择人员分类" @change="doSearch"
code="AIDFUND_MEMBER_USER_TYPE"></dict-select>
</search-item>
<search-item label="人员属性">
<dict-select v-model="pageForm.userAttribute" placeholder="请选择人员属性" @change="doSearch"
code="USER_ATTRIBUTE"></dict-select>
</search-item>
</search>
`,
store,
@@ -45,6 +53,8 @@ const COMMON_QUERY = {
userStates: [],
personTypes: [],
preparedBys: [],
aidFundMemberUserType: '',
userAttribute: '',
}
}
},
@@ -62,12 +62,12 @@ const MEMBER_CHANGE = {
code="USER_ACADEMIC_DEGREE"></dict-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="党政职务">
<el-form-item prop="position">
<el-input v-model="formData.position" placeholder="请输入党政职务"
:disabled="allowFields('position')" maxlength="50"></el-input>
</el-form-item>
</el-descriptions-item>
<!-- <el-descriptions-item label="党政职务">-->
<!-- <el-form-item prop="position">-->
<!-- <el-input v-model="formData.position" placeholder="请输入党政职务"-->
<!-- :disabled="allowFields('position')" maxlength="50"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-descriptions-item>-->
<!--<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, SCHOOL_UNION_MEMBER_ADMIN')">
<el-descriptions-item label="工作单位">
@@ -150,7 +150,19 @@ const MEMBER_CHANGE = {
<dict-select v-model="formData.preparedBy" code="USER_PREPARED_BY_TYPE"
:disabled="allowFields('preparedBy')" style="width: 100%"></dict-select>
</el-form-item>
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item label="人员属性">
<el-form-item prop="userAttribute">
<dict-select v-model="formData.userAttribute" code="USER_ATTRIBUTE"
style="width: 100%"></dict-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="人员分类">
<el-form-item prop="aidFundMemberUserType">
<dict-select v-model="formData.aidFundMemberUserType" code="AIDFUND_MEMBER_USER_TYPE"
style="width: 100%"></dict-select>
</el-form-item>
</el-descriptions-item>
<template v-if="formData.userState == '退休'">
<el-descriptions-item label="退休日期">
@@ -174,7 +186,7 @@ const MEMBER_CHANGE = {
style="width: 100%"></el-date-picker>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
<!-- <el-descriptions-item></el-descriptions-item>-->
</template>
<el-descriptions-item label="会员状态" :span="1.5">
@@ -439,6 +451,8 @@ const MEMBER_CHANGE = {
userState,
personType,
preparedBy,
userAttribute,
aidFundMemberUserType,
idCard,
mobile,
email,
@@ -463,6 +477,8 @@ const MEMBER_CHANGE = {
this.$set(this.formData, "userState", userState)
this.$set(this.formData, "personType", personType)
this.$set(this.formData, "preparedBy", preparedBy)
this.$set(this.formData, "userAttribute", userAttribute)
this.$set(this.formData, "aidFundMemberUserType", aidFundMemberUserType)
this.$set(this.formData, "unitName", unit ? unit.name : null)
this.$set(this.formData, "unitId", unit ? unit.id : null)
this.$set(this.formData, "unionName", union ? union.name : null)
@@ -38,6 +38,14 @@ layout("/layouts/platform.html"){
<dict-select v-model="pageForm.preparedBy" placeholder="请选择编制类别" @change="doSearch"
code="USER_PREPARED_BY_TYPE"></dict-select>
</search-item>
<search-item label="人员分类">
<dict-select v-model="pageForm.aidFundMemberUserType" placeholder="请选择人员分类" @change="doSearch"
code="AIDFUND_MEMBER_USER_TYPE"></dict-select>
</search-item>
<search-item label="人员属性">
<dict-select v-model="pageForm.userAttribute" placeholder="请选择人员属性" @change="doSearch"
code="USER_ATTRIBUTE"></dict-select>
</search-item>
<search-item label="更新日期">
<el-date-picker :picker-options="pickerOptions" @change="changeDateRangeChange"
align="right" end-placeholder="结束日期" format="yyyy-MM-dd"
@@ -50,6 +58,31 @@ layout("/layouts/platform.html"){
<el-card shadow="never" class="mt10">
<table-tool label="人员列表(工会小组或分工会提交的变更还需校工会审核哦)">
<el-button :disabled="!checkUsers.length" @click="openBatchEditMember" class="ml5" icon="el-icon-edit"
size="small" type="primary">
设置会员
</el-button>
<el-button :disabled="!checkUsers.length" @click="openBatchEditAidFundType" class="ml5" icon="el-icon-edit"
size="small" type="primary">
设置人员分类
</el-button>
<el-button :disabled="!checkUsers.length" @click="openBatchEditUserAttribute" class="ml5" icon="el-icon-edit"
size="small" type="primary">
设置人员属性
</el-button>
<el-button :disabled="!checkUsers.length" @click="openBatchEditUserState" class="ml5" icon="el-icon-edit"
size="small" type="primary">
设置在职状态
</el-button>
<el-button :disabled="!checkUsers.length" @click="openUnitMove" class="ml5" icon="el-icon-edit"
size="small" type="primary">
单位调整
</el-button>
<el-radio-group @change="doSearch" class="mr5"
size="small"
v-model="pageForm.isMember">
@@ -107,8 +140,9 @@ layout("/layouts/platform.html"){
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
<el-table :data="tableData" :size="tableSize" @selection-change="tableHandleSelectionChange" @sort-change="pageOrder"
class="vi-table" ref="table" row-key="id" style="width: 100%">
<el-table-column :reserve-selection="true" type="selection"></el-table-column>
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号" type="index" width="80px" fixed="left"></el-table-column>
<el-table-column :label="column.label" :prop="column.prop"
@@ -195,6 +229,241 @@ layout("/layouts/platform.html"){
<template #edit>
<member-all-change ref="memberAllChangeRef"></member-all-change>
</template>
<el-drawer
:before-close="handleClose"
:visible.sync="batchEditUserAttributeVisible"
size="1000px" title="批量设置人员属性">
<el-timeline style="margin-right: 40px">
<el-timeline-item placement="top" timestamp="">
<el-form :model="batchFormDataUserAttribute" label-width="100px" ref="batchFormUserAttribute">
<el-row :gutter="60">
<el-col :span="12">
<el-form-item label="人员属性">
<dict-select
@change="checkUsers.map(v => $set(v, 'userAttribute', batchFormDataUserAttribute.userAttribute))"
clearable code="USER_ATTRIBUTE"
placeholder="请选择人员属性"
style="width: 300px"
v-model="batchFormDataUserAttribute.userAttribute"></dict-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-timeline-item>
<el-timeline-item placement="top" timestamp="">
<el-table :data="checkUsers" class="vi-table" height="70vh" row-key="id" style="width: 100%">
<el-table-column align="center" header-align="center" label="工号" prop="loginname" show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="姓名" prop="username" show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="所属单位" prop="unitName" show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="所属工会" prop="unionName" show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="人员属性" prop="userAttribute" show-overflow-tooltip width="300px">
<template scope="{row}">
<dict-select clearable code="USER_ATTRIBUTE" placeholder="请选择人员属性" style="width: 200px"
v-model="row.userAttribute"></dict-select>
</template>
</el-table-column>
</el-table>
</el-timeline-item>
</el-timeline>
<span style="position: absolute;bottom: 20px;right: 20px">
<el-button @click="batchEditUserAttributeVisible = false;checkUsers=[];$refs.table.clearSelection()">取消</el-button>
<el-button :loading="batchEditLoading" @click="doBatchEditUserAttribute" type="primary">确定</el-button>
</span>
</el-drawer>
<el-drawer
:before-close="handleClose"
:visible.sync="batchEditMemberVisible"
size="1000px" title="批量设置会员">
<el-timeline style="margin-right: 40px">
<el-timeline-item placement="top" timestamp="">
<el-form :model="batchFormDataMember" label-width="100px" ref="batchFormMember">
<el-row :gutter="60">
<el-col :span="12">
<el-form-item label="是否会员">
<el-switch
@change="checkUsers.map(v => $set(v, 'member', batchFormDataMember.member))"
v-model="batchFormDataMember.member"
active-text="是"
inactive-text="否">
</el-switch>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否福利会员">
<el-switch
@change="checkUsers.map(v => $set(v, 'welfareMember', batchFormDataMember.welfareMember))"
v-model="batchFormDataMember.welfareMember"
active-text="是"
inactive-text="否">
</el-switch>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-timeline-item>
<el-timeline-item placement="top" timestamp="">
<el-table :data="checkUsers" class="vi-table" height="70vh" row-key="id" style="width: 100%">
<el-table-column align="center" header-align="center" label="工号" prop="loginname" show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="姓名" prop="username" show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="所属单位" prop="unitName" show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="所属工会" prop="unionName" show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="是否会员" prop="member" show-overflow-tooltip width="150px">
<template scope="{row}">
<el-switch v-model="row.member" active-text="是" inactive-text="否"></el-switch>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="是否福利会员" prop="welfareMember" show-overflow-tooltip width="150px">
<template scope="{row}">
<el-switch v-model="row.welfareMember" active-text="是" inactive-text="否"></el-switch>
</template>
</el-table-column>
</el-table>
</el-timeline-item>
</el-timeline>
<span style="position: absolute;bottom: 20px;right: 20px">
<el-button @click="batchEditMemberVisible = false;checkUsers=[];$refs.table.clearSelection()">取消</el-button>
<el-button :loading="batchEditLoading" @click="doBatchEditMember" type="primary">确定</el-button>
</span>
</el-drawer>
<el-drawer
:before-close="handleClose"
:visible.sync="batchEditAidFundTypeVisible"
size="1000px" title="批量设置人员分类">
<el-timeline style="margin-right: 40px">
<el-timeline-item placement="top" timestamp="">
<el-form :model="batchFormDataAidFundType" label-width="100px" ref="batchFormAidFundType">
<el-row :gutter="60">
<el-col :span="12">
<el-form-item label="人员分类">
<dict-select
@change="checkUsers.map(v => $set(v, 'aidFundMemberUserType', batchFormDataAidFundType.aidFundMemberUserType))"
clearable code="AIDFUND_MEMBER_USER_TYPE"
placeholder="请选择人员分类"
style="width: 300px"
v-model="batchFormDataAidFundType.aidFundMemberUserType"></dict-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-timeline-item>
<el-timeline-item placement="top" timestamp="">
<el-table :data="checkUsers" class="vi-table" height="70vh" row-key="id" style="width: 100%">
<el-table-column align="center" header-align="center" label="工号" prop="loginname" show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="姓名" prop="username" show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="所属单位" prop="unitName" show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="所属工会" prop="unionName" show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="人员分类" prop="aidFundMemberUserType" show-overflow-tooltip width="300px">
<template scope="{row}">
<dict-select clearable code="AIDFUND_MEMBER_USER_TYPE" placeholder="请选择人员分类" style="width: 200px"
v-model="row.aidFundMemberUserType"></dict-select>
</template>
</el-table-column>
</el-table>
</el-timeline-item>
</el-timeline>
<span style="position: absolute;bottom: 20px;right: 20px">
<el-button @click="batchEditAidFundTypeVisible = false;checkUsers=[];$refs.table.clearSelection()">取消</el-button>
<el-button :loading="batchEditLoading" @click="doBatchEditAidFundType" type="primary">确定</el-button>
</span>
</el-drawer>
<el-drawer
:before-close="handleClose"
:visible.sync="batchEditUserStateVisible"
size="1000px" title="批量设置在职状态">
<el-timeline style="margin-right: 40px">
<el-timeline-item placement="top" timestamp="">
<el-form :model="batchFormDataUserState" label-width="100px" ref="batchFormUserState">
<el-row :gutter="60">
<el-col :span="12">
<el-form-item label="在职状态">
<dict-select
@change="checkUsers.map(v => $set(v, 'userState', batchFormDataUserState.userState))"
clearable code="USER_STATE"
placeholder="请选择在职状态"
style="width: 300px"
v-model="batchFormDataUserState.userState"></dict-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-timeline-item>
<el-timeline-item placement="top" timestamp="">
<el-table :data="checkUsers" class="vi-table" height="70vh" row-key="id" style="width: 100%">
<el-table-column align="center" header-align="center" label="工号" prop="loginname" show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="姓名" prop="username" show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="所属单位" prop="unitName" show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="所属工会" prop="unionName" show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="在职状态" prop="userState" show-overflow-tooltip width="300px">
<template scope="{row}">
<dict-select clearable code="USER_STATE" placeholder="请选择在职状态" style="width: 200px"
v-model="row.userState"></dict-select>
</template>
</el-table-column>
</el-table>
</el-timeline-item>
</el-timeline>
<span style="position: absolute;bottom: 20px;right: 20px">
<el-button @click="batchEditUserStateVisible = false;checkUsers=[];$refs.table.clearSelection()">取消</el-button>
<el-button :loading="batchEditLoading" @click="doBatchEditUserState" type="primary">确定</el-button>
</span>
</el-drawer>
<el-drawer
:before-close="handleClose"
:visible.sync="unitMoveVisible"
size="1000px" title="批量单位调整">
<el-timeline style="margin-right: 40px">
<el-timeline-item placement="top" timestamp="">
<el-form :model="unitMoveFormData" label-width="100px" ref="unitMoveForm">
<el-row :gutter="60">
<el-col :span="12">
<el-form-item label="所属工会">
<el-select clearable filterable placeholder="请选择所属工会" style="width: 300px"
v-model="unitMoveFormData.unionId" @change="moveUnionsChange">
<el-option v-for="item in unitMoveUnions" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所属单位">
<el-select clearable filterable placeholder="请选择所属单位" style="width: 300px"
v-model="unitMoveFormData.unitId" @change="moveUnitChange">
<el-option v-for="item in unitMoveUnits" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-timeline-item>
<el-timeline-item placement="top" timestamp="">
<el-table :data="checkUsers" class="vi-table" height="70vh" row-key="id" style="width: 100%">
<el-table-column align="center" header-align="center" label="工号" prop="loginname" show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="姓名" prop="username" show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="当前单位" prop="unitName" show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="当前工会" prop="unionName" show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="调整后工会" show-overflow-tooltip>
<template>{{ unitMoveFormData.unionName }}</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="调整后单位" show-overflow-tooltip>
<template>{{ unitMoveFormData.unitName }}</template>
</el-table-column>
</el-table>
</el-timeline-item>
</el-timeline>
<span style="position: absolute;bottom: 20px;right: 20px">
<el-button @click="unitMoveVisible = false;checkUsers=[];$refs.table.clearSelection()">取消</el-button>
<el-button :loading="batchEditLoading" @click="doUnitMove" type="primary">确定</el-button>
</span>
</el-drawer>
</guava>
</div>
@@ -244,10 +513,31 @@ layout("/layouts/platform.html"){
changed: 2,
isMember: 1,
changeTypes: [],
aidFundMemberUserType: "",
userAttribute: "",
},
unions: [],
units: [],
id: "",
checkUsers: [],
batchEditLoading: false,
batchEditUserAttributeVisible: false,
batchEditMemberVisible: false,
batchEditAidFundTypeVisible: false,
batchEditUserStateVisible: false,
unitMoveVisible: false,
batchFormDataUserAttribute: {},
batchFormDataMember: {member: false, welfareMember: false},
batchFormDataAidFundType: {},
batchFormDataUserState: {},
unitMoveFormData: {
unitId: "",
unionId: "",
unitName: "",
unionName: ""
},
unitMoveUnions: [],
unitMoveUnits: [],
tableColumns: [
{ prop: "loginname", label: "工号", width: 120, fixed: "left"},
{ prop: "username", label: "姓名", width: 120, fixed: "left" },
@@ -258,11 +548,13 @@ layout("/layouts/platform.html"){
{ prop: "mobile", label: "联系电话", width: 120 },
{ prop: "political", label: "政治面貌", width: 120, sortable: true},
{ prop: "userState", label: "在职状态", width: 120, sortable: true },
{ prop: "personType", label: "教职工类别", width: 120, sortable: true },
{ prop: "personType", label: "教职工类别", width: 120, sortable: true, checked: 0 },
{ prop: "preparedBy", label: "编制类别", width: 120, sortable: true },
{ prop: "postDoctoralJoinDate", label: "进站时间", sortable: true, checked: 0 },
{ prop: "unionName", label: "所属工会", width: 120, sortable: true },
{ prop: "unitName", label: "所属单位", width: 120, sortable: true },
{ prop: "userAttribute", label: "人员属性", width: 120, sortable: true },
{ prop: "aidFundMemberUserType", label: "人员分类", width: 120, sortable: true },
{ prop: "idCardType", label: "证件类型", width: 120, sortable: true, checked: 0 },
{ prop: "idCard", label: "证件号码", width: 120, sortable: true, checked: 0 },
{ prop: "marriage", label: "婚姻状况", width: 120, sortable: true, checked: 0 },
@@ -381,7 +673,161 @@ layout("/layouts/platform.html"){
invertCheck() {
const all = this.tableColumns.map(c => c.prop);
this.checkedFields = all.filter(p => !this.checkedFields.includes(p));
}
},
tableHandleSelectionChange(val) {
this.checkUsers = JSON.parse(JSON.stringify([...val]))
},
handleClose(done) {
this.$confirm("确认关闭?").then(() => {
done()
this.checkUsers = []
this.$refs.table.clearSelection()
}).catch(() => {})
},
openBatchEditUserAttribute() {
this.batchFormDataUserAttribute = {}
this.batchEditUserAttributeVisible = true
},
openBatchEditMember() {
this.batchFormDataMember = {member: false, welfareMember: false}
this.batchEditMemberVisible = true
},
openBatchEditAidFundType() {
this.batchFormDataAidFundType = {}
this.batchEditAidFundTypeVisible = true
},
openBatchEditUserState() {
this.batchFormDataUserState = {}
this.batchEditUserStateVisible = true
},
async openUnitMove() {
this.unitMoveFormData = {
unitId: "",
unionId: "",
unitName: "",
unionName: ""
}
this.unitMoveUnits = []
this.unitMoveVisible = true
const isAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
if (isAdmin) {
this.unitMoveUnions = await this.$businessTool.listUnion(this.pageForm.unionId)
} else {
this.unitMoveUnions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
}
},
async moveUnionsChange(val) {
if (val) {
this.unitMoveUnits = await this.$businessTool.listUnit(val)
const union = this.unitMoveUnions.find(v => v.id === val)
this.$set(this.unitMoveFormData, "unionName", union ? union.name : "")
this.$set(this.unitMoveFormData, "unitId", "")
this.$set(this.unitMoveFormData, "unitName", "")
} else {
this.$set(this.unitMoveFormData, "unitId", "")
this.$set(this.unitMoveFormData, "unitName", "")
this.$set(this.unitMoveFormData, "unionName", "")
this.unitMoveUnits = []
}
},
moveUnitChange(val) {
if (val) {
const unit = this.unitMoveUnits.find(v => v.id === val)
this.$set(this.unitMoveFormData, "unitName", unit ? unit.name : "")
} else {
this.$set(this.unitMoveFormData, "unitName", "")
}
},
async doBatchEditUserAttribute() {
const batch = this.checkUsers.map(v => {
return {id: v.id, userAttribute: v.userAttribute}
})
this.batchEditLoading = true
const resp = await this.$axios.post("/platform/member/change/manage/batchUpdateUserAttribute", {users: JSON.stringify(batch)})
if (resp.code === 0) {
this.$message.success(resp.msg)
this.pageData()
this.$refs.table.clearSelection()
this.batchEditUserAttributeVisible = false
this.checkUsers = []
} else {
this.$message.error(resp.msg)
}
this.batchEditLoading = false
},
async doBatchEditMember() {
const batch = this.checkUsers.map(v => {
return {id: v.id, member: v.member, welfareMember: v.welfareMember}
})
this.batchEditLoading = true
const resp = await this.$axios.post("/platform/member/change/manage/batchUpdateMember", {users: JSON.stringify(batch)})
if (resp.code === 0) {
this.$message.success(resp.msg)
this.pageData()
this.$refs.table.clearSelection()
this.batchEditMemberVisible = false
this.checkUsers = []
} else {
this.$message.error(resp.msg)
}
this.batchEditLoading = false
},
async doBatchEditAidFundType() {
const batch = this.checkUsers.map(v => {
return {id: v.id, aidFundMemberUserType: v.aidFundMemberUserType}
})
this.batchEditLoading = true
const resp = await this.$axios.post("/platform/member/change/manage/batchUpdateAidFundType", {users: JSON.stringify(batch)})
if (resp.code === 0) {
this.$message.success(resp.msg)
this.pageData()
this.$refs.table.clearSelection()
this.batchEditAidFundTypeVisible = false
this.checkUsers = []
} else {
this.$message.error(resp.msg)
}
this.batchEditLoading = false
},
async doBatchEditUserState() {
const batch = this.checkUsers.map(v => {
return {id: v.id, userState: v.userState}
})
this.batchEditLoading = true
const resp = await this.$axios.post("/platform/member/change/manage/batchUpdateUserState", {users: JSON.stringify(batch)})
if (resp.code === 0) {
this.$message.success(resp.msg)
this.pageData()
this.$refs.table.clearSelection()
this.batchEditUserStateVisible = false
this.checkUsers = []
} else {
this.$message.error(resp.msg)
}
this.batchEditLoading = false
},
async doUnitMove() {
if (!this.unitMoveFormData.unitId) {
this.$message.warning("请选择新单位!")
return
}
const params = {
unitId: this.unitMoveFormData.unitId,
userIds: JSON.stringify(this.checkUsers.map(v => v.id))
}
this.batchEditLoading = true
const resp = await this.$axios.post("/platform/member/change/manage/unitMove", params)
if (resp.code === 0) {
this.$message.success(resp.msg)
this.pageData()
this.$refs.table.clearSelection()
this.unitMoveVisible = false
this.checkUsers = []
} else {
this.$message.error(resp.msg)
}
this.batchEditLoading = false
}
},
computed: {
showColumns() {
@@ -35,6 +35,14 @@ layout("/layouts/platform.html"){
<dict-select v-model="pageForm.changeType" placeholder="变更类型" @change="doSearch"
code="MEMBER_CHANGE_TYPE"></dict-select>
</search-item>
<search-item label="人员分类">
<dict-select v-model="pageForm.aidFundMemberUserType" placeholder="请选择人员分类" @change="doSearch"
code="AIDFUND_MEMBER_USER_TYPE"></dict-select>
</search-item>
<search-item label="人员属性">
<dict-select v-model="pageForm.userAttribute" placeholder="请选择人员属性" @change="doSearch"
code="USER_ATTRIBUTE"></dict-select>
</search-item>
</search>
</el-card>
@@ -132,6 +140,16 @@ layout("/layouts/platform.html"){
unions: [],
units: [],
changeTypeData: [],
pageForm: {
searchKeyword: "",
unionId: "",
unitId: "",
userState: "",
personType: "",
changeType: "",
aidFundMemberUserType: "",
userAttribute: ""
}
}
},
components: {
@@ -1,4 +1,4 @@
const MEMBER_INFO = {
const MEMBER_INFO = {
template: /*language=html*/ `
<div>
<!-- 基本信息 -->
@@ -16,7 +16,7 @@
<!-- 第 3 行 -->
<el-descriptions-item label="证件类型">{{ viewData.idCardType }}</el-descriptions-item>
<el-descriptions-item label="身份证号码">{{ viewData.idcard }}</el-descriptions-item>
<el-descriptions-item label="身份证号码">{{ viewData.idCard }}</el-descriptions-item>
<el-descriptions-item label="联系电话">{{ viewData.mobile }}</el-descriptions-item>
<!-- 第 4 行 -->
@@ -64,7 +64,7 @@
<el-descriptions-item label="所属校区">{{ viewData.campus }}</el-descriptions-item>
<!-- 第 2 行 -->
<el-descriptions-item label="校时间">{{ viewData.arrivalAtSchoolDate ? $moment(viewData.arrivalAtSchoolDate).format('YYYY-MM-DD') : null }}</el-descriptions-item>
<el-descriptions-item label="校时间">{{ viewData.arrivalAtSchoolDate ? $moment(viewData.arrivalAtSchoolDate).format('YYYY-MM-DD') : null }}</el-descriptions-item>
<el-descriptions-item label="从教年月">{{ viewData.teachingTime ? $moment(viewData.teachingTime).format('YYYY-MM-DD') : null }}</el-descriptions-item>
<el-descriptions-item label="预/已离校时间">{{ viewData.expectedLeaveSchoolDate ? $moment(viewData.expectedLeaveSchoolDate).format('YYYY-MM-DD') : null }}</el-descriptions-item>
@@ -82,6 +82,9 @@
<el-descriptions-item label="行政级别(管理岗位)">{{ viewData.administrativeLevel }}</el-descriptions-item>
<el-descriptions-item label="岗级">{{ viewData.positionLevel }}</el-descriptions-item>
<el-descriptions-item label="行政岗级">{{ viewData.administrativePositionLevel }}</el-descriptions-item>
<el-descriptions-item label="人员分类">{{ viewData.aidFundMemberUserType }}</el-descriptions-item>
<el-descriptions-item label="人员属性">{{ viewData.userAttribute }}</el-descriptions-item>
</el-descriptions>
</div>
`,
@@ -100,4 +103,4 @@
})
}
}
}
};
@@ -45,6 +45,14 @@ const COMMON_QUERY = {
<dict-select v-model="pageForm.preparedBys" placeholder="请选择编制类别" @change="doSearch"
code="USER_PREPARED_BY_TYPE" multiple collapse-tags></dict-select>
</search-item>
<search-item label="人员分类">
<dict-select v-model="pageForm.aidFundMemberUserType" placeholder="请选择人员分类" @change="doSearch"
code="AIDFUND_MEMBER_USER_TYPE"></dict-select>
</search-item>
<search-item label="人员属性">
<dict-select v-model="pageForm.userAttribute" placeholder="请选择人员属性" @change="doSearch"
code="USER_ATTRIBUTE"></dict-select>
</search-item>
</search>
`,
store,
@@ -68,6 +76,8 @@ const COMMON_QUERY = {
userStates: [],
personTypes: [],
preparedBys: [],
aidFundMemberUserType: '',
userAttribute: '',
}
}
},
@@ -0,0 +1,348 @@
const MEMBER_ADD_FORM = {
template: /*language=HTML*/ `
<div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix="" class="flow-task-form">
<el-descriptions :column="3" border>
<el-descriptions-item label="工号">
<el-form-item prop="loginname">
<el-input v-model="formData.loginname" placeholder="请输入工号" size="small"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="姓名">
<el-form-item prop="username">
<el-input v-model="formData.username" placeholder="请输入姓名" size="small"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="性别">
<el-form-item prop="sex">
<el-radio-group v-model="formData.sex" size="small">
<el-radio border label="男">男</el-radio>
<el-radio border label="女">女</el-radio>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="民族">
<el-form-item prop="nation">
<dict-select style="width: 100%" placeholder="请选择民族" v-model="formData.nation"
code="USER_NATION"></dict-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="出生日期">
<el-form-item prop="birthday">
<el-date-picker v-model="formData.birthday" type="date"
placeholder="请选择出生日期"
value-format="yyyy-MM-dd"
style="width: 100%"></el-date-picker>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="政治面貌">
<el-form-item prop="political">
<dict-select style="width: 100%" placeholder="请选择政治面貌" v-model="formData.political"
code="USER_POLITICAL"></dict-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="学历">
<el-form-item prop="education">
<dict-select style="width: 100%" placeholder="请选择学历" v-model="formData.education"
code="USER_EDUCATION"></dict-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="学位">
<el-form-item prop="academicDegree">
<dict-select style="width: 100%" placeholder="请选择学位" v-model="formData.academicDegree"
code="USER_ACADEMIC_DEGREE"></dict-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="职称">
<el-form-item prop="professionalTitle">
<dict-select v-model="formData.professionalTitle" code="TECHNICAL_TITLE_LEVEL"
style="width: 100%"></dict-select>
</el-form-item>
</el-descriptions-item>
<!-- <el-descriptions-item label="党政职务">-->
<!-- <el-form-item prop="position">-->
<!-- <el-input v-model="formData.position" placeholder="请输入党政职务"-->
<!-- maxlength="50"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-descriptions-item>-->
<el-descriptions-item label="所属单位">
<el-form-item prop="unitId">
<el-select clearable filterable placeholder="请选择所属单位" style="width: 100%"
@change="getUnionName"
v-model="formData.unitId">
<el-option :key="item.id" :label="item.name" :value="item.id"
v-for="item in units"></el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="所属工会">
<el-form-item prop="unionId">
<el-select disabled clearable filterable placeholder="请选择所属工会" style="width: 100%"
v-model="formData.unionId">
<el-option :key="item.id" :label="item.name" :value="item.id"
v-for="item in unions"></el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="所属校区">
<el-form-item prop="campus">
<dict-select style="width: 100%" placeholder="请选择所属校区" v-model="formData.campus"
code="USER_CAMPUS"></dict-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="在职状态">
<el-form-item prop="userState">
<dict-select v-model="formData.userState" code="USER_STATE"
style="width: 100%"></dict-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="人员属性">
<el-form-item prop="userAttribute">
<dict-select v-model="formData.userAttribute" code="USER_ATTRIBUTE"
style="width: 100%"></dict-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="人员分类">
<el-form-item prop="aidFundMemberUserType">
<dict-select v-model="formData.aidFundMemberUserType" code="AIDFUND_MEMBER_USER_TYPE"
style="width: 100%"></dict-select>
</el-form-item>
</el-descriptions-item>
<!-- <el-descriptions-item label="编制类别">-->
<!-- <el-form-item prop="preparedBy">-->
<!-- <dict-select v-model="formData.preparedBy" code="USER_PREPARED_BY_TYPE"-->
<!-- style="width: 100%"></dict-select>-->
<!-- </el-form-item>-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item label="教职工类别">-->
<!-- <el-form-item prop="personType">-->
<!-- <dict-select v-model="formData.personType" code="USER_PERSON_TYPE"-->
<!-- style="width: 100%"></dict-select>-->
<!-- </el-form-item>-->
<!-- </el-descriptions-item>-->
<el-descriptions-item label="身份证号码">
<el-form-item prop="idCard">
<el-input v-model="formData.idCard" placeholder="请输入身份证号码" maxlength="18"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="联系电话">
<el-form-item prop="mobile">
<el-input v-model="formData.mobile" placeholder="请输入联系电话" maxlength="32"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="电子邮箱">
<el-form-item prop="email">
<el-input v-model="formData.email" placeholder="请输入电子邮箱" maxlength="50"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="婚姻状况">
<el-form-item prop="marriage">
<dict-select v-model="formData.marriage" code="USER_MARRIAGE"
style="width: 100%"></dict-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="入校时间">
<el-form-item prop="arrivalAtSchoolDate">
<el-date-picker v-model="formData.arrivalAtSchoolDate" type="date"
placeholder="请选择入校时间"
value-format="yyyy-MM-dd"
style="width: 100%"></el-date-picker>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="工作时间">
<el-form-item prop="workDate">
<el-date-picker v-model="formData.workDate" type="date"
placeholder="请选择工作时间"
value-format="yyyy-MM-dd"
style="width: 100%"></el-date-picker>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="家庭住址" :span="3">
<el-form-item prop="homeAddress">
<el-input v-model="formData.homeAddress" placeholder="请输入家庭住址" maxlength="100"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="家庭主要成员" :span="3">
<el-form-item prop="families">
<el-table :data="formData.families" border size="small">
<el-table-column label="关系" prop="relation">
<template slot-scope="{row}">
<el-input v-model="row.relation" maxlength="50"
placeholder="请输入与本人关系"></el-input>
</template>
</el-table-column>
<el-table-column label="姓名" prop="name">
<template slot-scope="{row}">
<el-input v-model="row.name" maxlength="50" placeholder="请输入姓名"></el-input>
</template>
</el-table-column>
<el-table-column label="工作单位" prop="unit">
<template slot-scope="{row}">
<el-input v-model="row.unit" maxlength="100"
placeholder="请输入工作单位"></el-input>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark">
<template slot-scope="{row}">
<el-input v-model="row.remark" maxlength="100" placeholder="请输入备注"></el-input>
</template>
</el-table-column>
<el-table-column width="100px">
<template slot="header" slot-scope="scope">
<el-button type="primary" size="mini"
@click="formData.families.push({})">添加
</el-button>
</template>
<template slot-scope="scope">
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="formData.families.length===0"
@click="formData.families.splice(scope.$index,1)"
></el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="个人简况" :span="3">
<el-form-item prop="personalData">
<text-editor v-model="formData.personalData"></text-editor>
</el-form-item>
</el-descriptions-item>
<!-- <el-descriptions-item label="会员状态">-->
<!-- <el-form-item prop="member">-->
<!-- <el-switch v-model="formData.member" active-text="是" inactive-text="否"></el-switch>-->
<!-- </el-form-item>-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item label="福利会员状态">-->
<!-- <el-form-item prop="welfareMember">-->
<!-- <el-switch v-model="formData.welfareMember" active-text="是" inactive-text="否"></el-switch>-->
<!-- </el-form-item>-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item></el-descriptions-item>-->
<el-descriptions-item label="特长及获奖情况" :span="3">
<el-form-item prop="specialty">
<text-editor v-model="formData.specialty"></text-editor>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
</el-form>
<div style="margin-top: 20px; text-align: right;">
<el-button @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleSubmit" :loading="submitLoading">提交</el-button>
</div>
</div>
`,
store,
dicts: ["USER_NATION", "USER_POLITICAL", "USER_EDUCATION", "USER_ACADEMIC_DEGREE", "USER_CAMPUS",
"USER_STATE", "USER_PREPARED_BY_TYPE", "USER_PERSON_TYPE", "USER_MARRIAGE","AIDFUND_MEMBER_USER_TYPE","USER_ATTRIBUTE"],
data() {
return {
formData: {
loginname: '',
username: '',
sex: '男',
nation: '',
birthday: '',
political: '',
education: '',
academicDegree: '',
position: '',
unitId: '',
unionId: '',
campus: '',
userState: '',
preparedBy: '',
personType: '',
idCard: '',
mobile: '',
email: '',
marriage: '',
arrivalAtSchoolDate: '',
homeAddress: '',
families: [],
personalData: '',
specialty: '',
member: false,
welfareMember: false
},
formRules: {
loginname: [{ required: true, message: '请输入工号', trigger: 'blur' }],
username: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
sex: [{ required: true, message: '请选择性别', trigger: 'change' }],
idCard: [{ required: true, message: '请输入身份证号码', trigger: 'blur' }],
mobile: [{ required: true, message: '请输入联系电话', trigger: 'blur' }],
unitId: [{ required: true, message: '请选择工作单位', trigger: 'change' }],
unionId: [{ required: true, message: '请选择所属工会', trigger: 'change' }],
userState: [{ required: true, message: '请选择在职状态', trigger: 'change' }]
},
units: [],
unions: [],
submitLoading: false
}
},
methods: {
async initUnits() {
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
this.units = await this.$businessTool.listUnit()
this.unions = await this.$businessTool.listUnion()
} else {
this.units = await this.$businessTool.listUnit(this.$store.state.user.union.id)
this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
}
},
async getUnionName(unitId) {
const unit = this.units.find(u => u.id === unitId)
if (unit && unit.unionId) {
this.formData.unionId = unit.unionId
}
},
handleSubmit() {
this.$refs.formRef.validate((valid) => {
if (!valid) {
return
}
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const loading = createLoading()
this.$axios.post('/platform/member/info/input/add', this.formData).then(res => {
if (res.code === 0) {
this.$message.success(res.msg)
commonUtil.pjaxPush("/platform/member/info/input")
}
}).finally(() => {
loading.close()
})
})
})
},
handleCancel() {
this.$refs.formRef.resetFields()
this.formData.families = []
this.$parent.$parent.close()
}
},
created() {
this.initUnits()
}
}
@@ -126,11 +126,13 @@ layout("/layouts/platform.html"){
{ prop: "mobile", label: "联系电话", width: 120 },
{ prop: "political", label: "政治面貌", width: 120, sortable: true},
{ prop: "userState", label: "在职状态", width: 120, sortable: true },
{ prop: "personType", label: "教职工类别", width: 120, sortable: true },
{ prop: "personType", label: "教职工类别", width: 120, sortable: true, checked: 0 },
{ prop: "preparedBy", label: "编制类别", width: 120, sortable: true },
{ prop: "postDoctoralJoinDate", label: "进站时间", sortable: true, checked: 0 },
{ prop: "unionName", label: "所属工会", width: 120, sortable: true },
{ prop: "unitName", label: "所属单位", width: 120, sortable: true },
{ prop: "userAttribute", label: "人员属性", width: 120, sortable: true },
{ prop: "aidFundMemberUserType", label: "人员分类", width: 120, sortable: true },
{ prop: "idCardType", label: "证件类型", width: 120, sortable: true, checked: 0 },
{ prop: "idCard", label: "证件号码", width: 120, sortable: true, checked: 0 },
{ prop: "marriage", label: "婚姻状况", width: 120, sortable: true, checked: 0 },
@@ -51,9 +51,15 @@ layout("/layouts/platform.html"){
v-model="pageForm.preparedBy"
placeholder="请选择编制类别"
@change="doSearch"
code="USER_PREPARED_BY_TYPE"
code="USER_PREPARED_BY_TYPE"
></dict-select>
</search-item>
<search-item label="人员分类">
<dict-select v-model="pageForm.aidFundMemberUserType" placeholder="请选择人员分类" @change="doSearch" code="AIDFUND_MEMBER_USER_TYPE"></dict-select>
</search-item>
<search-item label="人员属性">
<dict-select v-model="pageForm.userAttribute" placeholder="请选择人员属性" @change="doSearch" code="USER_ATTRIBUTE"></dict-select>
</search-item>
</search>
</el-card>
@@ -103,13 +109,15 @@ layout("/layouts/platform.html"){
new Vue({
el: "#app",
mixins: [initTableMixins],
dicts: ["USER_STATE", "USER_PERSON_TYPE", "MEMBER_CHANGE_TYPE"],
dicts: ["USER_STATE", "USER_PERSON_TYPE", "MEMBER_CHANGE_TYPE", "AIDFUND_MEMBER_USER_TYPE", "USER_ATTRIBUTE"],
data() {
return {
pageForm: {
year: new Date().getFullYear() - 1 + "",
memberSearchName: "",
memberSearchKeyWord: ""
memberSearchKeyWord: "",
aidFundMemberUserType: "",
userAttribute: ""
},
userId: "",
unions: [],
@@ -0,0 +1,186 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<template>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker
style="width: 100%"
v-model="pageForm.year"
value-format="yyyy"
type="year"
placeholder="请选择年度"
></el-date-picker>
</search-item>
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"></el-input>
</search-item>
<search-item label="模糊查询">
<member-cnd @cnd="(v)=>pageForm={...pageForm,...v}"></member-cnd>
</search-item>
<search-item label="所属工会">
<el-select
@change="flushUnits"
@clear="flushUnits"
clearable
filterable
placeholder="请选择所属工会"
style="width: 100%"
v-model="pageForm.unionId"
>
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unions"></el-option>
</el-select>
</search-item>
<search-item label="所属单位">
<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>
</search-item>
<search-item label="在职状态">
<dict-select v-model="pageForm.userState" placeholder="请选择在职状态" @change="doSearch" code="USER_STATE"></dict-select>
</search-item>
<search-item label="教职工类别">
<dict-select v-model="pageForm.personType" placeholder="请选择教职工类别" @change="doSearch" code="USER_PERSON_TYPE"></dict-select>
</search-item>
<search-item label="编制类别">
<dict-select
v-model="pageForm.preparedBy"
placeholder="请选择编制类别"
@change="doSearch"
code="USER_PREPARED_BY_TYPE"
></dict-select>
</search-item>
<search-item label="人员分类">
<dict-select v-model="pageForm.aidFundMemberUserType" placeholder="请选择人员分类" @change="doSearch" code="AIDFUND_MEMBER_USER_TYPE"></dict-select>
</search-item>
<search-item label="人员属性">
<dict-select v-model="pageForm.userAttribute" placeholder="请选择人员属性" @change="doSearch" code="USER_ATTRIBUTE"></dict-select>
</search-item>
</search>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="用户列表">
<el-button class="m10" type="primary" size="small" @click="openAdd">新增人员</el-button>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" class="vi-table" ref="table" row-key="id" style="width: 100%">
<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-column label="操作" width="100px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini">查看</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<member-info ref="memberInfoRef"></member-info>
</template>
<template #edit>
<member-add-form ref="memberAddFormRef"></member-add-form>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/info/memberInfo.js"){}#-->
<!--#include("../common/memberAddForm.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
dicts: ["USER_STATE", "USER_PERSON_TYPE", "MEMBER_CHANGE_TYPE","AIDFUND_MEMBER_USER_TYPE","USER_ATTRIBUTE"],
data() {
return {
pageForm: {
year: new Date().getFullYear() - 1 + "",
memberSearchName: "",
memberSearchKeyWord: ""
},
userId: "",
unions: [],
units: [],
addDialogVisible: false,
tableColumns: [
{ prop: "loginname", label: "工号" },
{ prop: "username", label: "姓名" },
{ prop: "sex", label: "性别" },
{ prop: "mobile", label: "联系电话" },
{ prop: "userState", label: "在职状态", sortable: true },
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true },
{ prop: "createdAtStr", label: "录入时间", sortable: true },
{ prop: "createdByUsername", label: "录入人", sortable: true },
]
}
},
components: {
"member-cnd": httpVueLoader("/components/module/member/MemberCnd.vue?v=" + new Date().getTime()),
"member-info": MEMBER_INFO,
"member-add-form": MEMBER_ADD_FORM
},
methods: {
openAdd() {
this.$refs.guava.edit(() => {
// 可以在这里初始化表单数据
})
},
handleAddSuccess() {
this.doSearch()
},
openView(row) {
this.$refs.guava.view(() => {
this.$refs.memberInfoRef.onOpen(row.userId)
})
},
async initData() {
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
this.unions = await this.$businessTool.listUnion(this.pageForm.unionId)
this.units = await this.$businessTool.listUnit()
} else {
this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
this.units = await this.$businessTool.listUnit(this.$store.state.user.union.id)
}
},
async flushUnits() {
this.$set(this.pageForm, "unitId", null)
this.units = []
if (this.pageForm.unionId) {
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
}
}
},
created() {
this.pageData()
this.initData()
}
})
</script>
<!--#
}
#-->
@@ -158,11 +158,13 @@ layout("/layouts/platform.html"){
{ prop: "mobile", label: "联系电话", width: 120 },
{ prop: "political", label: "政治面貌", width: 120, sortable: true},
{ prop: "userState", label: "在职状态", width: 120, sortable: true },
{ prop: "personType", label: "教职工类别", width: 120, sortable: true },
{ prop: "personType", label: "教职工类别", width: 120, sortable: true, checked: 0 },
{ prop: "preparedBy", label: "编制类别", width: 120, sortable: true },
{ prop: "postDoctoralJoinDate", label: "进站时间", sortable: true, checked: 0 },
{ prop: "unionName", label: "所属工会", width: 120, sortable: true },
{ prop: "unitName", label: "所属单位", width: 120, sortable: true },
{ prop: "userAttribute", label: "人员属性", width: 120, sortable: true },
{ prop: "aidFundMemberUserType", label: "人员分类", width: 120, sortable: true },
{ prop: "idCardType", label: "证件类型", width: 120, sortable: true, checked: 0 },
{ prop: "idCard", label: "证件号码", width: 120, sortable: true, checked: 0 },
{ prop: "marriage", label: "婚姻状况", width: 120, sortable: true, checked: 0 },
@@ -201,6 +203,8 @@ layout("/layouts/platform.html"){
pageForm.sexTypes = JSON.stringify(this.pageForm.sexTypes)
pageForm.memberTypes = JSON.stringify(this.pageForm.memberTypes)
pageForm.personTypes = JSON.stringify(this.pageForm.personTypes)
pageForm.aidFundMemberUserTypes = JSON.stringify(this.pageForm.aidFundMemberUserTypes)
pageForm.userAttributes = JSON.stringify(this.pageForm.userAttributes)
pageForm.userStates = JSON.stringify(this.pageForm.userStates)
const data = this.tableColumns.filter(item => this.checkedFields.includes(item.prop)).map(item => {
return {prop: item.prop, label: item.label}
@@ -224,6 +228,8 @@ layout("/layouts/platform.html"){
pageForm.sexTypes = JSON.stringify(this.pageForm.sexTypes)
pageForm.memberTypes = JSON.stringify(this.pageForm.memberTypes)
pageForm.personTypes = JSON.stringify(this.pageForm.personTypes)
pageForm.aidFundMemberUserTypes = JSON.stringify(this.pageForm.aidFundMemberUserTypes)
pageForm.userAttributes = JSON.stringify(this.pageForm.userAttributes)
pageForm.preparedBys = JSON.stringify(this.pageForm.preparedBys)
pageForm.memberStatus = JSON.stringify(this.pageForm.memberStatus)
pageForm.userStates = JSON.stringify(this.pageForm.userStates)
@@ -112,6 +112,56 @@ const MEMBER_STATISTICS_COMPREHENSIVE_QUERY_FORM = {
</el-col>
</el-row>
<el-row type="flex" align="middle" class="query-row query-row-tag">
<el-col class="query-row-title">人员分类:</el-col>
<el-col class="query-row-content query-row-content-tag">
<el-tag
style="margin-right: 10px;cursor: pointer"
v-for="item in aidFundMemberUserTypeOptions"
:key="item.code"
:type="item.name"
:effect="pageForm.aidFundMemberUserTypes.includes(item.code)?'dark':'plain'"
@click="tagClick('aidFundMemberUserTypes',item.code)">
{{ item.name }}
</el-tag>
<el-link type="danger"
v-if="aidFundMemberUserTypeOptions.length&&pageForm.aidFundMemberUserTypes.length"
:underline="false"
@click="pageForm.aidFundMemberUserTypes=[];doSearch()">清空
</el-link>
<el-link :underline="false"
@click="pageForm.aidFundMemberUserTypes=aidFundMemberUserTypeOptions.map(p=>p.code);doSearch()"
type="success">全部
</el-link>
</el-col>
</el-row>
<el-row type="flex" align="middle" class="query-row query-row-tag">
<el-col class="query-row-title">人员属性:</el-col>
<el-col class="query-row-content query-row-content-tag">
<el-tag
style="margin-right: 10px;cursor: pointer"
v-for="item in userAttributeOptions"
:key="item.code"
:type="item.name"
:effect="pageForm.userAttributes.includes(item.code)?'dark':'plain'"
@click="tagClick('userAttributes',item.code)">
{{ item.name }}
</el-tag>
<el-link type="danger"
v-if="userAttributeOptions.length&&pageForm.userAttributes.length"
:underline="false"
@click="pageForm.userAttributes=[];doSearch()">清空
</el-link>
<el-link :underline="false"
@click="pageForm.userAttributes=userAttributeOptions.map(p=>p.code);doSearch()"
type="success">全部
</el-link>
</el-col>
</el-row>
<el-row type="flex" align="middle" class="query-row">
<el-col class="query-row-content">
<el-row>
@@ -208,6 +258,8 @@ const MEMBER_STATISTICS_COMPREHENSIVE_QUERY_FORM = {
searchName: "username",
personTypes: [],
preparedBys: [],
aidFundMemberUserTypes: [],
userAttributes: [],
userStates: [],
memberStatus: [],
year: moment().format("YYYY"),
@@ -224,6 +276,8 @@ const MEMBER_STATISTICS_COMPREHENSIVE_QUERY_FORM = {
},
personTypeOptions: [],
preparedByOptions: [],
aidFundMemberUserTypeOptions: [],
userAttributeOptions: [],
userStateOptions: [],
memberStatusOptions: [],
unions: [],
@@ -315,6 +369,8 @@ const MEMBER_STATISTICS_COMPREHENSIVE_QUERY_FORM = {
this.pageForm.sexTypes = []
this.pageForm.personTypes = []
this.pageForm.preparedBys = []
this.pageForm.aidFundMemberUserTypes = []
this.pageForm.userAttributes = []
this.pageForm.memberStatus = []
this.pageForm.userStates = []
this.pageForm.unionId = []
@@ -352,6 +408,12 @@ const MEMBER_STATISTICS_COMPREHENSIVE_QUERY_FORM = {
this.$businessTool.getDictOptions("USER_PREPARED_BY_TYPE").then((data) => {
this.preparedByOptions = data
})
this.$businessTool.getDictOptions("AIDFUND_MEMBER_USER_TYPE").then((data) => {
this.aidFundMemberUserTypeOptions = data
})
this.$businessTool.getDictOptions("USER_ATTRIBUTE").then((data) => {
this.userAttributeOptions = data
})
this.$businessTool.getDictOptions("USER_STATE").then((data) => {
this.userStateOptions = data
})
@@ -1,6 +1,28 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style> .query-row {
display: flex;
align-items: center;
margin-bottom: 10px;
}
.query-row-title {
width: 120px;
min-width: 120px;
}
.query-row-content {
flex: 1;
display: flex;
flex-wrap: wrap;
align-items: center;
}
.query-row-content-tag {
flex: 1;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
@@ -39,6 +61,33 @@ layout("/layouts/platform.html"){
</el-radio-group>
</search-item>
</search>
</el-card>
<el-card shadow="never" class="mt10">
<el-row type="flex" align="middle" class="query-row query-row-tag">
<el-col class="query-row-title">人员属性:</el-col>
<el-col class="query-row-content query-row-content-tag">
<el-tag style="margin-right: 10px;cursor: pointer"
v-for="item in userAttributeOptions"
:key="item.code"
:type="item.name"
:effect="pageForm.userAttributes.includes(item.code)?'dark':'plain'"
@click="tagClick(item.code)">
{{ item.name }}
</el-tag>
<el-link type="danger"
v-if="userAttributeOptions.length&&pageForm.userAttributes.length"
:underline="false"
@click="pageForm.userAttributes=[];doSearch()">清空
</el-link>
<el-link :underline="false"
@click="pageForm.userAttributes=userAttributeOptions.map(p=>p.code);doSearch()"
type="success">全部
</el-link>
</el-col>
</el-row>
</el-card>
<el-card shadow="never" class="mt10">
@@ -84,9 +133,11 @@ layout("/layouts/platform.html"){
},
unions: [],
units: [],
userAttributeOptions: [],
pageForm: {
currentYear: moment().format("YYYY"),
queryType: "fgh"
queryType: "fgh",
userAttributes: []
}
},
methods: {
@@ -107,9 +158,22 @@ layout("/layouts/platform.html"){
this.units = data
})
}
this.$businessTool.getDictOptions("USER_ATTRIBUTE").then((data) => {
this.userAttributeOptions = data
})
},
tagClick(code) {
if (this.pageForm.userAttributes.includes(code)) {
this.pageForm.userAttributes.splice(this.pageForm.userAttributes.indexOf(code), 1)
} else {
this.pageForm.userAttributes.push(code)
}
this.doSearch()
},
pageData() {
this.$axios.post(loc() + "/pageData", this.pageForm).then((res) => {
const pageForm = clone(this.pageForm)
pageForm.userAttributes = JSON.stringify(this.pageForm.userAttributes)
this.$axios.post(loc() + "/pageData", pageForm).then((res) => {
if (res.code === 0) {
this.tableData = res.data
this.pageForm.totalCount = res.data.totalCount