first commit

This commit is contained in:
2026-08-26 14:25:17 +08:00
commit 06debfd1fc
10595 changed files with 1836924 additions and 0 deletions
@@ -0,0 +1,45 @@
<div id="member_apply_branch_union_approval_form">
<el-form :model="formData" ref="formRef" label-width="0" label-suffix="" class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
</el-form>
<snaker-flow-task-form-action @task-action="handleTaskAction" @cancel="handleCancel"></snaker-flow-task-form-action>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: "#member_apply_branch_union_approval_form",
data() {
return {
businessId: GetQueryString("businessId"),
formData: {
tf_opinion: ""
},
}
},
methods: {
handleTaskAction(val) {
console.log(val)
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...val,
...this.formData
})
}).then(res => {
if (res.code === 0) {
this.$message.success("操作成功")
// 发送完成消息
window.GlobalBroadcastChannel.postMessage({
type: "task-complete",
payload: val
})
}
})
},
handleCancel(val) {
console.log(val)
},
}
})
</script>
@@ -0,0 +1,198 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<common-query ref="commonQueryRef" user-attribute-multiple @search="search"></common-query>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="申请列表">
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
<el-radio-button label="true">已审核</el-radio-button>
<el-radio-button label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
<el-table-column
:index="indexMethod"
align="center"
header-align="center"
label="序号"
type="index"
width="80px"
></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
header-align="center"
min-width="100px"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template scope="{row}" v-if="column.prop=='loginname'">
<el-link @click="openView(row)" type="primary">{{row.loginname}}</el-link>
</template>
<template scope="{row}" v-else-if="column.prop=='sign'">
<el-image v-if="row.sign" :src="row.sign" style="height: 60px"></el-image>
<el-tag type="warning" v-else>暂无</el-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='instanceState'">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="200px">
<template scope="{row}">
<el-button size="mini" type="primary" @click="openView(row)">
查看
</el-button>
<el-button v-if="row.taskState === 10" @click="openApproval(row)" size="mini" type="primary">
审核
</el-button>
<el-button v-if="row.canRevoke" @click="openRevoke(row)" size="mini" type="danger">
撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">
{{formData.taskName}}
</div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=""
class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
</el-row>
</div>
</info>
</template>
</guava>
</div>
<!--#include("../common/commonQuery.html"){}#-->
<script nonce="${cspNonce!}">
<!--#include("../common/info.js"){}#-->
<!--#include("../common/commonQuery.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
pageForm: {
audit: false
},
tableColumns: [
{ prop: "loginName", label: "工号", sortable: true },
{ prop: "userName", label: "姓名", sortable: true },
{ prop: "userState", label: "在职状态", sortable: true },
// { prop: "personType", label: "人员类型", sortable: true },
// { prop: "preparedBy", label: "编制类别", sortable: true },
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true },
// { prop: "sign", label: "签字" },
{ prop: "curTaskName", label: "当前节点" },
{ prop: "instanceState", label: "流程状态" }
],
// 审核相关
showApprovalForm: false,
formData: {
tf_opinion: ""
},
}
},
components: {
'info': INFO,
'common-query': COMMON_QUERY,
},
methods: {
openView(row) {
this.$refs.guava.edit(()=>{
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
})
},
openApproval(row) {
this.$refs.guava.edit(()=>{
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.infoRef.onOpen(row)
})
},
handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const loading = createLoading()
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
}).finally(() => {
loading.close()
})
})
},
openRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
}).then(() => {
const loading = createLoading()
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doSearch()
}
}).finally(()=>{
loading.close()
})
})
},
search(pageForm){
if (pageForm) {
this.pageForm = {...this.pageForm, ...pageForm}
}
this.doSearch()
},
},
created() {
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,51 @@
<script type="text/x-template" id="member-apply-common-query-template">
<search @search="doSearch">
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"></el-input>
</search-item>
<template v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN', 'BRANCH_UNION_CHAIRMAN'])">
<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.userStates" placeholder="请选择在职状态" @change="doSearch"
code="USER_STATE" multiple collapse-tags></dict-select>
</search-item>
<search-item label="人员类型">
<dict-select v-model="pageForm.personTypes" placeholder="请选择人员类型" @change="doSearch"
code="USER_PERSON_TYPE" multiple collapse-tags></dict-select>
</search-item>
<!--
<search-item label="编制类别">
<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" code="AIDFUND_MEMBER_USER_TYPE"
style="width: 100%"></dict-select>
</search-item>-->
<search-item label="人员属性">
<dict-select v-if="userAttributeMultiple" v-model="pageForm.userAttributes" code="USER_ATTRIBUTE"
multiple collapse-tags clearable style="width: 100%"></dict-select>
<dict-select v-else v-model="pageForm.userAttribute" code="USER_ATTRIBUTE"
clearable style="width: 100%"></dict-select>
</search-item>
</template>
</search>
</script>
@@ -0,0 +1,67 @@
const COMMON_QUERY = {
template: "#member-apply-common-query-template",
props: {
// 默认保持原单选行为,仅由明确传参的页面开启人员属性多选。
userAttributeMultiple: {
type: Boolean,
default: false
}
},
store,
mixins: [initTableMixins],
data() {
return {
unions: [],
units: [],
pageForm: {
searchKeyword: '',
unionId: '',
unitId: '',
userStates: [],
personTypes: [],
preparedBys: [],
aidFundMemberUserType: '',
userAttribute: '',
userAttributes: [],
}
}
},
methods: {
doSearch(){
const pageForm = clone(this.pageForm)
pageForm.userStates = JSON.stringify(this.pageForm.userStates)
pageForm.personTypes = JSON.stringify(this.pageForm.personTypes)
pageForm.preparedBys = JSON.stringify(this.pageForm.preparedBys)
pageForm.userAttributes = JSON.stringify(this.pageForm.userAttributes)
this.$emit('search', pageForm)
},
async initData(){
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
this.$businessTool.listUnion(this.pageForm.unionId).then((data) => {
this.unions = data
})
this.$businessTool.listUnit().then((data) => {
this.units = data
})
} else if (this.$auth.hasRole("BRANCH_UNION_CHAIRMAN")) {
this.$businessTool.listUnion(this.$store.state.user.union.id).then((data) => {
this.unions = data
})
this.$businessTool.listUnit(this.$store.state.user.union.id).then((data) => {
this.units = data
})
}
},
async flushUnits(){
this.$set(this.pageForm, "unitId", null)
this.units = []
if (this.pageForm.unionId) {
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
}
}
},
async created() {
this.initData()
}
}
@@ -0,0 +1,149 @@
const INFO = {
template: /*language=HTML*/ `
<div>
<div class="process-title">
申请信息
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
</div>
<el-descriptions :column="3" border>
<el-descriptions-item label="工号">{{ viewData.loginname }}</el-descriptions-item>
<el-descriptions-item label="姓名">{{ viewData.username }}</el-descriptions-item>
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
<el-descriptions-item label="民族">{{ viewData.nation }}</el-descriptions-item>
<el-descriptions-item label="出生日期">{{ $moment(viewData.birthday).format("YYYY年MM月DD日") }}</el-descriptions-item>
<el-descriptions-item label="政治面貌">{{ viewData.political }}</el-descriptions-item>
<el-descriptions-item label="学历">{{ viewData.education }}</el-descriptions-item>
<el-descriptions-item label="学位">{{ viewData.academicDegree }}</el-descriptions-item>
<el-descriptions-item label="党政职务">{{ viewData.position }}</el-descriptions-item>
<el-descriptions-item label="工作单位">{{ viewData.unitName }}</el-descriptions-item>
<el-descriptions-item label="所属工会">{{ viewData.unionName }}</el-descriptions-item>
<!-- <el-descriptions-item label="所属校区">{{ viewData.campus }}</el-descriptions-item>-->
<el-descriptions-item label="身份证号码">{{ viewData.idCard }}</el-descriptions-item>
<el-descriptions-item label="联系电话">{{ viewData.mobile }}</el-descriptions-item>
<!-- <el-descriptions-item label="电子邮箱">{{ viewData.email }}</el-descriptions-item>-->
<el-descriptions-item label="在职状态">{{ viewData.userState }}</el-descriptions-item>
<!-- <el-descriptions-item label="人员类型">{{ viewData.personType }}</el-descriptions-item>-->
<el-descriptions-item label="婚姻状况">{{ viewData.marriage }}</el-descriptions-item>
<el-descriptions-item label="入职时间">{{ viewData.arrivalAtSchoolDate }}</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
<el-descriptions-item label="家庭住址" :span="3">{{ viewData.homeAddress }}</el-descriptions-item>
<template v-if="viewData.loginname == $store.state.user.loginname">
</template>
<el-descriptions-item label="家庭主要成员" :span="3">
<el-table v-if="viewData.families&&viewData.families.length"
:data="viewData.families" size="mini" border
:header-cell-style="{background:'#eff3f6'}"
style="width: 100%">
<el-table-column prop="relation" label="与本人关系" align="center">
</el-table-column>
<el-table-column prop="name" label="姓名" align="center">
</el-table-column>
<el-table-column prop="unit" label="单位" align="center">
</el-table-column>
<el-table-column prop="remark" label="备注" align="center">
</el-table-column>
</el-table>
<el-empty v-else :image-size="50" description="暂无家庭成员信息"></el-empty>
</el-descriptions-item>
<el-descriptions-item label="个人学习及工作经历" :span="3">
<div v-if="viewData.personalData" class="text-left" v-html="viewData.personalData"></div>
<el-tag type="warning" v-else>暂无</el-tag>
</el-descriptions-item>
<el-descriptions-item label="特长及获奖情况" :span="3">
<div v-if="viewData.specialty" class="text-left" v-html="viewData.specialty"></div>
<el-tag type="warning" v-else>暂无</el-tag>
</el-descriptions-item>
<el-descriptions-item label="签字信息" :span="3" v-if="viewData.sign">
<el-image :src="viewData.sign"
class="signature-image"></el-image>
</el-descriptions-item>
</el-descriptions>
<template v-for="task in doneTasks">
<div class="mt10">
<div class="process-title">{{ task.displayName }}</div>
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
v-if="task.ext.isFirstTaskNode">
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName }}({{task.ext.initiatorAccount}})
</el-descriptions-item>
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
<el-descriptions-item label="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE" :value="task.ext.submitType"></dict-tag>
</el-descriptions-item>
</el-descriptions>
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
}}({{task.taskFormData.loginName}})
</el-descriptions-item>
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
<el-descriptions-item label="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE" :value="task.ext.submitType"></dict-tag>
</el-descriptions-item>
<template v-if="task.taskFormData.tf_allocation_unionId">
<el-descriptions-item label="分配工会" :span="1.5">
{{ task.taskFormData.tf_allocation_unionName }}
</el-descriptions-item>
<el-descriptions-item label="分配前工会" :span="1.5">
{{ task.taskFormData.tf_self_unionName }}
</el-descriptions-item>
</template>
<el-descriptions-item label="办理意见" :span="3" v-if="!task.ext.isFirstTaskNode">{{
task.taskFormData.opinion }}
</el-descriptions-item>
</el-descriptions>
</div>
</template>
<slot></slot>
<snaker-chart ref="snakerChartRef"></snaker-chart>
</div>
`,
store,
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
data() {
return {
row: {},
viewData: {},
doneTasks: []
}
},
methods: {
onOpen(row) {
this.row = row
this.info()
this.getDoneTasks()
},
info() {
this.$axios.post("/platform/member/apply/mine/findMemberApplyRecord", { id: this.row.id }).then((res) => {
if (res.code === 0) {
this.viewData = res.data
}
})
},
getDoneTasks() {
this.$axios.post("/flow/common/doneTasks", { bizId: this.row.id }).then((res) => {
if (res.code === 0) {
this.doneTasks = res.data
}
})
},
// 查看流程图
openChart(){
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId, this.row.instanceId)
}
}
}
@@ -0,0 +1,128 @@
const MEMBER_APPLY_AUDIT_INFO = {
template: /*language=HTML*/ `
<div>
<el-tabs v-model="activeName">
<el-tab-pane label="申请信息" name="basicInfo">
<el-descriptions :column="3" border class="descriptions-form">
<el-descriptions-item label="工号">{{ viewData.loginname }}</el-descriptions-item>
<el-descriptions-item label="姓名">{{ viewData.username }}</el-descriptions-item>
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
<el-descriptions-item label="民族">{{ viewData.nation }}</el-descriptions-item>
<el-descriptions-item label="出生日期">{{ moment(viewData.birthday).format("YYYY年MM月DD日") }}</el-descriptions-item>
<el-descriptions-item label="政治面貌">{{ viewData.political }}</el-descriptions-item>
<el-descriptions-item label="学历">{{ viewData.education }}</el-descriptions-item>
<el-descriptions-item label="学位">{{ viewData.academicDegree }}</el-descriptions-item>
<el-descriptions-item label="党政职务">{{ viewData.position }}</el-descriptions-item>
<el-descriptions-item label="工作单位">{{ viewData.userUnitName }}</el-descriptions-item>
<el-descriptions-item label="所属工会">{{ viewData.userUnionName }}</el-descriptions-item>
<el-descriptions-item label="所属校区">{{ viewData.campus }}</el-descriptions-item>
<el-descriptions-item label="身份证号码">{{ viewData.idCard }}</el-descriptions-item>
<el-descriptions-item label="联系电话">{{ viewData.mobile }}</el-descriptions-item>
<el-descriptions-item label="电子邮箱">{{ viewData.email }}</el-descriptions-item>
<el-descriptions-item label="在职状态">{{ viewData.userState }}</el-descriptions-item>
<el-descriptions-item label="人员类型">{{ viewData.personType }}</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
<el-descriptions-item label="家庭主要成员" :span="3">
<el-table v-if="viewData.families&&viewData.families.length"
:data="viewData.families" size="mini" border
:header-cell-style="{background:'#eff3f6'}"
style="width: 100%">
<el-table-column prop="relation" label="与本人关系" align="center" header-align="center">
</el-table-column>
<el-table-column prop="name" label="姓名" align="center" header-align="center">
</el-table-column>
<el-table-column prop="unit" label="单位" align="center" header-align="center">
</el-table-column>
<el-table-column prop="remark" label="备注" align="center" header-align="center">
</el-table-column>
</el-table>
<el-empty v-else :image-size="50" description="暂无家庭成员信息"></el-empty>
</el-descriptions-item>
<el-descriptions-item label="个人简况" :span="3">
<div v-if="viewData.vita" class="text-left" v-html="viewData.vita"></div>
<el-tag type="warning" v-else>暂无</el-tag>
</el-descriptions-item>
<el-descriptions-item label="签字信息" :span="3">
<el-image v-if="viewData.sign" :src="viewData.sign"
class="signature-image"></el-image>
<el-tag type="warning" v-else>暂无</el-tag>
</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<el-tab-pane v-if="viewData.nodeTasks && viewData.nodeTasks.length > 0" label="审核信息" name="audit">
<div>
<div v-for="nodeTask in viewData.nodeTasks" :key="nodeTask.id">
<div class="process-title">
{{nodeTask.nodeName}}
</div>
<el-descriptions :column="3" border v-for="task in nodeTask.tasks" :key="task.id"
style="margin-bottom: 10px">
<el-descriptions-item label="审核人">
{{ task.actualOwnerLoginName + '-' + task.actualOwnerUserName}}
</el-descriptions-item>
<el-descriptions-item label="审核时间">{{ task.endOn}}</el-descriptions-item>
<el-descriptions-item label="审核结果">
<div v-if="task.extVariable">
<el-tag type="success" size="mini"
v-if="task.extVariable.bpmTaskApprovalType === 'PASS'">同意
</el-tag>
<el-tag type="danger" size="mini"
v-if="task.extVariable.bpmTaskApprovalType === 'BACK'">退回
</el-tag>
<el-tag type="danger" size="mini"
v-if="task.extVariable.bpmTaskApprovalType === 'REJECT'">拒绝
</el-tag>
</div>
</el-descriptions-item>
<el-descriptions-item label="审核意见" :span="3">
{{ task.extVariable.approvalOpinion }}
</el-descriptions-item>
<template v-if="$auth.hasRoleOr('SYSADMIN') && task.extVariable.approvalRemark">
<el-descriptions-item label="审核说明" :span="3">
{{ task.extVariable.approvalRemark }}
</el-descriptions-item>
</template>
<el-descriptions-item label="签字" :span="3">
<el-image :src="task.extVariable.approvalSignature"
v-if="task.extVariable && task.extVariable.approvalSignature"
class="signature-image"></el-image>
</el-descriptions-item>
</el-descriptions>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
`,
data() {
return{
activeName: "basicInfo",
viewData: {
nodeTasks: {}
}
}
},
methods: {
async onOpen(id){
const resp = await $.post('/platform/member/apply/mine/findMemberApplyRecord', {id})
if (resp.code === 0) {
this.viewData = resp.data
this.$emit('union-name', this.viewData.userUnionName)
if (this.viewData.families) {
this.viewData.families = JSON.parse(this.viewData.families)
} else {
this.viewData.families = []
}
}
}
}
}
@@ -0,0 +1,166 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<common-query ref="commonQueryRef" user-attribute-multiple @search="search"></common-query>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="申请列表">
<el-button size="small" type="primary" @click="onApply">申请入会</el-button>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
<el-table-column
:index="indexMethod"
align="center"
header-align="center"
label="序号"
type="index"
width="80px"
></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
header-align="center"
min-width="100px"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template scope="{row}" v-if="column.prop=='loginname'">
<el-link @click="openView(row)" type="primary">{{row.loginname}}</el-link>
</template>
<template scope="{row}" v-else-if="column.prop=='sign'">
<el-image v-if="row.sign" :src="row.sign" style="height: 60px"></el-image>
<el-tag type="warning" v-else>暂无</el-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='instanceState'">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="220" fixed="right">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">
查看
</el-button>
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId"
@click="onEdit(row)" size="mini" type="primary">
编辑
</el-button>
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">
撤回
</el-button>
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId"
@click="onDelete(row.id)" size="mini" type="danger">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #view>
<info ref="info"></info>
</template>
</guava>
</div>
<!--#include("../common/commonQuery.html"){}#-->
<script nonce="${cspNonce!}">
<!--#include("../common/info.js"){}#-->
<!--#include("../common/commonQuery.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
tableColumns: [
{ prop: "loginName", label: "工号", sortable: true },
{ prop: "userName", label: "姓名", sortable: true },
{ prop: "userState", label: "在职状态", sortable: true },
// { prop: "personType", label: "人员类型", sortable: true },
// { prop: "preparedBy", label: "编制类别", sortable: true },
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true },
// { prop: "sign", label: "签字" },
{ prop: "taskName", label: "当前节点"},
{ prop: "instanceState", label: "流程状态"}
],
unions: [],
units: []
}
},
components: {
'info': INFO,
'common-query': COMMON_QUERY,
},
methods: {
onApply() {
commonUtil.pjaxPush('/platform/member/apply/submit')
},
openView(row) {
this.$refs.guava.view(() => {
this.$refs.info.onOpen(row)
})
},
onEdit(row) {
commonUtil.pjaxPush('/platform/member/apply/submit?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const loading = createLoading()
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((resp) => {
this.$message.success(resp.msg)
this.pageData()
}).finally(() => {
loading.close()
})
})
},
onDelete(id) {
this.$confirm("您确定要删除吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const loading = createLoading()
this.$axios.post("/platform/member/apply/mine/onDelete", { id }).then((res) => {
if (res.code === 0) {
this.doSearch()
this.$message.success(res.msg)
}
}).finally(() => {
loading.close()
})
})
},
search(pageForm){
if (pageForm) {
this.pageForm = {...this.pageForm, ...pageForm}
}
this.doSearch()
},
},
created() {
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,84 @@
<div id="member_apply_school_union_approval_form">
<el-form :model="formData" ref="approvalFormRef" label-position="left" label-width="110px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="分配工会关系" prop="tf_allocation_unionId"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-select clearable filterable placeholder="请选择工会" style="width: 100%;"
@change="assignmentUnionName"
v-model="formData.tf_allocation_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-col>
<el-col :span="12">
<el-form-item label="当前所在工会" prop="tf_self_unionName">
<el-input v-model="formData.tf_self_unionName" readonly></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
<!-- <el-form-item label="电子签名" prop="approvalSignature" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">-->
<!-- <pc-signature v-model="formData.approvalSignature"></pc-signature>-->
<!-- </el-form-item>-->
</el-form>
<snaker-flow-task-form-action @task-action="handleTaskAction"
@cancel="handleCancel">
</snaker-flow-task-form-action>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: "#member_apply_school_union_approval_form",
store,
data() {
return {
businessId: GetQueryString("businessId"),
formData: {
tf_opinion: "",
tf_self_unionName: this.$store.state.user.union.name
},
unions: []
}
},
methods: {
handleTaskAction(val) {
console.log(val)
const data = {
...val,
...this.formData
}
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify(data)
}).then(res => {
if (res.code === 0) {
this.$message.success("操作成功")
// 发送完成消息
window.GlobalBroadcastChannel.postMessage({
type: "task-complete",
payload: val
})
}
})
},
handleCancel(val) {
console.log(val)
},
// 分配工会名称
assignmentUnionName(val) {
const union = this.unions.find(item => item.id === val)
this.$set(this.formData, "tf_allocation_unionName", union.name)
},
},
created() {
this.$businessTool.listUnion().then(data => {
this.unions = data
})
}
})
</script>
@@ -0,0 +1,229 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<common-query ref="commonQueryRef" user-attribute-multiple @search="search"></common-query>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="申请列表">
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
<el-radio-button label="true">已审核</el-radio-button>
<el-radio-button label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
<el-table-column
:index="indexMethod"
align="center"
header-align="center"
label="序号"
type="index"
width="80px"
></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
header-align="center"
min-width="100px"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template scope="{row}" v-if="column.prop=='loginname'">
<el-link @click="openView(row)" type="primary">{{row.loginname}}</el-link>
</template>
<template scope="{row}" v-else-if="column.prop=='sign'">
<el-image v-if="row.sign" :src="row.sign" style="height: 60px"></el-image>
<el-tag type="warning" v-else>暂无</el-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='instanceState'">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="200px">
<template scope="{row}">
<el-button size="mini" type="primary" @click="openView(row)">查看</el-button>
<el-button v-if="row.taskState === 10" @click="openApproval(row)" size="mini" type="primary">
审核
</el-button>
<el-button v-if="row.canRevoke" @click="openRevoke(row.taskId)" size="mini" type="danger">
撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">
{{formData.taskName}}
</div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="130px" label-suffix="">
<el-row :gutter="20" v-if="formData.origin === 'HMC'">
<el-col :span="12">
<el-form-item label="分配工会关系" prop="tf_allocation_unionId"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-select clearable filterable placeholder="请选择工会" style="width: 100%;"
@change="assignmentUnionName"
v-model="formData.tf_allocation_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-col>
<el-col :span="12">
<el-form-item label="当前所在工会" prop="tf_self_unionName">
<el-input v-model="formData.tf_self_unionName" readonly></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
</el-row>
</div>
</info>
</template>
</guava>
</div>
<!--#include("../common/commonQuery.html"){}#-->
<script nonce="${cspNonce!}">
<!--#include("../common/info.js"){}#-->
<!--#include("../common/commonQuery.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
pageForm: {
audit: false
},
tableColumns: [
{ prop: "loginName", label: "工号", sortable: true },
{ prop: "userName", label: "姓名", sortable: true },
{ prop: "userState", label: "在职状态", sortable: true },
{ prop: "personType", label: "人员类型", sortable: true },
// { prop: "preparedBy", label: "编制类别", sortable: true },
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true },
{ prop: "sign", label: "签字" },
{ prop: "curTaskName", label: "当前节点" },
{ prop: "instanceState", label: "流程状态" }
],
// 审核相关
showApprovalForm: false,
formData: {
tf_opinion: ""
},
unions: [],
}
},
components: {
'info': INFO,
'common-query': COMMON_QUERY,
},
methods: {
openView(row) {
this.$refs.guava.edit(()=>{
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
})
},
openApproval(row) {
this.$refs.guava.edit(()=>{
this.showApprovalForm = true
this.formData = {
origin: row.origin,
processTaskId: row.taskId,
taskName: row.curTaskName
}
if (row.origin === "HMC") {
this.$set(this.formData, "tf_self_unionName", this.$store.state.user.union.name)
}
this.$refs.infoRef.onOpen(row)
})
},
handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const loading = createLoading()
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
}).finally(() => {
loading.close()
})
})
},
openRevoke(taskId) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
}).then(() => {
const loading = createLoading()
this.$axios.post("/flow/common/revokeTask", { taskId }).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doSearch()
}
}).finally(() => {
loading.close()
})
})
},
search(pageForm){
if (pageForm) {
this.pageForm = {...this.pageForm, ...pageForm}
}
this.doSearch()
},
// 分配工会名称
assignmentUnionName(val) {
const union = this.unions.find(item => item.id === val)
this.$set(this.formData, "tf_allocation_unionName", union.name)
},
},
created() {
this.pageData()
this.$businessTool.listUnion().then(data => {
this.unions = data
})
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,475 @@
<div id="member_apply">
<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" readonly 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" readonly 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="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-input v-model="formData.unitName" disabled placeholder="暂无工作单位"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="所属工会">
<el-form-item prop="unionName">
<el-input v-model="formData.unionName" disabled placeholder="请输入所属工会"></el-input>
</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"
disabled 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"
disabled style="width: 100%"></dict-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
<el-descriptions-item label="身份证号码">
<el-form-item prop="idCard">
<el-input v-model="formData.idCard" disabled 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" disabled 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="家庭主要成员" :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="入会意愿" :span="3">
<el-form-item prop="isVoluntary">
<el-checkbox
size="medium"
style="width: 95%; color: #F56C6C; display: flex; align-items: center;"
v-model="formData.isVoluntary">
<div>
<span style="flex: 1; word-wrap: break-word; word-break: break-all; white-space: normal;">
我自愿申请加入学校工会,并委托学校按规定代为扣缴工会会员会费。
</span>
</div>
<div>
<span style="flex: 1; word-wrap: break-word; word-break: break-all; white-space: normal;">
我将严格遵守工会章程,认真执行工会决议,积极参与工会活动,主动融入“学校健康幸福家”建设,为营造温暖、和谐、奋进的校园氛围贡献力量,以实际行动助力学校各项事业发展。
</span>
</div>
</el-checkbox>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="签字" :span="3">
<el-form-item prop="sign">
<pc-signature v-model="formData.sign"></pc-signature>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
</el-form>
<snaker-flow-task-form-action @task-action="handleTaskAction" @save-draft="handleSaveDraft"></snaker-flow-task-form-action>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: "#member_apply",
store,
data() {
return {
businessId: GetQueryString("businessId"),
instanceId: GetQueryString("instanceId"),
units: [],
formData: {
families: []
},
formRules: {
username: [{required: false, message: "必填", trigger: ["change", "blur"]}],
sex: [{required: false, message: "必填", trigger: ["change", "blur"]}],
isVoluntary: [{required: true, message: "必填", trigger: ["change", "blur"]}],
sign: [{required: true, message: "必填", trigger: ["change", "blur"]}],
email: [
{
validator: (rule, value, callback) => {
if (!value) {
callback();
} else if (/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(value)) {
callback();
} else {
callback(new Error("邮箱格式错误"));
}
},
trigger: ["change", "blur"]
}
],
idCard: [
{
validator: (rule, value, callback) => {
if (!value) {
// 如果值为空,直接通过校验
callback();
} else if (/^[1-9]\d{5}(18|19|20)?\d{2}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}(\d|[Xx])$/.test(value)) {
// 18位身份证号码格式正确
callback();
} else if (/^[1-9]\d{7}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
// 15位身份证号码格式正确
callback();
} else if (/^[1-9]\d{5}(18|19|20)?\d{2}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
// 外国人身份证号码格式正确(18位)
callback();
} else if (/^[1-9]\d{7}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
// 外国人身份证号码格式正确(15位)
callback();
} else {
// 格式错误,返回错误信息
callback(new Error("身份证号码格式错误"));
}
},
trigger: ["change", "blur"]
}
],
mobile: [
{
validator: (rule, value, callback) => {
if (!value) {
// 如果值为空,直接通过校验
callback();
} else if (/^[1][345789][0-9]{9}$/.test(value)) {
// 手机号格式正确
callback();
} else if (/^\d+-\d+$/.test(value) && value.length <= 16) {
// 座机号格式正确
callback();
} else {
// 格式错误,返回错误信息
callback(new Error(value.includes('-') ? '座机号码格式错误' : '手机号码格式错误'));
}
},
trigger: ["change", "blur"]
}
]
},
}
},
methods: {
normalizeUnitField() {
if (!this.formData || !this.formData.unitId) {
return
}
const unitId = String(this.formData.unitId)
this.$set(this.formData, "unitId", unitId)
const unit = this.units.find(v => String(v.id) === unitId)
if (unit) {
this.$set(this.formData, "unitName", unit.name)
this.$set(this.formData, "unionName", unit.unionName || unit.unionname || this.formData.unionName || "")
}
},
// 提交
handleTaskAction(val) {
this.$refs.formRef.validate((valid) => {
if (valid) {
if (!this.instanceId) {
this.handleApply(val)
} else {
this.handleReApply(val)
}
}
})
},
// 提交申请
handleApply(val) {
this.$confirm("您确定要提交吗?", "提示", { type: "warning" })
.then(() => {
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$axios
.post("/flow/common/startInstanceAndExecute", {
...val,
bizData: JSON.stringify(this.formData)
})
.then((res) => {
if (res.code === 0) {
this.$message.success("操作成功")
// 发送完成消息
window.GlobalBroadcastChannel.postMessage({
type: "task-complete"
})
}
})
}
})
})
},
// 重新提交申请
handleReApply(val) {
this.$confirm("您确定要提交吗?", "提示", { type: "warning" })
.then(() => {
this.$axios
.post("/flow/common/executeTask", {
data: JSON.stringify({
processTaskId: val.taskId,
processInstanceId: val.instanceId,
submitType: val.submitType,
f_data: JSON.stringify(this.formData)
})
})
.then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
window.GlobalBroadcastChannel.postMessage({
type: "task-complete"
})
}
})
})
},
// 保存
handleSaveDraft(val) {
this.$confirm("您确定要保存吗?", "提示", { type: "warning" })
.then(() => {
this.$axios
.post("/flow/common/startInstance", {
...val,
bizData: JSON.stringify(this.formData)
})
.then((res) => {
if (res.code === 0) {
this.$message.success("操作成功")
// 发送完成消息
window.parent.postMessage(
{
type: "task-complete"
},
"*"
)
}
})
})
},
// 取消
handleCancel() {
},
async validateApply() {
if (this.formData.id) {
return
}
// const resp = await $.post('/platform/member/apply/submit/validateApply')
// if (resp.code === 0 && resp.data > 0) {
// this.$confirm("您有其他入会流程正在进行中,请勿重复申请,如需查看详情,可前往我的申请界面,是否前往?", "提示", { type: "warning" })
// .then(() => {
// this.member = true
// this.$store.dispatch("pjaxRoute", "/platform/member/apply/mine")
// })
// .catch(() => {
// this.member = true
// })
// }
},
async init() {
let user
const resp = await $.post('/platform/member/apply/submit/getSelfUserInfo')
if (resp.code === 0) {
if (!resp.data) {
user = this.$store.state.user
} else {
user = resp.data
}
} else {
user = this.$store.state.user
}
this.member = user.member
if (this.id) {
this.$axios.post("/platform/member/apply/submit/findApplyById", { id: this.id }).then((res) => {
if (res.code === 0) {
this.formData = res.data
}
})
} else {
const {
id,
username,
loginname,
sex,
nation,
birthday,
political,
education,
academicDegree,
position,
unitId,
unitName,
unit,
unionId,
unionName,
union,
campus,
userState,
personType,
idCard,
mobile,
email,
families,
personalData
} = user
this.$set(this.formData, "userId", id)
this.$set(this.formData, "username", username)
this.$set(this.formData, "loginname", loginname)
this.$set(this.formData, "birthday", birthday)
this.$set(this.formData, "sex", sex)
this.$set(this.formData, "idCard", idCard)
this.$set(this.formData, "nation", nation)
this.$set(this.formData, "political", political)
this.$set(this.formData, "position", position)
this.$set(this.formData, "education", education)
this.$set(this.formData, "academicDegree", academicDegree)
this.$set(this.formData, "campus", campus)
this.$set(this.formData, "userState", userState)
this.$set(this.formData, "personType", personType)
this.$set(this.formData, "unitName", unit ? unit.name : unitName)
this.$set(this.formData, "unitId", unit ? String(unit.id) : unitId)
this.$set(this.formData, "unionName", union ? union.name : unionName)
this.$set(this.formData, "unionId", union ? union.id : unionId)
this.$set(this.formData, "mobile", mobile)
this.$set(this.formData, "email", email)
this.$set(this.formData, "families", families ? families : [])
this.$set(this.formData, "personalData", personalData)
}
},
},
async created() {
await this.init()
this.units = await this.$businessTool.listUnit()
this.normalizeUnitField()
await this.validateApply()
}
})
</script>
@@ -0,0 +1,486 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<el-card shadow="never">
<snaker-start slot="header" label="入会申请" define_key="HYRH"></snaker-start>
<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" readonly 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" readonly 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="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-input v-model="formData.unitName" disabled placeholder="暂无工作单位"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="所属工会">
<el-form-item prop="unionName">
<el-input v-model="formData.unionName" disabled placeholder="请输入所属工会"></el-input>
</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"
disabled 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="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="marriage" label="婚姻状况">
<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="idCard">
<el-input v-model="formData.idCard" disabled 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" disabled placeholder="请输入联系电话"
maxlength="32"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="入职时间">
<el-form-item prop="arrivalAtSchoolDate">
<el-input v-model="formData.arrivalAtSchoolDate" placeholder="请输入入职时间"
disabled maxlength="50"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
<el-descriptions-item label="家庭住址" :span="3">
<el-form-item prop="homeAddress" label="家庭住址">
<el-input v-model="formData.homeAddress" placeholder="请输入家庭住址" maxlength="90"></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" label="个人学习及工作经历">
<text-editor v-model="formData.personalData"></text-editor>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="特长及获奖情况" :span="3">
<el-form-item prop="specialty" label="特长及获奖情况">
<text-editor v-model="formData.specialty"></text-editor>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="入会意愿" :span="3">
<el-form-item prop="isVoluntary">
<el-checkbox
size="medium"
style="width: 95%; color: #F56C6C; display: flex; align-items: center;"
v-model="formData.isVoluntary">
<div>
<span
style="flex: 1; word-wrap: break-word; word-break: break-all; white-space: normal;">
我自愿申请加入学校工会,并委托学校按规定代为扣缴工会会员会费。
</span>
</div>
<div>
<span
style="flex: 1; word-wrap: break-word; word-break: break-all; white-space: normal;">
我将严格遵守工会章程,认真执行工会决议,积极参与工会活动,主动融入“学校健康幸福家”建设,为营造温暖、和谐、奋进的校园氛围贡献力量,以实际行动助力学校各项事业发展。
</span>
</div>
</el-checkbox>
</el-form-item>
</el-descriptions-item>
<!-- <el-descriptions-item label="签字" :span="3">-->
<!-- <el-form-item prop="sign">-->
<!-- <pc-signature v-model="formData.sign"></pc-signature>-->
<!-- </el-form-item>-->
<!-- </el-descriptions-item>-->
</el-descriptions>
</el-form>
<el-row v-if="showActionButtons" type="flex" justify="end" class="mt20">
<el-button type="primary" plain @click="onSave">保存</el-button>
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
</el-row>
</el-card>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
id: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
units: [],
// 当前登录人已是会员时,不显示保存和提交按钮。
showActionButtons: true,
formData: {
families: []
},
formRules: {
username: [{ required: false, message: "必填", trigger: ["change", "blur"] }],
sex: [{ required: false, message: "必填", trigger: ["change", "blur"] }],
isVoluntary: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
sign: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
homeAddress: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
personalData: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
specialty: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
marriage: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
arrivalAtSchoolDate: [{ required: true, message: "必填", trigger: ["change", "blur"] }]
/*email: [
{
validator: (rule, value, callback) => {
if (!value) {
callback();
} else if (/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(value)) {
callback();
} else {
callback(new Error("邮箱格式错误"));
}
},
trigger: ["change", "blur"]
}
],
idCard: [
{
validator: (rule, value, callback) => {
if (!value) {
// 如果值为空,直接通过校验
callback();
} else if (/^[1-9]\d{5}(18|19|20)?\d{2}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}(\d|[Xx])$/.test(value)) {
// 18位身份证号码格式正确
callback();
} else if (/^[1-9]\d{7}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
// 15位身份证号码格式正确
callback();
} else if (/^[1-9]\d{5}(18|19|20)?\d{2}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
// 外国人身份证号码格式正确(18位)
callback();
} else if (/^[1-9]\d{7}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
// 外国人身份证号码格式正确(15位)
callback();
} else {
// 格式错误,返回错误信息
callback(new Error("身份证号码格式错误"));
}
},
trigger: ["change", "blur"]
}
],
mobile: [
{
validator: (rule, value, callback) => {
if (!value) {
// 如果值为空,直接通过校验
callback();
} else if (/^[1][345789][0-9]{9}$/.test(value)) {
// 手机号格式正确
callback();
} else if (/^\d+-\d+$/.test(value) && value.length <= 16) {
// 座机号格式正确
callback();
} else {
// 格式错误,返回错误信息
callback(new Error(value.includes('-') ? '座机号码格式错误' : '手机号码格式错误'));
}
},
trigger: ["change", "blur"]
}
]*/
}
}
},
methods: {
normalizeUnitField() {
if (!this.formData || !this.formData.unitId) {
return
}
const unitId = String(this.formData.unitId)
this.$set(this.formData, "unitId", unitId)
const unit = this.units.find(v => String(v.id) === unitId)
if (unit) {
this.$set(this.formData, "unitName", unit.name)
this.$set(this.formData, "unionName", unit.unionName || unit.unionname || this.formData.unionName || "")
}
},
onSave() {
this.$confirm("您确定保存吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const loading = createLoading()
this.$axios.post("/platform/member/apply/submit/save", { data: JSON.stringify(this.formData) }).then(res => {
if (res.code === 0) {
this.$message.success(res.msg)
commonUtil.pjaxPush("/platform/member/apply/mine")
}
}).finally(() => {
loading.close()
})
})
},
onSubmit() {
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const loading = createLoading()
this.$axios.post("/platform/member/apply/submit/submit", {
data: JSON.stringify(this.formData)
}).then(res => {
if (res.code === 0) {
this.$message.success(res.msg)
commonUtil.pjaxPush("/platform/member/apply/mine")
}
}).finally(() => {
loading.close()
})
})
}
})
},
onFinishTask() {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const loading = createLoading()
this.$axios.post("/platform/member/apply/submit/submitAgain", {
data: JSON.stringify(this.formData),
taskId: this.taskId
}).then(res => {
if (res.code === 0) {
this.$message.success(res.msg)
commonUtil.pjaxPush("/platform/member/apply/mine")
}
}).finally(() => {
loading.close()
})
})
},
async init() {
let user
const resp = await $.post("/platform/member/apply/submit/getSelfUserInfo")
if (resp.code === 0) {
if (!resp.data) {
user = this.$store.state.user
} else {
user = resp.data
}
} else {
user = this.$store.state.user
}
// 页面按钮是否展示,以当前登录人的会员状态为准。
this.showActionButtons = !(user && user.member)
if (this.id) {
const res = await this.$axios.post("/platform/member/apply/submit/findApplyById", { id: this.id })
debugger
if (res.code === 0) {
this.formData = res.data
}
} else {
const {
id,
username,
loginname,
sex,
nation,
birthday,
political,
education,
academicDegree,
arrivalAtSchoolDate,
position,
unitId,
unitName,
unit,
unionId,
unionName,
union,
campus,
userState,
personType,
preparedBy,
idCard,
mobile,
email,
families,
personalData
} = user
this.$set(this.formData, "userId", id)
this.$set(this.formData, "username", username)
this.$set(this.formData, "loginname", loginname)
this.$set(this.formData, "birthday", birthday)
this.$set(this.formData, "sex", sex)
this.$set(this.formData, "idCard", idCard)
this.$set(this.formData, "nation", nation)
this.$set(this.formData, "political", political)
this.$set(this.formData, "position", position)
this.$set(this.formData, "education", education)
this.$set(this.formData, "academicDegree", academicDegree)
this.$set(this.formData, "campus", campus)
this.$set(this.formData, "userState", userState)
this.$set(this.formData, "personType", personType)
this.$set(this.formData, "preparedBy", preparedBy)
this.$set(this.formData, "unitName", unit ? unit.name : unitName)
this.$set(this.formData, "unitId", unit ? String(unit.id) : unitId)
this.$set(this.formData, "unionName", union ? union.name : unionName)
this.$set(this.formData, "unionId", union ? union.id : unionId)
this.$set(this.formData, "mobile", mobile)
this.$set(this.formData, "email", email)
this.$set(this.formData, "families", families ? families : [])
this.$set(this.formData, "personalData", personalData)
this.$set(this.formData, "arrivalAtSchoolDate", this.$moment(arrivalAtSchoolDate).format('YYYY-MM-DD'))
}
}
},
async created() {
await this.init()
this.units = await this.$businessTool.listUnit()
this.normalizeUnitField()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,199 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<common-query ref="commonQueryRef" @search="search"></common-query>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="申请列表">
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
<el-radio-button label="true">已审核</el-radio-button>
<el-radio-button label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
<el-table-column
:index="indexMethod"
align="center"
header-align="center"
label="序号"
type="index"
width="80px"
></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
header-align="center"
min-width="100px"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template scope="{row}" v-if="column.prop=='loginname'">
<el-link @click="openView(row)" type="primary">{{row.loginname}}</el-link>
</template>
<template scope="{row}" v-else-if="column.prop=='sign'">
<el-image v-if="row.sign" :src="row.sign" style="height: 60px"></el-image>
<el-tag type="warning" v-else>暂无</el-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='instanceState'">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="200px">
<template scope="{row}">
<el-button size="mini" type="primary" @click="openView(row)">
查看
</el-button>
<el-button v-if="row.taskState === 10" @click="openApproval(row)" size="mini" type="primary">
审核
</el-button>
<el-button v-if="row.canRevoke" @click="openRevoke(row)" size="mini" type="danger">
撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">
{{formData.taskName}}
</div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=""
class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
</el-row>
</div>
</info>
</template>
</guava>
</div>
<!--#include("../common/commonQuery.html"){}#-->
<script nonce="${cspNonce!}">
<!--#include("../common/info.js"){}#-->
<!--#include("../common/commonQuery.js"){}#-->
new Vue({
el: '#app',
store,
mixins: [initTableMixins],
data() {
return {
pageForm: {
audit: false
},
tableColumns: [
{ prop: "loginName", label: "工号", sortable: true },
{ prop: "userName", label: "姓名", sortable: true },
{ prop: "userState", label: "在职状态", sortable: true },
{ prop: "personType", label: "人员类型", sortable: true },
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true },
{ prop: "sign", label: "签字" },
{ prop: "curTaskName", label: "当前节点" },
{ prop: "instanceState", label: "流程状态" }
],
// 审核相关
showApprovalForm: false,
formData: {
tf_opinion: ""
},
}
},
components: {
"info": INFO,
"common-query": COMMON_QUERY,
},
methods: {
openView(row) {
this.$refs.guava.edit(()=>{
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
})
},
openApproval(row) {
this.$refs.guava.edit(()=>{
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.infoRef.onOpen(row)
})
},
handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const loading = createLoading()
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
}).finally(() => {
loading.close()
})
})
},
openRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
}).then(() => {
const loading = createLoading()
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doSearch()
}
}).finally(() => {
loading.close()
})
})
},
search(pageForm){
if (pageForm) {
this.pageForm = {...this.pageForm, ...pageForm}
}
this.doSearch()
},
},
created() {
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,145 @@
<div id="member_apply_view">
<el-descriptions :column="3" border>
<el-descriptions-item label="工号">{{ viewData.loginname }}</el-descriptions-item>
<el-descriptions-item label="姓名">{{ viewData.username }}</el-descriptions-item>
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
<el-descriptions-item label="民族">{{ viewData.nation }}</el-descriptions-item>
<el-descriptions-item label="出生日期">{{ $moment(viewData.birthday).format("YYYY年MM月DD日") }}</el-descriptions-item>
<el-descriptions-item label="政治面貌">{{ viewData.political }}</el-descriptions-item>
<el-descriptions-item label="学历">{{ viewData.education }}</el-descriptions-item>
<el-descriptions-item label="学位">{{ viewData.academicDegree }}</el-descriptions-item>
<el-descriptions-item label="党政职务">{{ viewData.position }}</el-descriptions-item>
<el-descriptions-item label="工作单位">{{ viewData.unitName }}</el-descriptions-item>
<el-descriptions-item label="所属工会">{{ viewData.unionName }}</el-descriptions-item>
<el-descriptions-item label="所属校区">{{ viewData.campus }}</el-descriptions-item>
<el-descriptions-item label="身份证号码">{{ viewData.idCard }}</el-descriptions-item>
<el-descriptions-item label="联系电话">{{ viewData.mobile }}</el-descriptions-item>
<el-descriptions-item label="电子邮箱">{{ viewData.email }}</el-descriptions-item>
<el-descriptions-item label="在职状态">{{ viewData.userState }}</el-descriptions-item>
<el-descriptions-item label="人员类型">{{ viewData.personType }}</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
<el-descriptions-item label="家庭主要成员" :span="3">
<el-table v-if="viewData.families&&viewData.families.length"
:data="viewData.families" size="mini" border
:header-cell-style="{background:'#eff3f6'}"
style="width: 100%">
<el-table-column prop="relation" label="与本人关系" align="center" header-align="center">
</el-table-column>
<el-table-column prop="name" label="姓名" align="center" header-align="center">
</el-table-column>
<el-table-column prop="unit" label="单位" align="center" header-align="center">
</el-table-column>
<el-table-column prop="remark" label="备注" align="center" header-align="center">
</el-table-column>
</el-table>
<el-empty v-else :image-size="50" description="暂无家庭成员信息"></el-empty>
</el-descriptions-item>
<el-descriptions-item label="个人简况" :span="3">
<div v-if="viewData.personalData" class="text-left" v-html="viewData.personalData"></div>
<el-tag type="warning" v-else>暂无</el-tag>
</el-descriptions-item>
<el-descriptions-item label="签字信息" :span="3">
<el-image v-if="viewData.sign" :src="viewData.sign"
class="signature-image"></el-image>
<el-tag type="warning" v-else>暂无</el-tag>
</el-descriptions-item>
</el-descriptions>
<template v-for="task in doneTasks">
<div class="task-panel mt10">
<div class="task-panel-header">{{ task.displayName }}</div>
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-if="task.ext.isFirstTaskNode">
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName }}({{task.ext.initiatorAccount}})</el-descriptions-item>
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
<el-descriptions-item label="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE" :value="task.ext.submitType"></dict-tag>
</el-descriptions-item>
</el-descriptions>
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName }}({{task.taskFormData.loginName}})</el-descriptions-item>
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
<el-descriptions-item label="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE" :value="task.ext.submitType"></dict-tag>
</el-descriptions-item>
<template v-if="task.taskFormData.tf_allocation_unionId">
<el-descriptions-item label="分配工会" :span="1.5">
{{ task.taskFormData.tf_allocation_unionName }}
</el-descriptions-item>
<el-descriptions-item label="分配前工会" :span="1.5">
{{ task.taskFormData.tf_self_unionName }}
</el-descriptions-item>
</template>
<el-descriptions-item label="办理意见" :span="3" v-if="!task.ext.isFirstTaskNode">{{ task.taskFormData.opinion }}</el-descriptions-item>
</el-descriptions>
</div>
</template>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: "#member_apply_view",
store,
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
data() {
return {
businessId: GetQueryString("businessId"),
instanceId: GetQueryString("instanceId"),
viewData: {},
doneTasks: []
}
},
methods: {
info() {
this.$axios.post("/platform/member/apply/mine/findMemberApplyRecord", { id: this.businessId }).then((res) => {
if (res.code === 0) {
this.viewData = res.data
}
})
},
getDoneTasks() {
this.$axios.post("/flow/common/doneTasks", { instanceId: this.instanceId }).then((res) => {
if (res.code === 0) {
this.doneTasks = res.data
}
})
}
},
created() {
this.info()
this.getDoneTasks()
}
})
</script>
<style>
.task-panel {
background: white;
border-radius: 4px;
overflow: hidden;
}
.task-panel-header {
background: rgb(250, 250, 250);
border: 1px solid rgb(228, 231, 237);
border-bottom: none;
padding: 12px 16px;
display: flex;
justify-content: space-between;
align-items: center;
}
.el-descriptions-item__label.is-bordered-label {
width: 15%;
}
</style>
@@ -0,0 +1,118 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<member-audit-table ref="tableRef" @open-change-view="openChangeInfo" @open-edit="openEdit"
@open-approval="openApproval" @open-view="openView"></member-audit-table>
<template #view>
<member-info ref="memberInfoRef"></member-info>
</template>
<template #public>
<member-audit-change-info ref="memberAuditChangeInfoViewRef"></member-audit-change-info>
<div v-if="showApprovalForm">
<el-form :model="formData" ref="approvalFormRef" label-position="left" label-width="80px">
<el-form-item label="审核意见" prop="approvalOpinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea>
</el-form-item>
<el-form-item label="电子签名" prop="approvalSignature" :rules="[{required:false,message:'必填',trigger:['change','blur']}]">
<pc-signature v-model="formData.approvalSignature"></pc-signature>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button type="primary" @click="doApproval('PASS')">同意</el-button>
<el-button type="danger" @click="doApproval('REJECT')">拒绝</el-button>
<el-button type="danger" @click="doApproval('BACK')">退回重新填写</el-button>
<el-button plain @click="$refs.guava.index()">取消</el-button>
</el-row>
</div>
</template>
<template #edit>
<member-change :id="id" :url="url" :edit="true" ref="memberChangeRef" @submit-ready="changeSuccess"></member-change>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/audit/memberAuditTable.js"){}#-->
<!--#include("../../common/audit/memberAuditChangeInfo.js"){}#-->
<!--#include("../../common/info/memberInfo.js"){}#-->
<!--#include("../../common/change/memberChange.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data: {
showApprovalForm: false,
id: '',
url: '',
},
components: {
"member-audit-table": MEMBER_AUDIT_TABLE,
"member-audit-change-info": MEMBER_AUDIT_CHANGE_INFO,
"member-info": MEMBER_INFO,
"member-change": MEMBER_CHANGE,
},
methods: {
doApproval(approvalType) {
this.formData.bpmTaskApprovalType = approvalType
this.$refs.approvalFormRef.validate((valid) => {
if (valid) {
this.$axios
.post(loc() + "/approval", {
approval: JSON.stringify(this.formData)
})
.then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
})
}
})
},
openApproval(data) {
this.$refs.guava.public(() => {
this.showApprovalForm = true
this.formData = row.approvalParam
this.$refs.memberAuditChangeInfoViewRef.onOpen({recordId: data.id, userId: data.userId})
})
},
openChangeInfo(data){
this.$refs.guava.public(() => {
this.showApprovalForm = false
this.$refs.memberAuditChangeInfoViewRef.onOpen({recordId: data.id, userId: data.userId})
})
},
openView(userId){
this.$refs.guava.view(() => {
this.$refs.memberInfoRef.onOpen(userId)
})
},
doSearch() {
this.$refs.tableRef.doSearch()
},
changeSuccess() {
this.$refs.guava.index(() => {
this.doSearch()
})
},
openEdit(row) {
this.id = row.id
this.url = '/platform/member/branchUnion/manage/list/generalMemberChange'
this.$refs.guava.edit(() => {
this.$refs.memberChangeRef.init()
})
}
}
});
</script>
<!--#
}
#-->
@@ -0,0 +1,98 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<member-manage-query ref="queryRef" @query-ready="onQueryReady"></member-manage-query>
<member-manage-table ref="tableRef" v-if="isQueryReady" @refresh="tableReady" @change-member="changeMember"
@view-member="viewMember" @add-member="addMember" @refresh-table="changeSuccess"></member-manage-table>
<template #view>
<member-info ref="memberInfoRef"></member-info>
</template>
<template #edit>
<member-apply :admin-operate="true"></member-apply>
</template>
<template #public>
<member-change :id="id" :url="url" ref="memberChangeRef" @submit-ready="changeSuccess"></member-change>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/manage/memberManageQuery.js"){}#-->
<!--#include("../../common/manage/memberManageTable.js"){}#-->
<!--#include("../../common/info/memberInfo.js"){}#-->
<!--#include("../../common/apply/memberApply.js"){}#-->
<!--#include("../../common/change/memberChange.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data: {
id: '',
username: '',
url:'',
isQueryReady: false,
hasShownMessage: false
},
components: {
"member-manage-query": MEMBER_MANAGE_QUERY,
"member-manage-table": MEMBER_MANAGE_TABLE,
"member-info": MEMBER_INFO,
"member-apply": MEMBER_APPLY,
"member-change": MEMBER_CHANGE,
},
methods: {
changeMember(data){
this.id = data.id
this.username = data.username
this.url = '/platform/member/branchUnion/manage/list/generalMemberChange'
this.$refs.guava.public(() => {
this.$refs.memberChangeRef.init()
})
},
viewMember(val){
this.$refs.guava.view(() => {
this.$refs.memberInfoRef.onOpen(val)
})
},
addMember(){
this.$refs.guava.edit()
},
onQueryReady(pageForm) {
this.isQueryReady = true;
this.$nextTick(() => {
if (this.$refs.tableRef) {
this.$refs.tableRef.pageData();
this.$refs.tableRef.pageForm = pageForm
}
})
},
tableReady(pageForm){
this.$refs.queryRef.pageForm = pageForm
},
changeSuccess(){
this.$refs.guava.index()
this.$nextTick(()=>{
this.$refs.tableRef.pageData()
})
if (this.hasShownMessage) return
setTimeout(() => {
this.$message.success('您已成功提交【'+ this.username +'】老师的变更,可前往分工会审核菜单查看审核记录');
}, 1000);
this.hasShownMessage = true;
}
},
created() {
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,51 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<template>
<member-record @open-view="openView" @open-change-info="openChangeInfo"></member-record>
</template>
<template #view>
<member-info ref="memberInfoRef"></member-info>
</template>
<template #public>
<member-audit-change-info ref="memberAuditChangeInfoRef"></member-audit-change-info>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/record/memberRecord.js"){}#-->
<!--#include("../../common/info/memberInfo.js"){}#-->
<!--#include("../../common/audit/memberAuditChangeInfo.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
store,
components: {
"member-record": MEMBER_RECORD,
"member-info": MEMBER_INFO,
"member-audit-change-info": MEMBER_AUDIT_CHANGE_INFO
},
data: {
userId: ''
},
methods: {
openChangeInfo(row) {
this.$refs.guava.public(() => {
this.$refs.memberAuditChangeInfoRef.onOpen({recordId: row.id, userId: row.userId})
})
},
openView(data) {
this.$refs.guava.view(() => {
this.$refs.memberInfoRef.onOpen(data)
})
}
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,549 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"></el-input>
</search-item>
<search-item label="名单事项">
<el-select
clearable
filterable
placeholder="请选择"
style="width: 100%"
@change="changeProject"
v-model="pageForm.verificationProjectId"
>
<el-option :key="item.id" :label="item.projectName" :value="item.id" v-for="item in verificationList"></el-option>
</el-select>
</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>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool
:label="'人员核对列表' + '【' + ( buttonData.disableSubmit ? buttonData.buttonContent : buttonData.submitCountContent ) + '】'"
>
<el-button type="primary" size="small" @click="exportExcel">导出名单事项核对记录</el-button>
<el-button v-if="buttonData.isFeedback" type="primary" size="small" @click="viewFeedback()">查看反馈结果</el-button>
<el-button v-if="buttonData.disableSubmit" style="margin-left: 10px" type="primary" size="small" @click="incorrectSubmission">
有误提交
</el-button>
<el-button v-if="buttonData.disableSubmit" style="margin-left: 10px" type="primary" size="small" @click="openCorrectSubmission">
无误提交
</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
:index="indexMethod"
align="center"
header-align="center"
label="序号"
type="index"
width="80px"
></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
align="center"
header-align="center"
min-width="100px"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template scope="{row}" v-if="column.prop=='loginname'">
<el-link @click="openView(row)" type="primary">{{row.loginname}}</el-link>
</template>
<template scope="{row}" v-else-if="column.prop=='isChanged'">
<el-link v-if="row.isChanged" @click="openChangeInfo(row)" :underline="false" type="primary">变更</el-link>
<el-link v-else :underline="false" type="danger" disabled>未变更</el-link>
</template>
<template scope="{row}" v-else-if="column.prop=='branchUnionChecked'">
<el-tag size="mini" v-if="row.branchUnionChecked" type="success">已核对</el-tag>
<el-tag size="mini" v-else type="danger">未核对</el-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='currentState'">
<el-tooltip
class="item"
effect="dark"
:content="'校工会审核意见:' + (row.verificationOption ? row.verificationOption : '暂无' )"
placement="top"
>
<el-link v-if="row.currentState == 1" :underline="false" type="danger">拒绝</el-link>
<!-- <el-link v-else-if="!row.branchUnionChecked" :underline="false" type="info" disabled>待分工会提交</el-link>-->
<el-link v-else-if="(row.currentState == 0 || !row.currentState)" :underline="false" type="info" disabled>
待审核
</el-link>
<el-link v-else :underline="false" type="primary" disabled>通过</el-link>
</el-tooltip>
</template>
</el-table-column>
<el-table-column v-if="buttonData.disableSubmit" label="操作" fixed="right" width="300px">
<template scope="{row}">
<el-button v-if="row.isChanged" size="mini" type="primary" @click="openChangeInfo(row)">查看变更</el-button>
<el-button v-if="row.currentState !== 2" size="mini" type="primary" @click="openChange(row)">
{{ row.isChanged ? '重新变更' : '变更' }}
</el-button>
<el-button v-if="row.isChanged && row.currentState != 2" size="mini" type="danger" @click="revokeChange(row)">
撤销变更
</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-change :id="userId" :url="url" ref="memberChangeRef" @submit-ready="changeSuccess"></member-change>
</template>
<template #public>
<member-verification-change ref="memberVerificationChangeRef"></member-verification-change>
</template>
</guava>
<el-dialog title="无误提交" :visible.sync="correctSubmissionDialog" width="50%" append-to-body>
<el-form :model="formData" ref="formRef" label-width="120px" :rules="formRules" size="small">
<el-form-item prop="feedbackContent" label="当前需核对人数">
<el-input :value="totalCount" size="small" readonly></el-input>
</el-form-item>
<el-form-item prop="feedbackNum" label="反馈人数">
<el-input-number v-model="formData.feedbackNum" style="width: 100%" placeholder="请填写反馈人数" size="small"></el-input-number>
</el-form-item>
<template v-if="verificationData.welfareJson && verificationData.welfareJson.length > 0">
<el-form-item prop="welfareJson" label="福利选择人数">
<el-table :data="formData.welfareJson" border size="small">
<el-table-column label="福利名称" prop="welfareName">
<template slot-scope="{row}">
<el-input v-model="row.welfareName" readonly maxlength="50" placeholder="请输入福利名称"></el-input>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark">
<template slot-scope="{row}">
<el-input v-model="row.remark" readonly maxlength="100" placeholder="请输入备注"></el-input>
</template>
</el-table-column>
<el-table-column label="选择人数" prop="chooseNumber">
<template slot-scope="{row}">
<el-input-number
style="width: 100%"
v-model="row.chooseNumber"
:min="0"
placeholder="请输入选择此福利的人数"
></el-input-number>
</template>
</el-table-column>
</el-table>
</el-form-item>
</template>
<template v-if="verificationData.isNeedFeedbackFile">
<el-form-item required label="附件上传" prop="feedbackFiles">
<file-upload
:value.sync="formData.feedbackFiles"
:upload_number="2"
upload_result_category="array"
complete_result
upload_mode="drag"
accept=".doc,.docx,.xls,.xlsx,.pdf"
></file-upload>
</el-form-item>
</template>
</el-form>
<el-row class="mt20" justify="end" type="flex">
<el-button @click="correctSubmissionDialog = false">取消</el-button>
<el-button type="primary" @click="correctSubmission">提交</el-button>
</el-row>
</el-dialog>
<el-dialog title="反馈结果" :visible.sync="feedbackDialog" width="50%" append-to-body>
<el-descriptions :column="2" border>
<el-descriptions-item label="事项名称">{{ viewData.projectName }}</el-descriptions-item>
<el-descriptions-item label="工会名称">{{ viewData.unionName }}</el-descriptions-item>
<el-descriptions-item label="反馈日期">{{ viewData.feedbackDate }}</el-descriptions-item>
<el-descriptions-item label="反馈人数">{{ viewData.feedbackNum }}</el-descriptions-item>
<template v-if="viewData.welfareJson">
<el-descriptions-item span="2" label="福利选择人数">
<el-table :data="viewData.welfareJson" border size="small">
<el-table-column label="福利名称" prop="welfareName"></el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column>
<el-table-column label="选择人数" prop="chooseNumber"></el-table-column>
</el-table>
</el-descriptions-item>
</template>
<el-descriptions-item span="2" label="核对时间">{{ viewData.startDate + '至' + viewData.endDate }}</el-descriptions-item>
<el-descriptions-item span="2" label="内容及要求" span="2">{{ viewData.content }}</el-descriptions-item>
<el-descriptions-item span="2" label="反馈附件">
<file-preview :files="viewData.feedbackFiles" complete_result></file-preview>
</el-descriptions-item>
</el-descriptions>
</el-dialog>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../../common/info/memberInfo.js"){}#-->
<!--#include("../../../common/change/memberChange.js"){}#-->
<!--#include("../../../common/verification/memberVerificationChange.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
components: {
"member-info": MEMBER_INFO,
"member-change": MEMBER_CHANGE,
"member-verification-change": MEMBER_VERIFICATION_CHANGE
},
data() {
return {
userId: "",
verificationChangeInfoUserId: "",
url: "/platform/member/branchUnion/verification/check/doCheckMember",
verificationList: [],
verificationData: {},
unions: [],
units: [],
tableColumns: [
{ prop: "loginname", label: "工号", sortable: true },
{ prop: "username", label: "姓名", sortable: true },
{ prop: "sex", label: "性别", sortable: true, width: "100px" },
{ prop: "userState", label: "在职状态", sortable: true },
// {prop: "preparedBy", label: "编制类别", sortable: true},
// {prop: 'personType', label: '人员类型', sortable: true},
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true },
{ prop: "isChanged", label: "变更状态", sortable: true },
{ prop: "branchUnionChecked", label: "核对状态", sortable: true },
{ prop: "currentState", label: "校工会状态", sortable: true }
],
formRules: {
feedbackNum: [
{ required: true, message: "请填写反馈人数", trigger: ["blur", "change"] },
{ type: "number", message: "反馈人数必须为数字" }
],
feedbackFiles: [{ required: true, message: "请上传反馈附件", trigger: ["blur", "change"] }],
welfareJson: [{ required: true, message: "请填写福利选择人数", trigger: ["blur", "change"] }]
},
pageForm: {
verificationProjectId: "",
unionId: "",
unitId: "",
userState: "",
personType: ""
},
buttonData: {
disableSubmit: false,
buttonContent: "",
submitCountContent: "",
isFeedback: false
},
correctSubmissionDialog: false,
feedbackDialog: false,
viewData: {},
totalCount: 0
}
},
methods: {
exportExcel() {
this.$downLoad("/platform/member/branchUnion/verification/check/exportExcel", this.pageForm)
},
viewFeedback() {
this.$axios
.post("/platform/member/branchUnion/verification/check/getVerificationFeedback", {
verificationProjectId: this.pageForm.verificationProjectId,
unionId: this.$store.state.user.union.id
})
.then((res) => {
if (res.code === 0) {
this.viewData = res.data
this.feedbackDialog = true
} else {
this.$message.error(res.msg)
}
})
},
/**
* 有误提交
*/
incorrectSubmission() {
//确定要提交吗,请确保数据已核对完毕
this.$confirm("确定要提交吗?,请确保数据已核对完毕", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.$axios
.post("/platform/member/branchUnion/verification/check/incorrectSubmission", {
verificationProjectId: this.pageForm.verificationProjectId
})
.then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.buttonData.disableSubmit = false
this.pageData()
this.validateSubmitButton()
} else {
this.$message.warning(res.msg)
}
})
})
.catch(() => {})
},
openCorrectSubmission() {
this.$confirm("您确认要无误提交吗?提交后所有数据将无法撤销,点击确认后将填写反馈人数,是否确认?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.verificationData = this.verificationList.find((v) => v.id === this.pageForm.verificationProjectId)
if (this.verificationData.welfareJson && this.verificationData.welfareJson.length > 0) {
this.formData.welfareJson = this.verificationData.welfareJson
} else {
this.formData.welfareJson = []
}
console.log(this.verificationData)
this.correctSubmissionDialog = true
})
},
/**
* 无误提交
*/
correctSubmission() {
if (this.formData.feedbackNum !== this.totalCount) {
this.$message.warning("反馈人数与实际反馈人数不一致,无法提交;如有疑问,请联系校工会")
return
}
let data = clone(this.formData)
if (this.formData.welfareJson && this.formData.welfareJson.length > 0) {
data.welfareJson = this.formData.welfareJson.map((v) => ({
...v,
chooseNumber: v.chooseNumber || 0
}))
const totalChooseNumber = data.welfareJson.reduce((sum, item) => sum + item.chooseNumber, 0)
if (totalChooseNumber !== this.totalCount) {
this.$message.warning("上报的福利选择人数与当前需核对人数不一致,无法提交;如有疑问,请联系校工会")
return
}
data.welfareJson = JSON.stringify(data.welfareJson)
}
if (data.feedbackFiles) {
data.feedbackFiles = JSON.stringify(data.feedbackFiles)
}
data.verificationProjectId = this.pageForm.verificationProjectId
this.$axios
.post("/platform/member/branchUnion/verification/check/correctSubmission", {
data: JSON.stringify(data)
})
.then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.correctSubmissionDialog = false
this.pageData()
this.validateSubmitButton()
this.formData = {}
} else {
this.$message.warning(res.msg)
}
})
},
/**
* 变更数据查看
* @param row
*/
openChangeInfo(row) {
this.$refs.guava.public(() => {
this.$refs.memberVerificationChangeRef.onOpen({ id: row.userId, projectId: this.pageForm.verificationProjectId })
})
},
/**
* 撤销变更
*/
revokeChange(row) {
this.$confirm("确定要撤销变更吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
const formData = new FormData()
formData.userId = row.userId
formData.verificationProjectId = this.pageForm.verificationProjectId
this.$axios
.post("/platform/member/branchUnion/verification/check/branchUnionRevokeChange", {
data: JSON.stringify(formData)
})
.then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doSearch()
} else {
this.$message.warning(res.msg)
}
})
})
.catch(() => {})
},
// 基本信息查看
openView(row) {
this.$refs.guava.view(() => {
this.$refs.memberInfoRef.onOpen(row.userId)
})
},
openChange(row) {
if (row.currentState == 2) {
// 该条记录校工会核对时已通过,您确定要继续变更吗?
this.$confirm("该条记录校工会核对时已通过,您确定要继续变更吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.openChangeNext(row)
})
.catch((e) => {
console.log("取消" + e)
})
} else {
this.openChangeNext(row)
}
},
openChangeNext(row) {
this.userId = row.userId
const data = this.verificationList.find((v) => v.id === row.verificationProjectId)
this.$refs.guava.edit(() => {
this.$refs.memberChangeRef.verificationInit({
renewFields: data.renewFields,
verificationProjectId: row.verificationProjectId,
changeOrigin: "BRANCH_UNION_VERIFICATION"
})
})
// this.$nextTick(() => {
// this.$refs.memberChangeRef.verificationInit({
// renewFields: data.renewFields,
// verificationProjectId: row.verificationProjectId,
// changeOrigin: "BRANCH_UNION_VERIFICATION"
// })
// })
},
getVerificationList() {
this.$axios.post("/platform/member/branchUnion/verification/check/getVerificationList").then((res) => {
if (res.code === 0) {
this.verificationList = res.data
if (this.verificationList.length > 0) {
this.$set(this.pageForm, "verificationProjectId", this.verificationList[0].id)
this.verificationData = this.verificationList[0]
this.validateSubmitButton()
}
this.pageData()
}
})
},
changeSuccess() {
this.$refs.guava.index()
this.doSearch()
},
initData() {
const isAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
if (isAdmin) {
this.$businessTool.listUnion(this.pageForm.unionId).then((data) => {
this.unions = data
})
} else {
this.$businessTool.listUnion(this.$store.state.user.union.id).then((data) => {
this.unions = data
})
}
},
changeProject() {
this.doSearch()
this.validateSubmitButton()
},
flushUnits() {
this.$set(this.pageForm, "unitId", null)
this.units = []
if (this.pageForm.unionId) {
this.$businessTool.listUnit(this.pageForm.unionId).then((data) => {
this.units = data
})
}
},
//校验提交按钮是否能使用
validateSubmitButton() {
this.$axios
.post("/platform/member/branchUnion/verification/check/validateSubmitButton", {
verificationProjectId: this.pageForm.verificationProjectId
})
.then((res) => {
if (res.code === 0) {
const data = res.data
this.buttonData.disableSubmit = data.buttonStatus
this.buttonData.buttonContent = data.buttonContent
this.buttonData.submitCountContent = data.submitCountContent
this.buttonData.isFeedback = data.isFeedback
} else {
this.buttonData.disableSubmit = false
}
})
},
pageData() {
this.$axios.post("/platform/member/branchUnion/verification/check/pageData", this.pageForm).then((res) => {
if (res.code === 0) {
this.tableData = res.data.list
this.pageForm.totalCount = res.data.totalCount
// if (!this.totalCount) {
// this.totalCount = res.data.totalCount
// }
this.totalCount = res.data.totalCount
}
})
}
},
async created() {
this.getVerificationList()
this.initData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,44 @@
<div id="member_change_branch_union_approval">
<el-form :model="formData" ref="formRef" label-width="0" label-suffix="" class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
</el-form>
<snaker-flow-task-form-action @task-action="handleTaskAction" @cancel="handleCancel"></snaker-flow-task-form-action>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: "#member_change_branch_union_approval",
store,
data() {
return {
formData: {
tf_opinion: ""
},
}
},
methods: {
handleTaskAction(val) {
const data = {
...val,
...this.formData
}
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify(data)
}).then(res => {
if (res.code === 0) {
this.$message.success("操作成功")
// 发送完成消息
window.parent.postMessage({
type: "task-complete"
}, "*")
}
})
},
handleCancel(val) {
console.log(val)
},
}
})
</script>
@@ -0,0 +1,208 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<common-query ref="commonQueryRef" user-attribute-multiple @search="search"></common-query>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="审核列表">
<el-radio-group @change="search" class="mr5" size="small" v-model="pageForm.audit">
<el-radio-button label="true">已审核</el-radio-button>
<el-radio-button label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号" type="index" width="80px"></el-table-column>
<el-table-column :label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
header-align="center"
min-width="100px"
show-overflow-tooltip
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop=='changeTypes'">
<span style="color: #0e78c5;cursor: pointer" @click="openView(row)">
{{getChangeTypes(row.changeTypes)}}
</span>
</template>
<template scope="{row}" v-else-if="column.prop=='instanceState'">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="200px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
</el-button>
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">
{{formData.taskName}}
</div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=""
class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
</el-row>
</div>
</info>
</template>
</guava>
</div>
<!--#include("../common/commonQuery.html"){}#-->
<script nonce="${cspNonce!}">
<!--#include("../common/info.js"){}#-->
<!--#include("../common/commonQuery.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
pageForm: {
audit: false
},
tableColumns: [
{ prop: "loginName", label: "工号", sortable: true },
{ prop: "userName", label: "姓名", sortable: true },
{ prop: "sex", label: "性别", sortable: true },
{ prop: "userState", label: "在职状态", sortable: true },
{ prop: "personType", label: "人员类型", sortable: true },
// { prop: 'preparedBy', label: '编制类别', sortable: true },
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true },
{ prop: "changeTypes", label: "变更类型", sortable: true, width: 200 },
{ prop: "applyDateTime", label: "申请时间", sortable: true },
{ prop: "curTaskName", label: "当前节点"},
{ prop: "instanceState", label: "流程状态"}
],
changeTypeData: [],
// 审核相关
formData: {},
showApprovalForm: false
}
},
components: {
'info': INFO,
'common-query': COMMON_QUERY,
},
methods: {
openView(row){
this.$refs.guava.edit(() => {
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
})
},
openAudit(row) {
this.$refs.guava.edit(()=>{
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.infoRef.onOpen(row)
})
},
handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const loading = createLoading()
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
}).finally(() => {
loading.close()
})
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
}).then(() => {
const loading = createLoading()
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doSearch()
}
}).finally(() => {
loading.close()
})
})
},
search(pageForm){
if (pageForm) {
this.pageForm = {...this.pageForm, ...pageForm}
}
this.doSearch()
},
getChangeTypes(changeTypes) {
const changeTypesList = JSON.parse(changeTypes)
if (!changeTypesList) return null
if (changeTypesList) {
if (!changeTypesList || changeTypesList.length === 0 || !this.changeTypeData || this.changeTypeData.length === 0) return null
return changeTypesList
.map((v) => {
return this.changeTypeData.find((item) => item.code === v).changeTypeName
})
.join(",")
}
return null
},
},
async created() {
this.changeTypeData = await this.$businessTool.getEnumOptions("MemberChangeType")
this.pageData()
}
});
</script>
<!--#
}
#-->
@@ -0,0 +1,40 @@
<script type="text/x-template" id="member-change-common-query-template">
<search @search="doSearch">
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"></el-input>
</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.userStates" placeholder="请选择在职状态" @change="doSearch"
code="USER_STATE" multiple collapse-tags></dict-select>
</search-item>
<search-item label="人员类型">
<dict-select v-model="pageForm.personTypes" placeholder="请选择人员类型" @change="doSearch"
code="USER_PERSON_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-if="userAttributeMultiple" v-model="pageForm.userAttributes"
placeholder="请选择人员属性" @change="doSearch" code="USER_ATTRIBUTE"
multiple collapse-tags clearable></dict-select>
<dict-select v-else v-model="pageForm.userAttribute" placeholder="请选择人员属性"
@change="doSearch" code="USER_ATTRIBUTE"></dict-select>
</search-item>
</search>
</script>
@@ -0,0 +1,70 @@
const COMMON_QUERY = {
template: "#member-change-common-query-template",
props: {
// 未显式开启时保持原单选行为,避免影响未列入本次范围的页面。
userAttributeMultiple: {
type: Boolean,
default: false
}
},
store,
mixins: [initTableMixins],
data() {
return{
unions: [],
units: [],
pageForm: {
searchKeyword: '',
unionId: '',
unitId: '',
userStates: [],
personTypes: [],
preparedBys: [],
aidFundMemberUserType: '',
userAttribute: '',
userAttributes: [],
}
}
},
methods: {
doSearch(){
const pageForm = clone(this.pageForm)
pageForm.userStates = JSON.stringify(this.pageForm.userStates)
pageForm.personTypes = JSON.stringify(this.pageForm.personTypes)
pageForm.preparedBys = JSON.stringify(this.pageForm.preparedBys)
// 多选人员属性沿用现有数组查询参数的JSON提交方式。
pageForm.userAttributes = JSON.stringify(this.pageForm.userAttributes)
this.$emit('search', pageForm)
},
async initData(){
if (this.$auth.hasRoleOr("SYSADMIN, SCHOOL_UNION_ADMIN, SCHOOL_UNION_MEMBER_ADMIN")) {
this.$businessTool.listUnion(this.pageForm.unionId).then((data) => {
this.unions = data
})
this.$businessTool.listUnit().then((data) => {
this.units = data
})
} else {
this.$businessTool.listUnion(this.$store.state.user.union.id).then((data) => {
this.unions = data
})
this.$businessTool.listUnit(this.$store.state.user.union.id).then((data) => {
this.units = data
})
}
},
async flushUnits(){
this.$set(this.pageForm, "unitId", null)
this.units = []
if (this.pageForm.unionId) {
this.$businessTool.listUnit(this.pageForm.unionId).then((data) => {
this.units = data
})
}
}
},
async created() {
this.initData()
}
}
@@ -0,0 +1,180 @@
const INFO = {
template: /*language=HTML*/ `
<div>
<div class="process-title">申请信息
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
</div>
<el-tabs v-model="activeName">
<el-tab-pane label="基础信息" name="basicInfo">
<el-descriptions :column="3" border class="descriptions-form">
<el-descriptions-item label="工号">{{ viewData.loginname }}</el-descriptions-item>
<el-descriptions-item label="姓名">{{ viewData.username }}</el-descriptions-item>
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
<el-descriptions-item label="民族">{{ viewData.nation }}</el-descriptions-item>
<el-descriptions-item label="出生日期">{{ viewData.birthday ?
$moment(viewData.birthday).format("YYYY年MM月DD日") : '暂无' }}
</el-descriptions-item>
<el-descriptions-item label="政治面貌">{{ viewData.political }}</el-descriptions-item>
<el-descriptions-item label="学历">{{ viewData.education }}</el-descriptions-item>
<el-descriptions-item label="学位">{{ viewData.academicDegree }}</el-descriptions-item>
<el-descriptions-item label="党政职务">{{ viewData.position }}</el-descriptions-item>
<el-descriptions-item label="工作单位">{{ viewData.unitName }}</el-descriptions-item>
<el-descriptions-item label="所属工会">{{ viewData.unionName }}</el-descriptions-item>
<el-descriptions-item v-if="showThreeUnit" label="三级单位">{{ viewData.threeUnitName || '暂无' }}</el-descriptions-item>
<el-descriptions-item v-else label="所属校区">{{ viewData.campus }}</el-descriptions-item>
<el-descriptions-item label="身份证号码">{{ viewData.idCard }}</el-descriptions-item>
<el-descriptions-item label="联系电话">{{ viewData.mobile }}</el-descriptions-item>
<el-descriptions-item label="电子邮箱">{{ viewData.email }}</el-descriptions-item>
<el-descriptions-item label="在职状态">{{ viewData.userState }}</el-descriptions-item>
<el-descriptions-item label="人员类型">{{ viewData.personType }}</el-descriptions-item>
<template v-if="viewData.userState == '退休'">
<el-descriptions-item label="退休日期">{{ viewData.retireDate ?
$moment(viewData.retireDate).format("YYYY-MM-DD") : '暂无' }}
</el-descriptions-item>
<el-descriptions-item label="福利享受截止日期">{{
$moment(viewData.welfareStopDate).format("YYYY-MM-DD") }}
</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
</template>
<el-descriptions-item label="会员状态">{{ viewData.member ? '会员' : '非会员' }}
</el-descriptions-item>
<!-- <template v-if="viewData.loginname == $store.state.user.loginname">-->
<template>
<el-descriptions-item label="家庭主要成员" :span="3">
<el-table v-if="viewData.families&&viewData.families.length"
:data="viewData.families" size="mini" border
:header-cell-style="{background:'#eff3f6'}"
style="width: 100%">
<el-table-column prop="relation" label="与本人关系" align="center"
header-align="center">
</el-table-column>
<el-table-column prop="name" label="姓名" align="center" header-align="center">
</el-table-column>
<el-table-column prop="unit" label="单位" align="center" header-align="center">
</el-table-column>
<el-table-column prop="remark" label="备注" align="center" header-align="center">
</el-table-column>
</el-table>
<el-empty v-else :image-size="50" description="暂无家庭成员信息"></el-empty>
</el-descriptions-item>
<el-descriptions-item label="个人简况" :span="3">
<template slot="label">个人简况</template>
<div v-if="viewData.personalData" class="text-left" v-html="viewData.personalData"></div>
<span v-else>无数据</span>
</el-descriptions-item>
</template>
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="变更信息" name="changeInfo" v-if="viewData.changeInfos">
<el-table :data="viewData.changeInfos" :size="tableSize" @sort-change="pageOrder" ref="table"
row-key="id" style="width: 100%">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号" type="index" width="80px"></el-table-column>
<el-table-column prop="fieldName" label="变更字段" header-align="center"></el-table-column>
<el-table-column prop="sourceValue" label="原数据" header-align="center">
<template slot-scope="{row}">
<div v-html="row.sourceValue"></div>
</template>
</el-table-column>
<el-table-column prop="newValue" label="新数据" header-align="center">
<template slot-scope="{row}">
<div v-html="row.newValue"></div>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
<template v-for="task in doneTasks">
<div class="mt10">
<div class="process-title">{{ task.displayName }}</div>
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
v-if="task.ext.isFirstTaskNode">
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
}}({{task.ext.initiatorAccount}})
</el-descriptions-item>
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
<el-descriptions-item label="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.submitType"></dict-tag>
</el-descriptions-item>
</el-descriptions>
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
}}({{task.taskFormData.loginName}})
</el-descriptions-item>
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
<el-descriptions-item label="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.submitType"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
task.taskFormData.opinion }}
</el-descriptions-item>
</el-descriptions>
</div>
</template>
<slot></slot>
<snaker-chart ref="snakerChartRef"></snaker-chart>
</div>
`,
store,
mixins: [initTableMixins],
props: {
showThreeUnit: { type: Boolean, default: false }
},
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
data(){
return {
viewData: {},
doneTasks: [],
row: null,
activeName: "basicInfo",
}
},
methods: {
// 打开
onOpen(row) {
this.row = row
console.log(row.id)
this.info()
this.getDoneTasks()
},
// 获取申请信息
info() {
this.$axios.post("/platform/member/change/mine/findMemberChangeRecord", { id: this.row.id }).then((res) => {
if (res.code === 0) {
this.viewData = res.data
}
})
},
// 获取已办任务审批记录
getDoneTasks() {
this.$axios.post("/flow/common/doneTasks", { bizId: this.row.id }).then((res) => {
if (res.code === 0) {
this.doneTasks = res.data
}
})
},
// 查看流程图
openChart(){
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId, this.row.instanceId)
}
}
}
@@ -0,0 +1,111 @@
const MEMBER_ALL_CHANGE_INFO = {
template: /*language=HTML*/ `
<el-tabs v-model="activeName">
<el-tab-pane label="基础信息" name="basicInfo">
<el-descriptions :column="3" border class="descriptions-form">
<el-descriptions-item label="工号">{{ viewData.loginname }}</el-descriptions-item>
<el-descriptions-item label="姓名">{{ viewData.username }}</el-descriptions-item>
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
<el-descriptions-item label="民族">{{ viewData.nation }}</el-descriptions-item>
<el-descriptions-item label="出生日期">{{ viewData.birthday ? $moment(viewData.birthday).format("YYYY年MM月DD日") : "" }}</el-descriptions-item>
<el-descriptions-item label="政治面貌">{{ viewData.political }}</el-descriptions-item>
<el-descriptions-item label="学历">{{ viewData.education }}</el-descriptions-item>
<el-descriptions-item label="学位">{{ viewData.academicDegree }}</el-descriptions-item>
<el-descriptions-item label="党政职务">{{ viewData.position }}</el-descriptions-item>
<el-descriptions-item label="工作单位">{{ viewData.unitName }}</el-descriptions-item>
<el-descriptions-item label="所属工会">{{ viewData.unionName }}</el-descriptions-item>
<el-descriptions-item label="所属校区">{{ viewData.campusName }}</el-descriptions-item>
<el-descriptions-item label="身份证号码">{{ viewData.idCard }}</el-descriptions-item>
<el-descriptions-item label="联系电话">{{ viewData.mobile }}</el-descriptions-item>
<el-descriptions-item label="电子邮箱">{{ viewData.email }}</el-descriptions-item>
<el-descriptions-item label="在职状态">{{ viewData.userState }}</el-descriptions-item>
<el-descriptions-item label="人员类型">{{ viewData.personType }}</el-descriptions-item>
<template v-if="viewData.userState == '退休'">
<el-descriptions-item label="退休日期">{{ viewData.retireDate ? $moment(viewData.retireDate).format("YYYY-MM-DD") : '暂无' }}</el-descriptions-item>
<el-descriptions-item label="福利享受截止日期">{{ $moment(viewData.welfareStopDate).format("YYYY-MM-DD") }}</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
</template>
<el-descriptions-item label="会员状态">{{ viewData.member ? '会员' : '非会员' }}</el-descriptions-item>
<el-descriptions-item label="福利会员状态">{{ viewData.welfareMember ? '福利会员' : '非福利会员' }}</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
<template v-if="viewData.loginname == $store.state.user.loginname">
<el-descriptions-item label="家庭主要成员" :span="3">
<el-table v-if="viewData.families&&viewData.families.length"
:data="viewData.families" size="mini" border
:header-cell-style="{background:'#eff3f6'}"
style="width: 100%">
<el-table-column prop="relation" label="与本人关系" align="center" header-align="center">
</el-table-column>
<el-table-column prop="name" label="姓名" align="center" header-align="center">
</el-table-column>
<el-table-column prop="unit" label="单位" align="center" header-align="center">
</el-table-column>
<el-table-column prop="remark" label="备注" align="center" header-align="center">
</el-table-column>
</el-table>
<el-empty v-else :image-size="50" description="暂无家庭成员信息"></el-empty>
</el-descriptions-item>
<el-descriptions-item label="个人简况" :span="3">
<template slot="label">个人简况</template>
<div v-if="viewData.vita" class="text-left" v-html="viewData.vita"></div>
<span v-else>无数据</span>
</el-descriptions-item>
</template>
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="历史变更记录" name="changeInfo" v-if="viewData.allChangeInfo">
<el-timeline>
<el-timeline-item placement="top" v-for="(changeData, index) in viewData.allChangeInfo"
:key="index" :timestamp="changeData.timestamp">
<el-card>
<h4>{{ changeData.changeOriginName }}</h4>
<el-table :data="changeData.changeInfos" size="mini" ref="table" row-key="id" style="width: 100%">
<el-table-column align="center" header-align="center"
label="序号" type="index" width="80px"></el-table-column>
<el-table-column prop="fieldName" label="变更字段" header-align="center"></el-table-column>
<el-table-column prop="sourceValue" label="原数据" header-align="center">
<template slot-scope="{row}">
<div v-html="row.sourceValue"></div>
</template>
</el-table-column>
<el-table-column prop="newValue" label="新数据" header-align="center">
<template slot-scope="{row}">
<div v-html="row.newValue"></div>
</template>
</el-table-column>
</el-table>
</el-card>
</el-timeline-item>
</el-timeline>
</el-tab-pane>
</el-tabs>
`,
store,
data(){
return{
viewData: {},
activeName: "basicInfo"
}
},
methods:{
onOpen(userId){
this.$axios.post('/platform/member/change/manage/getAllChangeMemberInfo', {userId})
.then(resp => {
if (resp.code === 0) {
this.viewData = resp.data
} else {
this.$message.warning(resp.msg)
}
})
}
}
}
@@ -0,0 +1,565 @@
const MEMBER_CHANGE = {
template: /*language=HTML*/ `
<el-card shadow="never">
<snaker-start slot="header" label="会员变更" define_key="HYBG"></snaker-start>
<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" readonly 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" readonly size="small"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="性别">
<el-form-item prop="sex">
<el-radio-group :disabled="allowFields('sex')" 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"
:disabled="allowFields('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"
:disabled="allowFields('birthday')"
placeholder="请选择出生日期"
format="yyyy-MM-dd"
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"
:disabled="allowFields('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"
:disabled="allowFields('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"
:disabled="allowFields('academicDegree')"
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>-->
<!--<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, SCHOOL_UNION_MEMBER_ADMIN')">
<el-descriptions-item label="工作单位">
<el-form-item prop="unitId">
<el-select clearable filterable placeholder="请选择工作单位" style="width: 100%"
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 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>
</template>-->
<template>
<el-descriptions-item label="工作单位">
<el-form-item prop="unitId">
<el-input v-model="formData.unitName" disabled placeholder="暂无工作单位"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="所属工会">
<el-form-item prop="unionName">
<el-input v-model="formData.unionName" disabled placeholder="请输入所属工会"></el-input>
</el-form-item>
</el-descriptions-item>
</template>
<el-descriptions-item v-if="showThreeUnit" label="三级单位">
<el-form-item prop="threeUnitId">
<el-select v-model="formData.threeUnitId" clearable filterable
placeholder="请选择三级单位" style="width: 100%">
<el-option v-for="item in threeUnits" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item v-else label="所属校区">
<el-form-item prop="campus">
<dict-select style="width: 100%" placeholder="请选择所属校区" v-model="formData.campus"
:disabled="allowFields('campus')" code="USER_CAMPUS"></dict-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="身份证号码">
<el-form-item prop="idCard">
<el-input v-model="formData.idCard" :disabled="allowFields('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" :disabled="allowFields('mobile')"
placeholder="请输入联系电话" maxlength="15"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="电子邮箱">
<el-form-item prop="email">
<el-input v-model="formData.email" :disabled="allowFields('email')"
placeholder="请输入电子邮箱" maxlength="50"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="在职状态">
<el-form-item prop="userState">
<dict-select v-model="formData.userState" code="USER_STATE"
:disabled="allowFields('userState')" 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"
:disabled="allowFields('personType')" 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>-->
<template v-if="formData.userState == '退休'">
<el-descriptions-item label="退休日期">
<el-form-item prop="retireDate">
<el-date-picker v-model="formData.retireDate"
type="date"
placeholder="请选择退休日期"
format="yyyy-MM-dd"
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="welfareStopDate">
<el-date-picker v-model="formData.welfareStopDate"
type="date"
:disabled="isView"
placeholder="请选择福利享受截止日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
style="width: 100%"></el-date-picker>
</el-form-item>
</el-descriptions-item>
<!-- <el-descriptions-item></el-descriptions-item>-->
</template>
<el-descriptions-item label="会员状态" >
<el-form-item prop="member">
<el-radio-group v-model="formData.member" size="small">
<el-radio border :label="true">会员</el-radio>
<el-radio border :label="false">非会员</el-radio>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="福利会员状态">
<el-form-item prop="welfareMember">
<el-radio-group v-model="formData.welfareMember" size="small" class="welfare-member-radio-group"
style="display: flex; align-items: center; flex-wrap: nowrap; white-space: nowrap;">
<el-radio border :label="true" style="flex-shrink: 0;">福利会员</el-radio>
<el-radio border :label="false" style="flex-shrink: 0;">非福利会员</el-radio>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="入校时间">
<el-form-item>
<el-date-picker v-model="formData.arrivalAtSchoolDate"
type="date"
placeholder="请选择入校时间"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
<template v-if="formData.loginname == $store.state.user.loginname">
<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" :disabled="allowFields('families')"
@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 || allowFields('families')"
@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>
</template>
</el-descriptions>
</el-form>
<el-row type="flex" justify="end" class="mt20">
<el-button type="primary" plain @click="$emit('do-back')">返回</el-button>
<el-button type="primary" @click="onSubmit">提交变更</el-button>
</el-row>
<!-- <el-row justify="end" type="flex" class="mt10">-->
<!-- <el-button @click="$emit('do-back')" v-if="formData.id || !isShow" type="primary">返 回</el-button>-->
<!-- <template v-if="isShow">-->
<!-- <el-button @click="doSave" type="primary">保存变更</el-button>-->
<!-- </template>-->
<!-- <el-button @click="doSubmit" type="primary">提交变更</el-button>-->
<!-- </el-row>-->
</el-card>
`,
props: {
id: { type: String, default: '' },
showThreeUnit: { type: Boolean, default: false },
},
mixins: [initTableMixins],
store,
data(){
return{
isShow: true,
user: {},
units: [],
unions: [],
threeUnits: [],
// 允许变更的字段
allowChangeFields: [],
formData: {
families: [],
},
formRules: {
username: [{required: false, message: "必填", trigger: ["change", "blur"]}],
sex: [{required: false, message: "必填", trigger: ["change", "blur"]}],
/*email: [
{
validator: (rule, value, callback) => {
if (!value) {
callback();
} else if (/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(value)) {
callback();
} else {
callback(new Error("邮箱格式错误"));
}
},
trigger: ["change", "blur"]
}
],
idCard: [
{
validator: (rule, value, callback) => {
if (!value) {
// 如果值为空,直接通过校验
callback();
} else if (/^[1-9]\d{5}(18|19|20)?\d{2}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}(\d|[Xx])$/.test(value)) {
// 18位身份证号码格式正确
callback();
} else if (/^[1-9]\d{7}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
// 15位身份证号码格式正确
callback();
} else if (/^[1-9]\d{5}(18|19|20)?\d{2}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
// 外国人身份证号码格式正确(18位)
callback();
} else if (/^[1-9]\d{7}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
// 外国人身份证号码格式正确(15位)
callback();
} else {
// 格式错误,返回错误信息
callback(new Error("身份证号码格式错误"));
}
},
trigger: ["change", "blur"]
}
],
mobile: [
{
validator: (rule, value, callback) => {
if (!value) {
// 如果值为空,直接通过校验
callback();
} else if (/^[1][345789][0-9]{9}$/.test(value)) {
// 手机号格式正确
callback();
} else if (/^\d+-\d+$/.test(value) && value.length <= 16) {
// 座机号格式正确
callback();
} else {
// 格式错误,返回错误信息
callback(new Error(value.includes('-') ? '座机号码格式错误' : '手机号码格式错误'));
}
},
trigger: ["change", "blur"]
}
]*/
},
welfareProjectList: []
}
},
methods: {
getUnionName(val){
const data = this.units.find(v => String(v.id) === String(val))
this.$set(this.formData, 'unitName', data ? data.name : '')
this.$set(this.formData, 'unionName', data ? (data.unionName || data.unionname || '') : '')
},
normalizeUnitField() {
if (!this.formData || !this.formData.unitId) {
return
}
const unitId = String(this.formData.unitId)
this.$set(this.formData, "unitId", unitId)
let unit = this.units.find(v => String(v.id) === unitId)
if (unit) {
this.$set(this.formData, "unitName", unit.name)
this.$set(this.formData, "unionName", unit.unionName || unit.unionname || this.formData.unionName || "")
}
},
allowFields(prop) {
return !this.allowChangeFields.map(v => v.code).includes(prop)
},
// 管理页仅查询当前被编辑人员所属二级单位的直属三级单位,避免越级选择其他单位数据。
initThreeUnits() {
this.threeUnits = []
if (!this.showThreeUnit) {
return Promise.resolve()
}
if (!this.formData.unitId) {
this.$message.warning("当前人员未配置所属单位,无法查询三级单位")
return Promise.resolve()
}
return this.$axios.post("/platform/sys/unit/child", {pid: this.formData.unitId})
.then((resp) => {
if (resp.code === 0) {
this.threeUnits = resp.data || []
if (this.threeUnits.length === 0) {
this.$message.warning("当前所属单位未配置三级单位")
}
} else {
this.$message.error(resp.msg || "三级单位查询失败")
}
})
.catch(() => {
this.$message.error("三级单位查询失败,请稍后重试")
})
},
doSave(){
this.$confirm("保存后可在我的申请里面再次编辑,您确定要保存吗?", "提示", { type: "warning" })
.then(() => {
const formData = this.formData
if (formData.families) {
formData.families = JSON.stringify(this.formData.families)
}
this.$emit('do-save', formData)
})
.catch()
},
onSubmit() {
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$confirm("提交后将进入审核流程,无法再进行编辑,您确定要提交申请吗?", "提示", { type: "warning" })
.then(() => {
const formData = this.formData
if (formData.families) {
formData.families = JSON.stringify(this.formData.families)
}
this.$emit('do-submit', formData)
})
.catch()
}
})
},
async init(userId){
if (userId) {
this.isShow = false
await this.getUserById(userId)
} else {
this.isShow = true
this.user = this.$store.state.user
}
await this.getFormDataValue(this.id)
this.allowChangeFields = await this.$businessTool.getDictOptions("ALLOW_CHANGE_FIELDS")
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_MEMBER_ADMIN, SCHOOL_UNION_ADMIN')) {
this.units = await this.$businessTool.listUnit()
this.unions = await this.$businessTool.listUnion()
} else {
this.units = await this.$businessTool.listUnit()
}
this.normalizeUnitField()
this.initThreeUnits()
},
async getUserById(userId){
const resp = await $.post("/platform/member/change/apply/getUserByIdForMemberChange", { userId })
if (resp.code === 0) {
this.user = resp.data
}
},
getFormDataValue(id){
if (id) {
return $.post("/platform/member/change/apply/findChangeById", { id }).then((res) => {
if (res.code === 0) {
this.formData = res.data
this.formData.unionid = this.user.unionid
if (this.formData.families) {
this.formData.families = JSON.parse(this.formData.families)
} else {
this.formData.families = []
}
}
})
} else {
const {
id,
username,
loginname,
sex,
member,
welfareMember,
nation,
birthday,
political,
education,
academicDegree,
position,
unit,
union,
campus,
threeUnitId,
userState,
personType,
preparedBy,
userAttribute,
aidFundMemberUserType,
idCard,
mobile,
email,
families,
personalData,
arrivalAtSchoolDate
} = this.user
this.$set(this.formData, "userId", id)
this.$set(this.formData, "username", username)
this.$set(this.formData, "loginname", loginname)
this.$set(this.formData, "birthday", birthday)
this.$set(this.formData, "sex", sex)
this.$set(this.formData, "member", member === 1)
this.$set(this.formData, "welfareMember", welfareMember === 1)
this.$set(this.formData, "idCard", idCard)
this.$set(this.formData, "nation", nation)
this.$set(this.formData, "political", political)
this.$set(this.formData, "position", position)
this.$set(this.formData, "education", education)
this.$set(this.formData, "academicDegree", academicDegree)
this.$set(this.formData, "campus", campus)
this.$set(this.formData, "threeUnitId", threeUnitId)
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 ? String(unit.id) : null)
this.$set(this.formData, "unionName", union ? union.name : null)
this.$set(this.formData, "unionId", union ? union.id : null)
this.$set(this.formData, "mobile", mobile)
this.$set(this.formData, "email", email)
this.$set(this.formData, "families", families ? families : [])
this.$set(this.formData, "personalData", personalData)
this.$set(this.formData, "arrivalAtSchoolDate", arrivalAtSchoolDate)
}
}
},
created(){
this.init()
},
style: /*language=CSS*/ `
.el-descriptions-item__label {
width: 15% !important;
}
.welfare-member-radio-group {
display: flex;
align-items: center;
flex-wrap: nowrap;
}
.welfare-member-radio-group .el-radio {
margin-right: 12px;
}
`
}
@@ -0,0 +1,896 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"></el-input>
</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 @change="flushThreeUnits" @clear="flushThreeUnits" 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="三级单位">
<el-select clearable filterable placeholder="请选择三级单位" style="width: 100%"
v-model="pageForm.threeUnitId">
<el-option :key="item.id" :label="item.name" :value="item.id"
v-for="item in threeUnits"></el-option>
</el-select>
</search-item>
<search-item label="性别">
<dict-select v-model="pageForm.sex" placeholder="性别" @change="doSearch"
code="USER_SEX"></dict-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.userAttributes" placeholder="请选择人员属性" @change="doSearch"
code="USER_ATTRIBUTE" multiple collapse-tags clearable></dict-select>
</search-item>
<search-item label="更新日期">
<el-date-picker :picker-options="pickerOptions" @change="changeDateRangeChange"
align="right" end-placeholder="结束日期" format="yyyy-MM-dd"
range-separator="-" start-placeholder="开始日期" style="width: 100%"
type="datetimerange" v-model="pageForm.changeDateRange"
value-format="yyyy-MM-dd"></el-date-picker>
</search-item>
</search>
</el-card>
<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">
<el-radio-button :label="null">全部教工</el-radio-button>
<el-radio-button :label="1">会员</el-radio-button>
<el-radio-button :label="0">非会员</el-radio-button>
</el-radio-group>
<span class="text-danger">人员异动:</span>
<el-radio-group @change="doSearch" class="mr5" size="small"
v-model="pageForm.changed">
<el-radio-button :label="2">全部</el-radio-button>
<el-radio-button :label="1">异动</el-radio-button>
<el-radio-button :label="0">未异动</el-radio-button>
</el-radio-group>
<!--<div v-if="pageForm.changed == '1'" class="div-enum">
<dict-select v-model="pageForm.USER_CHANGE_TYPE" placeholder="异动类型" @change="doSearch"
code="UserType"></dict-select>
</div>-->
<!--<el-button type="primary" size="small" icon="el-icon-printer" @click="exportExcel">导出会员名单</el-button>-->
<el-popover
placement="bottom"
trigger="click"
width="200">
<div style="padding:4px 0;border-bottom:1px solid #eee;">
<el-button size="mini" @click="checkAll">全选</el-button>
<el-button size="mini" @click="invertCheck">反选</el-button>
</div>
<div style="max-height:40vh;overflow-y:auto;padding:6px 0;">
<el-checkbox-group v-model="checkedFields">
<el-checkbox
v-for="f in tableColumns"
:key="f.prop"
:label="f.prop"
style="display:block;margin:6px 0;">
{{ f.label }}
</el-checkbox>
</el-checkbox-group>
</div>
<el-button
slot="reference"
type="text"
icon="el-icon-s-operation"
size="small"
style="margin-left:12px;">
列设置
</el-button>
</el-popover>
</table-tool>
<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"
:sortable="column.sortable" :width="column.width"
align="center" header-align="center" min-width="100px"
v-if="checkedFields.includes(column.prop)" :fixed="column.fixed"
show-overflow-tooltip v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop=='loginname'">
<el-link @click="openView(row.id)" type="primary">{{row.loginname}}</el-link>
</template>
</el-table-column>
<el-table-column header-align="center" label="异动信息">
<el-table-column align="center" header-align="center" label="更新时间"
min-width="145px" prop="changeTime"
show-overflow-tooltip sortable>
</el-table-column>
<el-table-column align="center" header-align="center" label="异动类型"
prop="changeType" show-overflow-tooltip sortable>
<template scope="{row}">
<span style="color: #0e78c5;cursor: pointer" @click="openUserChangeInfo(row)">
{{getChangeTypes(row.changeTypes)}}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column align="center" header-align="center" label="会员" prop="member"
show-overflow-tooltip sortable>
<template scope="{row}">
<span class="text-success " v-if="row.member==1">
<i class="fa fa-circle ml5"></i>
</span>
<span class="text-danger" v-else>
<i class="fa fa-circle ml5"></i>
</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="福利会员" prop="member"
show-overflow-tooltip sortable>
<template scope="{row}">
<span class="text-success " v-if="row.welfareMember==1">
<i class="fa fa-circle ml5"></i>
</span>
<span class="text-danger" v-else>
<i class="fa fa-circle ml5"></i>
</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作"
prop="userOnline" width="100px" fixed="right">
<template scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item
:command="{type:'change',data:row}"
v-if="$auth.hasRoleOr(['SYSADMIN','SCHOOL_UNION_ADMIN','BRANCH_UNION_CHAIRMAN','BRANCH_UNION_CHAIRMAN','BRANCH_UNION_GROUP_LEADER'])">
变更
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #view>
<member-info ref="memberInfoRef"></member-info>
</template>
<template #public>
<member-change ref="memberChangeRef" :show-three-unit="true" @do-back="$refs.guava.index()" @do-submit="doSubmit"></member-change>
</template>
<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>
<script nonce="${cspNonce!}">
<!--#include("../../common/info/memberInfo.js"){}#-->
<!--#include("../common/memberChange.js"){}#-->
<!--#include("../common/memberAllChangeInfo.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data: {
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
pageForm: {
unionId: "",
unitId: "",
threeUnitId: "",
sex: "",
searchKeyword: "",
changed: 2,
isMember: 1,
changeTypes: [],
aidFundMemberUserType: "",
userAttributes: [],
},
unions: [],
units: [],
threeUnits: [],
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" },
{ prop: "sex", label: "性别", width: 120},
{ prop: "birthday", label: "出生年月", width: 120, sortable: true },
{ prop: "nationality", label: "国籍", width: 120, sortable: true, checked: 0 },
// 临时屏蔽“民族”列表字段,不删除配置,后续需要可恢复。
// { prop: "nation", label: "民族", width: 120, sortable: true},
{ 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, 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: "personType", label: "人员类型", width: 120, sortable: true },
// 临时屏蔽“人员分类”列表字段,不删除配置,后续需要可恢复。
// { prop: "aidFundMemberUserType", label: "人员分类", width: 120, sortable: true },
{ prop: "userAttribute", 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 },
{ prop: "jobCategory", label: "岗位类别", width: 120, sortable: true, checked: 0 },
{ prop: "professionalTitle", label: "职称", width: 120, sortable: true, checked: 0 },
{ prop: "professionalLevel", label: "职级", width: 120, sortable: true, checked: 0 },
{ prop: "employeeSource", label: "职工来源", width: 120, sortable: true, checked: 0 },
{ prop: "administrativeLevel", label: "行政级别(管理岗位)", width: 120, sortable: true, checked: 0 },
{ prop: "positionSeries", label: "岗位系列", width: 120, sortable: true, checked: 0 },
{ prop: "positionLevel", label: "岗级", width: 120, sortable: true, checked: 0 },
{ prop: "administrativePositionLevel", label: "行政岗级", width: 120, sortable: true, checked: 0 },
{ prop: "arrivalAtSchoolDate", label: "来校时间", width: 120, sortable: true, checked: 0 },
{ prop: "teachingTime", label: "从教年月", width: 120, sortable: true, checked: 0 },
{ prop: "expectedLeaveSchoolDate", label: "预计/最后离校时间", width: 120, sortable: true, checked: 0 },
],
changeTypeData: [],
checkedFields: [],
allowChangeFields: []
},
components: {
"member-info": MEMBER_INFO,
"member-change": MEMBER_CHANGE,
"member-all-change": MEMBER_ALL_CHANGE_INFO,
},
methods: {
// 分页和导出共用该参数构建方法,保证人员属性多选值始终按 JSON 数组提交。
buildQueryPageForm(source = this.pageForm) {
const pageForm = clone(source)
pageForm.userAttributes = JSON.stringify(source.userAttributes || [])
return pageForm
},
// 覆盖公共分页方法,使后端按人员属性集合执行查询。
pageData(data = null) {
return initTableMixins.methods.pageData.call(this, this.buildQueryPageForm(data || this.pageForm))
},
dropdownCommand(command) {
const {type, data} = command
if (type === 'view') {
this.openView(data.id)
} else if (type === 'change') {
this.openChange(data.id)
}
},
openChange(id) {
this.$refs.guava.public(() => {
this.$refs.memberChangeRef.init(id)
})
},
openView(id) {
this.$refs.guava.view(() => {
this.$refs.memberInfoRef.onOpen(id)
})
},
openUserChangeInfo(row) {
this.$refs.guava.edit(() => {
this.$refs.memberAllChangeRef.onOpen(row.id)
})
},
async doSubmit(data) {
const loading = createLoading('正在提交中')
const resp = await this.$axios.post("/platform/member/change/manage/doSubmitChange", data)
loading.close()
if (resp.code === 0) {
this.$message.success(resp.msg)
this.$refs.guava.index()
this.pageData()
} else {
this.$message.error(resp.msg)
}
},
getChangeTypes(changeTypes){
if (!changeTypes) return null
const changeTypesList = JSON.parse(changeTypes)
if (changeTypesList) {
if (!changeTypesList || changeTypesList.length === 0 || !this.changeTypeData || this.changeTypeData.length === 0) return null
return changeTypesList
.map((v) => {
return this.changeTypeData.find((item) => item.code === v).changeTypeName
})
.join(",")
}
return null
},
changeDateRangeChange(val) {
if (val && val.length > 0) {
this.pageForm.changeDateBefore = val[0]
this.pageForm.changeDateEnd = val[1]
}
},
/**
* 导出会员名单
*/
exportExcel() {
const pageForm = this.buildQueryPageForm()
const data = this.tableColumns.filter(item => this.checkedFields.includes(item.prop)).map(item => {
return {prop: item.prop, label: item.label}
})
pageForm.columns = JSON.stringify(data)
this.$downLoad("/platform/member/change/manage/doExport", pageForm)
},
async initData() {
const isAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
if (isAdmin) {
this.unions = await this.$businessTool.listUnion(this.pageForm.unionId)
} else {
this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
}
this.changeTypeData = await this.$businessTool.getEnumOptions("MemberChangeType")
this.allowChangeFields = await this.$businessTool.getDictOptions("ALLOW_CHANGE_FIELDS")
},
flushUnits() {
this.$set(this.pageForm, "unitId", null)
this.$set(this.pageForm, "threeUnitId", null)
this.units = []
this.threeUnits = []
if (this.pageForm.unionId) {
this.$businessTool.listUnit(this.pageForm.unionId).then(data => {
this.units = data
})
}
},
// 所属单位变化时只加载其直属三级单位,避免跨单位筛选。
flushThreeUnits(unitId) {
this.$set(this.pageForm, "threeUnitId", null)
this.threeUnits = []
if (!unitId) {
return
}
this.$axios.post("/platform/sys/unit/child", {pid: unitId})
.then((res) => {
if (res.code === 0) {
this.threeUnits = res.data || []
} else {
this.$message.error(res.msg || "三级单位查询失败")
}
})
.catch(() => {
this.$message.error("三级单位查询失败,请稍后重试")
})
},
checkAll() {
this.checkedFields = this.tableColumns.map(c => c.prop);
},
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() {
return this.tableColumns.filter(c => this.checkedFields.includes(c.prop));
}
},
mounted() {
this.checkedFields = this.tableColumns.filter(c => c.checked !== 0).map(c => c.prop);
},
created() {
this.initData()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,161 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<el-card shadow="never">
<common-query ref="commonQueryRef" user-attribute-multiple @search="search"></common-query>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool :app="this" label="申请列表">
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号" type="index" width="80px"></el-table-column>
<el-table-column :label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
header-align="center"
min-width="100px"
show-overflow-tooltip
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop=='loginname'">
<el-link @click="openView(row)" type="primary">{{row.loginname}}</el-link>
</template>
<template scope="{row}" v-else-if="column.prop=='changeTypes'">
<span style="color: #0e78c5;cursor: pointer" @click="openView(row)">
{{getChangeTypes(row.changeTypes)}}
</span>
</template>
<template scope="{row}" v-else-if="column.prop=='instanceState'">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="300px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">
编辑
</el-button>
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</el-button>
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #view>
<info ref="infoRef" :show-three-unit="true"></info>
</template>
</guava>
</div>
<!--#include("../common/commonQuery.html"){}#-->
<script nonce="${cspNonce!}">
<!--#include("../common/info.js"){}#-->
<!--#include("../common/commonQuery.js"){}#-->
new Vue({
el: '#app',
mixins: [initTableMixins],
data(){
return{
tableColumns: [
{ prop: "loginname", label: "工号", sortable: true },
{ prop: "username", label: "姓名", sortable: true },
{ prop: "sex", label: "性别", sortable: true },
{ prop: "userState", label: "在职状态", sortable: true },
{ prop: "personType", label: "人员类型", sortable: true },
// { prop: "preparedBy", label: "编制类别", sortable: true },
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true },
{ prop: "changeTypes", label: "变更类型", sortable: true, width: 200 },
{ prop: "applyDateTime", label: "申请时间", sortable: true },
{ prop: "curTaskName", label: "当前节点"},
{ prop: "instanceState", label: "流程状态"}
],
changeTypeData: [],
}
},
components: {
'info': INFO,
'common-query': COMMON_QUERY,
},
methods: {
openView(row) {
this.$refs.guava.view(() => {
this.$refs.infoRef.onOpen(row)
})
},
onEdit(row) {
commonUtil.pjaxPush('/platform/member/change/apply?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const loading = createLoading()
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.pageData()
}
}).finally(() => {
loading.close()
})
})
},
onDelete(id) {
this.$confirm("您确定要删除吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const loading = createLoading()
this.$axios.post("/platform/member/change/mine/onDelete", {id}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.pageData()
}
}).finally(() => {
loading.close()
})
})
},
search(pageForm){
if (pageForm) {
this.pageForm = {...this.pageForm, ...pageForm}
}
this.doSearch()
},
getChangeTypes(changeTypes){
const changeTypesList = JSON.parse(changeTypes)
if (changeTypesList) {
if (!changeTypesList || changeTypesList.length === 0 || !this.changeTypeData || this.changeTypeData.length === 0) return null
return changeTypesList
.map((v) => {
return this.changeTypeData.find((item) => item.code === v).changeTypeName
})
.join(",")
}
return null
}
},
async created(){
this.pageData()
this.changeTypeData = await this.$businessTool.getEnumOptions("MemberChangeType")
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,232 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"></el-input>
</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="变更类型">
<el-select v-model="pageForm.changeType" placeholder="变更类型" @change="doSearch"
clearable filterable style="width: 100%">
<el-option :key="item.code" :label="item.changeTypeName" :value="item.code"
v-for="item in changeTypeData"></el-option>
</el-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.userAttributes" placeholder="请选择人员属性" @change="doSearch"
code="USER_ATTRIBUTE" multiple collapse-tags clearable></dict-select>
</search-item>
</search>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="变更列表" :app="this"></table-tool>
<el-table :data="tableData" style="width: 100%" row-key="id"
@sort-change="pageOrder"
resizable
v-loading="tableLoading" :size="tableSize" class="vi-table">
<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"
>
<template v-if="column.prop=='loginname'" scope="{row}">
<el-link type="primary" @click="openUserView(row)">{{row.loginname}}</el-link>
</template>
</el-table-column>
<el-table-column label="异动信息" header-align="center">
<el-table-column label="更新时间" prop="changeTime" min-width="130px"
header-align="center"
sortable
align="center" show-overflow-tooltip>
</el-table-column>
<el-table-column label="异动类型" prop="changeTypes" header-align="center"
width="150px"
align="center" show-overflow-tooltip sortable>
<template scope="{row}">
<span style="color: #0e78c5;cursor: pointer" @click="openView(row)">
{{ getChangeTypes(row.changeTypes) }}
</span>
</template>
</el-table-column>
</el-table-column>
<!-- <el-table-column label="审核状态">-->
<!-- <template scope="{row}">-->
<!-- <vi-table-state v-if="row.stateId" :state="row"></vi-table-state>-->
<!-- <vi-table-state v-else :state="{stateColor:'#1890ff',stateName:'暂无'}"></vi-table-state>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column prop="userOnline" align="center" header-align="center"
label="操作"
width="100px" fixed="right">
<template scope="{row}">
<el-button size="mini" type="primary" @click="openView(row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<member-all-change ref="memberAllChangeRef"></member-all-change>
</template>
<template #edit>
<member-info ref="memberInfoRef"></member-info>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/info/memberInfo.js"){}#-->
<!--#include("../common/memberAllChangeInfo.js"){}#-->
new Vue({
el:'#app',
store,
mixins: [initTableMixins],
data(){
return{
userId:'',
tableColumns: [
{prop: 'loginname', label: '工号'},
{prop: 'username', label: '姓名'},
{prop: 'sex', label: '性别', sortable: true, width: '100px'},
{prop: 'birthday', label: '出生年月', sortable: true},
{prop: 'personType', label: '人员类型', sortable: true},
{prop: 'userState', label: '在职状态', sortable: true},
{prop: 'unionName', label: '所属工会', sortable: true},
{prop: 'unitName', label: '所属单位', sortable: true},
],
unions: [],
units: [],
changeTypeData: [],
pageForm: {
searchKeyword: "",
unionId: "",
unitId: "",
userState: "",
personType: "",
changeType: "",
aidFundMemberUserType: "",
userAttributes: []
}
}
},
components: {
'member-info': MEMBER_INFO,
"member-all-change": MEMBER_ALL_CHANGE_INFO,
},
methods: {
openUserView(row){
this.$refs.guava.edit(() => {
this.$refs.memberInfoRef.onOpen(row.userId)
})
},
openView(row){
this.$refs.guava.view(() => {
this.$refs.memberAllChangeRef.onOpen(row.userId)
})
},
getChangeTypes(changeTypes){
if (!changeTypes) return null
const changeTypesList = JSON.parse(changeTypes)
if (changeTypesList) {
if (!changeTypesList || changeTypesList.length === 0 || !this.changeTypeData || this.changeTypeData.length === 0) return null
return changeTypesList
.map((v) => {
return this.changeTypeData.find((item) => item.code === v).changeTypeName
})
.join(",")
}
return null
},
async flushUnits() {
this.$set(this.pageForm, "unitId", null)
this.units = []
if (this.pageForm.unionId) {
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
}
},
pageData() {
const pageForm = clone(this.pageForm)
pageForm.userStates = JSON.stringify(pageForm.userStates)
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
pageForm.changeTypes = JSON.stringify(pageForm.changeTypes)
pageForm.changeOrigins = JSON.stringify(pageForm.changeOrigins)
// 人员属性为多选条件,提交前转换为后端可解析的 JSON 数组。
pageForm.userAttributes = JSON.stringify(pageForm.userAttributes)
this.$axios.post(loc() + '/pageData', pageForm)
.then(res => {
if (res.code === 0) {
this.tableData = res.data.list
this.pageForm.totalCount = res.data.totalCount
} else {
this.$message.error(res.msg)
}
})
},
},
async created() {
this.pageData();
if (this.$auth.hasRoleOr("SYSADMIN, SCHOOL_UNION_ADMIN")) {
this.unions = await this.$businessTool.listUnion()
} else {
this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
}
this.changeTypeData = await this.$businessTool.getEnumOptions("MemberChangeType")
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,44 @@
<div id="member_change_school_union_approval">
<el-form :model="formData" ref="formRef" label-width="0" label-suffix="" class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
</el-form>
<snaker-flow-task-form-action @task-action="handleTaskAction" @cancel="handleCancel"></snaker-flow-task-form-action>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: "#member_change_school_union_approval",
store,
data() {
return {
formData: {
tf_opinion: ""
},
}
},
methods: {
handleTaskAction(val) {
const data = {
...val,
...this.formData
}
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify(data)
}).then(res => {
if (res.code === 0) {
this.$message.success("操作成功")
// 发送完成消息
window.parent.postMessage({
type: "task-complete"
}, "*")
}
})
},
handleCancel(val) {
console.log(val)
},
}
})
</script>
@@ -0,0 +1,210 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<common-query ref="commonQueryRef" user-attribute-multiple @search="search"></common-query>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="审核列表">
<el-radio-group @change="search" class="mr5" size="small" v-model="pageForm.audit">
<el-radio-button label="true">已审核</el-radio-button>
<el-radio-button label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号" type="index" width="80px"></el-table-column>
<el-table-column :label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
header-align="center"
min-width="100px"
show-overflow-tooltip
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop=='loginname'">
<el-link @click="openUserView(row)" type="primary">{{row.loginname}}</el-link>
</template>
<template scope="{row}" v-else-if="column.prop=='changeTypes'">
<span style="color: #0e78c5;cursor: pointer" @click="openView(row)">
{{getChangeTypes(row.changeTypes)}}
</span>
</template>
<template scope="{row}" v-else-if="column.prop=='instanceState'">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="200px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
</el-button>
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">
{{formData.taskName}}
</div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=""
class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
</el-row>
</div>
</info>
</template>
</guava>
</div>
<!--#include("../common/commonQuery.html"){}#-->
<script nonce="${cspNonce!}">
<!--#include("../common/info.js"){}#-->
<!--#include("../common/commonQuery.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
pageForm: {
audit: false
},
tableColumns: [
{ prop: "loginName", label: "工号", sortable: true },
{ prop: "userName", label: "姓名", sortable: true },
{ prop: "sex", label: "性别", sortable: true },
{ prop: "userState", label: "在职状态", sortable: true },
{ prop: "personType", label: "人员类型", sortable: true },
// { prop: 'preparedBy', label: '编制类别', sortable: true },
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true },
{ prop: "changeTypes", label: "变更类型", sortable: true, width: 200 },
{ prop: "applyDateTime", label: "申请时间", sortable: true },
{ prop: "curTaskName", label: "当前节点"},
{ prop: "instanceState", label: "流程状态"}
],
changeTypeData: [],
// 审核相关
formData: {},
showApprovalForm: false
}
},
components: {
'info': INFO,
'common-query': COMMON_QUERY,
},
methods: {
openView(row){
this.$refs.guava.edit(() => {
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
})
},
openAudit(row) {
this.$refs.guava.edit(()=>{
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.infoRef.onOpen(row)
})
},
handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const loading = createLoading()
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
}).finally(() => {
loading.close()
})
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
}).then(() => {
const loading = createLoading()
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doSearch()
}
}).finally(() => {
loading.close()
})
})
},
search(pageForm){
if (pageForm) {
this.pageForm = {...this.pageForm, ...pageForm}
}
this.doSearch()
},
getChangeTypes(changeTypes) {
const changeTypesList = JSON.parse(changeTypes)
if (!changeTypesList) return null
if (changeTypesList) {
if (!changeTypesList || changeTypesList.length === 0 || !this.changeTypeData || this.changeTypeData.length === 0) return null
return changeTypesList
.map((v) => {
return this.changeTypeData.find((item) => item.code === v).changeTypeName
})
.join(",")
}
return null
},
},
async created() {
this.changeTypeData = await this.$businessTool.getEnumOptions("MemberChangeType")
this.pageData()
}
});
</script>
<!--#
}
#-->
@@ -0,0 +1,533 @@
<div id="member_change">
<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" readonly 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" readonly size="small"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="性别">
<el-form-item prop="sex">
<el-radio-group :disabled="allowFields('sex')" 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"
:disabled="allowFields('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"
:disabled="allowFields('birthday')"
placeholder="请选择出生日期"
format="yyyy-MM-dd"
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"
:disabled="allowFields('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"
:disabled="allowFields('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"
:disabled="allowFields('academicDegree')" 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>
<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, SCHOOL_UNION_MEMBER_ADMIN')">
<el-descriptions-item label="工作单位">
<el-form-item prop="unitId">
<el-select clearable filterable placeholder="请选择工作单位" style="width: 100%"
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 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>
</template>
<template v-else>
<el-descriptions-item label="工作单位">
<el-form-item prop="unitId">
<el-select clearable filterable placeholder="请选择工作单位" style="width: 100%"
:disabled="allowFields('unitId')" @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="unionName">
<el-input v-model="formData.unionName" disabled placeholder="请输入所属工会"></el-input>
</el-form-item>
</el-descriptions-item>
</template>
<el-descriptions-item label="所属校区">
<el-form-item prop="campus">
<dict-select style="width: 100%" placeholder="请选择所属校区" v-model="formData.campus"
:disabled="allowFields('campus')" code="USER_CAMPUS"></dict-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="身份证号码">
<el-form-item prop="idCard">
<el-input v-model="formData.idCard" :disabled="allowFields('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" :disabled="allowFields('mobile')" placeholder="请输入联系电话" maxlength="15"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="电子邮箱">
<el-form-item prop="email">
<el-input v-model="formData.email" :disabled="allowFields('email')" placeholder="请输入电子邮箱" maxlength="50"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="在职状态">
<el-form-item prop="userState">
<dict-select v-model="formData.userState" code="USER_STATE"
:disabled="allowFields('userState')" 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"
:disabled="allowFields('personType')" style="width: 100%"></dict-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
<template v-if="formData.userState == '退休'">
<el-descriptions-item label="退休日期">
<el-form-item prop="retireDate">
<el-date-picker v-model="formData.retireDate"
type="date"
placeholder="请选择出生日期"
format="yyyy-MM-dd"
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="welfareStopDate">
<el-date-picker v-model="formData.welfareStopDate"
type="date"
:disabled="isView"
placeholder="请选择福利享受截止日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
style="width: 100%"></el-date-picker>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
</template>
<el-descriptions-item label="会员状态" :span="1.5">
<el-form-item prop="member">
<el-radio-group v-model="formData.member" size="small">
<el-radio border :label="true">会员</el-radio>
<el-radio border :label="false">非会员</el-radio>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="福利会员状态" :span="1.5">
<el-form-item prop="welfareMember">
<el-radio-group v-model="formData.welfareMember" size="small">
<el-radio border :label="true">福利会员</el-radio>
<el-radio border :label="false">非福利会员</el-radio>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
<!--<template v-if="formData.member == 1">
<el-descriptions-item label="是否加入会员组别">
<el-form-item prop="member">
<el-radio-group v-model="formData.isJoinActivityMemberScope" size="small">
<el-radio border :label="true">是</el-radio>
<el-radio border :label="false">否</el-radio>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
</template>
<template v-if="formData.member == 0">
<el-descriptions-item label="是否退出会员组别">
<el-form-item prop="member">
<el-radio-group v-model="formData.isExitActivityMemberScope" size="small">
<el-radio border :label="true">是</el-radio>
<el-radio border :label="false">否</el-radio>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
</template>
<template v-if="formData.member != null && !formData.welfareMember">
<el-descriptions-item></el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
</template>
<template v-if="formData.welfareMember == true">
<el-descriptions-item label="是否加入福利项目">
<el-form-item prop="isJoinWelfareProject">
<el-radio-group v-model="formData.isJoinWelfareProject" size="small">
<el-radio border :label="true">是</el-radio>
<el-radio border :label="false">否</el-radio>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
<template v-if="formData.isJoinWelfareProject">
<el-descriptions-item label="选择福利项目">
<el-form-item prop="welfareProjectId">
<el-select clearable filterable placeholder="请选择福利项目" style="width: 100%"
v-model="formData.welfareProjectId">
<el-option v-for="item in welfareProjectList"
:key="id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
</template>
<template v-else>
<el-descriptions-item></el-descriptions-item>
</template>
</template>-->
<template v-if="">
<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" :disabled="allowFields('families')"
@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 || allowFields('families')"
@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>
</template>
</el-descriptions>
</el-form>
<snaker-flow-task-form-action @task-action="handleTaskAction" @save-draft="handleSaveDraft" @cancel="handleCancel"></snaker-flow-task-form-action>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: '#member_change',
store,
data() {
return {
units: [],
unions: [],
// 允许变更的字段
allowChangeFields: [],
formData: {
families: [],
},
formRules: {
username: [{required: false, message: "必填", trigger: ["change", "blur"]}],
sex: [{required: false, message: "必填", trigger: ["change", "blur"]}],
email: [
{
validator: (rule, value, callback) => {
if (!value) {
callback();
} else if (/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(value)) {
callback();
} else {
callback(new Error("邮箱格式错误"));
}
},
trigger: ["change", "blur"]
}
],
idCard: [
{
validator: (rule, value, callback) => {
if (!value) {
// 如果值为空,直接通过校验
callback();
} else if (/^[1-9]\d{5}(18|19|20)?\d{2}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}(\d|[Xx])$/.test(value)) {
// 18位身份证号码格式正确
callback();
} else if (/^[1-9]\d{7}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
// 15位身份证号码格式正确
callback();
} else if (/^[1-9]\d{5}(18|19|20)?\d{2}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
// 外国人身份证号码格式正确(18位)
callback();
} else if (/^[1-9]\d{7}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
// 外国人身份证号码格式正确(15位)
callback();
} else {
// 格式错误,返回错误信息
callback(new Error("身份证号码格式错误"));
}
},
trigger: ["change", "blur"]
}
],
mobile: [
{
validator: (rule, value, callback) => {
if (!value) {
// 如果值为空,直接通过校验
callback();
} else if (/^[1][345789][0-9]{9}$/.test(value)) {
// 手机号格式正确
callback();
} else if (/^\d+-\d+$/.test(value) && value.length <= 16) {
// 座机号格式正确
callback();
} else {
// 格式错误,返回错误信息
callback(new Error(value.includes('-') ? '座机号码格式错误' : '手机号码格式错误'));
}
},
trigger: ["change", "blur"]
}
]
},
}
},
methods: {
// 提交
handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", { type: "warning" })
.then(() => {
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$axios
.post("/flow/common/startInstanceAndExecute", {
...val,
bizData: JSON.stringify(this.formData)
})
.then((res) => {
if (res.code === 0) {
this.$message.success("操作成功")
// 发送完成消息
window.parent.postMessage(
{
type: "task-complete"
},
"*"
)
}
})
}
})
})
},
// 保存
handleSaveDraft(val) {
this.$confirm("您确定要保存吗?", "提示", { type: "warning" })
.then(() => {
this.$axios
.post("/flow/common/startInstance", {
...val,
bizData: JSON.stringify(this.formData)
})
.then((res) => {
if (res.code === 0) {
this.$message.success("操作成功")
// 发送完成消息
window.parent.postMessage(
{
type: "task-complete"
},
"*"
)
}
})
})
},
// 取消
handleCancel() {
},
getUnionName(val){
const data = this.units.find(v => v.id === val)
this.$set(this.formData, 'unionName', data ? data.unionname : '')
},
allowFields(prop) {
return !this.allowChangeFields.map(v => v.code).includes(prop)
},
async init(userId){
if (userId) {
this.isShow = false
await this.getUserById(userId)
} else {
this.isShow = true
this.user = this.$store.state.user
}
this.getFormDataValue(this.id)
this.allowChangeFields = await this.$businessTool.getDictOptions("ALLOW_CHANGE_FIELDS")
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_MEMBER_ADMIN, SCHOOL_UNION_ADMIN')) {
this.units = await this.$businessTool.listUnit()
this.unions = await this.$businessTool.listUnion()
} else {
this.units = await this.$businessTool.listUnit(this.user.union.id)
}
},
async getUserById(userId){
const resp = await this.$axios.post("/platform/member/change/apply/getUserByIdForMemberChange", { userId })
if (resp.code === 0) {
this.user = resp.data
}
},
getFormDataValue(id){
if (id) {
this.$axios.post("/platform/member/change/apply/findChangeById", { id }).then((res) => {
if (res.code === 0) {
this.formData = res.data
this.formData.unionid = this.user.unionid
if (this.formData.families) {
this.formData.families = JSON.parse(this.formData.families)
} else {
this.formData.families = []
}
}
})
} else {
const {
id,
username,
loginname,
sex,
member,
welfareMember,
nation,
birthday,
political,
education,
academicDegree,
position,
unit,
union,
campus,
userState,
personType,
preparedBy,
idCard,
mobile,
email,
families,
personalData
} = this.user
this.$set(this.formData, "userId", id)
this.$set(this.formData, "username", username)
this.$set(this.formData, "loginname", loginname)
this.$set(this.formData, "birthday", birthday)
this.$set(this.formData, "sex", sex)
this.$set(this.formData, "member", member === 1)
this.$set(this.formData, "welfareMember", welfareMember === 1)
this.$set(this.formData, "idCard", idCard)
this.$set(this.formData, "nation", nation)
this.$set(this.formData, "political", political)
this.$set(this.formData, "position", position)
this.$set(this.formData, "education", education)
this.$set(this.formData, "academicDegree", academicDegree)
this.$set(this.formData, "campus", campus)
this.$set(this.formData, "userState", userState)
this.$set(this.formData, "personType", personType)
this.$set(this.formData, "preparedBy", preparedBy)
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)
this.$set(this.formData, "unionId", union ? union.id : null)
this.$set(this.formData, "mobile", mobile)
this.$set(this.formData, "email", email)
this.$set(this.formData, "families", families ? families : [])
this.$set(this.formData, "personalData", personalData)
}
}
},
created(){
this.init()
}
})
</script>
@@ -0,0 +1,555 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<el-card shadow="never">
<snaker-start slot="header" label="会员变更" define_key="HYBG"></snaker-start>
<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" readonly 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" readonly size="small"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="性别">
<el-form-item prop="sex">
<el-radio-group :disabled="allowFields('sex')" 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">
<el-select style="width: 100%" placeholder="请选择民族" v-model="formData.nation"
:disabled="allowFields('nation')" clearable filterable>
<el-option v-for="item in nationOptions" :key="item.code" :label="item.name"
:value="item.code"></el-option>
</el-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"
:disabled="allowFields('birthday')"
placeholder="请选择出生日期"
format="yyyy-MM-dd"
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"
:disabled="allowFields('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"
:disabled="allowFields('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"
:disabled="allowFields('academicDegree')" 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>
<!--<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, SCHOOL_UNION_MEMBER_ADMIN')">
<el-descriptions-item label="工作单位">
<el-form-item prop="unitId">
<el-select clearable filterable placeholder="请选择工作单位" style="width: 100%"
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 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>
</template>-->
<template>
<el-descriptions-item label="工作单位">
<el-form-item prop="unitId">
<el-select clearable filterable placeholder="请选择工作单位" style="width: 100%"
:disabled="allowFields('unitId')" @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="unionName">
<el-input v-model="formData.unionName" disabled placeholder="请输入所属工会"></el-input>
</el-form-item>
</el-descriptions-item>
</template>
<el-descriptions-item label="所属校区">
<el-form-item prop="campus">
<dict-select style="width: 100%" placeholder="请选择所属校区" v-model="formData.campus"
:disabled="allowFields('campus')" code="USER_CAMPUS"></dict-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="身份证号码">
<el-form-item prop="idCard">
<el-input v-model="formData.idCard" :disabled="allowFields('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" :disabled="allowFields('mobile')" placeholder="请输入联系电话" maxlength="15"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="电子邮箱">
<el-form-item prop="email">
<el-input v-model="formData.email" :disabled="allowFields('email')" placeholder="请输入电子邮箱" maxlength="50"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="在职状态">
<el-form-item prop="userState">
<dict-select v-model="formData.userState" code="USER_STATE"
:disabled="allowFields('userState')" 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"
:disabled="allowFields('personType')" 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"-->
<!-- :disabled="allowFields('preparedBy')" style="width: 100%"></dict-select>-->
<!-- </el-form-item>-->
<!-- </el-descriptions-item>-->
<el-descriptions-item></el-descriptions-item>
<el-descriptions-item label="会员状态" :span="1.5">
<el-form-item prop="member">
<el-radio-group v-model="formData.member" size="small">
<el-radio border :label="true">会员</el-radio>
<el-radio border :label="false">非会员</el-radio>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="福利会员状态" :span="1.5">
<el-form-item prop="welfareMember">
<el-radio-group v-model="formData.welfareMember" size="small">
<el-radio border :label="true">福利会员</el-radio>
<el-radio border :label="false">非福利会员</el-radio>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
<!--<template v-if="formData.member == 1">
<el-descriptions-item label="是否加入会员组别">
<el-form-item prop="member">
<el-radio-group v-model="formData.isJoinActivityMemberScope" size="small">
<el-radio border :label="true">是</el-radio>
<el-radio border :label="false">否</el-radio>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
</template>
<template v-if="formData.member == 0">
<el-descriptions-item label="是否退出会员组别">
<el-form-item prop="member">
<el-radio-group v-model="formData.isExitActivityMemberScope" size="small">
<el-radio border :label="true">是</el-radio>
<el-radio border :label="false">否</el-radio>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
</template>
<template v-if="formData.member != null && !formData.welfareMember">
<el-descriptions-item></el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
</template>
<template v-if="formData.welfareMember == true">
<el-descriptions-item label="是否加入福利项目">
<el-form-item prop="isJoinWelfareProject">
<el-radio-group v-model="formData.isJoinWelfareProject" size="small">
<el-radio border :label="true">是</el-radio>
<el-radio border :label="false">否</el-radio>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
<template v-if="formData.isJoinWelfareProject">
<el-descriptions-item label="选择福利项目">
<el-form-item prop="welfareProjectId">
<el-select clearable filterable placeholder="请选择福利项目" style="width: 100%"
v-model="formData.welfareProjectId">
<el-option v-for="item in welfareProjectList"
:key="id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
</template>
<template v-else>
<el-descriptions-item></el-descriptions-item>
</template>
</template>-->
<template v-if="formData.loginname == $store.state.user.loginname">
<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" :disabled="allowFields('families')"
@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 || allowFields('families')"
@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>
</template>
</el-descriptions>
</el-form>
<el-row type="flex" justify="end" class="mt20">
<el-button type="primary" plain @click="onSave">保存</el-button>
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
</el-row>
</el-card>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: '#app',
store,
data(){
return{
bizId: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
units: [],
unions: [],
// 民族下拉需要保留原字典顺序,仅在存在“汉族”时将其置顶。
nationOptions: [],
// 允许变更的字段
allowChangeFields: [],
formData: {
families: [],
},
formRules: {
username: [{required: false, message: "必填", trigger: ["change", "blur"]}],
sex: [{required: false, message: "必填", trigger: ["change", "blur"]}],
/*email: [
{
validator: (rule, value, callback) => {
if (!value) {
callback();
} else if (/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(value)) {
callback();
} else {
callback(new Error("邮箱格式错误"));
}
},
trigger: ["change", "blur"]
}
],
idCard: [
{
validator: (rule, value, callback) => {
if (!value) {
// 如果值为空,直接通过校验
callback();
} else if (/^[1-9]\d{5}(18|19|20)?\d{2}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}(\d|[Xx])$/.test(value)) {
// 18位身份证号码格式正确
callback();
} else if (/^[1-9]\d{7}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
// 15位身份证号码格式正确
callback();
} else if (/^[1-9]\d{5}(18|19|20)?\d{2}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
// 外国人身份证号码格式正确(18位)
callback();
} else if (/^[1-9]\d{7}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
// 外国人身份证号码格式正确(15位)
callback();
} else {
// 格式错误,返回错误信息
callback(new Error("身份证号码格式错误"));
}
},
trigger: ["change", "blur"]
}
],
mobile: [
{
validator: (rule, value, callback) => {
if (!value) {
// 如果值为空,直接通过校验
callback();
} else if (/^[1][345789][0-9]{9}$/.test(value)) {
// 手机号格式正确
callback();
} else if (/^\d+-\d+$/.test(value) && value.length <= 16) {
// 座机号格式正确
callback();
} else {
// 格式错误,返回错误信息
callback(new Error(value.includes('-') ? '座机号码格式错误' : '手机号码格式错误'));
}
},
trigger: ["change", "blur"]
}
]*/
},
}
},
methods: {
// 保存
onSave() {
this.$confirm("您确定保存吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const loading = createLoading()
this.$axios.post('/platform/member/change/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
if (res.code === 0) {
this.$message.success("保存成功")
commonUtil.pjaxPush('/platform/member/change/mine')
}
}).finally(() => {
loading.close()
})
})
},
// 提交
onSubmit() {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const loading = createLoading()
this.$axios.post('/platform/member/change/apply/submit', {
data: JSON.stringify(this.formData)
}).then(res => {
if (res.code === 0) {
this.$message.success("提交成功")
commonUtil.pjaxPush('/platform/member/change/mine')
}
}).finally(() => {
loading.close()
})
})
},
onFinishTask() {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const loading = createLoading()
this.$axios.post('/platform/member/change/apply/submitAgain', {
data: JSON.stringify(this.formData),
taskId: GetQueryString("taskId")
}).then(res => {
if (res.code === 0) {
this.$message.success("提交成功")
commonUtil.pjaxPush('/platform/member/change/mine')
}
}).finally(() => {
loading.close()
})
})
},
// 获取表单工会名称
getUnionName(val){
const data = this.units.find(v => v.id === val)
this.$set(this.formData, 'unionName', data ? data.unionName : '')
},
// 获取表单可编辑的字段信息
allowFields(prop) {
return !this.allowChangeFields.map(v => v.code).includes(prop)
},
// 民族字典按页面要求处理排序,如果存在“汉族”则优先显示在第一位。
async initNationOptions() {
const nationOptions = await this.$businessTool.getDictOptions("USER_NATION")
const hanIndex = nationOptions.findIndex(item => item && item.name === "汉族")
if (hanIndex > 0) {
const hanNation = nationOptions.splice(hanIndex, 1)[0]
nationOptions.unshift(hanNation)
}
this.nationOptions = nationOptions
},
// 初始化表单数据
async init(userId){
if (userId) {
this.isShow = false
await this.getUserById(userId)
} else {
this.isShow = true
this.user = this.$store.state.user
}
this.getFormDataValue()
this.allowChangeFields = await this.$businessTool.getDictOptions("ALLOW_CHANGE_FIELDS")
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_MEMBER_ADMIN, SCHOOL_UNION_ADMIN')) {
this.units = await this.$businessTool.listUnit()
this.unions = await this.$businessTool.listUnion()
} else {
this.units = await this.$businessTool.listUnit(this.user.union.id)
}
await this.initNationOptions()
},
// 获取根据userId获取用户信息
async getUserById(userId){
const resp = await this.$axios.post("/platform/member/change/apply/getUserByIdForMemberChange", { userId })
if (resp.code === 0) {
this.user = resp.data
}
},
getFormDataValue(){
if (this.bizId) {
this.$axios.post("/platform/member/change/apply/findChangeById", { id: this.bizId }).then((res) => {
if (res.code === 0) {
this.formData = res.data
this.formData.unionid = this.user.unionid
if (this.formData.families) {
this.formData.families = JSON.parse(this.formData.families)
} else {
this.formData.families = []
}
}
})
} else {
const {
id,
username,
loginname,
sex,
member,
welfareMember,
nation,
birthday,
political,
education,
academicDegree,
position,
unit,
union,
campus,
userState,
personType,
preparedBy,
idCard,
mobile,
email,
families,
personalData
} = this.user
this.$set(this.formData, "userId", id)
this.$set(this.formData, "username", username)
this.$set(this.formData, "loginname", loginname)
this.$set(this.formData, "birthday", birthday)
this.$set(this.formData, "sex", sex)
this.$set(this.formData, "member", member)
this.$set(this.formData, "welfareMember", welfareMember)
this.$set(this.formData, "idCard", idCard)
this.$set(this.formData, "nation", nation)
this.$set(this.formData, "political", political)
this.$set(this.formData, "position", position)
this.$set(this.formData, "education", education)
this.$set(this.formData, "academicDegree", academicDegree)
this.$set(this.formData, "campus", campus)
this.$set(this.formData, "userState", userState)
this.$set(this.formData, "personType", personType)
this.$set(this.formData, "preparedBy", preparedBy)
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)
this.$set(this.formData, "unionId", union ? union.id : null)
this.$set(this.formData, "mobile", mobile)
this.$set(this.formData, "email", email)
this.$set(this.formData, "families", families ? families : [])
this.$set(this.formData, "personalData", personalData)
}
}
},
async created(){
this.init()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,60 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<member-change ref="memberChange" :id="id" @do-save="doSave" @do-submit="doSubmit"
@do-back="sublime.jumpPagePjax('/platform/member/change/mine')"></member-change>
</div>
<script nonce="${cspNonce!}">
<!--#include("../common/memberChange.js"){}#-->
new Vue({
el: '#app',
mixins: [initTableMixins],
data(){
return{
id: GetQueryString('id')
}
},
components: {
'member-change': MEMBER_CHANGE,
},
methods: {
async doSave(formData){
const loading = this.$loading({
lock: true,
text: '数据保存中请稍后...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
const resp = await $.post('/platform/member/change/apply/doSave', formData)
loading.close()
if (resp.code === 0) {
this.$message.success(resp.msg)
this.$store.dispatch("pjaxRoute", "/platform/member/change/mine")
} else {
this.$message.error(resp.msg)
}
},
async doSubmit(formData){
const loading = this.$loading({
lock: true,
text: '数据保存中请稍后...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
const resp = await $.post('/platform/member/change/apply/doSubmit', formData)
loading.close()
if (resp.code === 0) {
this.$message.success(resp.msg)
this.$store.dispatch("pjaxRoute", "/platform/member/change/mine")
} else {
this.$message.error(resp.msg)
}
},
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,207 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<common-query ref="commonQueryRef" @search="search"></common-query>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="审核列表">
<el-radio-group @change="search" class="mr5" size="small" v-model="pageForm.audit">
<el-radio-button label="true">已审核</el-radio-button>
<el-radio-button label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号" type="index" width="80px"></el-table-column>
<el-table-column :label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
header-align="center"
min-width="100px"
show-overflow-tooltip
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop=='changeTypes'">
<span style="color: #0e78c5;cursor: pointer" @click="openView(row)">
{{getChangeTypes(row.changeTypes)}}
</span>
</template>
<template scope="{row}" v-else-if="column.prop=='instanceState'">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="200px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
</el-button>
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">
{{formData.taskName}}
</div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=""
class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
</el-row>
</div>
</info>
</template>
</guava>
</div>
<!--#include("../common/commonQuery.html"){}#-->
<script nonce="${cspNonce!}">
<!--#include("../common/info.js"){}#-->
<!--#include("../common/commonQuery.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
pageForm: {
audit: false
},
tableColumns: [
{ prop: "loginName", label: "工号", sortable: true },
{ prop: "userName", label: "姓名", sortable: true },
{ prop: "sex", label: "性别", sortable: true },
{ prop: "userState", label: "在职状态", sortable: true },
{ prop: "personType", label: "人员类型", sortable: true },
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true },
{ prop: "changeTypes", label: "变更类型", sortable: true, width: 200 },
{ prop: "applyDateTime", label: "申请时间", sortable: true },
{ prop: "curTaskName", label: "当前节点"},
{ prop: "instanceState", label: "流程状态"}
],
changeTypeData: [],
// 审核相关
formData: {},
showApprovalForm: false
}
},
components: {
'info': INFO,
'common-query': COMMON_QUERY,
},
methods: {
openView(row){
this.$refs.guava.edit(() => {
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
})
},
openAudit(row) {
this.$refs.guava.edit(()=>{
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.infoRef.onOpen(row)
})
},
handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const loading = createLoading()
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
}).finally(() => {
loading.close()
})
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
}).then(() => {
const loading = createLoading()
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doSearch()
}
}).finally(() => {
loading.close()
})
})
},
search(pageForm){
if (pageForm) {
this.pageForm = {...this.pageForm, ...pageForm}
}
this.doSearch()
},
getChangeTypes(changeTypes) {
const changeTypesList = JSON.parse(changeTypes)
if (!changeTypesList) return null
if (changeTypesList) {
if (!changeTypesList || changeTypesList.length === 0 || !this.changeTypeData || this.changeTypeData.length === 0) return null
return changeTypesList
.map((v) => {
return this.changeTypeData.find((item) => item.code === v).changeTypeName
})
.join(",")
}
return null
},
},
async created() {
this.changeTypeData = await this.$businessTool.getEnumOptions("MemberChangeType")
this.pageData()
}
});
</script>
<!--#
}
#-->
@@ -0,0 +1,166 @@
<div id="member_change_view">
<el-tabs v-model="activeName">
<el-tab-pane label="基础信息" name="basicInfo">
<el-descriptions :column="3" border class="descriptions-form">
<el-descriptions-item label="工号">{{ viewData.loginname }}</el-descriptions-item>
<el-descriptions-item label="姓名">{{ viewData.username }}</el-descriptions-item>
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
<el-descriptions-item label="民族">{{ viewData.nation }}</el-descriptions-item>
<el-descriptions-item label="出生日期">{{ viewData.birthday ? $moment(viewData.birthday).format("YYYY年MM月DD日") : '暂无' }}</el-descriptions-item>
<el-descriptions-item label="政治面貌">{{ viewData.political }}</el-descriptions-item>
<el-descriptions-item label="学历">{{ viewData.education }}</el-descriptions-item>
<el-descriptions-item label="学位">{{ viewData.academicDegree }}</el-descriptions-item>
<el-descriptions-item label="党政职务">{{ viewData.position }}</el-descriptions-item>
<el-descriptions-item label="工作单位">{{ viewData.unitname }}</el-descriptions-item>
<el-descriptions-item label="所属工会">{{ viewData.unionname }}</el-descriptions-item>
<el-descriptions-item label="所属校区">{{ viewData.campus }}</el-descriptions-item>
<el-descriptions-item label="身份证号码">{{ viewData.idCard }}</el-descriptions-item>
<el-descriptions-item label="联系电话">{{ viewData.mobile }}</el-descriptions-item>
<el-descriptions-item label="电子邮箱">{{ viewData.email }}</el-descriptions-item>
<el-descriptions-item label="在职状态">{{ viewData.userState }}</el-descriptions-item>
<el-descriptions-item label="人员类型">{{ viewData.personType }}</el-descriptions-item>
<el-descriptions-item label="进校时间">{{ viewData.schoolTime }}</el-descriptions-item>
<template v-if="viewData.userState == '退休'">
<el-descriptions-item label="退休日期">{{ viewData.retireDate ? $moment(viewData.retireDate).format("YYYY-MM-DD") : '暂无' }}</el-descriptions-item>
<el-descriptions-item label="福利享受截止日期">{{ $moment(viewData.welfareStopDate).format("YYYY-MM-DD") }}</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
</template>
<el-descriptions-item label="会员状态">{{ viewData.member ? '会员' : '非会员' }}</el-descriptions-item>
<el-descriptions-item label="福利会员状态">{{ viewData.welfareMember ? '福利会员' : '非福利会员' }}</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
<el-descriptions-item label="家庭主要成员" :span="3">
<el-table v-if="viewData.families&&viewData.families.length"
:data="viewData.families" size="mini" border
:header-cell-style="{background:'#eff3f6'}"
style="width: 100%">
<el-table-column prop="relation" label="与本人关系" align="center" header-align="center">
</el-table-column>
<el-table-column prop="name" label="姓名" align="center" header-align="center">
</el-table-column>
<el-table-column prop="unit" label="单位" align="center" header-align="center">
</el-table-column>
<el-table-column prop="remark" label="备注" align="center" header-align="center">
</el-table-column>
</el-table>
<el-empty v-else :image-size="50" description="暂无家庭成员信息"></el-empty>
</el-descriptions-item>
<el-descriptions-item label="个人简况" :span="3">
<template slot="label">个人简况</template>
<div v-if="viewData.vita" class="text-left" v-html="viewData.vita"></div>
<span v-else>无数据</span>
</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="变更信息" name="changeInfo" v-if="viewData.changeInfos">
<el-table :data="viewData.changeInfos" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号" type="index" width="80px"></el-table-column>
<el-table-column prop="fieldName" label="变更字段" header-align="center"></el-table-column>
<el-table-column prop="sourceValue" label="原数据" header-align="center">
<template slot-scope="{row}">
<div v-html="row.sourceValue"></div>
</template>
</el-table-column>
<el-table-column prop="newValue" label="新数据" header-align="center">
<template slot-scope="{row}">
<div v-html="row.newValue"></div>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
<template v-for="task in doneTasks">
<div class="task-panel mt10">
<div class="task-panel-header">{{ task.displayName }}</div>
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-if="task.ext.isFirstTaskNode">
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName }}({{task.ext.initiatorAccount}})</el-descriptions-item>
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
<el-descriptions-item label="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE" :value="task.ext.submitType"></dict-tag>
</el-descriptions-item>
</el-descriptions>
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName }}({{task.taskFormData.loginName}})</el-descriptions-item>
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
<el-descriptions-item label="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE" :value="task.ext.submitType"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="办理意见" :span="3" v-if="!task.ext.isFirstTaskNode">{{ task.taskFormData.opinion }}</el-descriptions-item>
</el-descriptions>
</div>
</template>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: "#member_change_view",
mixins: [initTableMixins],
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
data() {
return {
activeName: "basicInfo",
businessId: GetQueryString("businessId"),
instanceId: GetQueryString("instanceId"),
viewData: {
changeInfos: [],
},
doneTasks: []
}
},
methods: {
info() {
this.$axios.post("/platform/member/change/view/findMemberChangeRecord", { id: this.businessId }).then((res) => {
if (res.code === 0) {
this.viewData = res.data
}
})
},
getDoneTasks() {
this.$axios.post("/flow/common/doneTasks", { instanceId: this.instanceId }).then((res) => {
if (res.code === 0) {
this.doneTasks = res.data
}
})
}
},
created() {
this.info()
this.getDoneTasks()
}
})
</script>
<style>
.task-panel {
background: white;
border-radius: 4px;
overflow: hidden;
}
.task-panel-header {
background: rgb(250, 250, 250);
border: 1px solid rgb(228, 231, 237);
border-bottom: none;
padding: 12px 16px;
display: flex;
justify-content: space-between;
align-items: center;
}
.el-descriptions-item__label.is-bordered-label {
width: 15%;
}
</style>
@@ -0,0 +1,28 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
</guava>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: '#app',
data() {
return{
}
},
methods: {
},
created() {
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,26 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
</div>
<script nonce="${cspNonce!}">
new Vue({
el: '#app',
data() {
return{
}
},
methods: {
},
created() {
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,26 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
</div>
<script nonce="${cspNonce!}">
new Vue({
el: '#app',
data() {
return{
}
},
methods: {
},
created() {
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,106 @@
const MEMBER_INFO = {
template: /*language=html*/ `
<div>
<!-- 基本信息 -->
<div class="process-title">基本信息</div>
<el-descriptions :column="3" border class="descriptions-form">
<!-- 第 1 行 -->
<el-descriptions-item label="姓名工号">{{ viewData.username + '(' + viewData.loginname + ')' }}</el-descriptions-item>
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
<el-descriptions-item label="出生日期">{{ viewData.birthday ? $moment(viewData.birthday).format('YYYY-MM-DD') : null }}</el-descriptions-item>
<!-- 第 2 行 -->
<el-descriptions-item label="国籍">{{ viewData.nationality }}</el-descriptions-item>
<el-descriptions-item label="民族">{{ viewData.nation }}</el-descriptions-item>
<el-descriptions-item label="政治面貌">{{ viewData.political }}</el-descriptions-item>
<!-- 第 3 行 -->
<el-descriptions-item label="证件类型">{{ viewData.idCardType }}</el-descriptions-item>
<el-descriptions-item label="身份证号码">{{ viewData.idCard }}</el-descriptions-item>
<el-descriptions-item label="联系电话">{{ viewData.mobile }}</el-descriptions-item>
<!-- 第 4 行 -->
<el-descriptions-item label="学历">{{ viewData.education }}</el-descriptions-item>
<el-descriptions-item label="学位">{{ viewData.academicDegree }}</el-descriptions-item>
<el-descriptions-item label="婚姻状况">{{ viewData.marriage }}</el-descriptions-item>
<!-- 第 5 行 -->
<el-descriptions-item label="会员状态">{{ viewData.member ? '会员' : '非会员' }}</el-descriptions-item>
<el-descriptions-item label="福利会员状态">{{ viewData.welfareMember ? '福利会员' : '非福利会员' }}</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
<!-- 退休补充 -->
<template v-if="viewData.userState == '退休'">
<el-descriptions-item label="退休日期">{{ viewData.retireDate ? $moment(viewData.retireDate).format("YYYY-MM-DD") : '暂无' }}</el-descriptions-item>
<el-descriptions-item label="福利享受截止日期">{{ viewData.welfareStopDate ? $moment(viewData.welfareStopDate).format("YYYY-MM-DD") : '暂无' }}</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
</template>
<!-- 仅本人可见 -->
<template v-if="viewData.loginname === $store.state.user.loginname">
<el-descriptions-item label="家庭主要成员" :span="3">
<el-table v-if="viewData.families && viewData.families.length" :data="viewData.families" size="mini" border :header-cell-style="{background:'#eff3f6'}" style="width: 100%">
<el-table-column prop="relation" label="与本人关系" align="center"/>
<el-table-column prop="name" label="姓名" align="center"/>
<el-table-column prop="unit" label="单位" align="center"/>
<el-table-column prop="remark" label="备注" align="center"/>
</el-table>
<el-empty v-else :image-size="50" description="暂无家庭成员信息"/>
</el-descriptions-item>
<el-descriptions-item label="个人简况" :span="3">
<div v-if="viewData.personalData" class="text-left" v-html="viewData.personalData"/>
<span v-else>无数据</span>
</el-descriptions-item>
</template>
</el-descriptions>
<!-- 工作信息 -->
<div class="process-title">工作信息</div>
<el-descriptions :column="3" border>
<!-- 第 1 行 -->
<el-descriptions-item label="工作单位">{{ viewData.unitName }}</el-descriptions-item>
<el-descriptions-item label="所属工会">{{ viewData.unionName }}</el-descriptions-item>
<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.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>
<!-- 第 3 行 -->
<el-descriptions-item label="在职状态">{{ viewData.userState }}</el-descriptions-item>
<el-descriptions-item label="人员类型">{{ viewData.personType }}</el-descriptions-item>
<!-- 第 4 行 -->
<el-descriptions-item label="人员属性">{{ viewData.userAttribute }}</el-descriptions-item>
<el-descriptions-item label="职称">{{ viewData.professionalTitle }}</el-descriptions-item>
<el-descriptions-item label="职级">{{ viewData.professionalLevel }}</el-descriptions-item>
<!-- 第 5 行 -->
<el-descriptions-item label="岗位系列">{{ viewData.positionSeries }}</el-descriptions-item>
<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="人员分类" v-if="false">{{ viewData.aidFundMemberUserType }}</el-descriptions-item>
</el-descriptions>
</div>
`,
store,
data() {
return {
viewData: {}
}
},
methods: {
onOpen(id) {
this.$axios.post("/platform/member/apply/common/findOne", { id }).then((res) => {
if (res.code === 0) {
this.viewData = res.data
}
})
}
}
};
@@ -0,0 +1,133 @@
const MEMBER_MANAGE_QUERY = {
template: `
<el-card shadow="never">
<search @search="doSearch">
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"></el-input>
</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.sex" placeholder="性别" @change="doSearch"
code="USER_SEX"></dict-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="更新日期">
<el-date-picker :picker-options="pickerOptions" @change="changeDateRangeChange"
align="right" end-placeholder="结束日期" format="yyyy-MM-dd"
range-separator="-" start-placeholder="开始日期" style="width: 100%"
type="datetimerange" v-model="pageForm.changeDateRange"
value-format="yyyy-MM-dd"></el-date-picker>
</search-item>
</search>
</el-card>
`,
mixins: [initTableMixins],
data() {
return {
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
picker.$emit("pick", [start, end])
}
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
picker.$emit("pick", [start, end])
}
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
picker.$emit("pick", [start, end])
}
}
]
},
pageForm: {
unionId: null,
unitId: null,
sex: null,
searchKeyword: null,
changed: 2,
isMember: 1,
isWelfareMember: null,
changeTypes: []
},
unions: [],
units: []
}
},
methods: {
changeDateRangeChange(val) {
if (val && val.length > 0) {
this.pageForm.changeDateBefore = val[0]
this.pageForm.changeDateEnd = val[1]
} else {
this.pageForm.changeDateBefore = null
this.pageForm.changeDateEnd = null
}
this.doSearch()
},
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)
}
// this.$businessTool.getDictOptions("MEMBER_CHANGE_TYPE").then((data) => {
// this.changeTypes = data
// })
this.doSearch()
},
async flushUnits() {
this.$set(this.pageForm, "unitId", null)
this.units = []
if (this.pageForm.unionId) {
this.$businessTool.listUnit(this.pageForm.unionId).then((data) => {
this.units = data
})
}
},
doSearch() {
this.$emit("query-ready", this.pageForm)
}
},
created() {
this.initData()
}
}
@@ -0,0 +1,259 @@
<!--#include("../change/memberChangeInfo.js"){}#-->
const MEMBER_MANAGE_TABLE = {
template: /*language=HTML*/ `
<div>
<el-card shadow="never" class="mt10">
<table-tool label="人员列表">
<span class="text-danger">会员:</span>
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.isMember">
<el-radio-button :label="null">全部</el-radio-button>
<el-radio-button :label="1">会员</el-radio-button>
<el-radio-button :label="0">非会员</el-radio-button>
</el-radio-group>
<!-- <span class="text-danger">福利会员:</span>-->
<!-- <el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.isWelfareMember">-->
<!-- <el-radio-button :label="null">全部</el-radio-button>-->
<!-- <el-radio-button :label="1">福利会员</el-radio-button>-->
<!-- <el-radio-button :label="0">非福利会员</el-radio-button>-->
<!-- </el-radio-group>-->
<span class="text-danger">人员异动:</span>
<el-radio-group @change="doSearch" class="mr5" size="small"
v-model="pageForm.changed">
<el-radio-button :label="2">全部</el-radio-button>
<el-radio-button :label="1">异动</el-radio-button>
<el-radio-button :label="0">未异动</el-radio-button>
</el-radio-group>
<!--<div v-if="pageForm.changed == '1'" class="div-enum">
<dict-select v-model="pageForm.USER_CHANGE_TYPE" placeholder="异动类型" @change="doSearch"
code="UserType"></dict-select>
</div>-->
<!--<el-button @click="addMember" type="primary" size="small">新增会员</el-button>-->
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id"
style="width: 100%">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号" type="index" width="80px"></el-table-column>
<el-table-column :label="column.label" :prop="column.prop"
:sortable="column.sortable" :width="column.width"
align="center" header-align="center" min-width="100px"
show-overflow-tooltip v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop=='loginname'">
<el-link @click="openView(row.id)" type="primary">{{row.loginname}}</el-link>
</template>
</el-table-column>
<el-table-column header-align="center" label="异动信息">
<el-table-column align="center" header-align="center" label="更新时间"
min-width="145px" prop="changeTime"
show-overflow-tooltip sortable>
</el-table-column>
<el-table-column align="center" header-align="center" label="异动类型"
prop="changeType" show-overflow-tooltip sortable>
<template scope="{row}">
<span style="color: #0e78c5;cursor: pointer" @click="openUserChangeInfo(row)">
{{getChangeTypes(row.changeTypes)}}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column v-if="$auth.hasRole('BRANCH_UNION_CHAIRMAN')" header-align="center"
label="审核状态"
prop="auditState">
</el-table-column>
<el-table-column align="center" header-align="center" label="会员" prop="member"
show-overflow-tooltip sortable>
<template scope="{row}">
<span class="text-success" v-if="row.member==1">
<i class="fa fa-circle ml5"></i> 是
</span>
<span class="text-danger" v-else>
<i class="fa fa-circle ml5"></i> 否
</span>
</template>
</el-table-column>
<!-- <el-table-column align="center" header-align="center" label="福利会员" prop="member"-->
<!-- show-overflow-tooltip sortable>-->
<!-- <template scope="{row}">-->
<!-- <span class="text-success" v-if="row.welfareMember==1">-->
<!-- <i class="fa fa-circle ml5"></i> 是-->
<!-- </span>-->
<!-- <span class="text-danger" v-else>-->
<!-- <i class="fa fa-circle ml5"></i> 否-->
<!-- </span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!--<el-table-column align="center" header-align="center" label="劳模" prop="member"
show-overflow-tooltip sortable>
<template scope="{row}">
<span class="text-success " v-if="row.isModelWorker==1">
<i class="fa fa-circle ml5"></i> 是
</span>
<span class="text-danger" v-else>
<i class="fa fa-circle ml5"></i> 否
</span>
</template>
</el-table-column>-->
<el-table-column align="center" header-align="center" label="操作"
prop="userOnline"
width="100px">
<template scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item
:command="{type:'change',data:row}"
v-if="$auth.hasRoleOr(['SYSADMIN','SCHOOL_UNION_ADMIN','BRANCH_UNION_CHAIRMAN','BRANCH_UNION_CHAIRMAN'])">
变更
</el-dropdown-item>
<!--<el-dropdown-item
:command="{type:'setModelWorker',data:row}"
v-if="$auth.hasRoleOr(['SYSADMIN','SCHOOL_UNION_ADMIN','BRANCH_UNION_CHAIRMAN','BRANCH_UNION_CHAIRMAN']) && !row.isModelWorker">
设为劳模
</el-dropdown-item>
<el-dropdown-item
:command="{type:'cancelModelWorker',data:row}"
v-if="$auth.hasRoleOr(['SYSADMIN','SCHOOL_UNION_ADMIN','BRANCH_UNION_CHAIRMAN','BRANCH_UNION_CHAIRMAN']) && row.isModelWorker">
取消劳模
</el-dropdown-item>-->
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<el-dialog title="变更信息" :visible.sync="changeInfoVisible" width="70%">
<member-change-info ref="memberChangeInfoRef"></member-change-info>
</el-dialog>
</div>
`,
mixins: [initTableMixins],
components: {
"member-change-info": MEMBER_CHANGE_INFO
},
data() {
return {
changeTypeData: [],
tableColumns: [
{ prop: "loginname", label: "工号", sortable: true },
{ prop: "username", label: "姓名", sortable: true },
{ prop: "sex", label: "性别", sortable: true, width: "100px" },
{ prop: "birthday", label: "出生年月", sortable: true },
{ prop: "userState", label: "在职状态", sortable: true },
{ prop: "personType", label: "人员类型", sortable: true },
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true }
],
changeInfoVisible: false,
userId: "",
pageForm: {
isMember: 1,
changed: 2
}
}
},
methods: {
dropdownCommand(command) {
const { type, data } = command
if (type === "view") {
this.openView(data.id)
} else if (type === "change") {
this.openChange(data)
} else if (type === "setModelWorker") {
this.setModelWorker(data.id)
} else if (type === "cancelModelWorker") {
this.cancelModelWorker(data.id)
}
},
setModelWorker(userId) {
this.$confirm("确定要将此教工设置为劳模吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.$axios.post("/platform/member/modelWorker/manage/setModelWorker", { userId: userId }).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.$emit("refresh-table")
} else {
this.$message.error(res.msg)
}
})
})
},
cancelModelWorker(userId) {
this.$confirm("确定要取消此教工的劳模身份码?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.$axios.post("/platform/member/modelWorker/manage/cancelModelWorker", { userIds: JSON.stringify([userId]) })
.then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.$emit("refresh-table")
} else {
this.$message.error(res.msg)
}
})
})
},
openChange(data) {
this.$emit("change-member", { id: data.id, username: data.username })
},
openView(id) {
this.$emit("view-member", id)
},
addMember() {
this.$emit("add-member")
},
openUserChangeInfo(row) {
this.changeInfoVisible = true
this.$nextTick(() => {
this.$refs.memberChangeInfoRef.onOpen(row.id, null)
})
},
getChangeTypes(changeTypes) {
if (changeTypes) {
const c = JSON.parse(changeTypes)
return c
.map((v) => {
return this.changeTypeData.find((item) => item.code === v).name
})
.join(",")
}
return null
},
pageData() {
this.$axios.post(loc() + "/pageData", this.pageForm).then((res) => {
if (res.code === 0) {
this.tableData = res.data.list
this.pageForm.totalCount = res.data.totalCount
this.$emit("refresh", this.pageForm)
}
})
}
},
created() {
this.$businessTool.getAllDictOptions("MEMBER_CHANGE_TYPE").then((res) => {
this.changeTypeData = res
})
}
}
@@ -0,0 +1,97 @@
const MEMBER_VERIFICATION_CHANGE = {
template: `
<el-card shadow="never">
<div>
<div style="margin-bottom:20px">
<el-divider><h4 style="color: var(--color-primary)">当前信息</h4></el-divider>
</div>
<el-descriptions :column="3" border class="descriptions-form">
<el-descriptions-item label="姓名">{{ viewData.username }}</el-descriptions-item>
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
<el-descriptions-item label="民族">{{ viewData.nation }}</el-descriptions-item>
<el-descriptions-item label="在职状态">{{ viewData.userState }}</el-descriptions-item>
<el-descriptions-item label="人员类型">{{ viewData.personType }}</el-descriptions-item>
<el-descriptions-item label="学历">{{ viewData.education }}</el-descriptions-item>
<el-descriptions-item label="政治面貌">{{ viewData.political }}</el-descriptions-item>
<el-descriptions-item label="婚姻状况">{{ viewData.marriage || '' }}</el-descriptions-item>
<el-descriptions-item label="证件号码" span="2">{{ viewData.idCard }}</el-descriptions-item>
<el-descriptions-item label="联系电话">{{ viewData.mobile }}</el-descriptions-item>
<el-descriptions-item label="电子邮箱">{{ viewData.email }}</el-descriptions-item>
<el-descriptions-item label="是否会员">{{ viewData.member ? '是' : '否' }}</el-descriptions-item>
<el-descriptions-item label="是否福利会员">{{ viewData.welfareMember ? '是' : '否' }}</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
<el-descriptions-item label="所属工会、工作部门(学院)及职务" span="3">
<template slot="label">工作部门(学院)及岗位</template>
<div class="text-left">
{{ viewData.unionName + '-' + viewData.unitName + ( viewData.governmentPosition ? ( '(' + viewData.governmentPosition + ')' ) : '' ) }}
</div>
</el-descriptions-item>
</el-descriptions>
</div>
<div style="margin-top: 20px">
<div style="margin: 20px 0">
<el-divider><h4 style="color: var(--color-primary)">变更记录</h4></el-divider>
</div>
<el-table v-if="changeList && changeList.length > 0" ref="changeTable" :data="changeList" row-key="id"
style="width: 100%" border>
<el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column label="变更字段" prop="name"></el-table-column>
<el-table-column label="原数据" prop="value">
<template slot-scope="scope">
<div v-html="scope.row.value"></div>
</template>
</el-table-column>
<el-table-column label="新数据" prop="newValue">
<template slot-scope="scope">
<div v-html="scope.row.newValue"></div>
</template>
</el-table-column>
</el-table>
<el-empty v-else :image-size="50" description="未获取到变更信息"></el-empty>
</div>
</el-card>
`,
mixins: [initTableMixins],
data() {
return {
changeList: [],
viewData: {}
}
},
methods: {
findOne(id, projectId) {
if (!id || !projectId) {
return
}
this.$set(this.formData, "userId", id)
this.$set(this.formData, "verificationProjectId", projectId)
this.$axios
.post(loc() + "/getVerificationChangeInfo", {
data: JSON.stringify(this.formData)
})
.then((res) => {
if (res.code === 0) {
this.changeList = res.data
}
})
this.findUserInfo()
},
findUserInfo(id) {
if (!id) {
return
}
this.$axios.post("/platform/member/apply/common/findOne", { id: id }).then((res) => {
if (res.code === 0) {
this.viewData = res.data
}
})
},
onOpen(data) {
this.findOne(data.id, data.projectId)
this.$nextTick(() => {
this.findUserInfo(data.id)
})
}
}
}
@@ -0,0 +1,137 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<el-card shadow="never">
<common-query ref="commonQueryRef" @search="search"></common-query>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="非会员列表">
<el-button @click="doExport" size="mini" type="primary">导出</el-button>
<el-button :disabled="!selection || selection.length == 0"
@click="batchMake" size="mini" type="primary">批量设置为会员</el-button>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table"
row-key="id" @selection-change="handleSelectionChange" style="width: 100%">
<el-table-column :reserve-selection="true" type="selection" width="55"></el-table-column>
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号" type="index" width="80px"></el-table-column>
<el-table-column :label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
header-align="center"
min-width="100px"
show-overflow-tooltip
v-for="column in tableColumns">
</el-table-column>
<el-table-column label="操作" fixed="right" width="200px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button @click="singleMake(row)" size="mini" type="primary">设置为会员</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #view>
<member-info ref="memberInfo"></member-info>
</template>
</guava>
</div>
<!--#include("../common/commonQuery.html"){}#-->
<script nonce="${cspNonce!}">
<!--#include("../../common/info/memberInfo.js"){}#-->
<!--#include("../common/commonQuery.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
pageForm: {},
tableColumns: [
{ prop: "loginname", label: "工号", sortable: true },
{ prop: "username", label: "姓名", sortable: true },
{ prop: "sex", label: "性别", sortable: true },
{ prop: "userState", label: "在职状态", sortable: true },
{ prop: "personType", label: "人员类型", sortable: true },
// { prop: "preparedBy", label: "编制类别", sortable: true },
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true },
],
selection: [],
}
},
components: {
"common-query": COMMON_QUERY,
"member-info": MEMBER_INFO
},
methods: {
// 查看信息
openView(row) {
this.$refs.guava.view(() => {
this.$refs.memberInfo.onOpen(row.id)
})
},
// 单个设置会员
singleMake(row) {
const data = [row.id]
const msg = "确定将【" + row.username + "】设置为会员吗?"
this.setMemberFun(msg, data)
},
// 批量设置会员
batchMake() {
const msg = "确定将【" + this.selection.length + "】条数据设置为会员吗?"
const data = this.selection.map(item => item.id)
this.setMemberFun(msg, data)
},
setMemberFun(msg, data) {
this.$confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(async () => {
debugger
const loading = createLoading('正在提交中')
const resp = await this.$axios.post("/platform/member/info/batchMake/batchMake", {
userIds: JSON.stringify(data)
})
loading.close()
if (resp.code === 0) {
this.$message.success(resp.msg)
this.pageData()
this.selection = []
this.$refs.table.clearSelection()
} else {
this.$message.error(resp.msg)
}
})
},
doExport() {
this.$downLoad("/platform/member/info/batchMake/doExport", this.pageForm)
},
handleSelectionChange(val){
this.selection = val;
},
search(pageForm) {
if (pageForm) {
this.pageForm = {...this.pageForm, ...pageForm}
}
this.doSearch()
},
},
created() {
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,901 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
/* 主网格布局 */
.dashboard {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-rows: 200px 1fr;
gap: 20px;
width: 100%;
height: calc(100vh - 126px);
box-sizing: border-box;
}
/* 卡片基础样式 */
.card {
background-color: white;
border-radius: 8px;
overflow: hidden;
display: flex;
flex-direction: column;
}
/* 卡片标题样式 */
.card-title {
padding: 16px 20px 8px;
font-size: 16px;
font-weight: 600;
color: #333;
border-bottom: 1px solid #f0f0f0;
flex-shrink: 0;
}
/* 顶部统计卡片 */
.stats-card {
height: 200px;
padding: 20px;
box-sizing: border-box;
}
.stats-card .card-title {
padding: 0 0 8px 0;
border: none;
font-size: 14px;
color: #666;
margin-bottom: 8px;
}
.stat-value {
font-size: 32px;
font-weight: bold;
color: #217050;
margin: 10px 0;
line-height: 1.2;
}
.stat-meta {
font-size: 12px;
color: #999;
margin-top: auto;
}
.trend-up {
color: #52c41a;
}
.trend-down {
color: #ff4d4f;
}
/* 图表容器 */
.chart-container {
flex: 1;
min-height: 0;
padding: 10px;
}
/* 统计卡片中的图表容器 */
.stats-card .chart-container {
height: 120px;
min-height: 120px;
flex: none;
margin: 8px 0;
padding: 0;
}
/* 内容区域 - 左右布局 */
.content-left {
grid-column: 1 / 4;
display: grid;
grid-template-rows: 1fr 1fr;
gap: 20px;
min-height: 0;
}
.content-right {
grid-column: 4 / 5;
min-height: 0;
}
/* 左侧图表卡片 */
.content-left .card {
min-height: 0;
}
.content-left .card .chart-container {
flex: 1;
/*min-height: 200px;*/
}
/* 右侧表格样式 */
.content-right {
display: flex;
flex-direction: column;
}
.content-right .el-table {
flex: 1;
height: auto !important;
}
.content-right .card-title {
flex-shrink: 0;
}
/* 表格序号样式 */
.idx {
width: 24px;
height: 24px;
line-height: 24px;
text-align: center;
border-radius: 4px;
font-weight: bold;
margin: 0 auto;
}
.idx-rank {
background: linear-gradient(135deg, #217050, #2d8a5f);
color: white;
}
/* 响应式设计 */
@media (max-width: 1400px) {
.dashboard {
grid-template-columns: repeat(2, 1fr);
grid-template-rows: 200px 200px 1fr;
}
.stats-card:nth-child(1),
.stats-card:nth-child(2) {
grid-row: 1;
}
.stats-card:nth-child(3),
.stats-card:nth-child(4) {
grid-row: 2;
}
.content-left {
grid-column: 1 / 3;
grid-row: 3;
grid-template-columns: 2fr 1fr;
grid-template-rows: 1fr;
}
.content-right {
grid-column: 1 / 3;
grid-row: 4;
}
}
@media (max-width: 768px) {
.dashboard {
grid-template-columns: 1fr;
grid-template-rows: repeat(4, 180px) 1fr 300px;
gap: 15px;
}
.stats-card {
height: 180px;
padding: 15px;
}
.stats-card .chart-container {
height: 100px;
min-height: 100px;
}
.content-left {
grid-column: 1;
grid-row: 5;
grid-template-columns: 1fr;
grid-template-rows: 1fr 1fr;
}
.content-right {
grid-column: 1;
grid-row: 6;
min-height: 300px;
}
.stat-value {
font-size: 24px;
}
}
/* Element UI 表格样式重写 */
.el-table {
font-size: 14px;
}
.el-table .el-table__header-wrapper {
background-color: #fafafa;
}
.el-table .el-table__body-wrapper {
max-height: calc(100% - 48px);
overflow-y: auto;
}
.el-table th {
background-color: #fafafa !important;
color: #333;
font-weight: 600;
}
.el-table td {
border-bottom: 1px solid #f0f0f0;
}
.el-table--border .el-table__inner-wrapper::after {
display: none;
}
/* Loading 样式优化 */
.el-loading-mask {
background-color: rgba(255, 255, 255, 0.8);
}
.el-loading-spinner .circular {
width: 32px;
height: 32px;
}
@media (max-width: 768px) {
.dashboard {
grid-template-columns: 1fr; /* 单列布局 */
grid-template-rows: repeat(6, auto); /* 自动高度,6行 */
gap: 15px;
}
/* 所有卡片独占一行 */
.stats-card,
.content-left,
.content-right {
grid-column: 1 !important; /* 强制占满整行 */
grid-row: auto !important; /* 自动行位置 */
height: auto; /* 高度自适应 */
min-height: 180px; /* 最小高度保障 */
}
/* 调整左侧内容区域为垂直堆叠 */
.content-left {
display: flex;
flex-direction: column;
gap: 15px;
}
/* 调整图表容器高度 */
.chart-container {
min-height: 200px;
}
/* 统计卡片调整 */
.stats-card {
padding: 15px;
}
.stats-card .chart-container {
height: 120px;
min-height: 120px;
}
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<div class="dashboard">
<!-- 顶部四个统计卡片 - 高度固定200px -->
<div class="card stats-card">
<div class="card-title">会员数</div>
<div class="stat-value" v-loading="loading.memberNumber">
{{memberNumberData.memberNum}}
<span style="font-size: 14px">&ensp;</span>
</div>
<!-- <div class="stat-meta" v-loading="loading.memberNumber">-->
<!-- 年同比 {{memberNumberData.ratio}}&ensp;-->
<!-- <i :class="memberNumberData.diff >= 0 ? 'el-icon-top trend-up' : 'el-icon-bottom trend-down'"></i>-->
<!-- </div>-->
</div>
<div class="card stats-card">
<div class="card-title">增长趋势</div>
<div class="chart-container" id="growthTrendChart" v-loading="loading.growthTrend"></div>
</div>
<div class="card stats-card">
<div class="card-title">会员占比</div>
<div class="chart-container" id="memberPercentageChart" v-loading="loading.memberPercentage"></div>
</div>
<div class="card stats-card">
<div class="card-title">男女占比</div>
<div class="chart-container" id="memberSexPercentageChart" v-loading="loading.memberSexPercentage"></div>
</div>
<!-- 左侧内容区域 -->
<div class="content-left">
<!-- 工会会员数图表 -->
<div class="card">
<div class="card-title">工会会员数</div>
<div class="chart-container" id="unionMemberChart" v-loading="loading.unionMember"></div>
</div>
<!-- 人员类型图表 -->
<div class="card">
<div class="card-title">人员类型统计</div>
<div class="chart-container" id="personTypeMemberChart" v-loading="loading.personTypeMember"></div>
</div>
</div>
<!-- 右侧表格区域 -->
<div class="card content-right">
<div class="card-title">工会会员明细</div>
<el-table
:data="unionMember"
:header-cell-style="{background:'#FAFAFA'}"
style="width: 100%; height: calc(100% - 40px)"
row-key="id"
v-loading="loading.unionMember"
>
<el-table-column label="序号" width="100px" align="center">
<template scope="{$index}">
<div class="idx idx-rank" v-if="$index<3">{{$index+1}}</div>
<div class="idx" v-else>{{$index+1}}</div>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="分工会" prop="unioncode" show-overflow-tooltip sortable>
<template scope="{row}">{{row.unionname}}</template>
</el-table-column>
<el-table-column
align="center"
header-align="center"
label="会员人数"
prop="value"
show-overflow-tooltip
sortable
width="120px"
></el-table-column>
</el-table>
</div>
</div>
</guava>
</div>
<script nonce="${cspNonce!}">
const chart = {
growthTrendChart: undefined,
memberPercentageChart: undefined,
memberSexPercentageChart: undefined,
unionMemberChart: undefined,
personTypeMemberChart: undefined,
userStateMemberChart: undefined
}
const vue = new Vue({
el: "#app",
data(){
return{
loading: {
memberNumber: false,
growthTrend: false,
memberPercentage: false,
memberSexPercentage: false,
unionMember: false,
personTypeMember: false,
userStateMember: false
},
memberNumberData: {
memberNum: "--",
lastYearMemberNum: "--",
ratio: "0.0%",
diff: 0
},
memberPercentage: "--",
unionMember: []
}
},
methods: {
/**
* 会员数
* @returns {Promise<void>}
*/
async getMemberNumber() {
this.loading.memberNumber = true
this.$axios.post("/platform/member/info/board/memberNumber").then((resp) => {
if (resp.code === 0) {
const {
data: { memberNum, lastYearMemberNum }
} = resp
const diff = memberNum - lastYearMemberNum
const ratio = (lastYearMemberNum ? (Math.abs(diff) / lastYearMemberNum) * 100 : (diff / 1) * 10).toFixed(2) + " %"
this.memberNumberData = { memberNum, lastYearMemberNum, diff, ratio }
this.loading.memberNumber = false
} else {
this.$message.warning(resp.msg)
}
})
},
/**
* 增长趋势
* @returns {Promise<void>}
*/
async getGrowthTrend() {
this.loading.growthTrend = true
this.$axios.post("/platform/member/info/board/growthTrend").then((resp) => {
this.loading.growthTrend = false
if (resp.code === 0) {
const { data } = resp
const labels = data.map((v) => v.label)
const values = data.map((v) => v.value)
if (chart.growthTrendChart) {
chart.growthTrendChart.changeData(values)
return
}
chart.growthTrendChart = new G2Plot.TinyArea("growthTrendChart", {
autoFit: true,
data: values,
smooth: true,
// 核心配色方案
color: '#217050', // 主色线
areaStyle: {
fill: 'l(270) 0:#e8f5eb 1:#217050', // 线性渐变填充
opacity: 0.8
},
line: {
color: '#134330', // 深绿色线条
size: 2
},
// 数据点样式
point: {
size: 3,
style: {
fill: '#fff',
stroke: '#217050',
lineWidth: 2
}
},
showContent: true,
tooltip: {
customContent: function (i, data) {
if (labels[i]) {
return labels[i] + "-" + data[0]?.data?.y + "人"
}
return ""
}
}
})
chart.growthTrendChart.render()
} else {
this.$message.warning(resp.msg)
}
})
},
/**
* 会员占比
* @returns {Promise<void>}
*/
async getMemberPercentage() {
this.loading.memberPercentage = true
this.$axios.post("/platform/member/info/board/memberPercentage").then((resp) => {
this.loading.memberPercentage = false
if (resp.code === 0) {
const { data } = resp
this.memberPercentage = data.toFixed(2)
if (chart.memberPercentageChart) {
chart.memberPercentageChart.changeData(data)
return
}
chart.memberPercentageChart = new G2Plot.Liquid("memberPercentageChart", {
outline: {
border: 4,
distance: 8
},
wave: {
length: 128
},
autoFit: true,
percent: data,
color: '#217050',
statistic: {
content: {
style: {
fontSize: 16,
fill: '#fff', // 白色文字
}
}
}
})
chart.memberPercentageChart.render()
} else {
this.$message.warning(resp.msg)
}
})
},
/**
* 男女占比
* @returns {Promise<void>}
*/
async getMemberSexPercentage() {
this.loading.memberSexPercentage = true
this.$axios.post("/platform/member/info/board/memberSexPercentage").then((resp) => {
this.loading.memberSexPercentage = false
if (resp.code === 0) {
const { data } = resp
if (chart.memberSexPercentageChart) {
chart.memberSexPercentageChart.changeData(data)
return
}
chart.memberSexPercentageChart = new G2Plot.Pie("memberSexPercentageChart", {
data,
angleField: "value",
colorField: "type",
legend: false,
label: {
type: 'inner',
offset: '-30%',
style: {
fontSize: 14,
fontWeight: 'bold',
fill: '#fff', // 白色文字
textShadow: '0 1px 2px rgba(0,0,0,0.5)' // 增强可读性
},
formatter: (datum) => (datum.percent * 100).toFixed(1)
},
// 交互效果
interactions: [
{ type: 'element-active' },
],
color: ['#217050', '#f0a35c']
})
chart.memberSexPercentageChart.render()
} else {
this.$message.warning(resp.msg)
}
})
},
/**
* 各工会会员数
* @returns {Promise<void>}
*/
async getUnionMember() {
this.loading.unionMember = true
this.$axios.post("/platform/member/info/board/unionMember").then((resp) => {
this.loading.unionMember = false
if (resp.code === 0) {
const { chartData, tableData } = resp.data
this.unionMember = tableData
const labels = chartData.map((v) => v.unionname)
const values = chartData.map((v) => v.value)
if (chart.unionMemberChart) {
chart.unionMemberChart.changeData(values)
return
}
chart.unionMemberChart = new G2Plot.Column("unionMemberChart", {
data: chartData,
autoFit: true,
xField: "unionname",
yField: "value",
color: '#217050', // 主色柱体
// 柱体样式
columnStyle: {
fill: '#217050',
stroke: '#134330',
lineWidth: 1,
shadowColor: 'rgba(33, 112, 80, 0.5)', // 主色阴影
shadowBlur: 6,
radius: [4, 4, 0, 0] // 顶部圆角
},
label: {
position: "top",
style: {
fill: "#217050", // 白色文字
fontSize: 12,
fontWeight: 'bold',
textShadow: '0 1px 2px rgba(0,0,0,0.5)',
opacity: 0.9
},
formatter: (datum) => datum.value // 显示原始值
},
// X轴配置
xAxis: {
label: {
autoHide: true,
autoRotate: false,
style: {
fill: '#666',
fontSize: 12
}
},
line: {
style: {
stroke: '#e8f5eb' // 浅绿色轴线
}
},
grid: {
line: {
style: {
stroke: '#f0f0f0',
lineDash: [4, 2]
}
}
}
},
// Y轴配置
yAxis: {
label: {
style: {
fill: '#666'
},
formatter: (val) => val
},
grid: {
line: {
style: {
stroke: '#e8f5eb',
lineDash: [4, 2]
}
}
}
},
meta: {
label: {
alias: "类型"
},
value: {
alias: "会员数"
}
}
})
chart.unionMemberChart.render()
} else {
this.$message.warning(resp.msg)
}
})
},
/**
* 根据人员类型查找会员数
* @returns {Promise<void>}
*/
async getPersonTypeMember() {
this.loading.personTypeMember = true
this.$axios.post("/platform/member/info/board/personTypeMember").then((resp) => {
this.loading.personTypeMember = false
if (resp.code === 0) {
const { data } = resp
if (chart.personTypeMemberChart) {
chart.personTypeMemberChart.changeData(data)
return
}
chart.personTypeMemberChart = new G2Plot.Column("personTypeMemberChart", {
data,
autoFit: true,
xField: "label",
yField: "value",
// 核心配色方案
color: '#217050', // 主色柱体
// 柱体样式
columnStyle: {
fill: '#217050',
stroke: '#134330',
lineWidth: 1,
shadowColor: 'rgba(33, 112, 80, 0.5)', // 主色阴影
shadowBlur: 6,
radius: [4, 4, 0, 0] // 顶部圆角
},
// 数据标签
label: {
position: "top",
style: {
fill: "#217050", // 白色文字
fontSize: 12,
fontWeight: 'bold',
textShadow: '0 1px 2px rgba(0,0,0,0.5)',
opacity: 0.9
},
formatter: (datum) => datum.value // 显示原始值
// 如需千分位格式化:.toLocaleString()
},
// X轴配置
xAxis: {
label: {
autoHide: true,
autoRotate: false,
style: {
fill: '#666',
fontSize: 12
}
},
line: {
style: {
stroke: '#e8f5eb' // 浅绿色轴线
}
},
grid: {
line: {
style: {
stroke: '#f0f0f0',
lineDash: [4, 2]
}
}
}
},
// Y轴配置
yAxis: {
label: {
style: {
fill: '#666'
},
formatter: (val) => val
},
grid: {
line: {
style: {
stroke: '#e8f5eb',
lineDash: [4, 2]
}
}
}
},
meta: {
label: {
alias: "类型"
},
value: {
alias: "会员数"
}
}
})
chart.personTypeMemberChart.render()
} else {
this.$message.warning(resp.msg)
}
})
},
/**
* 根据在职状态查找会员数
* @returns {Promise<void>}
*/
async getUserStateMember() {
this.loading.userStateMember = true
this.$axios.post("/platform/member/info/board/userStateMember").then((resp) => {
this.loading.userStateMember = false
if (resp.code === 0) {
const { data } = resp
if (chart.userStateMemberChart) {
chart.userStateMemberChart.changeData(data)
return
}
chart.userStateMemberChart = new G2Plot.Column("userStateMemberChart", {
data,
autoFit: true,
xField: "label",
yField: "value",
// 核心配色方案
color: '#217050', // 主色柱体
// 柱体样式
columnStyle: {
fill: '#217050',
stroke: '#134330',
lineWidth: 1,
shadowColor: 'rgba(33, 112, 80, 0.5)', // 主色阴影
shadowBlur: 6,
radius: [4, 4, 0, 0] // 顶部圆角
},
// 数据标签
label: {
position: "top",
style: {
fill: "#217050", // 白色文字
fontSize: 12,
fontWeight: 'bold',
textShadow: '0 1px 2px rgba(0,0,0,0.5)',
opacity: 0.9
},
formatter: (datum) => datum.value // 显示原始值
// 如需千分位格式化:.toLocaleString()
},
// X轴配置
xAxis: {
label: {
autoHide: true,
autoRotate: false,
style: {
fill: '#666',
fontSize: 12
}
},
line: {
style: {
stroke: '#e8f5eb' // 浅绿色轴线
}
},
grid: {
line: {
style: {
stroke: '#f0f0f0',
lineDash: [4, 2]
}
}
}
},
// Y轴配置
yAxis: {
label: {
style: {
fill: '#666'
},
formatter: (val) => val
},
grid: {
line: {
style: {
stroke: '#e8f5eb',
lineDash: [4, 2]
}
}
}
},
meta: {
label: {
alias: "类型"
},
value: {
alias: "会员数"
}
}
})
chart.userStateMemberChart.render()
} else {
this.$message.warning(resp.msg)
}
})
},
initData() {
this.getMemberNumber()
this.getGrowthTrend()
this.getMemberPercentage()
this.getMemberSexPercentage()
this.getUnionMember()
this.getPersonTypeMember()
// this.getUserStateMember()
}
},
mounted() {
this.initData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,719 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.top-col {
background-color: white;
position: relative;
box-sizing: border-box;
padding: 20px;
width: calc((100% - (20px * 3)) / 4);
}
.top-col:not(:last-child),
.center-col:not(:last-child) {
margin-right: 20px;
}
.col-title {
color: rgba(0, 0, 0, 0.45);
font-size: 14px;
margin-bottom: 10px;
}
.top-col-member-number {
font-size: 30px;
color: rgba(0, 0, 0, 0.85);
}
.top-col-chart {
height: 80px;
width: 100%;
position: relative;
}
.center-col {
background-color: white;
position: relative;
box-sizing: border-box;
padding: 20px;
width: calc((100% - (20px * 1)) / 2);
}
.idx {
display: flex;
justify-content: center;
align-items: center;
color: rgba(0, 0, 0, 0.85);
width: 20px;
height: 20px;
border-radius: 50%;
background-color: #f0f0f0;
font-size: 12px;
margin: 0 auto;
}
.idx-rank {
color: white !important;
background-color: #314659 !important;
}
.el-table__body-wrapper::-webkit-scrollbar {
display: none; /* Chrome Safari */
}
.el-table__body-wrapper {
scrollbar-width: none; /* firefox */
-ms-overflow-style: none; /* IE 10+ */
overflow-x: hidden;
overflow-y: auto;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<el-row style="background-color: #f0f2f5" type="flex">
<el-col class="top-col" v-loading="loading.memberNumber">
<div class="col-title">会员数</div>
<div class="top-col-member-number">
{{memberNumberData.memberNum}}
<span style="font-size: 14px">&ensp;</span>
</div>
<div
style="
color: rgba(0, 0, 0, 0.85);
margin-top: 20px;
font-size: 14px;
display: flex;
align-items: center;
justify-content: flex-end;
"
>
年同比 {{memberNumberData.ratio}}&ensp;
<svg
aria-hidden="true"
data-icon="caret-up"
fill="currentColor"
focusable="false"
height="1em"
style="color: #67c23a"
v-if="memberNumberData.diff>=0"
viewBox="0 0 1024 1024"
width="1em"
>
<path
d="M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"
></path>
</svg>
<svg
aria-hidden="true"
data-icon="caret-up"
fill="currentColor"
focusable="false"
height="1em"
style="color: #f56c6c"
v-else
viewBox="0 0 1024 1024"
width="1em"
>
<path
d="M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"
></path>
</svg>
</div>
</el-col>
<el-col class="top-col" v-loading="loading.growthTrend">
<div class="col-title">增长趋势</div>
<div class="top-col-chart" id="growthTrendChart"></div>
</el-col>
<el-col class="top-col" v-loading="loading.memberPercentage">
<div class="col-title">会员占比</div>
<div class="top-col-chart" id="memberPercentageChart" style="position: absolute; height: 120px; right: -10%; bottom: 20px"></div>
</el-col>
<el-col class="top-col" v-loading="loading.memberSexPercentageChart">
<div class="col-title">男女占比</div>
<div class="top-col-chart" id="memberSexPercentageChart" style="position: absolute; height: 120px; right: -10%; bottom: 20px"></div>
</el-col>
</el-row>
<el-row style="background-color: #f0f2f5; margin-top: 20px" type="flex">
<el-col class="center-col" v-loading="loading.unionMember">
<div class="col-title">工会会员数</div>
<div id="unionMemberChart" style="width: 100%; height: 200px"></div>
<el-table
:data="unionMember"
:header-cell-style="{background:'#FAFAFA'}"
height="calc(100vh - 190px - 400px)"
row-key="id"
style="width: 100%; margin-top: 20px"
>
<el-table-column label="序号" width="100px" align="center">
<template scope="{$index}">
<div class="idx idx-rank" v-if="$index<3">{{$index+1}}</div>
<div class="idx" v-else>{{$index+1}}</div>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="分工会" prop="unioncode" show-overflow-tooltip sortable>
<template scope="{row}">{{row.unionname}}</template>
</el-table-column>
<el-table-column
align="center"
header-align="center"
label="会员人数"
prop="value"
show-overflow-tooltip
sortable
width="120px"
></el-table-column>
</el-table>
</el-col>
<el-col class="center-col">
<div class="col-title">在职状态</div>
<div
id="userStateMemberChart"
style="width: 100%; height: calc(50% - 35px); box-sizing: border-box; padding: 30px 10px"
v-loading="loading.userStateMember"
></div>
<div class="col-title">人员类型</div>
<div
id="personTypeMemberChart"
style="width: 100%; height: calc(50% - 35px); box-sizing: border-box; padding: 30px 10px"
v-loading="loading.personTypeMember"
></div>
</el-col>
</el-row>
</guava>
</div>
<script nonce="${cspNonce!}">
const chart = {
growthTrendChart: undefined,
memberPercentageChart: undefined,
memberSexPercentageChart: undefined,
unionMemberChart: undefined,
personTypeMemberChart: undefined,
userStateMemberChart: undefined
}
new Vue({
el: "#app",
data: {
loading: {
memberNumber: false,
growthTrend: false,
memberPercentage: false,
memberSexPercentage: false,
unionMember: false,
personTypeMember: false,
userStateMember: false
},
memberNumberData: {
memberNum: "--",
lastYearMemberNum: "--",
ratio: "0.0%",
diff: 0
},
memberPercentage: "--",
unionMember: []
},
methods: {
/**
* 会员数
* @returns {Promise<void>}
*/
async getMemberNumber() {
this.loading.memberNumber = true
this.$axios.post("/platform/member/info/board/memberNumber").then((resp) => {
if (resp.code === 0) {
const {
data: { memberNum, lastYearMemberNum }
} = resp
const diff = memberNum - lastYearMemberNum
const ratio = (lastYearMemberNum ? (Math.abs(diff) / lastYearMemberNum) * 100 : (diff / 1) * 10).toFixed(2) + " %"
this.memberNumberData = { memberNum, lastYearMemberNum, diff, ratio }
this.loading.memberNumber = false
} else {
this.$message.warning(resp.msg)
}
})
},
/**
* 增长趋势
* @returns {Promise<void>}
*/
async getGrowthTrend() {
this.loading.growthTrend = true
this.$axios.post("/platform/member/info/board/growthTrend").then((resp) => {
this.loading.growthTrend = false
if (resp.code === 0) {
const { data } = resp
const labels = data.map((v) => v.label)
const values = data.map((v) => v.value)
if (chart.growthTrendChart) {
chart.growthTrendChart.changeData(values)
return
}
chart.growthTrendChart = new G2Plot.TinyArea("growthTrendChart", {
autoFit: true,
data: values,
smooth: true,
// 核心配色方案
color: '#217050', // 主色线
areaStyle: {
fill: 'l(270) 0:#e8f5eb 1:#217050', // 线性渐变填充
opacity: 0.8
},
line: {
color: '#134330', // 深绿色线条
size: 2
},
// 数据点样式
point: {
size: 3,
style: {
fill: '#fff',
stroke: '#217050',
lineWidth: 2
}
},
showContent: true,
tooltip: {
customContent: function (i, data) {
if (labels[i]) {
return labels[i] + "-" + data[0]?.data?.y + "人"
}
return ""
}
}
})
chart.growthTrendChart.render()
} else {
this.$message.warning(resp.msg)
}
})
},
/**
* 会员占比
* @returns {Promise<void>}
*/
async getMemberPercentage() {
this.loading.memberPercentage = true
this.$axios.post("/platform/member/info/board/memberPercentage").then((resp) => {
this.loading.memberPercentage = false
if (resp.code === 0) {
const { data } = resp
this.memberPercentage = data.toFixed(2)
if (chart.memberPercentageChart) {
chart.memberPercentageChart.changeData(data)
return
}
chart.memberPercentageChart = new G2Plot.Liquid("memberPercentageChart", {
outline: {
border: 4,
distance: 8
},
wave: {
length: 128
},
autoFit: true,
percent: data,
color: '#217050',
statistic: {
content: {
style: {
fontSize: 16,
fill: '#fff', // 白色文字
}
}
}
})
chart.memberPercentageChart.render()
} else {
this.$message.warning(resp.msg)
}
})
},
/**
* 男女占比
* @returns {Promise<void>}
*/
async getMemberSexPercentage() {
this.loading.memberSexPercentage = true
this.$axios.post("/platform/member/info/board/memberSexPercentage").then((resp) => {
this.loading.memberSexPercentage = false
if (resp.code === 0) {
const { data } = resp
if (chart.memberSexPercentageChart) {
chart.memberSexPercentageChart.changeData(data)
return
}
chart.memberSexPercentageChart = new G2Plot.Pie("memberSexPercentageChart", {
data,
angleField: "value",
colorField: "type",
legend: false,
label: {
type: 'inner',
offset: '-30%',
style: {
fontSize: 14,
fontWeight: 'bold',
fill: '#fff', // 白色文字
textShadow: '0 1px 2px rgba(0,0,0,0.5)' // 增强可读性
},
formatter: (datum) => (datum.percent * 100).toFixed(1)
},
// 交互效果
interactions: [
{ type: 'element-active' },
],
color: ['#217050', '#f0a35c']
})
chart.memberSexPercentageChart.render()
} else {
this.$message.warning(resp.msg)
}
})
},
/**
* 各工会会员数
* @returns {Promise<void>}
*/
async getUnionMember() {
this.loading.unionMember = true
this.$axios.post("/platform/member/info/board/unionMember").then((resp) => {
this.loading.unionMember = false
if (resp.code === 0) {
const { chartData, tableData } = resp.data
this.unionMember = tableData
const labels = chartData.map((v) => v.unionname)
const values = chartData.map((v) => v.value)
if (chart.unionMemberChart) {
chart.unionMemberChart.changeData(values)
return
}
chart.unionMemberChart = new G2Plot.Column("unionMemberChart", {
data: chartData,
autoFit: true,
xField: "unionname",
yField: "value",
color: '#217050', // 主色柱体
// 柱体样式
columnStyle: {
fill: '#217050',
stroke: '#134330',
lineWidth: 1,
shadowColor: 'rgba(33, 112, 80, 0.5)', // 主色阴影
shadowBlur: 6,
radius: [4, 4, 0, 0] // 顶部圆角
},
label: {
position: "top",
style: {
fill: "#217050", // 白色文字
fontSize: 12,
fontWeight: 'bold',
textShadow: '0 1px 2px rgba(0,0,0,0.5)',
opacity: 0.9
},
formatter: (datum) => datum.value // 显示原始值
},
// X轴配置
xAxis: {
label: {
autoHide: true,
autoRotate: false,
style: {
fill: '#666',
fontSize: 12
}
},
line: {
style: {
stroke: '#e8f5eb' // 浅绿色轴线
}
},
grid: {
line: {
style: {
stroke: '#f0f0f0',
lineDash: [4, 2]
}
}
}
},
// Y轴配置
yAxis: {
label: {
style: {
fill: '#666'
},
formatter: (val) => val
},
grid: {
line: {
style: {
stroke: '#e8f5eb',
lineDash: [4, 2]
}
}
}
},
meta: {
label: {
alias: "类型"
},
value: {
alias: "会员数"
}
}
})
chart.unionMemberChart.render()
} else {
this.$message.warning(resp.msg)
}
})
},
/**
* 根据人员类型查找会员数
* @returns {Promise<void>}
*/
async getPersonTypeMember() {
this.loading.personTypeMember = true
this.$axios.post("/platform/member/info/board/personTypeMember").then((resp) => {
this.loading.personTypeMember = false
if (resp.code === 0) {
const { data } = resp
if (chart.personTypeMemberChart) {
chart.personTypeMemberChart.changeData(data)
return
}
chart.personTypeMemberChart = new G2Plot.Column("personTypeMemberChart", {
data,
autoFit: true,
xField: "label",
yField: "value",
// 核心配色方案
color: '#217050', // 主色柱体
// 柱体样式
columnStyle: {
fill: '#217050',
stroke: '#134330',
lineWidth: 1,
shadowColor: 'rgba(33, 112, 80, 0.5)', // 主色阴影
shadowBlur: 6,
radius: [4, 4, 0, 0] // 顶部圆角
},
// 数据标签
label: {
position: "top",
style: {
fill: "#217050", // 白色文字
fontSize: 12,
fontWeight: 'bold',
textShadow: '0 1px 2px rgba(0,0,0,0.5)',
opacity: 0.9
},
formatter: (datum) => datum.value // 显示原始值
// 如需千分位格式化:.toLocaleString()
},
// X轴配置
xAxis: {
label: {
autoHide: true,
autoRotate: false,
style: {
fill: '#666',
fontSize: 12
}
},
line: {
style: {
stroke: '#e8f5eb' // 浅绿色轴线
}
},
grid: {
line: {
style: {
stroke: '#f0f0f0',
lineDash: [4, 2]
}
}
}
},
// Y轴配置
yAxis: {
label: {
style: {
fill: '#666'
},
formatter: (val) => val
},
grid: {
line: {
style: {
stroke: '#e8f5eb',
lineDash: [4, 2]
}
}
}
},
meta: {
label: {
alias: "类型"
},
value: {
alias: "会员数"
}
}
})
chart.personTypeMemberChart.render()
} else {
this.$message.warning(resp.msg)
}
})
},
/**
* 根据在职状态查找会员数
* @returns {Promise<void>}
*/
async getUserStateMember() {
this.loading.userStateMember = true
this.$axios.post("/platform/member/info/board/userStateMember").then((resp) => {
this.loading.userStateMember = false
if (resp.code === 0) {
const { data } = resp
if (chart.userStateMemberChart) {
chart.userStateMemberChart.changeData(data)
return
}
chart.userStateMemberChart = new G2Plot.Column("userStateMemberChart", {
data,
autoFit: true,
xField: "label",
yField: "value",
// 核心配色方案
color: '#217050', // 主色柱体
// 柱体样式
columnStyle: {
fill: '#217050',
stroke: '#134330',
lineWidth: 1,
shadowColor: 'rgba(33, 112, 80, 0.5)', // 主色阴影
shadowBlur: 6,
radius: [4, 4, 0, 0] // 顶部圆角
},
// 数据标签
label: {
position: "top",
style: {
fill: "#217050", // 白色文字
fontSize: 12,
fontWeight: 'bold',
textShadow: '0 1px 2px rgba(0,0,0,0.5)',
opacity: 0.9
},
formatter: (datum) => datum.value // 显示原始值
// 如需千分位格式化:.toLocaleString()
},
// X轴配置
xAxis: {
label: {
autoHide: true,
autoRotate: false,
style: {
fill: '#666',
fontSize: 12
}
},
line: {
style: {
stroke: '#e8f5eb' // 浅绿色轴线
}
},
grid: {
line: {
style: {
stroke: '#f0f0f0',
lineDash: [4, 2]
}
}
}
},
// Y轴配置
yAxis: {
label: {
style: {
fill: '#666'
},
formatter: (val) => val
},
grid: {
line: {
style: {
stroke: '#e8f5eb',
lineDash: [4, 2]
}
}
}
},
meta: {
label: {
alias: "类型"
},
value: {
alias: "会员数"
}
}
})
chart.userStateMemberChart.render()
} else {
this.$message.warning(resp.msg)
}
})
},
initData() {
this.getMemberNumber()
this.getGrowthTrend()
this.getMemberPercentage()
this.getMemberSexPercentage()
this.getUnionMember()
this.getPersonTypeMember()
this.getUserStateMember()
}
},
mounted() {
this.initData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,51 @@
<script type="text/x-template" id="member-info-common-query-template">
<search @search="doSearch">
<search-item label="姓名/工号">
<el-select
clearable
v-model="pageForm.userIds"
filterable
remote
collapse-tags
placeholder="请输入姓名或工号"
:remote-method="queryUser"
@change="doSearch"
style="width: 100%"
multiple
>
<el-option v-for="o in userList" :label="o.username + '(' + o.loginname + ')'" :value="o.id"
:key="o.id"></el-option>
</el-select>
</search-item>
<search-item label="所属工会">
<el-select @change="handleUnionChange" @clear="handleUnionClear" 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="在职状态" v-if="!query_disable">
<dict-select v-model="pageForm.userStates" placeholder="请选择在职状态" @change="doSearch"
code="USER_STATE" multiple collapse-tags></dict-select>
</search-item>
<search-item label="人员类型" v-if="!query_disable">
<dict-select v-model="pageForm.personTypes" placeholder="请选择人员类型" @change="doSearch"
code="USER_PERSON_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.userAttributes" placeholder="请选择人员属性" @change="doSearch"
code="USER_ATTRIBUTE" multiple collapse-tags clearable></dict-select>
</search-item>
</search>
</script>
@@ -0,0 +1,86 @@
const COMMON_QUERY = {
template: "#member-info-common-query-template",
store,
props: {
query_disable: {
type: Boolean,
default: false
}
},
mixins: [initTableMixins],
data() {
return{
userList: [],
unions: [],
units: [],
pageForm: {
searchKeyword: '',
unionId: '',
unitId: '',
userIds: [],
userStates: [],
personTypes: [],
preparedBys: [],
aidFundMemberUserType: '',
userAttributes: [],
}
}
},
methods: {
async queryUser(val) {
const resp = await $.get("/open/common/userOptions", {query: val})
this.userList = resp.data
},
doSearch(){
const pageForm = clone(this.pageForm)
pageForm.userIds = JSON.stringify(this.pageForm.userIds)
pageForm.userStates = JSON.stringify(this.pageForm.userStates)
pageForm.personTypes = JSON.stringify(this.pageForm.personTypes)
pageForm.preparedBys = JSON.stringify(this.pageForm.preparedBys)
// 人员属性多选值按现有数组查询参数口径提交。
pageForm.userAttributes = JSON.stringify(this.pageForm.userAttributes)
this.$emit('search', pageForm)
},
handleUnionChange() {
this.flushUnits()
this.$emit("union-change", this.pageForm.unionId || "")
},
handleUnionClear() {
this.handleUnionChange()
},
setUnionFromTree(unionId) {
this.$set(this.pageForm, "unionId", unionId || "")
this.flushUnits()
},
async initData(){
if (this.$auth.hasRoleOr("SYSADMIN, SCHOOL_UNION_ADMIN, SCHOOL_UNION_MEMBER_ADMIN")) {
this.$businessTool.listUnion(this.pageForm.unionId).then((data) => {
this.unions = data
})
this.$businessTool.listUnit().then((data) => {
this.units = data
})
} else {
this.$businessTool.listUnion(this.$store.state.user.union.id).then((data) => {
this.unions = data
})
this.$businessTool.listUnit(this.$store.state.user.union.id).then((data) => {
this.units = data
})
}
},
async flushUnits(){
this.$set(this.pageForm, "unitId", null)
this.units = []
if (this.pageForm.unionId) {
this.$businessTool.listUnit(this.pageForm.unionId).then((data) => {
this.units = data
})
}
}
},
async created() {
this.initData()
}
}
@@ -0,0 +1,373 @@
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: {},
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: {
getDefaultFormData() {
return {
id: '',
recordId: '',
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
}
},
onOpen(params) {
this.formData = this.getDefaultFormData()
if (this.$refs.formRef) {
this.$refs.formRef.resetFields()
}
if (params && params.recordId && params.userId) {
// 编辑时回填当前补录记录,继续复用新增表单。
$.post('/platform/member/info/input/findOne', params).then(res => {
if (res.code === 0 && res.data) {
this.formData = Object.assign(this.getDefaultFormData(), res.data)
this.formData.families = this.formData.families || []
}
})
}
this.$nextTick(() => {
this.$refs.formRef && this.$refs.formRef.clearValidate()
})
},
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()
const submitUrl = this.formData.recordId ? '/platform/member/info/input/update' : '/platform/member/info/input/add'
this.$axios.post(submitUrl, this.formData).then(res => {
if (res.code === 0) {
this.$message.success(res.msg)
}
}).finally(() => {
loading.close()
})
})
})
},
handleCancel() {
this.$refs.formRef.resetFields()
this.formData = this.getDefaultFormData()
this.$parent.$parent.close()
}
},
created() {
this.formData = this.getDefaultFormData()
this.initUnits()
}
}
@@ -0,0 +1,324 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.search-other {
display: flex;
align-items: center;
margin-top: 20px;
}
.search-other-label {
width: 90px;
min-width: 90px;
color: rgb(100, 100, 100);
margin-right: 10px;
flex-shrink: 0;
}
.search-other > div {
display: flex;
flex-wrap: wrap;
align-items: center;
margin-bottom: -6px;
}
.search-other .el-tag {
margin-right: 10px;
margin-bottom: 6px;
cursor: pointer;
}
.search-other .el-link {
margin-bottom: 6px;
margin-right: 10px;
}
.popover-container {
display: flex;
align-items: center;
line-height: 22px;
}
.popover-icon {
margin-right: 6px;
}
.popover-icon-waning {
color: #e6a23c;
font-size: 24px !important;
font-family: element-icons !important;
}
.popover-icon-waning:before {
content: "\e7a3";
}
.popover-footer {
text-align: right;
margin-top: 20px;
}
.el-popover__reference:nth-of-type(1) {
margin-left: 10px;
margin-right: 5px;
}
</style>
<div id="app">
<guava ref="guava">
<el-card shadow="never">
<common-query ref="commonQueryRef" @search="search" query_disable></common-query>
</el-card>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="工号开头">
<el-input v-model="pageForm.startLoginNames" maxLength="100"
placeholder="多个请用英文逗号分隔"></el-input>
</search-item>
<search-item label="工号结尾">
<el-input v-model="pageForm.endLoginNames" maxLength="100"
placeholder="多个请用英文逗号分隔"></el-input>
</search-item>
</search>
<div class="search-other mt20">
<div class="search-other-label">在职状态</div>
<div>
<el-tag
style="margin-right: 10px;cursor: pointer"
v-for="item in dict.type.USER_STATE"
:key="item.code"
:type="item.name"
:effect="pageForm.userStates.includes(item.name)?'dark':'plain'"
@click="tagClick('userStates',item.name)">
{{ item.name }}
</el-tag>
<el-link type="danger"
v-if="dict.type.USER_STATE?.length && pageForm.userStates.length"
:underline="false"
@click="pageForm.userStates=[]; doSearch()">清空
</el-link>
<el-link :underline="false"
@click="pageForm.userStates = dict.type.USER_STATE?.map(p=>p.code); doSearch()"
type="success">全部
</el-link>
</div>
</div>
<div class="search-other mt20">
<div class="search-other-label">人员类型</div>
<div>
<el-tag
style="margin-right: 10px;cursor: pointer"
v-for="item in dict.type.USER_PERSON_TYPE"
:key="item.code"
:type="item.name"
:effect="pageForm.personTypes.includes(item.name)?'dark':'plain'"
@click="tagClick('personTypes',item.name)">
{{ item.name }}
</el-tag>
<el-link type="danger"
v-if="dict.type.USER_PERSON_TYPE?.length && pageForm.personTypes.length"
:underline="false"
@click="pageForm.personTypes=[]; doSearch()">清空
</el-link>
<el-link :underline="false"
@click="pageForm.personTypes = dict.type.USER_PERSON_TYPE?.map(p=>p.code); doSearch()"
type="success">全部
</el-link>
</div>
</div>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="数据列表">
<el-button size="mini" icon="el-icon-s-tools" type="primary" @click="onBirthday">根据身份证设置生日</el-button>
<el-popover
v-for="item in popoverConfigs"
:key="item.text"
placement="left"
width="360"
title="温馨提醒"
v-model="item.visible">
<div class="popover-container">
<div class='popover-icon popover-icon-waning'></div>
<div>
<p>
<i class='el-icon-s-help' style='margin-right: 6px;'></i>
<span>如果先清空已有数据,后更新,请选择</span>
<span style='color: red'>更新</span>
<span style='font-weight: bolder'>(这将清空目前所有的会员,请谨慎操作!)</span>
</p>
<p class="mt5">
<i class='el-icon-s-help' style='margin-right: 6px;'></i>
<span>如果追加或更新数据,请选择</span>
<span style='color: red'>追加</span>
</p>
</div>
</div>
<div class="popover-footer">
<el-button size="mini" type="text" @click="item.visible = false">取消</el-button>
<el-button type="warning" size="mini" @click="handlePopoverAction(item, true)">追加</el-button>
<el-button type="primary" size="mini" @click="handlePopoverAction(item, false)">更新</el-button>
</div>
<el-button slot="reference" size="mini" icon="el-icon-s-tools" type="primary">{{ item.text }}</el-button>
</el-popover>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号" type="index" width="80px"></el-table-column>
<el-table-column :label="column.label"
:prop="column.prop"
:key="column.prop"
:sortable="column.sortable"
:width="column.width"
header-align="center"
min-width="100px"
show-overflow-tooltip
v-for="column in tableColumns">
</el-table-column>
<el-table-column label="操作" fixed="right" width="100">
<template slot-scope="{row}">
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #view>
<member-info ref="memberInfoRef"></member-info>
</template>
</guava>
</div>
<!--#include("../common/commonQuery.html"){}#-->
<script nonce="${cspNonce!}">
<!--#include("../../common/info/memberInfo.js"){}#-->
<!--#include("../common/commonQuery.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
components: {
'member-info': MEMBER_INFO,
'common-query': COMMON_QUERY,
},
dicts: ['USER_PERSON_TYPE', 'USER_STATE'],
data() {
return {
visible: false,
pageForm: {
personTypes: [],
userStates: [],
},
tableColumns: [
{ prop: "loginName", label: "工号", sortable: true },
{ prop: "userName", label: "姓名", sortable: true },
{ prop: "sex", label: "性别", sortable: true },
{ prop: "userState", label: "在职状态", sortable: true },
{ prop: "personType", label: "人员类型", sortable: true },
// { prop: "preparedBy", label: "编制类别", sortable: true },
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true },
],
personTypeOptions: [],
popoverConfigs: [
{text: '设置会员', func: this.onMember, visible: false},
// {text: '设置福利会员', func: this.onWelfare, visible: false},
],
}
},
methods: {
handlePopoverAction(item, isAppend) {
item.func(isAppend)
item.visible = false
document.activeElement.blur()
},
onBirthday() {
this.$confirm("您确定要根据身份证号设置出生日期吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/member/info/dataManage/setBirthdayByIdCard").then((res) => {
if (res.code === 0) {
this.pageData()
this.$message.success(res.msg)
} else {
this.$message.error(res.msg)
}
})
})
},
onMember(append) {
const pageForm = clone(this.pageForm)
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
pageForm.userStates = JSON.stringify(pageForm.userStates)
this.$axios.post("/platform/member/info/dataManage/setMemberByCnd", {
"pageForm": JSON.stringify(pageForm),
"append": append
}).then((res) => {
if (res.code === 0) {
this.pageData()
this.$message.success(res.msg)
} else {
this.$message.error(res.msg)
}
})
},
onWelfare(append) {
const pageForm = clone(this.pageForm)
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
pageForm.userStates = JSON.stringify(pageForm.userStates)
pageForm.append = append
this.$axios.post("/platform/member/info/dataManage/setWelfareMemberByCnd", {
"pageForm": JSON.stringify(pageForm),
"append": append
}).then((res) => {
if (res.code === 0) {
this.pageData()
this.$message.success(res.msg)
} else {
this.$message.error(res.msg)
}
})
},
onView(row) {
this.$refs.guava.view(() => {
this.$refs.memberInfoRef.onOpen(row.id)
})
},
tagClick(key, val) {
const index = this.pageForm[key]?.findIndex(v => v === val)
if (index > -1) {
this.pageForm[key].splice(index, 1)
} else {
this.pageForm[key].push(val)
}
this.doSearch()
},
search(pageForm) {
if (pageForm) {
// 当前页的在职状态、人员类型使用标签数组筛选,公共查询组件回传的是字符串,
// 这里保留当前页数组,避免选择人员属性后把标签筛选状态覆盖掉。
const currentUserStates = this.pageForm.userStates
const currentPersonTypes = this.pageForm.personTypes
this.pageForm = {...this.pageForm, ...pageForm}
this.$set(this.pageForm, "userStates", currentUserStates)
this.$set(this.pageForm, "personTypes", currentPersonTypes)
}
this.doSearch()
},
pageData() {
const pageForm = clone(this.pageForm)
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
pageForm.userStates = JSON.stringify(pageForm.userStates)
this.$axios.post(loc() + "/pageData", pageForm).then((res) => {
if (res.code === 0) {
this.tableData = res.data.list
this.pageForm.totalCount = res.data.totalCount
}
})
},
},
created() {
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,68 @@
const ARCHIVE_MEMBER = {
template: `
<el-dialog
:visible.sync="archiveDialogVisible"
width="30%">
<div style="margin-bottom: 30px">
<el-divider class="labelYear">{{labelYear}}</el-divider>
</div>
<el-form :model="formData" ref="form" :rules="formRules" label-width="80px">
<el-form-item prop="year" label="备份年份" style="align-content: center">
<el-date-picker
placeholder="请选择备份年份"
value-format="yyyy"
v-model="formData.year"
type="year" style="width: 100%"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="archiveDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="archive">确 定</el-button>
</span>
</el-dialog>
`,
mixins: [initTableMixins],
data() {
return {
archiveDialogVisible: false,
formRules: {
year: [{ required: true, message: "请选择备份年份", trigger: ["blur", "change"] }]
},
pickerOptions: {
disabledDate(time) {
return time.getFullYear() > new Date().getFullYear() - 1
}
}
// labelYear: "把当前数据备份成为" + (new Date().getFullYear() - 1) + "年份的历史数据"
}
},
computed: {
labelYear() {
return "把当前数据备份成为以往年份的历史数据"
}
},
methods: {
async archive() {
this.$confirm("您确定要将当前数据备份为选择年份吗?已备份的数据将会被覆盖", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
callback: async (a, b) => {
if ("confirm" === a) {
//确认后再执行
const resp = await this.$axios.post("/platform/member/info/group/archive", { year: this.formData.year })
if (resp.code === 0) {
this.archiveDialogVisible = false
this.$message.success("操作成功")
} else {
this.$message.error(resp.msg)
}
}
}
})
}
}
}
@@ -0,0 +1,826 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<template>
<div class="member-group-layout" :class="{ 'is-tree-collapsed': treeCollapsed }">
<aside class="member-group-tree-panel">
<div class="member-group-tree-content" v-show="!treeCollapsed">
<el-card shadow="never" class="member-group-tree-card" :body-style="{ height: '100%' }">
<el-input placeholder="请输入关键字进行查找" v-model="filterText" clearable></el-input>
<div class="member-group-tree-scroll">
<el-tree
:data="treeData"
ref="treeRef"
node-key="id"
:expand-on-click-node="false"
:props="{
children: 'children',
label: 'name'
}"
default-expand-all
:filter-node-method="filterNode"
highlight-current
@node-click="treeNodeClick"
>
<template slot-scope="{ node, data }">
<span class="el-tree-node__label">
<i class="el-icon-folder-opened" v-if="node.level===1"></i>
<i class="el-icon-folder" v-else></i>
{{node.label}}
</span>
</template>
</el-tree>
</div>
</el-card>
</div>
<el-tooltip :content="treeCollapsed ? '展开组织树' : '收起组织树'" placement="right">
<el-button
class="member-group-tree-toggle"
size="mini"
:icon="treeCollapsed ? 'el-icon-arrow-right' : 'el-icon-arrow-left'"
@click="toggleTree"
></el-button>
</el-tooltip>
</aside>
<main class="member-group-content">
<el-card shadow="never" class="member-group-query-card" v-show="tabActive === 'memberList'">
<common-query ref="commonQueryRef" @search="search" @union-change="queryUnionChange"></common-query>
</el-card>
<el-card shadow="never" class="member-group-overview-card" v-show="tabActive !== 'memberList' && currentUnionId">
<div style="display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; color: #303133;">
<i class="el-icon-office-building"></i>
<span>{{ unionOverview.unionName || '-' }}</span>
<el-tag size="mini" type="primary">基层工会</el-tag>
</div>
<div style="margin-top: 10px; color: #606266; font-size: 13px;">
<span>负责人:{{ unionOverview.chairman || '-' }}</span>
<span style="margin: 0 12px; color: #dcdfe6;">|</span>
<span>联系电话:{{ unionOverview.telephone || unionOverview.chairmanMobile || '-' }}</span>
<span style="margin: 0 12px; color: #dcdfe6;">|</span>
<span>当前会员总数:{{ unionOverview.memberTotal || 0 }} 人</span>
</div>
<el-row :gutter="12" style="margin-top: 18px;">
<el-col :span="6" v-for="card in unionOverviewCards" :key="card.label">
<div style="background: #f5f9ff; border: 1px solid #e6f0ff; border-radius: 6px; padding: 18px 20px;">
<div style="font-size: 28px; line-height: 1; font-weight: 700; color: #0b72c9;">{{ card.value }}</div>
<div style="margin-top: 10px; color: #606266; font-size: 13px;">{{ card.label }}</div>
</div>
</el-col>
</el-row>
</el-card>
<el-card shadow="never" class="mt10 member-group-list-card">
<el-tabs v-model="tabActive" type="card" @tab-click="tabChange">
<el-tab-pane name="memberList">
<span slot="label">
<i class="el-icon-user"></i>
会员列表
</span>
<div ref="memberListPaneRef" class="member-group-member-list">
<table-tool label="会员列表">
<el-button type="primary" size="small" icon="el-icon-upload2" @click="openImport">导入会员</el-button>
<el-button
type="primary"
v-if="$auth.hasRoleOr(['SYSADMIN','SCHOOL_UNION_ADMIN'])"
size="small"
icon="el-icon-time"
@click="openArchive"
>
备份历史会员
</el-button>
<el-button type="primary" size="small" icon="el-icon-download" @click="exportMember">会员档案导出</el-button>
<el-popover
placement="bottom"
trigger="click"
width="200">
<div style="padding:4px 0;border-bottom:1px solid #eee;">
<el-button size="mini" @click="checkAll">全选</el-button>
<!-- <el-button size="mini" @click="invertCheck">反选</el-button>-->
</div>
<div style="max-height:40vh;overflow-y:auto;padding:6px 0;">
<el-checkbox-group v-model="checkedFields">
<el-checkbox
v-for="f in tableColumns"
:key="f.prop"
:label="f.prop"
style="display:block;margin:6px 0;">
{{ f.label }}
</el-checkbox>
</el-checkbox-group>
</div>
<el-button
slot="reference"
type="text"
icon="el-icon-s-operation"
size="small"
style="margin-left:12px;">
列设置
</el-button>
</el-popover>
</table-tool>
<el-table ref="memberTableRef" :height="tableHeight" :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder" :size="tableSize" class="vi-table">
<el-table-column
align="center"
header-align="center"
type="index"
fixed="left"
:index="indexMethod"
label="序号"
width="80px"
></el-table-column>
<el-table-column
show-overflow-tooltip
align="center"
header-align="center"
v-for="column in showColumns"
:key="column.prop"
:label="column.label"
:fixed="column.fixed"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
min-width="50"
></el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center" label="操作" fixed="right" width="100px">
<template scope="scope">
<el-button size="mini" type="primary" @click="openView(scope.row.id)">查看</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</div>
</el-tab-pane>
<el-tab-pane name="branchUnionUserManage">
<span slot="label">
<i class="el-icon-school"></i>
分工会干部
</span>
<sys-union-branch-union-user-manage
v-if="currentUnionId"
ref="branchUnionUserManageRef"
:union_id="currentUnionId"
:table_height="tableHeight"
></sys-union-branch-union-user-manage>
<el-empty v-else description="请选择一个分工会"></el-empty>
</el-tab-pane>
<el-tab-pane name="branchUnionPartUnitManage">
<span slot="label">
<i class="el-icon-school"></i>
组成单位
</span>
<sys-union-branch-union-part-unit-manage
v-if="currentUnionId"
ref="branchUnionPartUnitManageRef"
:union_id="currentUnionId"
:table_height="tableHeight"
></sys-union-branch-union-part-unit-manage>
<el-empty v-else description="请选择一个分工会"></el-empty>
</el-tab-pane>
<el-tab-pane name="branchUnionGroup">
<span slot="label">
<i class="el-icon-school"></i>
工会小组
</span>
<sys-union-branch-union-group-manage
v-if="currentUnionId"
ref="branchUnionGroupRef"
:union_id="currentUnionId"
:table_height="tableHeight"
></sys-union-branch-union-group-manage>
<el-empty v-else description="请选择一个分工会"></el-empty>
</el-tab-pane>
</el-tabs>
</el-card>
</main>
</div>
</template>
<template #view>
<member-info ref="infoRef"></member-info>
</template>
</guava>
<archive-member ref="archiveMemberRef"></archive-member>
<el-dialog title="会员导入" :visible.sync="importDialog" width="50%" :close-on-click-modal="false" :close-on-press-escape="false">
<file-import
ref="viewImport"
is_show_radio
temp_url="/platform/member/info/group/downloadMemberTemplate"
post_url="/platform/member/info/group/importMember"
@flush="successImport"
></file-import>
</el-dialog>
</div>
<style>
/* 会员档案页独立布局:树折叠时仅保留切换按钮占用的窄轨道。 */
#app .member-group-layout {
display: flex;
align-items: stretch;
gap: 16px;
min-width: 0;
height: calc(100vh - 82px);
overflow: hidden;
box-sizing: border-box;
}
#app .member-group-tree-panel {
position: relative;
flex: 0 0 clamp(280px, 20vw, 340px);
min-width: 0;
}
#app .member-group-tree-panel::after {
position: absolute;
top: 0;
right: 0;
bottom: 0;
z-index: 1;
width: 1px;
content: "";
background: #dcdfe6;
}
#app .member-group-tree-content,
#app .member-group-tree-card {
height: 100%;
}
#app .member-group-tree-card > .el-card__body {
display: flex;
flex-direction: column;
height: 100%;
box-sizing: border-box;
overflow: hidden;
}
#app .member-group-tree-scroll {
flex: 1 1 auto;
min-height: 0;
margin-top: 10px;
overflow-y: auto;
}
#app .member-group-tree-toggle {
position: absolute;
top: 50%;
right: -9px;
z-index: 3;
width: 18px;
height: 34px;
padding: 0;
transform: translateY(-50%);
color: #409eff;
background: #ffffff;
border-color: #dcdfe6;
border-radius: 0 3px 3px 0;
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1);
}
#app .member-group-tree-toggle:hover,
#app .member-group-tree-toggle:focus {
color: #409eff;
background: #ecf5ff;
border-color: #409eff;
}
#app .member-group-tree-toggle i {
margin: 0;
font-size: 12px;
}
#app .member-group-content {
display: flex;
flex-direction: column;
flex: 1 1 auto;
min-width: 0;
height: 100%;
overflow: hidden;
}
#app .member-group-layout.is-tree-collapsed .member-group-tree-panel {
flex-basis: 18px;
}
#app .member-group-layout.is-tree-collapsed .member-group-tree-toggle {
right: 0;
}
/* 查询项按可用宽度自动调整列数,减少固定比例布局造成的空白。 */
#app .member-group-query-card .search {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: 12px 18px;
align-items: center;
}
#app .member-group-query-card .search .search-item {
width: auto;
min-width: 0;
}
#app .member-group-query-card .search .search-query {
display: flex;
align-items: center;
min-height: 40px;
}
#app .member-group-query-card,
#app .member-group-overview-card {
flex: 0 0 auto;
}
/* 四个页签共用剩余高度,内容超出时仅在页签内容区域滚动。 */
#app .member-group-list-card {
flex: 1 1 auto;
min-height: 0;
overflow: hidden;
}
#app .member-group-list-card > .el-card__body {
height: 100%;
box-sizing: border-box;
overflow: hidden;
}
#app .member-group-list-card .el-tabs {
display: flex;
flex-direction: column;
height: 100%;
}
#app .member-group-list-card .el-tabs__header {
flex: 0 0 auto;
}
#app .member-group-list-card .el-tabs__content {
flex: 1 1 auto;
min-height: 0;
overflow-x: hidden;
overflow-y: hidden;
}
#app .member-group-list-card .el-tab-pane,
#app .member-group-member-list,
#app .member-group-list-card .el-tab-pane > div {
height: 100%;
min-height: 0;
overflow: hidden;
}
#app .member-group-member-list,
#app .member-group-list-card .el-tab-pane > div {
display: flex;
flex-direction: column;
}
#app .member-group-member-list > .ele-table-tool,
#app .member-group-member-list > .el-pagination-container,
#app .member-group-list-card .el-tab-pane > div > .el-card:first-child {
flex: 0 0 auto;
}
#app .member-group-list-card .el-tab-pane > div > .el-card:last-of-type {
flex: 1 1 auto;
min-height: 0;
overflow: hidden;
}
#app .member-group-list-card .el-tab-pane > div > .el-card:last-of-type > .el-card__body {
display: flex;
flex-direction: column;
height: 100%;
min-height: 0;
box-sizing: border-box;
overflow: hidden;
}
#app .member-group-member-list > .el-table,
#app .member-group-list-card .el-tab-pane > div > .el-card:last-of-type > .el-card__body > .el-table {
flex: 0 0 auto;
}
@media screen and (max-width: 1200px) {
#app .member-group-tree-panel {
flex-basis: 260px;
}
#app .member-group-query-card .search {
grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
}
</style>
<!--#include("../common/commonQuery.html"){}#-->
<script nonce="${cspNonce!}">
<!--#include("archiveMember.js"){}#-->
<!--#include("../common/commonQuery.js"){}#-->
<!--#include("../../common/info/memberInfo.js"){}#-->
<!--#include("/platform/sys/union/branchUnionUserManage.js"){}#-->
<!--#include("/platform/sys/union/branchUnionPartUnitManage.js"){}#-->
<!--#include("/platform/sys/union/branchUnionGroupManage.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
filterText: null,
treeCollapsed: false,
tableHeight: 400,
tableResizeObserver: null,
unionRootId: "member-union-root",
treeData: [],
currentTreeData: null,
tabActive: "memberList",
unionOverview: {},
pageForm: {},
tableColumns: [
{ prop: "loginname", label: "工号", width: 120, fixed: "left"},
{ prop: "username", label: "姓名", width: 120, fixed: "left" },
{ prop: "sex", label: "性别", width: 120},
{ prop: "birthday", label: "出生年月", width: 120, sortable: true },
{ prop: "nationality", label: "国籍", width: 120, sortable: true, checked: 0 },
// { prop: "nation", label: "民族", width: 120, sortable: true},
{ 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, checked: 0 },
// { prop: "preparedBy", label: "编制类别", width: 120, sortable: true },
{ prop: "postDoctoralJoinDate", label: "进站时间", sortable: true, checked: 0 },
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位",sortable: true },
// { prop: "aidFundMemberUserType", label: "人员分类", width: 120, sortable: true },
// { prop: "userAttribute", 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 },
{ prop: "jobCategory", label: "岗位类别", width: 120, sortable: true, checked: 0 },
{ prop: "professionalTitle", label: "职称", width: 120, sortable: true, checked: 0 },
{ prop: "professionalLevel", label: "职级", width: 120, sortable: true, checked: 0 },
{ prop: "employeeSource", label: "职工来源", width: 120, sortable: true, checked: 0 },
{ prop: "administrativeLevel", label: "行政级别(管理岗位)", width: 120, sortable: true, checked: 0 },
{ prop: "positionSeries", label: "岗位系列", width: 120, sortable: true, checked: 0 },
{ prop: "positionLevel", label: "岗级", width: 120, sortable: true, checked: 0 },
{ prop: "administrativePositionLevel", label: "行政岗级", width: 120, sortable: true, checked: 0 },
{ prop: "arrivalAtSchoolDate", label: "来校时间", width: 120, sortable: true, checked: 0 },
{ prop: "teachingTime", label: "从教年月", width: 120, sortable: true, checked: 0 },
{ prop: "expectedLeaveSchoolDate", label: "预计/最后离校时间", width: 120, sortable: true, checked: 0 },
],
checkedFields: [],
importDialog: false
}
},
watch: {
filterText(val) {
this.$refs.treeRef.filter(val)
},
checkedFields() {
// 列设置变更后,重新计算固定列与普通列的宽度,避免表头、表体出现错位。
this.$nextTick(() => {
if (this.$refs.memberTableRef) {
this.$refs.memberTableRef.doLayout()
}
})
}
},
components: {
"file-import": httpVueLoader("/components/plugins/sysImport/index.vue?v=" + new Date().getTime()),
"archive-member": ARCHIVE_MEMBER,
"member-info": MEMBER_INFO,
"common-query": COMMON_QUERY,
"sys-union-branch-union-user-manage": branchUnionUserManage,
"sys-union-branch-union-part-unit-manage": branchUnionPartUnitManage,
"sys-union-branch-union-group-manage": branchUnionGroupManage,
},
methods: {
// 切换组织树显示状态,并在内容宽度变化后重新计算固定列表格布局。
toggleTree() {
this.treeCollapsed = !this.treeCollapsed
this.$nextTick(() => {
this.updateTableHeight()
if (this.$refs.memberTableRef) {
this.$refs.memberTableRef.doLayout()
}
})
},
// 根据页签内容区的实际高度计算表格高度,由 Element Table 管理表头和表体滚动。
updateTableHeight() {
this.$nextTick(() => {
const tabsContent = this.$el.querySelector(".member-group-list-card .el-tabs__content")
if (!tabsContent || tabsContent.clientHeight <= 0) {
return
}
let availableHeight = tabsContent.clientHeight
let reservedHeight = 100
const memberPane = this.$refs.memberListPaneRef
if (memberPane && memberPane.clientHeight > 0) {
const tool = memberPane.querySelector(".ele-table-tool")
const pagination = memberPane.querySelector(".el-pagination-container")
// offsetHeight 不包含外边距,分页的 margin-top 需要一并扣除。
const getOuterHeight = (element) => {
if (!element) {
return 0
}
const style = window.getComputedStyle(element)
return element.offsetHeight
+ (parseFloat(style.marginTop) || 0)
+ (parseFloat(style.marginBottom) || 0)
}
availableHeight = memberPane.clientHeight
reservedHeight = getOuterHeight(tool) + getOuterHeight(pagination)
}
const nextHeight = Math.max(240, Math.floor(availableHeight - reservedHeight))
if (this.tableHeight !== nextHeight) {
this.tableHeight = nextHeight
}
this.$nextTick(() => {
if (this.$refs.memberTableRef) {
this.$refs.memberTableRef.doLayout()
}
})
})
},
openImport() {
this.importDialog = true
},
successImport() {
if(this.$refs.viewImport.$data.errorInfoData.errorCount === 0) {
this.importDialog = false
}
this.pageData()
},
exportMember() {
const pageForm = clone(this.pageForm)
pageForm.userStates = JSON.stringify(this.pageForm.userStates)
pageForm.personTypes = JSON.stringify(this.pageForm.personTypes)
pageForm.preparedBys = JSON.stringify(this.pageForm.preparedBys)
const data = this.tableColumns.filter(item => this.checkedFields.includes(item.prop)).map(item => {
return {prop: item.prop, label: item.label}
})
pageForm.columns = JSON.stringify(data)
this.$downLoad(loc() + "/exportMember", pageForm)
},
openArchive() {
this.$refs.archiveMemberRef.archiveDialogVisible = true
},
openView(userId) {
this.$refs.guava.view(() => {
this.$refs.infoRef.onOpen(userId)
})
},
initDefaultView() {
this.tabActive = "memberList"
this.currentTreeData = null
this.unionOverview = {}
this.pageForm = {
...this.pageForm,
unionId: "",
unitId: null
}
},
treeNodeClick(data) {
const unionId = data && data.type === "union" ? data.id : ""
this.currentTreeData = data
if (this.$refs.commonQueryRef) {
this.$refs.commonQueryRef.setUnionFromTree(unionId)
this.$nextTick(() => {
if (this.tabActive === "memberList") {
this.$refs.commonQueryRef.doSearch()
} else {
this.loadUnionOverview()
this.refreshCurrentTab()
}
})
} else {
this.pageForm = {
...this.pageForm,
unionId,
unitId: null
}
if (this.tabActive === "memberList") {
this.pageData()
} else {
this.loadUnionOverview()
this.refreshCurrentTab()
}
}
},
queryUnionChange(unionId) {
const nodeKey = unionId || this.unionRootId
this.currentTreeData = this.findTreeNode(this.treeData, nodeKey)
this.setCurrentTreeNode(nodeKey)
this.$nextTick(() => {
if (this.tabActive !== "memberList") {
this.loadUnionOverview()
this.refreshCurrentTab()
}
})
},
filterNode(value, data) {
if (!value) return true
return data.name.indexOf(value) !== -1
},
findTreeNode(list, id) {
for (let i = 0; i < (list || []).length; i++) {
const item = list[i]
if (item.id === id) {
return item
}
const child = this.findTreeNode(item.children, id)
if (child) {
return child
}
}
return null
},
getTreeData() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN", "SCHOOL_UNION_MEMBER_ADMIN"])
const currentUser = this.$store.state.user || {}
const currentUnion = currentUser.union || {}
const unionId = hasAdmin ? null : currentUnion.id
const setTreeData = (data) => {
const unionList = data || []
// 仅有一个可选分工会时默认收起左栏,仍可通过折叠按钮手动展开。
this.treeCollapsed = unionList.length === 1
this.treeData = [{
id: this.unionRootId,
name: "工会委员会",
type: "root",
children: unionList.map((item) => ({
id: item.id,
name: item.name,
type: "union"
}))
}]
this.$nextTick(() => {
if (this.tabActive !== "memberList") {
this.tabActive = "memberList"
}
// 唯一分工会作为默认查询节点;多条或无数据时继续使用工会根节点。
const defaultNode = unionList.length === 1 ? this.treeData[0].children[0] : this.treeData[0]
this.treeNodeClick(defaultNode)
this.setCurrentTreeNode(defaultNode.id)
this.updateTableHeight()
if (this.$refs.memberTableRef) {
this.$refs.memberTableRef.doLayout()
}
})
}
// 非管理员只能加载本人所属分工会;用户信息异常时保留根节点,禁止空参数查询全部分工会。
if (!hasAdmin && !unionId) {
setTreeData([])
return
}
this.$businessTool.listUnion(unionId).then((data) => {
setTreeData(data)
}).catch(() => {
// 组织树加载失败时回退到根节点,会员列表仍按后端数据权限正常查询。
setTreeData([])
})
},
setCurrentTreeNode(nodeKey) {
this.$nextTick(() => {
if (this.$refs.treeRef) {
this.$refs.treeRef.setCurrentKey(nodeKey)
}
})
},
tabChange(tab) {
this.$nextTick(() => {
this.updateTableHeight()
if (tab.name === "memberList") {
if (this.$refs.commonQueryRef) {
this.$refs.commonQueryRef.doSearch()
} else {
this.pageData()
}
} else {
this.loadUnionOverview()
this.refreshCurrentTab(tab.name)
}
})
},
loadUnionOverview() {
if (!this.currentUnionId) {
this.unionOverview = {}
return
}
this.$axios.post(loc() + "/unionOverview", { unionId: this.currentUnionId }).then((data) => {
if (data.code === 0) {
this.unionOverview = data.data || {}
this.updateTableHeight()
} else {
this.$message.error(data.msg)
}
})
},
refreshCurrentTab(tabName = this.tabActive) {
if (tabName === "memberList" || !this.currentUnionId) {
return
}
const ref = this.$refs[tabName + "Ref"]
if (ref && ref.doSearch) {
ref.doSearch()
}
},
search(pageForm) {
this.pageForm = {
...this.pageForm,
...pageForm,
}
this.pageData()
},
pageData() {
this.tableLoading = true
const pageForm = clone(this.pageForm)
pageForm.userStates = JSON.stringify(this.pageForm.userStates)
pageForm.personTypes = JSON.stringify(this.pageForm.personTypes)
pageForm.preparedBys = JSON.stringify(this.pageForm.preparedBys)
this.$axios.post(loc() + "/pageData", pageForm)
.then((data) => {
if (data.code === 0) {
this.tableData = data.data.list
this.pageForm.totalCount = data.data.totalCount
} else {
this.$message.error(data.msg)
}
})
.finally(() => {
this.tableLoading = false
})
},
checkAll() {
this.checkedFields = this.tableColumns.map(c => c.prop);
},
invertCheck() {
const all = this.tableColumns.map(c => c.prop);
this.checkedFields = all.filter(p => !this.checkedFields.includes(p));
}
},
computed: {
showColumns() {
return this.tableColumns.filter(c => this.checkedFields.includes(c.prop));
},
currentUnionId() {
return this.currentTreeData && this.currentTreeData.type === "union" ? this.currentTreeData.id : ""
},
unionOverviewCards() {
return [
{ label: "会员总数", value: this.unionOverview.memberTotal || 0 },
{ label: "教职工数", value: this.unionOverview.staffTotal || 0 },
{ label: "男性", value: this.unionOverview.maleTotal || 0 },
{ label: "女性", value: this.unionOverview.femaleTotal || 0 },
]
}
},
created() {
this.checkedFields = this.tableColumns.filter(c => c.checked !== 0).map(c => c.prop);
this.initDefaultView()
const initPage = () => {
this.getTreeData()
}
// 等待公共布局完成当前登录用户回显,避免首次登录或切换账号时读取不到所属分工会。
if (window.logonUserReady && window.logonUserReady.always) {
window.logonUserReady.always(() => {
initPage()
})
} else {
initPage()
}
},
mounted() {
const tabsContent = this.$el.querySelector(".member-group-list-card .el-tabs__content")
if (tabsContent && window.ResizeObserver) {
// 查询区换行或页面尺寸变化时,自动重新分配表格数据区域高度。
this.tableResizeObserver = new ResizeObserver(this.updateTableHeight)
this.tableResizeObserver.observe(tabsContent)
}
this.$nextTick(() => {
this.updateTableHeight()
})
window.addEventListener("resize", this.updateTableHeight)
},
beforeDestroy() {
if (this.tableResizeObserver) {
this.tableResizeObserver.disconnect()
this.tableResizeObserver = null
}
window.removeEventListener("resize", this.updateTableHeight)
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,183 @@
<!--#
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="人员分类" v-if="false">
<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.userAttributes" placeholder="请选择人员属性" @change="doSearch"
code="USER_ATTRIBUTE" multiple collapse-tags clearable></dict-select>
</search-item>
</search>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="用户列表">
<el-button icon="el-icon-printer" class="m10" type="primary" size="small" @click="doExportByUnion">按分工会导出</el-button>
<el-button icon="el-icon-printer" class="m10" type="primary" size="small" @click="doExport">导出</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>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/info/memberInfo.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: "",
aidFundMemberUserType: "",
userAttributes: []
},
userId: "",
unions: [],
units: [],
tableColumns: [
{ prop: "loginname", label: "工号" },
{ prop: "username", label: "姓名" },
{ prop: "sex", label: "性别" },
{ prop: "mobile", label: "联系电话" },
{ prop: "userState", label: "在职状态", sortable: true },
{ prop: "personType", label: "人员类型", sortable: true },
// { prop: "preparedBy", label: "编制类别", sortable: true },
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true }
]
}
},
components: {
"member-cnd": httpVueLoader("/components/module/member/MemberCnd.vue?v=" + new Date().getTime()),
"member-info": MEMBER_INFO
},
methods: {
// 分页和导出共用该参数构建方法,保证人员属性多选值始终按 JSON 数组提交。
buildQueryPageForm() {
const pageForm = clone(this.pageForm)
pageForm.userAttributes = JSON.stringify(this.pageForm.userAttributes || [])
return pageForm
},
// 覆盖公共分页方法,使后端按人员属性集合执行查询。
pageData() {
return initTableMixins.methods.pageData.call(this, this.buildQueryPageForm())
},
openView(row) {
this.$refs.guava.view(() => {
this.$refs.memberInfoRef.onOpen(row.id)
})
},
doExportByUnion() {
this.$downLoad("/platform/member/info/history/doExportByUnion", { year: this.pageForm.year })
},
doExport() {
this.$downLoad("/platform/member/info/history/doExport", this.buildQueryPageForm())
},
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>
<!--#
}
#-->
@@ -0,0 +1,212 @@
<!--#
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="人员分类" v-if="false">
<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.userAttributes" placeholder="请选择人员属性" @change="doSearch"
code="USER_ATTRIBUTE" multiple collapse-tags clearable></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="220px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini">查看</el-button>
<el-button @click="openEdit(row)" size="mini" type="primary">编辑</el-button>
<el-button @click="doDelete(row)" size="mini" type="danger">删除</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: {
userAttributes: [],
year: new Date().getFullYear() + "",
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: {
// 人员属性为多选条件,分页查询前统一转换为后端可接收的 JSON 数组。
pageData(data = null) {
const pageForm = clone(data || this.pageForm)
pageForm.userAttributes = JSON.stringify(this.pageForm.userAttributes || [])
return initTableMixins.methods.pageData.call(this, pageForm)
},
openAdd() {
this.$refs.guava.edit(() => {
this.$refs.memberAddFormRef.onOpen()
})
},
openEdit(row) {
this.$refs.guava.edit(() => {
this.$refs.memberAddFormRef.onOpen({
recordId: row.id,
userId: row.userId
})
})
},
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)
}
},
doDelete(row){
this.$confirm("您确定要删除吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
}).then(() => {
this.$axios.post('/platform/member/info/input/doDelete', {id: row.id, userId: row.userId}).then(res => {
if (res.code === 0) {
this.$message.success(res.msg);
this.doSearch()
}
})
})
}
},
created() {
this.pageData()
this.initData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,237 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"></el-input>
</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>
</el-card>
<el-card shadow="never">
<table-tool label="劳模列表">
<el-select v-model="pageForm.memberState" placeholder="会员筛选" clearable
style="width: 120px" @change="doSearch" class="mr10" size="small">
<el-option label="全部会员" value="all"></el-option>
<el-option label="会员" value="true"></el-option>
<el-option label="非会员" value="false"></el-option>
</el-select>
<el-select v-model="pageForm.welfareMemberState" placeholder="福利会员筛选" clearable
style="width: 120px" @change="doSearch" class="mr10" size="small">
<el-option label="全部福利会员" value="all"></el-option>
<el-option label="福利会员" value="true"></el-option>
<el-option label="非福利会员" value="false"></el-option>
</el-select>
<el-button size="small" @click="batchDelete" type="danger">
批量取消劳模
</el-button>
<!--<el-button size="small" @click="openImport" type="primary">
导入
</el-button>-->
<el-button size="small" @click="doExport" type="primary">
导出
</el-button>
</table-tool>
<el-table ref="table" :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
:size="tableSize" @selection-change="tableHandleSelectionChange">
<el-table-column type="selection" :reserve-selection="true"></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"
>
<template v-if="column.prop==='member'" scope="{row}">
<span v-if="row.member==1" class="text-success ">
<i class="fa fa-circle ml5"></i>
</span>
<span v-else class="text-danger">
<i class="fa fa-circle ml5"></i>
</span>
</template>
<template v-else-if="column.prop==='welfareMember'" scope="{row}">
<span v-if="row.welfareMember==1" class="text-success ">
<i class="fa fa-circle ml5"></i>
</span>
<span v-else class="text-danger">
<i class="fa fa-circle ml5"></i>
</span>
</template>
</el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center"
label="操作"
width="180px">
<template scope="{row}">
<el-button size="mini" type="primary" @click="openView(row.id)">查看</el-button>
<el-button size="mini" type="danger" @click="doDelete(row.id)">取消劳模</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #view>
<member-info ref="memberInfoRef" :id="userId"></member-info>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/info/memberInfo.js"){}#-->
new Vue({
el: '#app',
mixins: [initTableMixins],
data: {
pageForm: {
searchKeyword: '',
unionId: '',
unitId: '',
threeUnitId: '',
unionGroupId: '',
personType: '',
userState: '',
memberState: '',
welfareMemberState: ''
},
unions: [],
units: [],
tableColumns: [
{prop: 'loginname', label: '工号'},
{prop: 'username', label: '姓名'},
{prop: 'sex', label: '性别'},
{prop: 'mobile', label: '联系电话'},
{prop: 'personType', label: '人员类型'},
{prop: 'userState', label: '在职状态'},
{prop: 'unionName', label: '所属工会'},
{prop: 'unitName', label: '所属单位'},
{prop: 'member', label: '是否会员'},
{prop: 'welfareMember', label: '是否福利员'},
],
checkUsers: [],
userId: '',
},
components: {
"member-info": MEMBER_INFO,
},
methods: {
openView(userId) {
this.userId = userId
this.$refs.guava.view()
this.$nextTick(() => {
this.$refs.memberInfoRef.findOne()
})
},
openImport() {
},
doExport() {
this.$downLoad('/platform/member/modelWorker/manage/doExport', this.pageForm)
},
tableHandleSelectionChange(val) {
this.checkUsers = val;
},
batchDelete() {
if (!this.checkUsers.length) {
this.$message.warning("请先勾选需要取消劳模身份的数据!")
return
}
this.$confirm('您确定要取消这些教工的劳模身份吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const userIds = this.checkUsers.map(obj => obj.id);
this.$axios.post('/platform/member/modelWorker/manage/cancelModelWorker', {userIds: JSON.stringify(userIds)} )
.then((res) => {
if (res.code === 0) {
this.pageData()
this.$refs.table.clearSelection();
this.$message.success(res.msg)
} else {
this.$message.error(res.msg)
}
})
})
},
doDelete(userId) {
this.$confirm('您确定要取消该教工的劳模身份吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.checkUsers = []
this.checkUsers.push(userId)
this.$axios.post('/platform/member/modelWorker/manage/cancelModelWorker', {userIds: JSON.stringify(this.checkUsers)})
.then((res) => {
if (res.code === 0) {
this.pageData()
this.$message.success(res.msg)
} else {
this.$message.error(res.msg)
}
})
})
},
initData() {
const resp = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"]) ? this.pageForm.unionId : this.$store.state.user.union.id
this.$businessTool.listUnion(resp).then(data => {
this.unions = data
})
this.pageData()
},
flushUnits() {
this.$set(this.pageForm, "unitId", null)
this.units = []
if (this.pageForm.unionId) {
this.$businessTool.listUnit(this.pageForm.unionId).then(data => {
this.units = data
})
}
}
},
created() {
this.initData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,104 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<member-audit-table ref="tableRef" @open-change-view="openChangeInfo" @open-approval="openApproval"
@open-view="openView"></member-audit-table>
<template #view>
<member-info ref="memberInfoRef"></member-info>
</template>
<template #public>
<member-audit-change-info ref="memberAuditChangeInfoViewRef"></member-audit-change-info>
<div v-if="showApprovalForm">
<el-form :model="formData" ref="approvalFormRef" label-position="left" label-width="80px">
<el-form-item label="审核意见" prop="approvalOpinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea>
</el-form-item>
<el-form-item label="审核说明" prop="approvalRemark">
<el-input v-model="formData.approvalRemark" type="textarea" :rows="4" placeholder="请输入审核说明"></el-input>
</el-form-item>
<el-form-item label="电子签名" prop="approvalSignature" :rules="[{required:false,message:'必填',trigger:['change','blur']}]">
<pc-signature v-model="formData.approvalSignature"></pc-signature>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button type="primary" @click="doApproval('PASS')">同意</el-button>
<el-button type="danger" @click="doApproval('REJECT')">拒绝</el-button>
<el-button type="danger" @click="doApproval('BACK')">退回重新填写</el-button>
<el-button plain @click="$refs.guava.index()">取消</el-button>
</el-row>
</div>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/audit/memberAuditTable.js"){}#-->
<!--#include("../../common/audit/memberAuditRecord.js"){}#-->
<!--#include("../../common/audit/memberAuditChangeInfo.js"){}#-->
<!--#include("../../common/info/memberInfo.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data: {
showApprovalForm: false,
},
components: {
"member-audit-table": MEMBER_AUDIT_TABLE,
"member-audit-record": MEMBER_AUDIT_RECORD,
"member-audit-change-info": MEMBER_AUDIT_CHANGE_INFO,
"member-info": MEMBER_INFO,
},
methods: {
doApproval(approvalType) {
this.formData.bpmTaskApprovalType = approvalType
this.$refs.approvalFormRef.validate((valid) => {
if (valid) {
this.$axios
.post(loc() + "/approval", {
approval: JSON.stringify(this.formData)
})
.then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
})
}
})
},
openApproval(data) {
this.$refs.guava.public(() => {
this.showApprovalForm = true
this.formData = data.approvalParam
this.$refs.memberAuditChangeInfoViewRef.onOpen({recordId: data.id, userId: data.userId})
})
},
openView(userId){
this.$refs.guava.view(() => {
this.$refs.memberInfoRef.onOpen(userId)
})
},
openChangeInfo(data){
this.$refs.guava.public(() => {
this.showApprovalForm = false
this.$refs.memberAuditChangeInfoViewRef.onOpen({recordId: data.id, userId: data.userId})
})
},
doSearch() {
this.$refs.tableRef.doSearch()
},
}
});
</script>
<!--#
}
#-->
@@ -0,0 +1,93 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<member-manage-query ref="queryRef" @query-ready="onQueryReady"></member-manage-query>
<member-manage-table ref="tableRef" v-if="isQueryReady" @refresh="tableReady" @change-member="changeMember"
@view-member="viewMember" @add-member="addMember" @refresh-table="changeSuccess"></member-manage-table>
<template #view>
<member-info ref="memberInfoRef"></member-info>
</template>
<template #edit>
<member-apply :admin-operate="true"></member-apply>
</template>
<template #public>
<member-change :id="id" :url="url" ref="memberChangeRef"
@submit-ready="changeSuccess"></member-change>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/manage/memberManageQuery.js"){}#-->
<!--#include("../../common/manage/memberManageTable.js"){}#-->
<!--#include("../../common/info/memberInfo.js"){}#-->
<!--#include("../../common/apply/memberApply.js"){}#-->
<!--#include("../../common/change/memberChange.js"){}#-->
const vue = new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data: {
id: '',
url:'',
username: '',
isQueryReady: false,
hasShownMessage: false
},
components: {
"member-manage-query": MEMBER_MANAGE_QUERY,
"member-manage-table": MEMBER_MANAGE_TABLE,
"member-info": MEMBER_INFO,
"member-apply": MEMBER_APPLY,
"member-change": MEMBER_CHANGE,
},
methods: {
changeMember(data){
this.id = data.id
this.url = '/platform/member/schoolUnion/manage/list/generalMemberChange'
this.$refs.guava.public()
this.$nextTick(()=>{
this.$refs.memberChangeRef.init()
})
},
viewMember(val){
this.$refs.guava.view(() => {
this.$refs.memberInfoRef.onOpen(val)
})
},
addMember(){
this.$refs.guava.edit()
},
onQueryReady(pageForm) {
this.isQueryReady = true;
this.$nextTick(() => {
if (this.$refs.tableRef) {
this.$refs.tableRef.pageForm = pageForm
this.$refs.tableRef.pageData();
}
})
},
tableReady(pageForm){
this.$refs.queryRef.pageForm = pageForm
},
changeSuccess(){
this.$refs.guava.index(() => {
this.$refs.tableRef.pageData()
})
}
},
created() {
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,51 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<template>
<member-record @open-view="openView" @open-change-info="openChangeInfo"></member-record>
</template>
<template #view>
<member-info ref="memberInfoRef"></member-info>
</template>
<template #public>
<member-audit-change-info ref="memberAuditChangeInfoRef" is_default_url></member-audit-change-info>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/record/memberRecord.js"){}#-->
<!--#include("../../common/info/memberInfo.js"){}#-->
<!--#include("../../common/audit/memberAuditChangeInfo.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
store,
components: {
"member-record": MEMBER_RECORD,
"member-info": MEMBER_INFO,
"member-audit-change-info": MEMBER_AUDIT_CHANGE_INFO
},
data: {
userId: ''
},
methods: {
openChangeInfo(row) {
this.$refs.guava.public(() => {
this.$refs.memberAuditChangeInfoRef.onOpen({recordId: row.id, userId: row.userId})
})
},
openView(data) {
this.$refs.guava.view(() => {
this.$refs.memberInfoRef.onOpen(data)
})
}
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,375 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="名单事项">
<el-select clearable filterable placeholder="请选择" style="width: 100%"
@change="doSearch"
v-model="pageForm.verificationProjectId">
<el-option :key="item.id" :label="item.projectName" :value="item.id"
v-for="item in verificationList"></el-option>
</el-select>
</search-item>
<search-item label="所属工会">
<el-select @change="doSearch" 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>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="分工会列表">
<template v-if="projectInfo && projectInfo.welfareJson && projectInfo.welfareJson.length > 0">
<el-button type="primary" size="small" @click="showWelfareUserInfo">查看各工会福利上报情况</el-button>
</template>
<el-button type="primary" size="small" @click="doExportByPageDataForExcel">导出页面数据</el-button>
<el-button type="primary" size="small" @click="exportChangeType('userState')">导出在职状态变更数</el-button>
<el-button type="primary" size="small" @click="exportChangeType('restore')">导出入会人数</el-button>
<el-button type="primary" size="small" @click="exportChangeType('withdrawal')">导出退会人数</el-button>
<el-button type="primary" size="small" @click="exportChangeType('member')">导出最终会员数</el-button>
<el-button type="primary" size="small" @click="exportChangeType('welfareMember')">导出最终福利会员数</el-button>
<el-button type="primary" size="small" @click="exportExcel">导出名单事项核对记录</el-button>
</table-tool>
<el-table v-if="tableData" :data="tableData" border show-summary>
<el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column label="工会名称" prop="unionName"></el-table-column>
<el-table-column label="需核对人数" prop="allNum"></el-table-column>
<el-table-column label="变更总人数" prop="changeNum"></el-table-column>
<el-table-column label="在职状态变更数" prop="userStateNum">
<template slot-scope="scope">
<el-link @click="openUserState(scope.row)" type="primary">{{ scope.row.userStateNum }}</el-link>
</template>
</el-table-column>
<el-table-column label="入会人数" prop="restoreNum">
<template slot-scope="scope">
<el-link @click="openRestore(scope.row)" type="primary">{{ scope.row.restoreNum }}</el-link>
</template>
</el-table-column>
<el-table-column label="退会人数" prop="withdrawalNum">
<template slot-scope="scope">
<el-link @click="openWithdrawal(scope.row)" type="primary">{{ scope.row.withdrawalNum }}</el-link>
</template>
</el-table-column>
<el-table-column label="最终会员数" prop="lastMemberNum">
<template slot-scope="scope">
<el-link @click="openLastMember(scope.row)" type="primary">{{ scope.row.lastMemberNum }}</el-link>
</template>
</el-table-column>
<el-table-column label="最终福利会员数" prop="lastWelfareMemberNum">
<template slot-scope="scope">
<el-link @click="openLastWelfareMember(scope.row)" type="primary">{{ scope.row.lastWelfareMemberNum }}</el-link>
</template>
</el-table-column>
<el-table-column label="分工会提交次数" prop="branchUnionSubmitNum"></el-table-column>
<el-table-column label="分工会提交状态" prop="branchUnionSubmit">
<template slot-scope="scope">
<el-tag size="mini" v-if="scope.row.branchUnionSubmit" type="success">已提交</el-tag>
<el-tag size="mini" v-else type="danger">未提交</el-tag>
</template>
</el-table-column>
<el-table-column label="反馈状态" prop="isFeedback">
<template slot-scope="scope">
<el-tag size="mini" v-if="scope.row.isFeedback" type="success">已反馈</el-tag>
<el-tag size="mini" v-else type="danger">未反馈</el-tag>
</template>
</el-table-column>
<el-table-column label="当前状态" prop="status"></el-table-column>
<el-table-column label="操作" width="280">
<template slot-scope="scope">
<el-button @click="viewUser(scope.row)" type="primary" size="mini">查看</el-button>
<el-button @click="openHandle(scope.row)" type="primary" size="mini"
v-if="!scope.row.isFeedback && scope.row.branchUnionSubmit !=0
&& scope.row.branchUnionSubmitNum !== scope.row.schoolUnionSubmitNum">审核</el-button>
<el-button @click="viewFeedback(scope.row)" type="primary" size="mini" v-if="scope.row.isFeedback">反馈结果</el-button>
<el-button @click="doRollback(scope.row)" type="danger" size="mini"
v-if="!scope.row.isRollback && scope.row.isFeedback">退回</el-button>
</template>
</el-table-column>
</el-table>
<el-empty v-else :image-size="200"></el-empty>
</el-card>
</template>
<template #edit>
<school-view-handle ref="schoolViewHandleRef" :verification-project-id="pageForm.verificationProjectId"
@open-change="openChange" :union-name="unionName" @success-submit="successSubmit"></school-view-handle>
</template>
<template #view>
<view-change-type-user ref="viewChangeTypeUserRef" :label-name="labelName"></view-change-type-user>
</template>
<template #public>
<table-tool>
<el-button size="small" type="primary" icon="el-icon-plus" @click="welfareChooseNumExport">导出数据</el-button>
</table-tool>
<el-table :data="welfareTableData" class="vi-table" ref="table" style="width: 100%" show-summary>
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号" type="index" width="80px"></el-table-column>
<el-table-column :label="column" :prop="column"
align="center" header-align="center" min-width="100px"
show-overflow-tooltip v-for="column in welfareTableHeader">
</el-table-column>
</el-table>
</template>
</guava>
<el-dialog title="反馈结果" :visible.sync="feedbackDialog" width="50%" append-to-body>
<el-descriptions :column="2" border>
<el-descriptions-item label="事项名称">{{ viewData.projectName }}</el-descriptions-item>
<el-descriptions-item label="工会名称">{{ viewData.unionName }}</el-descriptions-item>
<el-descriptions-item label="反馈日期">{{ viewData.feedbackDate }}</el-descriptions-item>
<el-descriptions-item label="反馈人数">{{ viewData.feedbackNum }}</el-descriptions-item>
<template v-if="viewData.welfareJson">
<el-descriptions-item span="2" label="福利选择人数">
<el-table :data="viewData.welfareJson" border size="small">
<el-table-column label="福利名称" prop="welfareName"></el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column>
<el-table-column label="选择人数" prop="chooseNumber"></el-table-column>
</el-table>
</el-descriptions-item>
</template>
<el-descriptions-item span="2" label="核对时间">{{ viewData.startDate + '至' + viewData.endDate }}</el-descriptions-item>
<el-descriptions-item span="2" label="内容及要求" span="2">{{ viewData.content }}</el-descriptions-item>
<el-descriptions-item span="2" label="反馈附件">
<file-preview :files="viewData.feedbackFiles" complete_result></file-preview>
</el-descriptions-item>
</el-descriptions>
</el-dialog>
<el-dialog :visible.sync="memberChangeDialog" width="80%" append-to-body>
<member-change ref="memberChangeRef" :id="userId" :url="url" show-close
@submit-ready="memberChangeDialog = false;$refs.schoolViewHandleRef.doSearch()" @close="memberChangeDialog = false"></member-change>
</el-dialog>
</div>
<script nonce="${cspNonce!}">
<!--#include("schoolViewAndHandle.js"){}#-->
<!--#include("viewChangeTypeUser.js"){}#-->
<!--#include("../../../change/common/memberChange.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data(){
return {
// 当前的名单核对事项详细信息
// projectInfo: {},
pageForm: {
verificationProjectId: "",
unionId: '',
},
unionId: '',
unionName: '',
unions: [],
verificationList: [],
feedbackDialog: false,
viewData: {},
labelName: '',
userId: '',
url: '/platform/member/schoolUnion/verification/check/doCheckMember',
memberChangeDialog: false,
welfareTableData: [],
welfareTableHeader: [],
}
},
computed:{
projectInfo(){
if(this.pageForm.verificationProjectId && this.verificationList){
return this.verificationList.find(v=>v.id === this.pageForm.verificationProjectId)
}
return null
}
},
components: {
"school-view-handle": SCHOOL_VIEW_AND_HANDLE,
"view-change-type-user": VIEW_CHANGE_TYPE_USER,
"member-change": MEMBER_CHANGE
},
methods: {
// 导出福利上报的人数
welfareChooseNumExport() {
this.$downLoad('/platform/member/schoolUnion/verification/check/welfareChooseNumExport', {
projectId: this.pageForm.verificationProjectId
})
},
showWelfareUserInfo() {
this.$refs.guava.public(() => {
// 去查上报的福利选择信息
this.$axios.post('/platform/member/schoolUnion/verification/check/getWelfareUserInfo',
{projectId: this.pageForm.verificationProjectId})
.then(res => {
if (res.code === 0) {
this.welfareTableData = res.data.tableData
this.welfareTableHeader = res.data.tableHeader
}
})
})
},
openChange(row) {
this.userId = row.userId
this.memberChangeDialog = true
const data = this.verificationList.find(v => v.id === this.pageForm.verificationProjectId)
this.$nextTick(() => {
this.$refs.memberChangeRef.verificationInit({
renewFields: data.renewFields,
verificationProjectId: data.id,
changeOrigin: "SCHOOL_UNION_VERIFICATION"
})
})
},
// 查看在职状态变更列表
openUserState(row) {
this.labelName = row.unionName + '在职状态变更列表'
this.showChangeTypeUser("userState", row)
},
// 查看入会人员列表
openRestore(row) {
this.labelName = row.unionName + '入会人员列表'
this.showChangeTypeUser("restore", row)
},
// 查看退会人员列表
openWithdrawal(row) {
this.labelName = row.unionName + '退会人员列表'
this.showChangeTypeUser("withdrawal", row)
},
// 查看最终会员人数
openLastMember(row) {
this.labelName = row.unionName + '最终会员列表'
this.showChangeTypeUser("member", row)
},
// 查看最终福利会员人数
openLastWelfareMember(row) {
this.labelName = row.unionName + '最终福利会员列表'
this.showChangeTypeUser("welfareMember", row)
},
showChangeTypeUser(changeType, row) {
this.$refs.guava.view(() => {
this.$refs.viewChangeTypeUserRef.pageForm.verificationProjectId = this.pageForm.verificationProjectId
this.$refs.viewChangeTypeUserRef.pageForm.changeType = changeType
this.$refs.viewChangeTypeUserRef.pageForm.unionId = row.unionId
this.$refs.viewChangeTypeUserRef.flushUnits()
this.$refs.viewChangeTypeUserRef.pageData()
})
},
exportChangeType(changeType) {
this.pageForm.changeType = changeType
this.$downLoad('/platform/member/schoolUnion/verification/check/exportAllChangeTypeUserExcel', this.pageForm)
},
exportExcel() {
this.$downLoad('/platform/member/schoolUnion/verification/check/exportExcel', this.pageForm)
},
doExportByPageDataForExcel(){
this.$downLoad('/platform/member/schoolUnion/verification/check/doExportByPageDataForExcel', this.pageForm)
},
viewFeedback(row){
this.$axios.post('/platform/member/branchUnion/verification/check/getVerificationFeedback',{
verificationProjectId: this.pageForm.verificationProjectId,
unionId: row.unionId,
}).then(res => {
if (res.code === 0) {
this.viewData = res.data
this.feedbackDialog = true
} else {
this.$message.error(res.msg)
}
})
},
async viewUser(row){
this.unionName = row.unionName
const units = await this.$businessTool.listUnit(row.unionId)
this.$refs.guava.edit(() => {
this.$refs.schoolViewHandleRef.unionId = row.unionId
this.$refs.schoolViewHandleRef.units = units
this.$refs.schoolViewHandleRef.pageData('0')
})
},
openHandle(row){
this.unionName = row.unionName
this.$refs.guava.edit()
this.$nextTick(()=> {
this.$refs.schoolViewHandleRef.isView = false
this.$refs.schoolViewHandleRef.unionId = row.unionId
this.$refs.schoolViewHandleRef.pageData('2')
})
},
// 退回
doRollback(data){
// 您确定要退回吗?
this.$prompt('请填写退回原因', '退回', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputValue: '',
inputPattern: /^.+$/,
inputErrorMessage: '请填写退回原因',
type: 'warning'
}).then(({value}) => {
console.log(value)
this.$axios.post("/platform/member/schoolUnion/verification/check/doRollback", {
id: data.id,
rollbackReason: value,
}).then(res => {
if (res.code === 0) {
this.$message.success('退回成功')
this.pageData()
} else {
this.$message.error(res.msg)
}
})
})
},
getVerificationList() {
this.$axios.post("/platform/member/branchUnion/verification/check/getVerificationList").then(res => {
if (res.code === 0) {
this.verificationList = res.data
if (res.data && res.data.length > 0) {
this.$set(this.pageForm, "verificationProjectId", this.verificationList[0].id)
this.projectInfo = this.verificationList[0]
}
this.pageData()
this.initData()
}
})
},
successSubmit() {
this.$refs.guava.index(()=>{
this.pageData()
})
},
initData() {
this.$businessTool.listUnion().then(data => {
if (this.verificationList) {
const project = this.verificationList.find(v=>v.id === this.pageForm.verificationProjectId)
this.unions = data.filter(v=> project.unionIds.includes(v.id))
} else {
this.unions = data
}
})
},
pageData() {
this.$axios.post("/platform/member/schoolUnion/verification/check/pageData",this.pageForm)
.then(res => {
if (res.code === 0) {
this.tableData = res.data
}
})
},
},
created() {
this.getVerificationList()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,285 @@
<!--#include("../../../common/info/memberInfo.js"){}#-->
<!--#include("../../../common/verification/memberVerificationChange.js"){}#-->
const SCHOOL_VIEW_AND_HANDLE = {
template: `
<div>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"></el-input>
</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>
</el-card>
<el-card shadow="never">
<table-tool :label="unionName + '审核列表'">
<el-button v-if="!isView" @click="doSubmit" type="primary" size="small">提交</el-button>
<el-radio-group @change="doSearch" size="small" style="margin-left: 10px" v-model="pageForm.schoolUnionChecked">
<el-radio-button :label="0">全部</el-radio-button>
<el-radio-button :label="1">已核对</el-radio-button>
<el-radio-button :label="2">未核对</el-radio-button>
</el-radio-group>
</table-tool>
<el-table ref="table" :data="tableData" row-key="id" style="width: 100%" border>
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号" type="index" width="80px"></el-table-column>
<el-table-column
:label="column.label" :prop="column.prop"
:sortable="column.sortable" :width="column.width"
align="center" header-align="center" min-width="100px"
show-overflow-tooltip v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop=='isChanged'">
<el-link v-if="row.isChanged" @click="openChangeInfo(row)" :underline="false" type="primary">变更</el-link>
<el-link v-else :underline="false" type="danger" disabled>未变更</el-link>
</template>
<template scope="{row}" v-else-if="column.prop=='schoolUnionChecked'">
<el-tag size="mini" v-if="!row.isChanged">无需核对</el-tag>
<template v-else>
<el-tag size="mini" v-if="row.schoolUnionChecked" type="success">已核对</el-tag>
<el-tag size="mini" v-else type="danger">未核对</el-tag>
</template>
</template>
</el-table-column>
<el-table-column label="操作" align="center" header-align="center" width="220px">
<template scope="{row}">
<el-button @click="openView(row)" type="primary" size="mini" plain>查看</el-button>
<el-button @click="openHandle(row)" v-if="!isView && !row.schoolUnionChecked && row.isChanged" type="primary" size="mini">审核</el-button>
<el-button @click="openChange(row)" v-else-if="!row.isChanged" type="primary" size="mini" plain>变更</el-button>
<el-button @click="openChange(row)" v-else-if="row.schoolUnionChecked && row.isChanged" type="primary" size="mini" plain>再次变更</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<el-dialog :title="titleName" width="70%" :visible.sync="doHandleVisible" :append-to-body="true">
<el-tabs type="border-card" v-model="activeName">
<el-tab-pane label="用户信息" name="1">
<member-info ref="memberInfoRef"></member-info>
</el-tab-pane>
<el-tab-pane label="变更详情" name="2">
<table-tool label="变更记录"></table-tool>
<el-table v-if="changeRecord" ref="changeTable" :data="changeRecord" row-key="id" style="width: 100%" border>
<el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column label="变更字段" prop="name"></el-table-column>
<el-table-column label="原数据" prop="value">
<template slot-scope="scope">
<div v-html="scope.row.value"></div>
</template>
</el-table-column>
<el-table-column label="新数据" prop="newValue">
<template slot-scope="scope">
<div v-html="scope.row.newValue"></div>
</template>
</el-table-column>
</el-table>
<el-empty v-else :image-size="100" description="暂无变更数据"></el-empty>
</el-tab-pane>
</el-tabs>
<div style="margin-top: 20px">
<el-form v-if="!submitFlag" :model="formData" ref="formRef" label-width="0" style="margin-top: 20px" :rules="formRules" size="small">
<table-tool label="审核意见"></table-tool>
<el-form-item prop="option">
<el-input type="textarea" maxlength="200" show-word-limit rows="4" v-model="option" placeholder="请填写审核意见"></el-input>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<template v-if="submitFlag">
<el-button @click="doHandleVisible = false">关 闭</el-button>
</template>
<template v-else>
<el-button type="danger" @click="doHandle(false)">拒 绝</el-button>
<el-button type="primary" @click="doHandle(true)">通 过</el-button>
</template>
</span>
</el-dialog>
<el-dialog title="变更数据" width="70%" :visible.sync="changeInfoVisible" :append-to-body="true">
<member-verification-change ref="memberVerificationChangeRef"></member-verification-change>
<span slot="footer" class="dialog-footer">
<el-button @click="changeInfoVisible = false">关 闭</el-button>
</span>
</el-dialog>
</div>
`,
props: {
unionName: { type: String, required: true },
verificationProjectId: { type: String, required: true },
},
mixins: [initTableMixins],
components: {
"member-info": MEMBER_INFO,
"member-verification-change": MEMBER_VERIFICATION_CHANGE
},
data() {
return {
tableColumns: [
{ label: "姓名", prop: "username" },
{ label: "工号", prop: "loginname" },
{ label: "性别", prop: "sex" },
{ label: "在职状态", prop: "userState" },
{ label: "人员类型", prop: "personType" },
{ label: "所属单位", prop: "unitName" },
{ label: "是否变更", prop: "isChanged" },
// { label: "分工会状态", prop: "branchUnionChecked" },
{ label: "校工会审核状态", prop: "schoolUnionChecked" },
// { label: "校工会审核状态", prop: "currentState" },
],
units: [],
unionId: '',
pageForm: {
unionId: '',
unionName: this.unionName,
verificationProjectId: '',
schoolUnionChecked: '2',
},
changeRecord: [],
doHandleVisible: false,
formData: {},
userId: '',
verificationChangeInfoUserId: '',
activeName: '3',
titleName: '',
option: '',
isView: true,
submitFlag: true,
changeInfoVisible:false,
}
},
methods: {
openChange(row) {
this.$emit('open-change', row)
},
openChangeInfo(row){
this.changeInfoVisible = true
this.$nextTick(() => {
this.$refs.memberVerificationChangeRef.onOpen({id:row.userId,projectId:this.verificationProjectId})
})
},
doHandle(flag) {
// flag true 通过,false 拒绝
if (!flag && !this.option) {
// 拒绝,必须要填写审核意见
this.$message.warning('请填写审核意见')
return
}
// 通过后将修改此用户的基本信息,是否确认?
this.$confirm('通过后,将修改此用户的基本信息,是否确认?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const formData = new FormData()
this.$set(formData, "userId", this.userId)
this.$set(formData, "verificationProjectId", this.pageForm.verificationProjectId)
this.$set(formData, "flag", flag)
this.$set(formData, "option", this.option)
this.$axios.post('/platform/member/schoolUnion/verification/check/doHandle',{
data: JSON.stringify(formData)
}).then(res => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doHandleVisible = false
this.pageData()
} else {
this.$message.error(res.msg)
}
})
}).catch(() => {
this.doHandleVisible = false
})
},
//校工会提交
doSubmit(){
this.$confirm('请确保数据全部核对完毕,提交后会将该表格数据全部转为已核对状态,是否确认?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$axios.post('/platform/member/schoolUnion/verification/check/schoolVerificationSubmit', {
data: JSON.stringify(this.pageForm)
}).then(res=> {
if (res.code === 0) {
this.isView = true
this.submitFlag = true
this.$message.success(res.msg)
this.pageData('0')
this.$emit("success-submit")
} else {
this.$message.error(res.msg)
}
})
})
},
showData(row){
this.userId = row.userId
this.$nextTick(() => {
this.$refs.memberInfoRef.onOpen(row.userId)
})
const formData = new FormData()
this.$set(formData, "userId", row.userId)
this.$set(formData, "verificationProjectId", this.pageForm.verificationProjectId)
this.$axios
.post("/platform/member/schoolUnion/verification/check/getVerificationChangeInfo", {
data: JSON.stringify(formData)
})
.then((res) => {
if (res.code === 0) {
this.changeRecord = {}
this.changeRecord = res.data
}
})
},
openView(row) {
this.titleName = row.username + '基本信息'
this.activeName = '1'
this.showData(row)
this.submitFlag = true
this.doHandleVisible = true
},
openHandle(row) {
this.activeName = '2'
this.submitFlag = false
this.titleName = '校工会审核'
this.showData(row)
this.doHandleVisible = true
},
pageData(o) {
this.pageForm.unionId = this.unionId
this.pageForm.verificationProjectId = this.verificationProjectId
if (o) {
this.$set(this.pageForm, 'schoolUnionChecked', o)
}
this.$axios.post("/platform/member/schoolUnion/verification/check/getCheckedMemberByUnionId", this.pageForm).then((res) => {
if (res.code === 0) {
this.tableData = res.data.list
this.pageForm.totalCount = res.data.totalCount
this.$emit("refresh", this.pageForm)
}
})
},
},
created() {
}
}
@@ -0,0 +1,115 @@
const VIEW_CHANGE_TYPE_USER = {
template: `
<div>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"></el-input>
</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>
</el-card>
<el-card shadow="never">
<table-tool :label="labelName">
<el-button @click="doExport" size="small" type="primary">导出人员</el-button>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号" type="index" width="80px"></el-table-column>
<el-table-column :label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
header-align="center"
min-width="100px"
show-overflow-tooltip
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop=='member'">
<span class="text-success" v-if="row.member=='是'">
<i class="fa fa-circle ml5"></i> 是
</span>
<span class="text-danger" v-else>
<i class="fa fa-circle ml5"></i> 否
</span>
</template>
<template scope="{row}" v-else-if="column.prop=='welfareMember'">
<span class="text-success" v-if="row.welfareMember=='是'">
<i class="fa fa-circle ml5"></i> 是
</span>
<span class="text-danger" v-else>
<i class="fa fa-circle ml5"></i> 否
</span>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</div>
`,
props: {
labelName: { type: String, default: "" }
},
mixins: [initTableMixins],
store,
data() {
return {
units: [],
tableColumns: [
{ prop: "loginname", label: "工号", sortable: true },
{ prop: "username", label: "姓名", sortable: true },
{ prop: "userState", label: "在职状态", sortable: true },
{ prop: "personType", label: "人员类型", sortable: true },
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true },
{ prop: "member", label: "会员", sortable: true },
{ prop: "welfareMember", label: "福利会员", sortable: true }
]
}
},
methods: {
doExport() {
this.$downLoad("/platform/member/schoolUnion/verification/check/exportChangeTypeUserByUnionIdExcel", this.pageForm)
},
flushUnits() {
this.$set(this.pageForm, "unitId", null)
this.units = []
if (this.pageForm.unionId) {
this.$businessTool.listUnit(this.pageForm.unionId).then((data) => {
this.units = data
})
}
},
pageData() {
if (this.pageForm.changeType === "userState") {
this.tableColumns.push(
{ prop: "oldUserState", label: "原在职状态", sortable: true },
{ prop: "newUserState", label: "新在职状态", sortable: true }
)
} else {
// 清除上述列
this.tableColumns = this.tableColumns.filter((item) => item.prop !== "oldUserState" && item.prop !== "newUserState")
}
this.$axios.post("/platform/member/schoolUnion/verification/check/getChangeTypeUserPageData", this.pageForm).then((res) => {
if (res.code === 0) {
this.tableData = res.data.list
this.pageForm.totalCount = res.data.totalCount
}
})
}
}
}
@@ -0,0 +1,238 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker
@change="doSearch"
style="width: 100%"
v-model="pageForm.projectYear"
value-format="yyyy"
:clearable="false"
type="year"
:picker-options="pickerOptions"
placeholder="请选择年度">
</el-date-picker>
</search-item>
<search-item label="事项名称">
<el-input placeholder="请输入名单核对事项名称查询" clearable v-model="pageForm.searchKeyword"></el-input>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool>
<el-button size="small" type="primary" icon="el-icon-plus" @click="openAdd">新增</el-button>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" border header-align="center" style="width: 100%">
<el-table-column type="index" label="序号" width="80px" :index="indexMethod"></el-table-column>
<el-table-column prop="projectName" label="事项名称" align="center"></el-table-column>
<el-table-column prop="content" label="事项内容及要求" show-overflow-tooltip align="center"></el-table-column>
<el-table-column prop="isNeedFeedback" label="是否需要反馈" align="center">
<template scope="{row}">
<span style="color: #00aa3a" v-if="row.isNeedFeedback == 1"></span>
<span style="color: #ac2925" v-else></span>
</template>
</el-table-column>
<el-table-column prop="isNeedFeedbackFile" label="是否需要反馈附件" align="center">
<template scope="{row}">
<span style="color: #00aa3a" v-if="row.isNeedFeedbackFile == 1"></span>
<span style="color: #ac2925" v-else></span>
</template>
</el-table-column>
<el-table-column prop="applyTimes" label="核对时间" align="center">
<template scope="{row}">
<span>{{ row.startDate + ' 至 ' + row.endDate }}</span>
</template>
</el-table-column>
<el-table-column prop="releaseDateTime" label="发布时间" align="center">
<template scope="{row}">
<span>{{ row.isEnabled ? row.releaseDateTime : '未发布'}}</span>
</template>
</el-table-column>
<el-table-column prop="applyDate" label="创建时间" align="center"></el-table-column>
<el-table-column label="操作" width="250" align="center">
<template slot-scope="{row}">
<el-link size="mini" type="primary" @click="openView(row)">查看</el-link>
<el-link size="mini" v-if="!row.isEnabled" type="primary" @click="openEdit(row)">编辑</el-link>
<el-link size="mini" type="primary" @click="openSetUser(row)">设置人员</el-link>
<el-link size="mini" v-if="!row.isEnabled" type="primary" @click="releaseVerificationProject(row)">发布</el-link>
<el-link size="mini" v-if="row.isEnabled" type="primary" @click="closeVerificationProject(row)">关闭</el-link>
<el-link size="mini" v-if="!row.isEnabled" type="primary" @click="removeVerificationProject(row)">删除</el-link>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<verification-set-user-list ref="memberListUserRef" :id="verificationProjectId" :unions="unions" @submit-ready="submitReady"
@show-selection-user="showSelectionUser"></verification-set-user-list>
</template>
<template #view>
<verification-show-selection-users ref="showSelectionUserViewRef" :unions="unions" :can-be-modified="false"></verification-show-selection-users>
</template>
</guava>
<verification-project-add ref="addProjectRef" @success-submit="successSubmit"></verification-project-add>
<el-dialog title="名单核对事项" :visible.sync="dialogFormVisible" width="70%" @close="closeDialogFormVisible" :close-on-click-modal="false">
<verification-show-selection-users ref="showSelectionUserRef" :unions="unions" :can-be-modified="true"></verification-show-selection-users>
<div slot="footer" class="dialog-footer">
<el-button @click="closeDialogFormVisible">关 闭</el-button>
<!-- <el-button type="primary" @click="$refs.showSelectionUserRef.doSubmit()">提 交</el-button>-->
</div>
</el-dialog>
</div>
<script nonce="${cspNonce!}">
<!--#include("verificationSetUserList.js"){}#-->
<!--#include("verificationProjectAdd.js"){}#-->
<!--#include("verificationShowSelectionUsers.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
components: {
"verification-set-user-list": VERIFICATION_SET_USER_LIST,
"verification-project-add": VERIFICATION_PROJECT_ADD,
"verification-show-selection-users": VERIFICATION_SHOW_SELECTION_USERS,
},
data() {
return {
setUserRow: {},
dialogFormVisible: false,
verificationProjectId: "",
isQueryReady: false,
unions:[],
viewData: {},
activeName: "info",
pageForm: {
projectYear: moment().format('YYYY'),
},
pickerOptions: {
disabledDate(time) {
return (
time.getFullYear() > new Date().getFullYear()
);
}
},
}
},
methods: {
closeDialogFormVisible(){
this.dialogFormVisible = false
// this.$refs.memberListUserRef.pageData()
},
openEdit(row) {
this.$refs.addProjectRef.findOne(row.id)
this.$nextTick(()=>{
this.$refs.addProjectRef.openView()
})
},
removeVerificationProject(row) {
this.$confirm("该操作会将所有关于此事项的数据全部删除,确定要删除吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/member/schoolUnion/verification/manage/removeVerificationProject", {
verificationProjectId: row.id
}).then(res => {
this.$message.success(res.msg)
this.pageData()
})
})
},
closeVerificationProject(row) {
this.$confirm("确定要关闭吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/member/schoolUnion/verification/manage/closeVerificationProject", {
verificationProjectId: row.id
}).then(res => {
this.$message.success(res.msg)
this.pageData()
})
})
},
releaseVerificationProject(row) {
this.$confirm("确定要发布吗?发布后将无法设置人员", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/member/schoolUnion/verification/manage/releaseVerificationProject", {
verificationProjectId: row.id
}).then(res => {
this.$message.success(res.msg)
this.pageData()
})
})
},
successSubmit(){
this.pageData()
},
submitReady(){
this.$confirm("提交成功,是否跳转至项目管理页面?", "提示", {
confirmButtonText: "跳转至管理页",
cancelButtonText: "停留当前页面",
type: "success"
}).then(() => {
this.$refs.guava.index()
})
},
showSelectionUser(){
this.dialogFormVisible = true
this.$nextTick(()=>{
this.$refs.showSelectionUserRef.showInit(this.setUserRow)
})
},
showUsersSubmit() {
this.dialogFormVisible = false
this.submitReady()
},
openAdd() {
this.$refs.addProjectRef.dialogFormVisible = true
},
openView(row) {
this.$axios.post("/platform/member/schoolUnion/verification/manage/getSelectionUser", { id: row.id }).then((res) => {
if (res.code === 0) {
// this.getUnions(row)
this.$refs.guava.view(() => {
this.$refs.showSelectionUserViewRef.showInit(row)
})
}
})
},
openSetUser(row){
this.verificationProjectId = row.id
this.setUserRow = row
this.getUnions(row)
this.$refs.guava.edit(() => {
this.$refs.memberListUserRef.pageData()
})
},
getUnions(row){
const unionIds = JSON.parse(row.unionIds)
this.$businessTool.listUnion().then(data => {
this.unions = data.filter(item => unionIds.includes(item.id))
})
}
},
created(){
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,169 @@
const VERIFICATION_PROJECT_ADD = {
template: /*language=html*/ `
<el-dialog title="名单核对事项" :visible.sync="dialogFormVisible" width="1000px" :close-on-click-modal="false">
<el-form :model="formData" ref="formRef" label-width="140px" :rules="formRules">
<el-form-item prop="projectName" label="事项名称">
<el-input v-model="formData.projectName" maxlength="100"></el-input>
</el-form-item>
<el-form-item prop="content" label="内容及要求">
<el-input v-model="formData.content" maxlength="500"
rows="3" type="textarea" show-word-limit></el-input>
</el-form-item>
<el-form-item prop="unionIds" label="推送分工会">
<el-transfer filterable :filter-method="filterMethod" :titles="['可选工会', '已选工会']"
filter-placeholder="请输入分工会名称" v-model="formData.unionIds"
:props="{key:'id',label:'name'}" :data="unionData">
</el-transfer>
</el-form-item>
<el-form-item prop="applyTimes" label="核对时间">
<el-date-picker v-model="formData.applyTimes" type="datetimerange"
range-separator="至" start-placeholder="开始日期"
value-format="yyyy-MM-dd HH:mm:ss"
end-placeholder="结束日期"></el-date-picker>
</el-form-item>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item prop="isNeedFeedback" label="是否需要反馈">
<el-radio-group v-model="formData.isNeedFeedback" size="small">
<el-radio :label="true" border>是</el-radio>
<el-radio :label="false" border>否</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="isNeedFeedbackFile" label="是否需要反馈附件">
<el-radio-group v-model="formData.isNeedFeedbackFile" size="small">
<el-radio :label="true" border>是</el-radio>
<el-radio :label="false" border>否</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item prop="welfareJson" label="福利填写">
<el-table :data="formData.welfareJson" border size="small">
<el-table-column label="福利名称" prop="welfareName">
<template slot-scope="{row}">
<el-input v-model="row.welfareName" maxlength="50" 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.welfareJson.push({})">添加</el-button>
</template>
<template slot-scope="scope">
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="formData.welfareJson.length===0"
@click="formData.welfareJson.splice(scope.$index,1)"
></el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button>
<el-button type="primary" @click="doSubmit">确 定</el-button>
</div>
</el-dialog>
`,
data() {
return {
dialogFormVisible: false,
formData: {
isNeedFeedback: true,
isNeedFeedbackFile: true,
unionIds: [],
welfareJson: []
},
formRules: {
projectName: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
content: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
applyTimes: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
// unionIds: [{required: true, message: "必填", trigger: ["change", "blur"]}],
isNeedFeedback: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
isNeedFeedbackFile: [{ required: true, message: "必填", trigger: ["change", "blur"] }]
},
unionData: []
}
},
methods: {
openView() {
this.formData = {
userIds: [],
delegationId: null,
roleId: null,
applyTimes: []
}
this.dialogFormVisible = true
},
filterMethod(query, item) {
return item.name.indexOf(query) > -1
},
getAllUnions() {
this.$businessTool.listUnion().then((data) => {
this.unionData = data
})
},
doSubmit() {
this.$refs.formRef.validate((valid) => {
if (valid) {
if (!this.formData.applyTimes || this.formData.applyTimes === 0) {
this.$message.warning("请选择核对时间")
return
}
if (this.formData.welfareJson && this.formData.welfareJson.length > 0) {
this.formData.welfareJson = JSON.stringify(this.formData.welfareJson)
}
this.formData.startDate = this.formData.applyTimes[0]
this.formData.endDate = this.formData.applyTimes[1]
this.$axios
.post("/platform/member/schoolUnion/verification/manage/insertOrUpdate", {
data: JSON.stringify(this.formData)
})
.then((res) => {
if (res.code === 0) {
this.dialogFormVisible = false
this.$message.success(res.msg)
this.$emit("success-submit")
}
})
}
})
},
findOne(id) {
if (id) {
this.$axios.post("/platform/member/schoolUnion/verification/manage/findOne", { verificationProjectId: id }).then((res) => {
if (res.code === 0) {
this.formData = res.data
if (this.formData.startDate && this.formData.endDate) {
this.$set(this.formData, "applyTimes", [this.formData.startDate, this.formData.endDate])
// this.formData.applyTimes = [this.formData.startDate, this.formData.endDate]
}
if (res.data.welfareJson) {
this.formData.welfareJson = JSON.parse(res.data.welfareJson)
} else {
this.formData.welfareJson = []
}
}
})
}
}
},
created() {
this.getAllUnions()
}
}
@@ -0,0 +1,65 @@
const VERIFICATION_QUERY = {
template: `
<el-card>
<search @search="doSearch">
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"></el-input>
</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.changeType" placeholder="变更类型" @change="doSearch"
code="MEMBER_CHANGE_TYPE"></dict-select>
</search-item>
</search>
</el-card>
`,
props: {
unions: { type: Array, default: [] }
},
mixins: [initTableMixins],
data() {
return {
units: []
}
},
methods: {
initData() {
this.doSearch()
},
async flushUnits() {
this.$set(this.pageForm, "unitId", null)
this.units = []
if (this.pageForm.unionId) {
this.$businessTool.listUnit(this.pageForm.unionId).then((data) => {
this.units = data
})
}
},
doSearch() {
this.$emit("query-ready", this.pageForm)
}
},
created() {}
}
@@ -0,0 +1,495 @@
const VERIFICATION_SET_USER_LIST = {
template: /*language=html*/ `
<div>
<el-card>
<search @search="doSearch">
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"></el-input>
</search-item>
<search-item label="性别">
<dict-select v-model="pageForm.sex" placeholder="性别" @change="doSearch"
code="USER_SEX"></dict-select>
</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.changeType" placeholder="变更类型" @change="doSearch"
code="MEMBER_CHANGE_TYPE"></dict-select>
</search-item>
<template v-if="pageForm.userState == '退休'">
<search-item label="福利项目">
<el-select @change="doSearch" clearable filterable
placeholder="福利项目" style="width: 100%;" v-model="pageForm.welfareProjectId">
<el-option :key="item.id" :label="item.name" :value="item.id"
v-for="item in welfareProjectList"></el-option>
</el-select>
</search-item>
<search-item v-if="pageForm.welfareProjectId" label="福利发放">
<el-radio-group v-model="pageForm.isGrantWelfare">
<el-radio-button :label="1">已发放</el-radio-button>
<el-radio-button :label="0">未发放</el-radio-button>
</el-radio-group>
</search-item>
<search-item label="退休时间">
<el-date-picker
v-model="pageForm.retireTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</search-item>
</template>
</search>
</el-card>
<el-card class="mt10">
<table-tool :label="'预选人员列表;当前人数:(' + pageForm.totalCount + '人)'">
<span>会员:</span>
<el-select v-model="pageForm.isMember" placeholder="会员状态" clearable
style="width: 120px" @change="pageData" class="mr10" size="small">
<el-option label="全部" :value="3"></el-option>
<el-option label="会员" :value="1"></el-option>
<el-option label="非会员" :value="0"></el-option>
</el-select>
<span>福利会员:</span>
<el-select v-model="pageForm.isWelfareMember" placeholder="福利会员状态" clearable
style="width: 120px" @change="pageData" class="mr10" size="small">
<el-option label="全部" :value="3"></el-option>
<el-option label="福利会员" :value="1"></el-option>
<el-option label="非福利会员" :value="0"></el-option>
</el-select>
<el-button @click="importUser" type="primary" size="small">导入预选人员</el-button>
<el-button @click="submitSelectUser" type="primary" size="small">提交预选人员</el-button>
<el-button @click="showSelectionUsers" type="primary" size="small">查看已提交人员</el-button>
</table-tool>
<vxe-table
border
show-overflow
keep-source
ref="tableRef"
height="500"
:column-config="{resizable: true}"
:loading="loading"
:mouse-config="{selected: true}"
:edit-config="{trigger: 'dblclick', mode: 'cell', showStatus: true}"
:keyboard-config="{isArrow: true, isDel: true, isEnter: true, isTab: true, isEdit: true}"
:scroll-y="{enabled: true}"
:data="tableData">
<vxe-column type="checkbox" width="60"></vxe-column>
<vxe-column type="seq" width="70"></vxe-column>
<vxe-column v-for="column in tableColumns"
:key="column.prop"
:field="column.prop"
:width="column.width"
:title="column.label">
<template slot="header" scope="{row}">
<span v-if="column.isDisClick">{{ column.label }}</span>
<el-checkbox v-else v-model="checkedColumnProps[column.prop]"
@change.prevent.native="changeCheckboxStatus($event, column.prop)">{{ column.label }}</el-checkbox>
</template>
<template scope="{row}" v-if="column.prop=='member'">
<span class="text-success" v-if="row.member">
<i class="fa fa-circle ml5"></i> 是
</span>
<span class="text-danger" v-else>
<i class="fa fa-circle ml5"></i> 否
</span>
</template>
<template scope="{row}" v-else-if="column.prop=='welfareMember'">
<span class="text-success" v-if="row.welfareMember">
<i class="fa fa-circle ml5"></i> 是
</span>
<span class="text-danger" v-else>
<i class="fa fa-circle ml5"></i> 否
</span>
</template>
</vxe-column>
</vxe-table>
</el-card>
<el-dialog :visible.sync="importDialog" width="50%" title="预选人员导入" append-to-body>
<el-timeline>
<el-timeline-item timestamp="下载模板" placement="top">
<el-card>
<el-button size="medium" style="width: 200px"
@click="$downLoad('/platform/member/schoolUnion/verification/manage/downloadImport')"
icon="el-icon-download">下载模板</el-button>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="上传文件" placement="top">
<el-card>
<el-form>
<el-upload
name="file"
ref="upload"
:on-remove="
(file, fileList) => {
importData.fileList = fileHandleRemove(file, fileList)
}
"
:on-change="
(file, fileList) => {
importData.fileList = fileHandleChange(file, fileList, { type: ['xls', 'xlsx'] })
}
"
:auto-upload="false"
:limit="1"
action
:file-list="importData.fileList"
>
<el-button size="medium" type="" icon="el-icon-upload" style="width: 200px">选择文件</el-button>
<div class="el-upload__tip" slot="tip" style="color: #f56c6c">只能上传 xls/xlsx 文件</div>
</el-upload>
</el-form>
</el-card>
</el-timeline-item>
</el-timeline>
<div style="text-align: right">
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doImport">确 定</el-button>
</span>
</div>
</el-dialog>
</div>
`,
props: {
id: { type: String, required: true },
unions: { type: Array, default: [] }
},
mixins: [initTableMixins],
data() {
return {
pageForm: {
verificationProjectId: "",
selectUserIds: [],
renewFields: [],
retireTime: [],
isMember: 3,
isWelfareMember: 3,
isGrantWelfare: null,
pageSize: 100000
},
units: [],
tableColumns: [],
selectUser: [],
renewFields: [],
checkedColumnProps: {},
loading: false,
welfareProjectList: [],
importDialog: false,
importData: {
fileList: []
}
}
},
watch: {
id: {
handler: function (val) {
if (val) {
this.getSelectionUser()
}
},
immediate: true
}
},
methods: {
submitSelectUser() {
const map = this.$refs.tableRef.getCheckboxRecords().map((v) => v.id)
if (!this.renewFields || this.renewFields.length === 0) {
this.$message.warning("请先勾选需要更改的字段")
return
}
//是否确认提交
this.$confirm("请仔细核对数据是否准确,是否确认提交?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
if (!map) {
this.$message.warning("暂无可提交的数据")
return
}
const loading = this.$loading({
lock: true,
text: "正在提交中,请稍后...",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)"
})
this.pageForm.selectUserIds = JSON.stringify(map)
this.pageForm.verificationProjectId = this.id
this.pageForm.renewFields = JSON.stringify(this.renewFields)
this.$axios
.post("/platform/member/schoolUnion/verification/manage/modifySelection", {
list: JSON.stringify(this.pageForm)
})
.then((res) => {
loading.close()
if (res.code === 0) {
this.pageData()
this.$message.success(res.msg)
this.$nextTick(() => {
this.$emit("submit-ready")
})
} else {
this.$message.error(res.msg)
}
})
})
console.log(map)
},
doSubmit() {
debugger
this.$confirm("如您未查看选择人员可先点击【查看选择人员】按钮进行细微调整,如仍要提交,请仔细核对数据是否准确,是否确认提交?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.$axios
.post("/platform/member/schoolUnion/verification/manage/modifySelection", {
list: JSON.stringify(this.pageForm)
})
.then((res) => {
if (res.code === 0) {
this.pageData()
this.$message.success(res.msg)
this.$nextTick(() => {
this.$emit("submit-ready")
})
} else {
this.$message.error(res.msg)
}
})
})
.catch(() => {})
},
showSelectionUsers() {
this.$emit("show-selection-user")
},
changeCheckboxStatus(event, prop) {
if (event && event.target) {
let isChecked = event.target.checked
this.checkedColumnProps[prop] = isChecked
if (isChecked) {
this.renewFields.push(prop)
} else {
this.renewFields.splice(this.renewFields.indexOf(prop), 1)
}
} else {
console.error("事件对象未定义或缺少 target 属性")
}
},
doSelectChange(val) {
this.selectUser = val
},
initTableColumns() {
this.tableColumns = []
this.$businessTool.getDictOptions("MEMBER_ALLOW_CHANGES_FIELD").then((data) => {
data.forEach((item) => {
if (!["unionId", "unitId"].includes(item.code)) {
this.tableColumns.push({ prop: item.code, label: item.name })
}
})
})
if (!this.tableColumns.some((column) => column.prop === "unionName")) {
this.tableColumns.push({ prop: "unionName", label: "所属工会", isDisClick: true })
}
if (!this.tableColumns.some((column) => column.prop === "unitName")) {
this.tableColumns.push({ prop: "unitName", label: "所属单位", isDisClick: true })
}
this.tableColumns.push({ prop: "loginname", label: "工号", isDisClick: true })
},
pageData() {
this.$set(this.pageForm, "verificationProjectId", this.id)
this.$axios.post("/platform/member/schoolUnion/verification/manage/getUserPageData", this.pageForm).then((res) => {
if (res.code === 0) {
this.tableData = res.data.list
this.pageForm.totalCount = res.data.totalCount
// this.$nextTick(() => {
// this.getSelectionUser()
// })
}
})
},
getSelectionUser() {
if (!this.id) {
return
}
this.$axios.post("/platform/member/schoolUnion/verification/manage/getSelectionUser", { id: this.id }).then((res) => {
if (res.code === 0 && res.data.renewFields && res.data.renewFields.length > 0) {
this.checkedColumnProps = res.data.renewFields.reduce((acc, prop) => {
acc[prop] = true
return acc
}, {})
this.renewFields = []
this.renewFields = res.data.renewFields
}
})
},
doSearch() {
/*const data = this.$refs.tableRef.getCheckboxRecords().map((v) => v.id)
if (data && data.length > 0) {
const loading = this.$loading({
lock: true,
text: "自动保存中,请稍后...",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)"
})
setTimeout(() => {
if (!this.renewFields || this.renewFields.length === 0) {
loading.close()
this.$message.warning("请先勾选需要更改的字段")
return
}
this.pageForm.selectUserIds = JSON.stringify(data)
this.pageForm.renewFields = JSON.stringify(this.renewFields)
this.pageForm.verificationProjectId = this.id
this.$axios
.post("/platform/member/schoolUnion/verification/manage/modifySelection", {
list: JSON.stringify(this.pageForm)
})
.then((res) => {
loading.close()
if (res.code === 0) {
this.pageData()
this.$message.success(res.msg)
this.$nextTick(() => {
this.$emit("submit-ready")
})
} else {
this.$message.error(res.msg)
}
})
}, 500)
// debugger
// const records = this.tableData.filter((row) => data.includes(row))
// this.$refs.tableRef.setAllCheckboxRow(records)
}*/
this.pageData()
},
saveSelectedRows() {
const selected = this.$refs.tableRef.getCheckboxReserveRecords()
debugger
console.log(selected)
},
cleanTableSelection() {
this.pageForm.pageNumber = 1
this.doSearch()
},
flushUnits() {
this.$set(this.pageForm, "unitId", null)
this.units = []
if (this.pageForm.unionId) {
this.$businessTool.listUnit(this.pageForm.unionId).then((data) => {
this.units = data
})
}
},
getWelfareProjectList() {
this.$axios.post("/platform/welfare/project/mange/getWelfareList").then((res) => {
if (res.code === 0) {
this.welfareProjectList = res.data
}
})
},
fileHandleChange(file, fileList, { type, size }) {
const removeFile = () => {
fileList.splice(fileList.findIndex((v) => v === file))
}
if (!file.size) {
this.$message.warning("您选择的是空文件!")
removeFile()
}
if (type && type.length && !type.includes(file.name.split(".").pop().toLowerCase())) {
this.$message.warning("文件格式错误!")
removeFile()
}
if (size && !file.size < size) {
this.$message.warning("文件过大!")
removeFile()
}
return fileList
},
importUser() {
this.importDialog = true
this.importData = {
fileList: []
}
},
doImport() {
if (this.importData.fileList.length === 0) {
this.$message.error({
title: "错误",
message: "请选择文件!"
})
return
}
const data = new FormData()
this.importData.fileList.forEach((val) => {
data.append("file", val.raw, val.raw.name)
})
data.append("verificationProjectId", this.id)
const loading = this.$loading({
lock: true,
text: "正在导入中,请稍后...",
spinner: "el-icon-loading"
})
this.$axios.post("/platform/member/schoolUnion/verification/manage/doImport", data).then((res) => {
loading.close()
if (res.code === 0) {
this.tableData = res.data.list
this.pageForm.totalCount = res.data.totalCount
this.importDialog = false
this.$nextTick(() => {
const $table = this.$refs.tableRef
if ($table) {
$table.setAllCheckboxRow(true)
}
})
} else {
this.$message.warning("导入失败")
}
})
}
},
created() {
this.initTableColumns()
this.getWelfareProjectList()
// this.findList()
}
}
@@ -0,0 +1,181 @@
const VERIFICATION_SHOW_SELECTION_USERS = {
template: `
<div>
<el-tabs type="border-card">
<el-tab-pane label="人员数据">
<el-card>
<search @search="doSearch">
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"></el-input>
</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>
</el-card>
<el-card class="mt10">
<el-table ref="listTable" :data="tableData" row-key="id" style="width: 100%">
<el-table-column type="index" label="序号" :index="indexMethod" width="80px"></el-table-column>
<el-table-column label="工号" prop="loginname"></el-table-column>
<el-table-column label="姓名" prop="username"></el-table-column>
<el-table-column label="性别" prop="sex"></el-table-column>
<el-table-column label="在职状态" prop="userState"></el-table-column>
<el-table-column label="人员类型" prop="personType"></el-table-column>
<el-table-column label="所属工会" prop="unionName"></el-table-column>
<el-table-column label="所属单位" prop="unitName"></el-table-column>
<el-table-column label="操作" fixed="right" width="80px" v-if="canBeModified">
<template slot-scope="scope">
<el-button size="mini" type="danger" @click="doRemoveUser(scope.row.id)">移除</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</el-tab-pane>
<el-tab-pane label="事项详情">
<el-descriptions class="margin-top" :column="3" border>
<el-descriptions-item label="事项名称" :span="3">{{ viewData.projectName }}</el-descriptions-item>
<el-descriptions-item label="事项内容" :span="3">{{ viewData.content }}</el-descriptions-item>
<el-descriptions-item label="创建时间" :span="3">{{ viewData.applyDate }}</el-descriptions-item>
<el-descriptions-item label="是否需要反馈" :span="3">{{ viewData.isNeedFeedback == 1 ? "是" : "否" }}</el-descriptions-item>
<el-descriptions-item label="是否需要反馈附件" :span="3">{{ viewData.isNeedFeedbackFile == 1 ? "是" : "否" }}</el-descriptions-item>
<el-descriptions-item label="发布时间" :span="3">{{ viewData.isEnabled ? viewData.releaseDateTime : '未发布' }}</el-descriptions-item>
<el-descriptions-item :span="3" label="核对时间">{{ viewData.startDate + " 至 " + viewData.endDate }}</el-descriptions-item>
<el-descriptions-item :span="3" label="需核对分工会">{{ viewData.unionNames }}</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
</el-tabs>
</div>
`,
props: {
//是否能修改,默认可以修改
canBeModified: { type: Boolean, default: true },
unions: { type: Array, default: [] }
},
mixins: [initTableMixins],
data() {
return {
pageForm: {
renewFields: []
},
fieldNames: [],
units: [],
sourceLength: 0
}
},
methods: {
doRemoveUser(id, index) {
//是否要将该用户从此表格数据中移除?
this.$confirm("是否要将该用户从提交人员表格数据中移除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
// const selectionIndex = this.pageForm.selectUserIds.indexOf(id)
// this.pageForm.selectUserIds.splice(selectionIndex, 1)
this.$axios.post("/platform/member/schoolUnion/verification/manage/removeMemberVerificationUserById", { id }).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.pageData()
this.$emit("remove-user")
} else {
this.$message.error(res.msg)
}
})
// this.tableData.splice(index, 1)
})
.catch(() => {})
},
/*doModifySelection() {
this.$axios
.post("/platform/member/schoolUnion/verification/manage/modifySelection", {
list: JSON.stringify(this.pageForm)
})
.then((res) => {
if (res.code === 0) {
this.dialogFormVisible = false
this.$message.success(res.msg)
this.$emit("modify-selection")
} else {
this.$message.error(res.msg)
}
})
.catch((e) => {
console.log(e)
})
},
doSubmit() {
this.$confirm("是否确认提交,提交后将修改之前数据,请仔细核对?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.doModifySelection()
this.$emit("show-users-submit")
})
.catch(() => {})
},*/
showInit(row) {
this.pageForm.verificationProjectId = row.id
this.findOne(row.id)
this.pageData()
},
async flushUnits() {
this.$set(this.pageForm, "unitId", null)
this.units = []
if (this.pageForm.unionId) {
this.$businessTool.listUnit(this.pageForm.unionId).then((data) => {
this.units = data
})
}
},
pageData() {
this.$axios
.post("/platform/member/schoolUnion/verification/manage/getShowSelectionUsers", { data: JSON.stringify(this.pageForm) })
.then((res) => {
if (res.code === 0) {
this.tableData = res.data.list
this.pageForm.totalCount = res.data.totalCount
}
})
},
findOne(id) {
if (!id) {
return
}
this.$axios
.post("/platform/member/schoolUnion/verification/manage/findOne", {
verificationProjectId: id
})
.then((res) => {
if (res.code === 0) {
this.viewData = res.data
}
})
}
},
created() {}
}
@@ -0,0 +1,324 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.query-row {
display: flex;
align-items: flex-start;
margin-bottom: 12px;
}
.query-row-title {
width: 120px;
min-width: 120px;
line-height: 32px;
}
.query-row-content {
flex: 1;
display: flex;
flex-wrap: wrap;
align-items: flex-start;
}
.query-row-content-tag {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
gap: 8px;
}
.query-tag-item {
margin-right: 0;
cursor: pointer;
}
.query-tag-actions {
display: inline-flex;
align-items: center;
gap: 10px;
line-height: 32px;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker
@change="doSearch"
style="width: 100%"
v-model="pageForm.currentYear"
value-format="yyyy"
:clearable="false"
type="year"
:picker-options="pickerOptions"
placeholder="请选择年度"
></el-date-picker>
</search-item>
<template v-if="pageForm.queryType == 'fgh'">
<search-item label="工会">
<el-select placeholder="分工会" v-model="pageForm.queryId" style="width: 100%" @change="doSearch" clearable filterable>
<el-option v-for="item in unions" :label="item.name" :value="item.id"></el-option>
</el-select>
</search-item>
</template>
<template v-else>
<search-item label="所属单位">
<el-select placeholder="请选择所属单位" v-model="pageForm.queryId" style="width: 100%" @change="doSearch" clearable filterable>
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</search-item>
</template>
<search-item>
<el-radio-group v-model="pageForm.queryType" @change="pageForm.queryId = '';doSearch()">
<el-radio-button label="fgh">按分工会分析</el-radio-button>
<el-radio-button label="unit">按单位分析</el-radio-button>
</el-radio-group>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<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
class="query-tag-item"
v-for="item in personTypeOptions"
:key="item.code"
:effect="pageForm.personTypes.includes(item.name)?'dark':'plain'"
@click="tagClick('personTypes',item.name)">
{{ item.name }}
</el-tag>
<span class="query-tag-actions">
<el-link type="danger"
v-if="personTypeOptions.length&&pageForm.personTypes.length"
:underline="false"
@click="pageForm.personTypes=[];doSearch()">清空
</el-link>
<el-link :underline="false"
@click="pageForm.personTypes=personTypeOptions.map(p=>p.code);doSearch()"
type="success">全部
</el-link>
</span>
</el-col>
</el-row>
<el-row type="flex" align="middle" class="query-row query-row-tag" v-if="false">
<el-col class="query-row-title">人员分类:</el-col>
<el-col class="query-row-content query-row-content-tag">
<el-tag
class="query-tag-item"
v-for="item in aidFundMemberUserTypeOptions"
:key="item.code"
:effect="pageForm.aidFundMemberUserTypes.includes(item.code)?'dark':'plain'"
@click="tagClick('aidFundMemberUserTypes',item.code)">
{{ item.name }}
</el-tag>
<span class="query-tag-actions">
<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>
</span>
</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 class="query-tag-item"
v-for="item in userAttributeOptions"
:key="item.code"
:effect="pageForm.userAttributes.includes(item.code)?'dark':'plain'"
@click="tagClick('userAttributes',item.code)">
{{ item.name }}
</el-tag>
<span class="query-tag-actions">
<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>
</span>
</el-col>
</el-row>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="会员分析"></table-tool>
<el-table :data="tableData" show-summary>
<el-table-column align="center" header-align="center" type="index" label="序号" width="80px"></el-table-column>
<el-table-column v-if="pageForm.queryType=='fgh'" align="center" header-align="center" label="分工会" width="220px">
<template scope="{row}">{{row.unionCode ? ''+row.unionCode+'' : null }}{{row.unionName}}</template>
</el-table-column>
<el-table-column v-if="pageForm.queryType=='unit'" align="center" header-align="center" label="单位" width="220px">
<template scope="{row}">{{row.unitCode?''+row.unitCode+'' : null}}{{row.unitName}}</template>
</el-table-column>
<!--<el-table-column align="center" header-align="center" label="年初数量"
sortable prop="lastYearMemberNum"></el-table-column>-->
<el-table-column align="center" header-align="center" label="新增人数" sortable prop="newMemberNum"></el-table-column>
<el-table-column
align="center"
header-align="center"
label="【新入职(恢复)"
sortable
label-class-name="addColumn"
prop="newResetMemberNum"
>
<template scope="{row}">
<span style="color: #c1c3c6">{{row.newResetMemberNum}}</span>
</template>
</el-table-column>
<el-table-column
align="center"
header-align="center"
label="校内转入】"
sortable
label-class-name="addColumn"
prop="memberUnitChangeNumIn"
>
<template scope="{row}">
<span style="color: #c1c3c6">{{row.memberUnitChangeNumIn}}</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="减少人数" sortable prop="reduceMemberNum"></el-table-column>
<el-table-column
align="center"
header-align="center"
label="【校内转出"
sortable
label-class-name="deleteColumn"
prop="memberUnitChangeNumOut"
>
<template scope="{row}">
<span style="color: #c1c3c6">{{row.memberUnitChangeNumOut}}</span>
</template>
</el-table-column>
<el-table-column
align="center"
header-align="center"
label="其他(退会)】"
sortable
label-class-name="deleteColumn"
prop="reduceOtherNum"
>
<template scope="{row}">
<span style="color: #c1c3c6">{{row.reduceOtherNum}}</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="当前数量" sortable prop="currentYearMemberNum"></el-table-column>
</el-table>
</el-card>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: "#app",
mixins: [initTableMixins],
store,
data: {
pickerOptions: {
disabledDate(time) {
return time.getFullYear() > new Date().getFullYear()
}
},
unions: [],
units: [],
personTypeOptions: [],
aidFundMemberUserTypeOptions: [],
userAttributeOptions: [],
pageForm: {
currentYear: moment().format("YYYY"),
queryType: "fgh",
personTypes: [],
userAttributes: [],
aidFundMemberUserTypes: []
},
fullTableData: []
},
methods: {
doExport() {},
initData() {
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
this.$businessTool.listUnion().then((data) => {
this.unions = data
})
this.$businessTool.listUnit().then((data) => {
this.units = data
})
} else {
this.$businessTool.listUnion(this.$store.state.user.union.id).then((data) => {
this.unions = data
})
this.$businessTool.listUnit(this.$store.state.user.union.id).then((data) => {
this.units = data
})
}
this.$businessTool.getDictOptions("USER_PERSON_TYPE").then((data) => {
this.personTypeOptions = data
})
this.$businessTool.getDictOptions("AIDFUND_MEMBER_USER_TYPE").then((data) => {
this.aidFundMemberUserTypeOptions = data
})
this.$businessTool.getDictOptions("USER_ATTRIBUTE").then((data) => {
this.userAttributeOptions = data
})
},
pageData() {
// 统计接口按 JSON 字符串接收多选条件,这里统一在提交前做转换,保证人员分类和人员属性都能正确过滤。
const pageForm = clone(this.pageForm)
pageForm.personTypes = JSON.stringify(this.pageForm.personTypes)
pageForm.aidFundMemberUserTypes = JSON.stringify(this.pageForm.aidFundMemberUserTypes)
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
}
})
},
tagClick(key,code) {
if (key === "personTypes") {
if (this.pageForm.personTypes.includes(code)) {
this.pageForm.personTypes.splice(this.pageForm.personTypes.indexOf(code), 1)
} else {
this.pageForm.personTypes.push(code)
}
}
if (key === "userAttributes") {
if (this.pageForm.userAttributes.includes(code)) {
this.pageForm.userAttributes.splice(this.pageForm.userAttributes.indexOf(code), 1)
} else {
this.pageForm.userAttributes.push(code)
}
}
if (key === "aidFundMemberUserTypes") {
if (this.pageForm.aidFundMemberUserTypes.includes(code)) {
this.pageForm.aidFundMemberUserTypes.splice(this.pageForm.aidFundMemberUserTypes.indexOf(code), 1)
} else {
this.pageForm.aidFundMemberUserTypes.push(code)
}
}
this.doSearch()
},
},
created() {
this.initData()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,279 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<template>
<query-form @search="search" ref="queryFormRef"></query-form>
<el-card shadow="never">
<table-tool label="会员列表">
<el-select
v-model="pageForm.searchType"
placeholder="是否会员"
clearable
style="width: 120px"
@change="pageData"
class="mr10"
size="small"
>
<el-option label="全部教工" value="all"></el-option>
<el-option label="会员" value="member"></el-option>
<el-option label="非会员" value="unMember"></el-option>
</el-select>
<el-select
v-model="pageForm.isUnit"
placeholder="是否有单位"
clearable
style="width: 120px"
@change="pageData"
class="mr10"
size="small"
>
<el-option label="有单位" value="true"></el-option>
<el-option label="无单位" value="false"></el-option>
</el-select>
<el-select
v-model="pageForm.isUnion"
placeholder="是否有工会"
clearable
style="width: 120px"
@change="pageData"
class="mr10"
size="small"
>
<el-option label="有工会" value="true"></el-option>
<el-option label="无工会" value="false"></el-option>
</el-select>
<el-button icon="el-icon-printer" type="primary" size="small" @click="doExport">导出</el-button>
<el-popover
placement="bottom"
trigger="click"
width="200">
<div style="padding:4px 0;border-bottom:1px solid #eee;">
<el-button size="mini" @click="checkAll">全选</el-button>
<el-button size="mini" @click="invertCheck">反选</el-button>
</div>
<div style="max-height:40vh;overflow-y:auto;padding:6px 0;">
<el-checkbox-group v-model="checkedFields">
<el-checkbox
v-for="f in tableColumns"
:key="f.prop"
:label="f.prop"
style="display:block;margin:6px 0;">
{{ f.label }}
</el-checkbox>
</el-checkbox-group>
</div>
<el-button
slot="reference"
type="text"
icon="el-icon-s-operation"
size="small"
style="margin-left:12px;">
列设置
</el-button>
</el-popover>
</table-tool>
<el-table
:data="tableData"
style="width: 100%"
stripe
border
:header-cell-style="{background:'#FAFAFA'}"
row-key="id"
@sort-change="pageOrder"
>
<el-table-column
align="center"
header-align="center"
type="index"
fixed="left"
:index="indexMethod"
label="序号"
width="80px"
></el-table-column>
<el-table-column
align="center"
header-align="center"
v-for="column in tableColumns"
show-overflow-tooltip
v-if="checkedFields.includes(column.prop)"
:label="column.label"
:prop="column.prop"
:width="column.width"
:fixed="column.fixed"
:sortable="column.sortable"
>
<template v-if="column.prop==='memberJoinTime'" scope="{row}">{{$moment(row.memberJoinTime).format('YYYY-MM-DD')}}</template>
<template v-else-if="column.prop==='birthday'" scope="{row}">
{{row.birthday ? $moment(row.birthday).format('YYYY-MM-DD') : null}}
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" width="100px" fixed="right">
<template scope="{row}">
<el-button size="mini" @click="openView(row.id)" type="primary">查看</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<member-info ref="memberInfoRef"></member-info>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include("queryForm.js"){}#-->
<!--#include("../../common/info/memberInfo.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
pageForm: {
searchType: "member"
},
unions: [],
units: [],
childrenData: {},
tableColumns: [
{ prop: "loginname", label: "工号", width: 120, fixed: "left"},
{ prop: "username", label: "姓名", width: 120, fixed: "left" },
{ prop: "sex", label: "性别", width: 120},
{ prop: "birthday", label: "出生年月", width: 120, sortable: true },
{ prop: "nationality", label: "国籍", width: 120, sortable: true, checked: 0 },
{ prop: "nation", label: "民族", width: 120, sortable: true},
{ 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, 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: "aidFundMemberUserType", label: "人员分类", width: 120, sortable: true },
{ prop: "userAttribute", 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 },
{ prop: "jobCategory", label: "岗位类别", width: 120, sortable: true, checked: 0 },
{ prop: "professionalTitle", label: "职称", width: 120, sortable: true, checked: 0 },
{ prop: "professionalLevel", label: "职级", width: 120, sortable: true, checked: 0 },
{ prop: "employeeSource", label: "职工来源", width: 120, sortable: true, checked: 0 },
{ prop: "administrativeLevel", label: "行政级别(管理岗位)", width: 120, sortable: true, checked: 0 },
{ prop: "positionSeries", label: "岗位系列", width: 120, sortable: true, checked: 0 },
{ prop: "positionLevel", label: "岗级", width: 120, sortable: true, checked: 0 },
{ prop: "administrativePositionLevel", label: "行政岗级", width: 120, sortable: true, checked: 0 },
{ prop: "arrivalAtSchoolDate", label: "来校时间", width: 120, sortable: true, checked: 0 },
{ prop: "teachingTime", label: "从教年月", width: 120, sortable: true, checked: 0 },
{ prop: "expectedLeaveSchoolDate", label: "预计/最后离校时间", width: 120, sortable: true, checked: 0 },
],
checkedFields: []
}
},
components: {
"query-form": MEMBER_STATISTICS_COMPREHENSIVE_QUERY_FORM,
"member-info": MEMBER_INFO
},
methods: {
openView(id) {
this.$refs.guava.view(() => {
this.$refs.memberInfoRef.onOpen(id)
})
},
doExport() {
const pageForm = clone(this.pageForm)
pageForm.userIds = JSON.stringify(this.pageForm.userIds)
pageForm.unionId = JSON.stringify(this.pageForm.unionId)
pageForm.unitId = JSON.stringify(this.pageForm.unitId)
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}
})
pageForm.columns = JSON.stringify(data)
this.$downLoad("/platform/member/statistics/comprehensive/doExport", pageForm)
},
search(pageForm) {
this.pageForm = {
...this.pageForm,
...pageForm,
}
this.pageData()
},
pageData() {
const pageForm = clone(this.pageForm)
pageForm.userIds = JSON.stringify(this.pageForm.userIds)
pageForm.age = JSON.stringify(this.pageForm.age)
pageForm.unionId = JSON.stringify(this.pageForm.unionId)
pageForm.unitId = JSON.stringify(this.pageForm.unitId)
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)
if (pageForm.birthdayRange && pageForm.birthdayRange.length > 0) {
pageForm.startDate = pageForm.birthdayRange[0]
pageForm.endDate = pageForm.birthdayRange[1]
}
if (pageForm.joinMemberRange && pageForm.joinMemberRange.length > 0) {
pageForm.startJoinDate = pageForm.joinMemberRange[0]
pageForm.endJoinDate = pageForm.joinMemberRange[1]
}
if (pageForm.leaveMemberRange && pageForm.leaveMemberRange.length > 0) {
pageForm.startLeaveDate = pageForm.leaveMemberRange[0]
pageForm.endLeaveDate = pageForm.leaveMemberRange[1]
}
this.$axios.post("/platform/member/statistics/comprehensive/pageData", pageForm).then((res) => {
if (res.code === 0) {
this.tableData = res.data.list
this.pageForm.totalCount = res.data.totalCount
} else {
this.$message.error(res.msg)
}
})
},
checkAll() {
this.checkedFields = this.tableColumns.map(c => c.prop);
},
invertCheck() {
const all = this.tableColumns.map(c => c.prop);
this.checkedFields = all.filter(p => !this.checkedFields.includes(p));
}
},
computed: {
showColumns() {
return this.tableColumns.filter(c => this.checkedFields.includes(c.prop));
}
},
mounted() {
this.checkedFields = this.tableColumns.filter(c => c.checked !== 0).map(c => c.prop);
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,470 @@
const MEMBER_STATISTICS_COMPREHENSIVE_QUERY_FORM = {
template: /*language=HTML*/ `
<el-card shadow="never">
<el-row class="query-row">
<el-col class="query-row-title">姓名/工号:</el-col>
<el-col class="query-row-content">
<el-select
clearable
v-model="pageForm.userIds"
filterable
remote
collapse-tags
placeholder="输入工号或者姓名查找"
:remote-method="queryUser"
@change="doSearch"
style="width: 100%"
multiple
>
<el-option v-for="o in userList" :label="o.username + '(' + o.loginname + ')'" :value="o.id"
:key="o.id"></el-option>
</el-select>
</el-col>
</el-row>
<el-row class="query-row">
<el-col class="query-row-title">性别:</el-col>
<el-col class="query-row-content">
<el-tag
:effect="pageForm.sexTypes.includes(item.name)?'dark':'plain'"
:key="item.code"
:type="item.name"
@click="tagClick('sexTypes',item.name)"
style="margin-right: 10px;cursor: pointer"
v-for="item in sexTypeOptions">
{{ item.name }}
</el-tag>
</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 userStateOptions"
:key="item.code"
:type="item.name"
:effect="pageForm.userStates.includes(item.name)?'dark':'plain'"
@click="tagClick('userStates',item.name)">
{{ item.name }}
</el-tag>
<el-link type="danger"
v-if="userStateOptions.length&&pageForm.userStates.length"
:underline="false"
@click="pageForm.userStates=[];doSearch()">清空
</el-link>
<el-link :underline="false"
@click="pageForm.userStates=userStateOptions.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 personTypeOptions"
:key="item.code"
:type="item.name"
:effect="pageForm.personTypes.includes(item.name)?'dark':'plain'"
@click="tagClick('personTypes',item.name)">
{{ item.name }}
</el-tag>
<el-link type="danger"
v-if="personTypeOptions.length&&pageForm.personTypes.length"
:underline="false"
@click="pageForm.personTypes=[];doSearch()">清空
</el-link>
<el-link :underline="false"
@click="pageForm.personTypes=personTypeOptions.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" v-if="false">
<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>
<el-col :span="12">
<span>所属工会:</span>
<el-select placeholder="所属工会" v-model="pageForm.unionId"
clearable multiple style="margin-left: 38px;width: 80%"
@change="flushUnits();doSearch()"
@clear="flushUnits();doSearch()"
filterable>
<el-option v-for="item in unions" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-col>
<el-col :span="12">
<span>所属单位:</span>
<el-select placeholder="所属单位" v-model="pageForm.unitId"
clearable multiple style="margin-left: 33px;width: 80%" filterable>
<el-option v-for="item in units" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-col>
</el-row>
</el-col>
</el-row>
<el-row class="query-row" type="flex" align="middle">
<el-col class="query-row-title">出生日期:</el-col>
<el-col class="query-row-content">
<el-date-picker
v-model="pageForm.startDate"
type="date"
@change="determineStartDate"
placeholder="选择开始日期">
</el-date-picker>
<el-date-picker
v-model="pageForm.endDate"
type="date"
@change="determineEndDate"
placeholder="选择结束日期">
</el-date-picker>
</el-col>
</el-row>
<el-row class="query-row" type="flex" align="middle">
<el-col class="query-row-title">年龄范围:</el-col>
<el-col class="query-row-content">
<el-row type="flex" style="align-items: center">
<el-col :span="15">
<el-slider
v-model="pageForm.age"
range
show-stops
:max="100">
</el-slider>
</el-col>
<el-col :span="9" class="pl20">
当前范围:{{ pageForm.age }}
</el-col>
</el-row>
</el-col>
</el-row>
<el-row type="flex" align="middle" class="query-row">
<el-col class="query-row-title">模糊查询:</el-col>
<el-col class="query-row-content">
<member-cnd @cnd="(v)=>pageForm={...pageForm,...v}"></member-cnd>
</el-col>
</el-row>
<el-row class="query-row" style="justify-content: end">
<el-checkbox v-model="pageForm.reverseSelection" label="是否反选" border
@change="doSearch"
class="reverseCheckBox"></el-checkbox>
<el-button type="danger" icon="el-icon-circle-close" @click="doReset">重置
</el-button>
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
</el-row>
</el-card>
`,
mixins: [initTableMixins],
store,
data() {
return {
userList: [],
pageForm: {
userIds: [],
isUnit: "",
isUnion: "",
unionId: [],
unitId: [],
unionGroupId: [],
threeUnitId: [],
searchName: "username",
personTypes: [],
preparedBys: [],
aidFundMemberUserTypes: [],
userAttributes: [],
userStates: [],
memberStatus: [],
year: moment().format("YYYY"),
roleIds: [],
age: [0, 0],
minAge: 0,
maxAge: 0,
module: "",
sexTypes: [],
reverseSelection: false,
activityUserCnd: "",
startDate: "",
endDate: ""
},
personTypeOptions: [],
preparedByOptions: [],
aidFundMemberUserTypeOptions: [],
userAttributeOptions: [],
userStateOptions: [],
memberStatusOptions: [],
unions: [],
units: [],
sexTypeOptions: [
{ code: "男", name: "男" },
{ code: "女", name: "女" }
],
pickerOptions: {
disabledDate: (time) => {
return time.getTime() > Date.now()
}
}
}
},
components: {
"member-cnd": httpVueLoader("/components/module/member/MemberCnd.vue?v=" + new Date().getTime())
},
methods: {
async queryUser(val) {
const resp = await $.get("/open/common/userOptions", {query: val})
this.userList = resp.data
},
determineEndDate() {
if (this.pageForm.startDate) {
if (Date.parse(this.pageForm.startDate) > Date.parse(this.pageForm.endDate)) {
this.pageForm.endDate = ""
this.$notify.warning("结束时间不能小于开始时间")
}
}
this.pageForm.endDate = this.pageForm.endDate.toLocaleDateString().replaceAll("/", "-")
},
determineStartDate() {
if (this.pageForm.endDate) {
if (Date.parse(this.pageForm.startDate) > Date.parse(this.pageForm.endDate)) {
this.pageForm.startDate = ""
this.$notify.warning("开始时间不能大于结束时间")
}
}
this.pageForm.startDate = this.pageForm.startDate.toLocaleDateString().replaceAll("/", "-")
},
tagClick(key, val) {
let idx = this.pageForm[key].indexOf(val)
if (idx !== -1) {
this.pageForm[key].splice(idx, 1)
} else {
this.pageForm[key].push(val)
}
this.doSearch()
},
/*checkPersonType(type) {
let idx = this.pageForm.personTypes.indexOf(type)
if (idx !== -1) {
this.pageForm.personTypes.splice(idx, 1)
} else {
this.pageForm.personTypes.push(type)
}
this.doSearch()
},*/
getDate(date) {
let year = date.getFullYear()
let month = date.getMonth() + 1
let day = date.getDate()
month = month >= 10 ? month : "0" + month
day = day >= 10 ? day : "0" + day
return year + "-" + month + "-" + day
},
checkUserStateType(state) {
let idx = this.pageForm.userStates.indexOf(state)
if (idx !== -1) {
this.pageForm.userStates.splice(idx, 1)
} else {
this.pageForm.userStates.push(state)
}
this.doSearch()
},
checkMemberStatusType(state) {
let idx = this.pageForm.memberStatus.indexOf(state)
if (idx !== -1) {
this.pageForm.memberStatus.splice(idx, 1)
} else {
this.pageForm.memberStatus.push(state)
}
this.doSearch()
},
doReset() {
this.pageForm.userIds = []
this.pageForm.memberTypes = []
this.pageForm.sexTypes = []
this.pageForm.personTypes = []
this.pageForm.preparedBys = []
this.pageForm.aidFundMemberUserTypes = []
this.pageForm.userAttributes = []
this.pageForm.memberStatus = []
this.pageForm.userStates = []
this.pageForm.unionId = []
this.pageForm.unitId = []
this.pageForm.activityGroupId = []
this.pageForm.threeUnitId = []
this.pageForm.module = ""
this.pageForm.teacherMeetingId = ""
this.pageForm.roleIds = []
this.pageForm.clubId = ""
this.pageForm.activityGroupId = ""
this.pageForm.activityUserCnd = ""
this.pageForm.age = [0, 0]
this.pageForm.reverseSelection = false
this.doSearch()
},
getMenuOptions() {
this.$axios.post("/platform/sys/role/getMenuOptions").then((resp) => {
if (resp.code === 0) {
this.menuOptions = resp.data
}
})
},
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)
}
this.$businessTool.getDictOptions("USER_PERSON_TYPE").then((data) => {
this.personTypeOptions = data
})
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
})
},
flushUnits() {
this.$set(this.pageForm, "unitId", null)
this.units = []
if (this.pageForm.unionId) {
this.$businessTool.listUnit(this.pageForm.unionId).then((data) => {
this.units = data
})
}
},
setPageFormParams(params) {
this.pageForm.isUnit = params.isUnit
this.pageForm.isUnion = params.isUnion
this.pageData()
},
doSearch() {
this.$emit('search', this.pageForm)
}
},
created() {
this.initData()
this.doSearch()
},
style: /*language=CSS*/ `
/deep/ .reverseCheckBox {
margin: 0 10px 0 0 !important;
}
/deep/ .query-row {
min-height: 60px;
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
}
/deep/ .query-row:not(:last-child) {
border-bottom: 1px dashed rgb(230, 230, 230);
}
/deep/ .query-row-title {
width: 120px;
}
/deep/ .query-row > .query-title {
width: 100px;
max-width: 100px;
min-width: 100px;
overflow: hidden;
}
/deep/ .query-row > .query-content {
min-width: 200px;
overflow: hidden;
}
/deep/ .query-row > .query-content > .el-tag {
margin-bottom: 5px;
margin-top: 5px;
}
/deep/ .query-row-tag {
padding: 10px 0;
}
/deep/ .query-row-content-tag {
display: flex;
flex-wrap: wrap; /* 标签自动换行 */
align-items: center;
gap: 4px 6px; /* 横纵向间距 */
}
`
}
@@ -0,0 +1,296 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
/* 人员类型统计页面固定占满平台内容区,避免页面本身产生纵向滚动条。 */
#app .person-type-statistics-layout {
display: flex;
flex-direction: column;
min-height: 0;
height: calc(100vh - 82px);
overflow: hidden;
}
#app .person-type-statistics-query-card {
flex: 0 0 auto;
}
/* 列表卡片使用剩余空间,数据超出时仅由 Element 表格内部滚动。 */
#app .person-type-statistics-list-card {
flex: 1 1 auto;
min-height: 0;
overflow: hidden;
}
#app .person-type-statistics-list-card > .el-card__body {
box-sizing: border-box;
display: flex;
flex-direction: column;
min-height: 0;
height: 100%;
overflow: hidden;
}
#app .person-type-statistics-list-card .ele-table-tool,
#app .person-type-statistics-list-card .el-pagination-container {
flex: 0 0 auto;
}
/* 固定高度表格使用纵向弹性布局,让数据区占满中间空间,合计行始终贴在列表底部。 */
#app .person-type-statistics-list-card .el-table {
display: flex;
flex-direction: column;
min-height: 0;
}
#app .person-type-statistics-list-card .el-table__header-wrapper,
#app .person-type-statistics-list-card .el-table__footer-wrapper {
flex: 0 0 auto;
}
#app .person-type-statistics-list-card .el-table__body-wrapper {
flex: 1 1 auto;
min-height: 0;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<div class="person-type-statistics-layout">
<el-card class="person-type-statistics-query-card" shadow="never">
<search @search="doSearch">
<search-item label="所属分工会" v-if="schoolAdmin">
<el-select v-model="pageForm.unionId" clearable filterable
placeholder="请选择所属分工会" style="width: 100%"
@change="handleUnionChange">
<el-option v-for="item in unions" :key="item.id"
:label="item.name" :value="item.id"></el-option>
</el-select>
</search-item>
<search-item label="所属单位" v-if="pageForm.queryType === 'unit'">
<el-select v-model="pageForm.unitId" clearable filterable
placeholder="请选择所属单位" style="width: 100%"
@change="doSearch">
<el-option v-for="item in units" :key="item.id"
:label="item.name" :value="item.id"></el-option>
</el-select>
</search-item>
<search-item v-if="schoolAdmin">
<el-radio-group v-model="pageForm.queryType" @change="handleQueryTypeChange">
<el-radio-button label="union">按分工会统计</el-radio-button>
<el-radio-button label="unit">按单位统计</el-radio-button>
</el-radio-group>
</search-item>
</search>
</el-card>
<el-card class="mt10 person-type-statistics-list-card" shadow="never">
<table-tool label="人员类型统计">
<el-button type="primary" icon="el-icon-download" @click="doExport">导出</el-button>
</table-tool>
<el-table v-loading="tableLoading" :data="tableData" :height="tableHeight"
border show-summary :summary-method="getSummaries"
ref="statisticsTableRef" style="width: 100%">
<el-table-column align="center" header-align="center" type="index" :index="indexMethod"
label="序号" width="80"></el-table-column>
<el-table-column v-if="pageForm.queryType === 'union'" align="center"
header-align="center" label="分工会" min-width="220">
<template slot-scope="{row}">
{{row.unionCode ? '' + row.unionCode + '' : ''}}{{row.unionName}}
</template>
</el-table-column>
<el-table-column v-else align="center" header-align="center"
label="单位" min-width="220">
<template slot-scope="{row}">
{{row.unitCode ? '' + row.unitCode + '' : ''}}{{row.unitName}}
</template>
</el-table-column>
<el-table-column v-if="schoolAdmin && pageForm.queryType === 'unit'"
align="center" header-align="center" label="所属分工会"
prop="unionName" min-width="180"></el-table-column>
<el-table-column align="center" header-align="center" label="小计"
prop="totalNum" min-width="100"></el-table-column>
<el-table-column v-for="item in personTypeOptions" :key="item.prop"
align="center" header-align="center" :label="item.name"
:prop="item.prop" min-width="120"></el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</div>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
pageForm: {
queryType: "union",
unionId: "",
unitId: ""
},
personTypeOptions: [],
summaryData: {},
schoolAdmin: false,
unions: [],
units: [],
tableHeight: 300,
tableResizeObserver: null,
pageRequestSequence: 0
}
},
methods: {
/** 查询后端统计结果,并使用后端返回的实际维度防止非校级用户越权切换。 */
pageData() {
// 翻页或重新查询时立即清空旧页并显示加载状态,避免用户误认为旧数据属于新页。
const requestSequence = ++this.pageRequestSequence
const requestData = Object.assign({}, this.pageForm)
this.tableData = []
this.tableLoading = true
this.$axios.post(loc() + "/pageData", requestData).then((resp) => {
// 快速切换分页时只接收最后一次请求,防止较慢的旧请求覆盖当前页。
if (requestSequence !== this.pageRequestSequence) {
return
}
if (resp.code === 0) {
const data = resp.data || {}
const pageData = data.pageData || {}
this.tableData = pageData.list || []
this.pageForm.totalCount = pageData.totalCount || 0
this.personTypeOptions = data.personTypeOptions || []
this.summaryData = data.summary || {}
this.schoolAdmin = data.schoolAdmin === true
this.pageForm.queryType = data.queryType || "unit"
// 动态列和合计数据返回后重新布局,确保合计行列宽对齐并固定在底部。
this.updateTableHeight()
} else {
this.$message.error(resp.msg)
}
}).finally(() => {
if (requestSequence === this.pageRequestSequence) {
this.tableLoading = false
}
})
},
/** 按列表卡片剩余空间计算表格高度,固定工具栏和分页并启用表格内部滚动。 */
updateTableHeight() {
this.$nextTick(() => {
const cardBody = this.$el.querySelector(".person-type-statistics-list-card > .el-card__body")
if (!cardBody || cardBody.clientHeight <= 0) {
return
}
const getOuterHeight = (element) => {
if (!element) {
return 0
}
const style = window.getComputedStyle(element)
return element.offsetHeight
+ (parseFloat(style.marginTop) || 0)
+ (parseFloat(style.marginBottom) || 0)
}
const bodyStyle = window.getComputedStyle(cardBody)
const bodyPadding = (parseFloat(bodyStyle.paddingTop) || 0)
+ (parseFloat(bodyStyle.paddingBottom) || 0)
const tableTool = cardBody.querySelector(".ele-table-tool")
const pagination = cardBody.querySelector(".el-pagination-container")
const reservedHeight = bodyPadding
+ getOuterHeight(tableTool)
+ getOuterHeight(pagination)
const nextHeight = Math.max(1, Math.floor(cardBody.clientHeight - reservedHeight))
if (this.tableHeight !== nextHeight) {
this.tableHeight = nextHeight
}
this.$nextTick(() => {
if (this.$refs.statisticsTableRef) {
this.$refs.statisticsTableRef.doLayout()
}
})
})
},
/** 切换分工会时清空单位,并重新加载该分工会下的单位选项。 */
handleUnionChange(unionId) {
this.pageForm.unitId = ""
this.loadUnits(unionId)
this.doSearch()
},
/** 切换统计维度后清空本地筛选并重新查询统计数据。 */
handleQueryTypeChange() {
this.pageForm.unionId = ""
this.pageForm.unitId = ""
this.loadUnits("")
this.doSearch()
},
/** 加载单位下拉选项,非校级用户只能加载当前所属工会的单位。 */
loadUnits(unionId) {
let targetUnionId = unionId
if (!this.schoolAdmin && this.$store.state.user.union) {
targetUnionId = this.$store.state.user.union.id
}
const unitPromise = targetUnionId
? this.$businessTool.listUnit(targetUnionId)
: this.$businessTool.listUnit()
unitPromise.then((data) => {
this.units = data || []
})
},
/** 初始化机构筛选数据。 */
initOrganizationOptions() {
this.$businessTool.listUnion().then((data) => {
this.unions = data || []
})
this.loadUnits("")
},
/** 使用后台返回的全量统计结果生成合计行,合计不受当前页数据影响。 */
getSummaries({columns}) {
return columns.map((column, index) => {
if (index === 0) {
return "合计"
}
if (!column.property) {
return ""
}
const value = this.summaryData[column.property]
return value === undefined || value === null ? "" : value
})
},
/** 按当前实际统计维度导出人员类型统计。 */
doExport() {
const params = $.param({
queryType: this.pageForm.queryType,
unionId: this.pageForm.unionId,
unitId: this.pageForm.unitId
})
window.open(loc() + "/doExport?" + params)
}
},
created() {
this.schoolAdmin = this.$auth.hasRoleOr([
"SYSADMIN",
"SCHOOL_UNION_ADMIN",
"SCHOOL_UNION_MEMBER_ADMIN"
])
if (!this.schoolAdmin) {
this.pageForm.queryType = "unit"
}
this.initOrganizationOptions()
this.pageData()
},
mounted() {
const listCardBody = this.$el.querySelector(".person-type-statistics-list-card > .el-card__body")
if (listCardBody && window.ResizeObserver) {
// 查询区换行或窗口尺寸变化时,重新分配表格内部滚动区域高度。
this.tableResizeObserver = new ResizeObserver(this.updateTableHeight)
this.tableResizeObserver.observe(listCardBody)
}
this.updateTableHeight()
window.addEventListener("resize", this.updateTableHeight)
},
beforeDestroy() {
if (this.tableResizeObserver) {
this.tableResizeObserver.disconnect()
this.tableResizeObserver = null
}
window.removeEventListener("resize", this.updateTableHeight)
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,285 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style> .query-row {
display: flex;
align-items: flex-start;
margin-bottom: 12px;
}
.query-row-title {
width: 120px;
min-width: 120px;
line-height: 32px;
}
.query-row-content {
flex: 1;
display: flex;
flex-wrap: wrap;
align-items: flex-start;
}
.query-row-content-tag {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
gap: 8px;
}
.query-tag-item {
margin-right: 0;
cursor: pointer;
}
.query-tag-actions {
display: inline-flex;
align-items: center;
gap: 10px;
line-height: 32px;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker
@change="doSearch"
style="width: 100%"
v-model="pageForm.currentYear"
value-format="yyyy"
:clearable="false"
type="year"
:picker-options="pickerOptions"
placeholder="请选择年度"
></el-date-picker>
</search-item>
<template v-if="pageForm.queryType == 'fgh'">
<search-item label="工会">
<el-select placeholder="分工会" v-model="pageForm.queryId" style="width: 100%" @change="doSearch" clearable filterable>
<el-option v-for="item in unions" :label="item.name" :value="item.id"></el-option>
</el-select>
</search-item>
</template>
<template v-else>
<search-item label="所属单位">
<el-select placeholder="请选择所属单位" v-model="pageForm.queryId" style="width: 100%" @change="doSearch" clearable filterable>
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</search-item>
</template>
<search-item>
<el-radio-group v-model="pageForm.queryType" @change="pageForm.queryId = '';doSearch()">
<el-radio-button label="fgh">按分工会统计</el-radio-button>
<el-radio-button label="unit">按单位统计</el-radio-button>
</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
class="query-tag-item"
v-for="item in personTypeOptions"
:key="item.code"
:effect="pageForm.personTypes.includes(item.name)?'dark':'plain'"
@click="tagClick('personTypes',item.name)">
{{ item.name }}
</el-tag>
<span class="query-tag-actions">
<el-link type="danger"
v-if="personTypeOptions.length&&pageForm.personTypes.length"
:underline="false"
@click="pageForm.personTypes=[];doSearch()">清空
</el-link>
<el-link :underline="false"
@click="pageForm.personTypes=personTypeOptions.map(p=>p.code);doSearch()"
type="success">全部
</el-link>
</span>
</el-col>
</el-row>
<el-row type="flex" align="middle" class="query-row query-row-tag" v-if="false">
<el-col class="query-row-title">人员分类:</el-col>
<el-col class="query-row-content query-row-content-tag">
<el-tag
class="query-tag-item"
v-for="item in aidFundMemberUserTypeOptions"
:key="item.code"
:effect="pageForm.aidFundMemberUserTypes.includes(item.code)?'dark':'plain'"
@click="tagClick('aidFundMemberUserTypes',item.code)">
{{ item.name }}
</el-tag>
<span class="query-tag-actions">
<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>
</span>
</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 class="query-tag-item"
v-for="item in userAttributeOptions"
:key="item.code"
:effect="pageForm.userAttributes.includes(item.code)?'dark':'plain'"
@click="tagClick('userAttributes',item.code)">
{{ item.name }}
</el-tag>
<span class="query-tag-actions">
<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>
</span>
</el-col>
</el-row>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="会员统计"></table-tool>
<el-table :data="tableData" show-summary>
<el-table-column
align="center"
header-align="center"
type="index"
:index="indexMethod"
label="序号"
width="80px"
></el-table-column>
<el-table-column v-if="pageForm.queryType=='fgh'" align="center" header-align="center" label="分工会" width="220px">
<template scope="{row}">{{row.unionCode ? ''+row.unionCode+'' : null }}{{row.unionName}}</template>
</el-table-column>
<el-table-column v-if="pageForm.queryType=='unit'" align="center" header-align="center" label="单位" width="220px">
<template scope="{row}">{{row.unitCode?''+row.unitCode+'' : null}}{{row.unitName}}</template>
</el-table-column>
<el-table-column prop="totalNumber" label="总人数" align="center" sortable></el-table-column>
<el-table-column prop="maleMember" label="男会员" align="center" sortable></el-table-column>
<el-table-column prop="femaleMember" label="女会员" align="center" sortable></el-table-column>
<el-table-column prop="smallForty" label="小于等于40岁会员" align="center" sortable></el-table-column>
<el-table-column prop="smallFifty" label="40-50" align="center" sortable></el-table-column>
<el-table-column prop="smallFiftyFive" label="50-55" align="center" sortable></el-table-column>
<el-table-column prop="smallFiftyFive2" label="大于55" align="center" sortable></el-table-column>
</el-table>
</el-card>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: "#app",
mixins: [initTableMixins],
store,
data: {
pickerOptions: {
disabledDate(time) {
return time.getFullYear() > new Date().getFullYear()
}
},
unions: [],
units: [],
personTypeOptions: [],
userAttributeOptions: [],
pageForm: {
currentYear: moment().format("YYYY"),
queryType: "fgh",
personTypes: [],
userAttributes: [],
aidFundMemberUserTypes: []
},
aidFundMemberUserTypeOptions: [],
},
methods: {
doExport() {},
initData() {
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
this.$businessTool.listUnion().then((data) => {
this.unions = data
})
this.$businessTool.listUnit().then((data) => {
this.units = data
})
} else {
this.$businessTool.listUnion(this.$store.state.user.union.id).then((data) => {
this.unions = data
})
this.$businessTool.listUnit(this.$store.state.user.union.id).then((data) => {
this.units = data
})
}
this.$businessTool.getDictOptions("USER_PERSON_TYPE").then((data) => {
this.personTypeOptions = data
})
this.$businessTool.getDictOptions("AIDFUND_MEMBER_USER_TYPE").then((data) => {
this.aidFundMemberUserTypeOptions = data
})
this.$businessTool.getDictOptions("USER_ATTRIBUTE").then((data) => {
this.userAttributeOptions = data
})
},
tagClick(key,code) {
if (key === "personTypes") {
if (this.pageForm.personTypes.includes(code)) {
this.pageForm.personTypes.splice(this.pageForm.personTypes.indexOf(code), 1)
} else {
this.pageForm.personTypes.push(code)
}
}
if (key === "userAttributes") {
if (this.pageForm.userAttributes.includes(code)) {
this.pageForm.userAttributes.splice(this.pageForm.userAttributes.indexOf(code), 1)
} else {
this.pageForm.userAttributes.push(code)
}
}
if (key === "aidFundMemberUserTypes") {
if (this.pageForm.aidFundMemberUserTypes.includes(code)) {
this.pageForm.aidFundMemberUserTypes.splice(this.pageForm.aidFundMemberUserTypes.indexOf(code), 1)
} else {
this.pageForm.aidFundMemberUserTypes.push(code)
}
}
this.doSearch()
},
pageData() {
const pageForm = clone(this.pageForm)
// 统计接口按 JSON 字符串接收多选条件,这里把人员分类和人员属性统一成同一提交口径。
pageForm.personTypes = JSON.stringify(this.pageForm.personTypes)
pageForm.aidFundMemberUserTypes = JSON.stringify(this.pageForm.aidFundMemberUserTypes)
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
}
})
}
},
created() {
this.initData()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,89 @@
const ADD_PROJECT_COMPONENT = {
template: `
<el-dialog title="名单核对事项" :visible.sync="dialogFormVisible" width="1000px" :close-on-click-modal="false">
<el-form :model="formData" ref="formRef" label-width="140px" :rules="formRules">
<el-form-item prop="projectName" label="事项名称">
<el-input v-model="formData.projectName" maxlength="100"></el-input>
</el-form-item>
<el-form-item prop="content" label="内容及要求">
<el-input v-model="formData.content" maxlength="500"
rows="3" type="textarea" show-word-limit></el-input>
</el-form-item>
<el-form-item prop="unionIds" label="推送分工会">
<el-transfer filterable :filter-method="filterMethod" :titles="['可选工会', '已选工会']"
filter-placeholder="请输入分工会名称" v-model="formData.unionIds"
:props="{key:'id',label:'name'}" :data="unionData">
</el-transfer>
</el-form-item>
<el-form-item prop="isNeedFeedback" label="是否需要反馈">
<el-radio-group v-model="formData.isNeedFeedback" size="small">
<el-radio :label="true" border>是</el-radio>
<el-radio :label="false" border>否</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="isNeedFeedbackFile" label="是否需要反馈附件">
<el-radio-group v-model="formData.isNeedFeedbackFile" size="small">
<el-radio :label="true" border>是</el-radio>
<el-radio :label="false" border>否</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button>
<el-button type="primary" @click="doSubmit">确 定</el-button>
</div>
</el-dialog>
`,
data() {
return {
dialogFormVisible: false,
formData: {
isNeedFeedback: true,
isNeedFeedbackFile: true,
unionIds: []
},
formRules: {
projectName: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
content: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
// unionIds: [{required: true, message: "必填", trigger: ["change", "blur"]}],
isNeedFeedback: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
isNeedFeedbackFile: [{ required: true, message: "必填", trigger: ["change", "blur"] }]
},
unionData: []
}
},
methods: {
onOpen() {
this.formData = {
userIds: [],
delegationId: null,
roleId: null
}
this.dialogFormVisible = true
},
filterMethod(query, item) {
return item.name.indexOf(query) > -1
},
async getAllUnions() {
this.unionData = await this.$businessTool.listUnion()
},
doSubmit() {
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$axios("/platform/member/branch/listVerification/insertOrUpdate", {
data: JSON.stringify(this.formData)
}).then((res) => {
if (res.code === 0) {
this.dialogFormVisible = false
this.$message.success(res.msg)
this.$emit("refresh")
}
})
}
})
}
},
created() {
this.getAllUnions()
}
}
@@ -0,0 +1,83 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="事项名称">
<el-input placeholder="请输入名单核对事项名称查询" clearable v-model="pageForm.searchKeyword"></el-input>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool>
<el-button size="small" type="primary" icon="el-icon-plus" @click="openAdd">新增</el-button>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" border size="small" header-align="center" style="width: 100%">
<el-table-column type="index" label="序号" :index="indexMethod"></el-table-column>
<el-table-column prop="projectName" label="事项名称" align="center"></el-table-column>
<el-table-column prop="content" label="事项内容及要求" align="center"></el-table-column>
<el-table-column prop="isNeedFeedback" label="是否需要反馈" align="center">
<template scope="{row}">
<span style="color: #00aa3a" v-if="row.isNeedFeedback == 1"></span>
<span style="color: #ac2925" v-else></span>
</template>
</el-table-column>
<el-table-column prop="isNeedFeedbackFile" label="是否需要反馈附件" align="center">
<template scope="{row}">
<span style="color: #00aa3a" v-if="row.isNeedFeedbackFile == 1"></span>
<span style="color: #ac2925" v-else></span>
</template>
</el-table-column>
<el-table-column prop="releaseDateTime" label="发布时间" align="center"></el-table-column>
<el-table-column prop="applyDate" label="创建时间" align="center"></el-table-column>
<el-table-column label="操作" width="200" align="center">
<template slot-scope="{row}">
<el-link size="mini" type="primary" @click="">查看</el-link>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<list-user ref="memberListUserRef" @refresh="doSearch"></list-user>
</template>
</guava>
<add-project ref="addProjectRef"></add-project>
</div>
<script nonce="${cspNonce!}">
<!--#include("listUser.js"){}#-->
<!--#include("addProject.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
components: {
"list-user": MEMBER_LIST_VERIFICATION_USER_COMPONENT,
"add-project": ADD_PROJECT_COMPONENT,
},
data() {
return {
}
},
methods: {
openAdd() {
this.$refs.addProjectRef.dialogFormVisible = true
}
},
created(){
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,70 @@
const MEMBER_LIST_VERIFICATION_USER_COMPONENT = {
template: `
<div>
<select @search="doSearch">
<search-item label="测试">
<el-input placeholder="测试" clearable v-model="pageForm.searchKeyword"></el-input>
</search-item>
</select>
<el-table ref="listTable" :data="tableData" @selection-change="doSelectChange"
class="vi-table" row-key="id" style="width: 100%" border>
<el-table-column :reserve-selection="true" type="selection" align="center"></el-table-column>
<el-table-column type="index" label="序号" :index="indexMethod" align="center" width="80px"></el-table-column>
<el-table-column :prop="column.prop" :width="column.width"
align="center" header-align="center"
min-width="100px" show-overflow-tooltip
v-for="column in tableColumns">
<template slot="header" scope="{row}">
<el-checkbox @change="change($event, column.prop)">{{ column.label }}</el-checkbox>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</div>
`,
mixins: [initTableMixins],
dicts: ["ALLOW_FIELD_CHANGES"],
data() {
return {
tableColumns: [],
selectUser: [],
renewFields: []
}
},
methods: {
doRowClick(val) {
console.log(val)
},
change(flag, prop) {
if (flag) {
this.renewFields.push(prop)
} else {
this.renewFields.splice(this.renewFields.indexOf(prop), 1)
}
},
doSelectChange(val) {
this.selectUser = val
},
initTableColumns() {
this.tableColumns = []
this.dict.type.ALLOW_FIELD_CHANGES.forEach((item) => {
this.tableColumns.push({ prop: item.code, label: item.name })
})
},
pageData() {
this.$axios.post("/platform/member/branch/listVerification/getUserPageData", this.pageForm).then((res) => {
if (res.code === 0) {
this.tableData = res.data.list
this.pageForm.totalCount = res.data.totalCount
}
})
}
},
created() {
this.pageData()
setTimeout(() => {
this.initTableColumns()
}, 1000)
}
}