first commit
This commit is contained in:
+223
@@ -0,0 +1,223 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="入会分工会审核" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-sticky>
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
show-action
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
@search="doSearch">
|
||||
<template #action>
|
||||
<div @click="doSearch">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="auditList" @change="doSearch" v-model="pageForm.audit"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/member/apply/branchUnionApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="doSearch">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="工号">{{row.loginName}}</table-column>
|
||||
<table-column label="所属工会">{{row.unionName}}</table-column>
|
||||
<table-column label="工作单位">{{row.unitName}}</table-column>
|
||||
<table-column label="填报时间">{{row.applyDateTime}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
|
||||
<i class="fa fa-check"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<info ref="infoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.taskName}}</div>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.tf_opinion"
|
||||
name="tf_opinion"
|
||||
label="审批意见"
|
||||
placeholder="请输入审批意见"
|
||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction(2)">拒绝</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</info>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
unionId: "",
|
||||
unitId: "",
|
||||
audit: false
|
||||
},
|
||||
unitList: [],
|
||||
auditList: [
|
||||
{ text: "已审核", value: true },
|
||||
{ text: "未审核", value: false }
|
||||
],
|
||||
|
||||
// 审核相关
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"info": INFO
|
||||
},
|
||||
methods: {
|
||||
historyBack,
|
||||
|
||||
onReady() {
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
|
||||
// 查看详情
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
},
|
||||
|
||||
onApproval(row) {
|
||||
this.showApprovalForm = true
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
const loading = this.$toast.loading({
|
||||
message: "加载中...",
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.infoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 撤回
|
||||
onRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要撤回吗?',
|
||||
}).then(() => {
|
||||
const loading = this.$toast.loading({
|
||||
message: "加载中...",
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
this.$axios.post('/flow/common/revokeTask', {taskId: row.taskId}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('撤回成功');
|
||||
this.doSearch();
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
initUnion() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? null : this.$store.state.user.union.id
|
||||
this.$businessTool.listUnion(unionId).then((data) => {
|
||||
this.unionList = data
|
||||
this.unionList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (hasAdmin) {
|
||||
this.unionList.unshift({ text: "全部工会", value: null })
|
||||
}
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
})
|
||||
},
|
||||
flushUnits() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
|
||||
this.$businessTool.listUnit(unionId).then((data) => {
|
||||
this.unitList = data
|
||||
this.unitList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.unitList.unshift({ text: "全部单位", value: null })
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,174 @@
|
||||
const INFO = {
|
||||
template: /*language=HTML*/ `
|
||||
<van-action-sheet v-model="visible" title="查看详情">
|
||||
<div class="detail-container">
|
||||
<van-cell-group title="基本信息">
|
||||
<van-cell title="工号">{{ viewData.loginname }}</van-cell>
|
||||
<van-cell title="姓名">{{ viewData.username }}</van-cell>
|
||||
<van-cell title="性别">{{ viewData.sex }}</van-cell>
|
||||
|
||||
<van-cell title="民族">{{ viewData.nation }}</van-cell>
|
||||
<van-cell title="出生日期">{{ $moment(viewData.birthday).format("YYYY年MM月DD日") }}</van-cell>
|
||||
<van-cell title="政治面貌">{{ viewData.political }}</van-cell>
|
||||
|
||||
<van-cell title="学历">{{ viewData.education }}</van-cell>
|
||||
<van-cell title="学位">{{ viewData.academicDegree }}</van-cell>
|
||||
<van-cell title="党政职务">{{ viewData.position }}</van-cell>
|
||||
|
||||
<van-cell title="工作单位">{{ viewData.unitName }}</van-cell>
|
||||
<van-cell title="所属工会">{{ viewData.unionName }}</van-cell>
|
||||
|
||||
<van-cell title="身份证号码">{{ viewData.idCard }}</van-cell>
|
||||
<van-cell title="联系电话">{{ viewData.mobile }}</van-cell>
|
||||
<van-cell title="入职时间">{{ viewData.arrivalAtSchoolDate }}</van-cell>
|
||||
|
||||
<van-cell title="在职状态">{{ viewData.userState }}</van-cell>
|
||||
<van-cell title="婚姻状况">{{ viewData.marriage || '暂无' }}</van-cell>
|
||||
<van-cell title="家庭住址">
|
||||
<template #label>
|
||||
<div style="white-space: pre-line">
|
||||
{{viewData.homeAddress}}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</van-cell>
|
||||
|
||||
<template v-if="viewData.loginname === $store.state.user.loginnmae">
|
||||
</template>
|
||||
<van-cell title="家庭成员" class="column-cell">
|
||||
<table class="family-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="table-header">序号</th>
|
||||
<th class="table-header">与本人关系</th>
|
||||
<th class="table-header">姓名</th>
|
||||
<th class="table-header">单位</th>
|
||||
<th class="table-header">备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="table-row" v-for="(item, index) in viewData.families" :key="index">
|
||||
<td class="table-cell">{{ index + 1 }}</td>
|
||||
<td class="table-cell">{{ item.relation }}</td>
|
||||
<td class="table-cell">{{ item.name }}</td>
|
||||
<td class="table-cell">{{ item.unit }}</td>
|
||||
<td class="table-cell">{{ item.remark }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</van-cell>
|
||||
|
||||
<van-cell title="个人学习及工作经历">
|
||||
<template #label>
|
||||
<div v-if="viewData.personalData" class="text-left" v-html="viewData.personalData"></div>
|
||||
<span style="font-size: 14px" v-else>无数据</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
|
||||
<van-cell title="特长及获奖情况">
|
||||
<template #label>
|
||||
<div v-if="viewData.specialty" class="text-left" v-html="viewData.specialty"></div>
|
||||
<span style="font-size: 14px" v-else>无数据</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<template v-for="task in doneTasks">
|
||||
<van-cell-group :title="task.displayName" v-if="task.ext.isFirstTaskNode">
|
||||
<van-cell title="申请用户">{{ task.ext.initiatorName }}({{task.ext.initiatorAccount}})
|
||||
</van-cell>
|
||||
<van-cell title="申请时间">{{ task.finishTime }}</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group :title="task.displayName" v-else>
|
||||
<van-cell title="办理用户">{{ task.taskFormData.userName }}({{task.taskFormData.loginName}})
|
||||
</van-cell>
|
||||
<van-cell title="办理时间">{{ task.finishTime }}</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="task.ext.caseFilingResult"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode" class="direction-column-cell">
|
||||
<div v-html="task.taskFormData.tf_opinion"></div>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
</div>
|
||||
<slot></slot>
|
||||
</van-action-sheet>
|
||||
`,
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
row: {},
|
||||
viewData: {},
|
||||
doneTasks: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
this.info()
|
||||
this.getDoneTasks()
|
||||
},
|
||||
|
||||
// 关闭
|
||||
onClose(){
|
||||
this.visible = false
|
||||
},
|
||||
|
||||
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
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.column-cell {
|
||||
flex-direction: column;
|
||||
}
|
||||
.family-table {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
border-collapse: collapse;
|
||||
table-layout: auto;
|
||||
text-align: center;
|
||||
font-family: 'Arial', sans-serif;
|
||||
margin: 20px 0;
|
||||
}
|
||||
.table-header {
|
||||
background-color: gray;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.table-row {
|
||||
background-color: #f9f9f9;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
.table-row:hover {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
.table-cell {
|
||||
padding: 10px 20px;
|
||||
border: 1px solid #ddd;
|
||||
text-align: center;
|
||||
}
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,189 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="入会填报记录" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
show-action
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
@search="doSearch">
|
||||
<template #action>
|
||||
<div @click="doSearch">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
<van-dropdown-menu
|
||||
v-if="$auth.hasRoleOr('SYSADMIN,SCHOOL_UNION_ADMIN,BRANCH_UNION_CHAIRMAN')"
|
||||
:close-on-click-outside="false"
|
||||
:close-on-click-overlay="false"
|
||||
>
|
||||
<van-dropdown-item :options="unionList" @change="unionChange" v-model="pageForm.unionId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
|
||||
<table-list api="/platform/member/apply/mine/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="doSearch">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="工号">{{row.loginName}}</table-column>
|
||||
<table-column label="所属工会">{{row.unionName}}</table-column>
|
||||
<table-column label="工作单位">{{row.unitName}}</table-column>
|
||||
<table-column label="填报时间">{{row.applyDateTime}}</table-column>
|
||||
<table-column label="当前节点">{{row.taskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskKey === 'startTask' || !row.instanceId"
|
||||
@click="onEdit(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>编辑</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.taskKey === 'startTask' || !row.instanceId"
|
||||
@click="onDelete(row.id)">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<info ref="infoRef"></info>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
unionId: "",
|
||||
unitId: ""
|
||||
},
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"info": INFO
|
||||
},
|
||||
methods: {
|
||||
historyBack,
|
||||
|
||||
onView(row) {
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
},
|
||||
|
||||
onEdit(row) {
|
||||
this.$pjaxReplace('/platform/member/apply/submit/h5?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
|
||||
},
|
||||
|
||||
onRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤销吗?",
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消"
|
||||
}).then(() => {
|
||||
const loading = this.$toast.loading({
|
||||
message: "加载中...",
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((resp) => {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onDelete(id) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要删除吗?",
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消"
|
||||
}).then(() => {
|
||||
const loading = this.$toast.loading({
|
||||
message: "加载中...",
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
this.$axios.post("/platform/member/apply/mine/onDelete", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doSearch()
|
||||
this.$toast.success(res.msg)
|
||||
} else {
|
||||
this.$toast.fail(res.msg)
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
},
|
||||
unionChange() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.flushUnits()
|
||||
this.doSearch()
|
||||
},
|
||||
async initUnion() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? null : this.$store.state.user.union.id
|
||||
this.unionList = await this.$businessTool.listUnion(unionId)
|
||||
this.unionList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (hasAdmin) {
|
||||
this.unionList.unshift({ text: "全部工会", value: null })
|
||||
}
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
|
||||
this.unitList = await this.$businessTool.listUnit(unionId)
|
||||
this.unitList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
this.unitList.unshift({ text: "全部单位", value: null })
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+223
@@ -0,0 +1,223 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="入会校工会审核" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-sticky>
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
show-action
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
@search="doSearch">
|
||||
<template #action>
|
||||
<div @click="doSearch">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="auditList" @change="doSearch" v-model="pageForm.audit"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/member/apply/schoolUnionApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="doSearch">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="工号">{{row.loginName}}</table-column>
|
||||
<table-column label="所属工会">{{row.unionName}}</table-column>
|
||||
<table-column label="工作单位">{{row.unitName}}</table-column>
|
||||
<table-column label="填报时间">{{row.applyDateTime}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
|
||||
<i class="fa fa-check"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<info ref="infoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.taskName}}</div>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.tf_opinion"
|
||||
name="tf_opinion"
|
||||
label="审批意见"
|
||||
placeholder="请输入审批意见"
|
||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction(2)">拒绝</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</info>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
unionId: "",
|
||||
unitId: "",
|
||||
audit: false
|
||||
},
|
||||
unitList: [],
|
||||
auditList: [
|
||||
{ text: "已审核", value: true },
|
||||
{ text: "未审核", value: false }
|
||||
],
|
||||
|
||||
// 审核相关
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"info": INFO
|
||||
},
|
||||
methods: {
|
||||
historyBack,
|
||||
|
||||
onReady() {
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
|
||||
// 查看详情
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
},
|
||||
|
||||
onApproval(row) {
|
||||
this.showApprovalForm = true
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
const loading = this.$toast.loading({
|
||||
message: "加载中...",
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.infoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 撤回
|
||||
onRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要撤回吗?',
|
||||
}).then(() => {
|
||||
const loading = this.$toast.loading({
|
||||
message: "加载中...",
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
this.$axios.post('/flow/common/revokeTask', {taskId: row.taskId}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('撤回成功');
|
||||
this.doSearch();
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
initUnion() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? null : this.$store.state.user.union.id
|
||||
this.$businessTool.listUnion(unionId).then((data) => {
|
||||
this.unionList = data
|
||||
this.unionList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (hasAdmin) {
|
||||
this.unionList.unshift({ text: "全部工会", value: null })
|
||||
}
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
})
|
||||
},
|
||||
flushUnits() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
|
||||
this.$businessTool.listUnit(unionId).then((data) => {
|
||||
this.unitList = data
|
||||
this.unitList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.unitList.unshift({ text: "全部单位", value: null })
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,605 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<style>
|
||||
.up_down > .van-cell {
|
||||
flex-flow: column;
|
||||
}
|
||||
|
||||
.up_down > .van-cell > .van-field__label {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.van-cell, .van-picker button, .submit .van-button--normal {
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="入会申请" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
|
||||
<van-form ref="formRef" class="form-container" :show-error-message="false">
|
||||
<van-cell-group title="基础信息" class="form-section">
|
||||
<van-field v-model="formData.loginname" label="工号" readonly></van-field>
|
||||
<van-field v-model="formData.username" label="姓名" readonly></van-field>
|
||||
<van-field v-model="formData.sex" label="性别" readonly></van-field>
|
||||
<van-field
|
||||
v-model="formData.nation"
|
||||
name="nation"
|
||||
label="民族"
|
||||
readonly
|
||||
placeholder="请点击选择民族"
|
||||
@click="showNationPicker = true"
|
||||
clickable
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showNationPicker">
|
||||
<van-picker show-toolbar
|
||||
:columns="nationColumns"
|
||||
@cancel="showNationPicker = false"
|
||||
@confirm="(v)=>{formData.nation = v;showNationPicker = false}"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
<van-field
|
||||
v-model="formData.birthday"
|
||||
label="出生年月"
|
||||
is-link
|
||||
readonly
|
||||
@click="showDatePicker = true"
|
||||
:rules="[{ required: true, message: '请填写出生年月' }]"
|
||||
></van-field>
|
||||
<van-popup v-model="showDatePicker" position="bottom">
|
||||
<van-datetime-picker
|
||||
type="date"
|
||||
:min-date="new Date(1900, 0, 1)"
|
||||
:max-date="new Date()"
|
||||
@confirm="onDateConfirm"
|
||||
@cancel="showDatePicker=false"
|
||||
></van-datetime-picker>
|
||||
</van-popup>
|
||||
<van-field
|
||||
v-model="formData.political"
|
||||
name="nation"
|
||||
label="政治面貌"
|
||||
readonly
|
||||
is-link
|
||||
placeholder="请选择政治面貌"
|
||||
@click="showPoliticalPicker = true"
|
||||
clickable
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showPoliticalPicker">
|
||||
<van-picker show-toolbar
|
||||
:columns="politicalColumns"
|
||||
@cancel="showPoliticalPicker = false"
|
||||
@confirm="(v)=>{formData.political = v;showPoliticalPicker = false}"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
<van-field
|
||||
v-model="formData.education"
|
||||
name="education"
|
||||
label="学历"
|
||||
readonly
|
||||
is-link
|
||||
placeholder="请选择学历"
|
||||
@click="showEducationPicker = true"
|
||||
clickable
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showEducationPicker">
|
||||
<van-picker show-toolbar
|
||||
:columns="educationColumns"
|
||||
@cancel="showEducationPicker = false"
|
||||
@confirm="(v)=>{formData.education = v;showEducationPicker = false}"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
<van-field
|
||||
v-model="formData.academicDegree"
|
||||
name="academicDegree"
|
||||
label="学位"
|
||||
readonly
|
||||
is-link
|
||||
placeholder="请选择学位"
|
||||
@click="showAcademicDegreePicker = true"
|
||||
clickable
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showAcademicDegreePicker">
|
||||
<van-picker show-toolbar
|
||||
:columns="academicDegreeColumns"
|
||||
@cancel="showAcademicDegreePicker = false"
|
||||
@confirm="(v)=>{formData.academicDegree = v;showAcademicDegreePicker = false}"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
<van-field
|
||||
v-model="formData.position"
|
||||
name="position"
|
||||
label="党政职务"
|
||||
placeholder="请输入党政职务"
|
||||
clearable
|
||||
maxlength="30"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.unitName" label="工作单位" readonly></van-field>
|
||||
<van-field v-model="formData.unionName" label="所属工会" readonly></van-field>
|
||||
|
||||
<!--<van-field
|
||||
v-model="formData.campusName"
|
||||
name="campusName"
|
||||
label="所属校区"
|
||||
readonly
|
||||
placeholder="请选择所属校区"
|
||||
@click="showCampusPicker = true"
|
||||
clickable
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showCampusPicker">
|
||||
<van-picker :columns="campusColumns" @cancel="showCampusPicker = false" @confirm="onCampusColumns" show-toolbar></van-picker>
|
||||
</van-popup>-->
|
||||
|
||||
<!--<van-field
|
||||
v-model="formData.userState"
|
||||
name="userState"
|
||||
label="在职状态"
|
||||
readonly
|
||||
placeholder="请填写在职状态"
|
||||
clickable
|
||||
></van-field>-->
|
||||
<van-field
|
||||
v-model="formData.personType"
|
||||
name="personType"
|
||||
label="人员类型"
|
||||
readonly
|
||||
placeholder="请填写人员类型"
|
||||
clickable
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.marriage"
|
||||
name="marriage"
|
||||
label="婚姻状况"
|
||||
readonly
|
||||
is-link
|
||||
placeholder="请选择婚姻状况"
|
||||
@click="showMarriagePicker = true"
|
||||
clickable
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showMarriagePicker">
|
||||
<van-picker show-toolbar
|
||||
:columns="marriageColumns"
|
||||
@cancel="showMarriagePicker = false"
|
||||
@confirm="(v)=>{formData.marriage = v;showMarriagePicker = false}"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
v-model="formData.idCard"
|
||||
disabled
|
||||
name="idCard"
|
||||
label="身份证号"
|
||||
placeholder="请输入身份证件号"
|
||||
clearable
|
||||
maxlength="18"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.mobile"
|
||||
disabled
|
||||
name="mobile"
|
||||
label="联系电话"
|
||||
placeholder="请输入联系电话"
|
||||
clearable
|
||||
type="tel"
|
||||
maxlength="11"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.arrivalAtSchoolDate"
|
||||
disabled
|
||||
name="arrivalAtSchoolDate"
|
||||
label="入职时间"
|
||||
placeholder="暂无"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.homeAddress"
|
||||
name="homeAddress"
|
||||
:rules="[{ required: true }]"
|
||||
label="家庭住址"
|
||||
required
|
||||
rows="2"
|
||||
autosize
|
||||
type="textarea"
|
||||
maxlength="80"
|
||||
placeholder="请输入家庭住址"
|
||||
></van-field>
|
||||
<!--<van-field
|
||||
v-model="formData.email"
|
||||
name="email"
|
||||
label="电子邮箱"
|
||||
placeholder="请输入电子邮箱"
|
||||
clearable
|
||||
maxlength="25"
|
||||
></van-field>-->
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="家庭信息" class="form-section up_down">
|
||||
<div class="van-cell">
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="display: flex;">
|
||||
<div style="width: 100%">
|
||||
<span>家庭主要成员及联系方式</span>
|
||||
</div>
|
||||
</div>
|
||||
<van-button v-if="formData.families && formData.families.length>0 && formData.families.length<5"
|
||||
style="width: 40px"
|
||||
icon="plus" type="primary" round size="mini"
|
||||
@click="formData.families.push({})"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
<template v-if="formData.families && formData.families.length>0">
|
||||
<div v-for="o,i in formData.families" class="mt5">
|
||||
<div style="font-weight: 700;display: flex;justify-content: space-between">
|
||||
<span>成员{{toChinesNum(i+1)}}</span>
|
||||
<van-button style="width: 40px"
|
||||
icon="cross" type="danger" round size="mini"
|
||||
@click="formData.families.splice(i,1)"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
<van-field label="关系" v-model="o.relation" placeholder="请填写与本人关系"
|
||||
:rules="[{ required:true, message: '请填写与本人关系' }]"></van-field>
|
||||
<van-field label="姓名" v-model="o.name" placeholder="请填写姓名"
|
||||
:rules="[{ required:true, message: '请填写姓名' }]"></van-field>
|
||||
<van-field label="工作单位" v-model="o.unit" placeholder="请填写工作单位"
|
||||
:rules="[{ required:true, message: '请填写工作单位' }]"></van-field>
|
||||
<van-field label="备注" v-model="o.remark" placeholder="请填写备注"
|
||||
:rules="[{ required:true, message: '请填写备注' }]"></van-field>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div style="padding: 50px;text-align: center">
|
||||
<van-button style="width: 50px"
|
||||
icon="plus" type="primary" round size="mini"
|
||||
@click="formData.families.push({})"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="个人学习及工作经历" class="form-section">
|
||||
<text-editor v-model="formData.personalData"></text-editor>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="特长及获奖情况" class="form-section">
|
||||
<text-editor v-model="formData.specialty"></text-editor>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="入会意愿" class="form-section">
|
||||
<van-checkbox style="font-size: 17px;padding: 12px" icon-size="24px"
|
||||
v-model="formData.isVoluntary" shape="square">
|
||||
<div style="text-indent: 2.1rem">
|
||||
<span :style="'color:' + (formData.isVoluntary ? '#1989fa' : '#F56C6C') ">
|
||||
我自愿申请加入学校工会,并委托学校按规定代为扣缴工会会员会费。
|
||||
</span>
|
||||
</div>
|
||||
<div style="text-indent: 2.1rem">
|
||||
<span :style="'color:' + (formData.isVoluntary ? '#1989fa' : '#F56C6C') ">
|
||||
我将严格遵守工会章程,认真执行工会决议,积极参与工会活动,主动融入“学校健康幸福家”建设,为营造温暖、和谐、奋进的校园氛围贡献力量,以实际行动助力学校各项事业发展。
|
||||
</span>
|
||||
</div>
|
||||
</van-checkbox>
|
||||
</van-cell-group>
|
||||
<div v-if="showActionButtons" style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button block type="primary" @click.submit="onSave">保存</van-button>
|
||||
<van-button v-if="!taskId" block type="primary" @click.submit="onSubmit">提交</van-button>
|
||||
<van-button v-else block type="primary" @click.submit="onFinishTask">提交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: ["USER_NATION", "USER_POLITICAL", "USER_EDUCATION", "USER_ACADEMIC_DEGREE", "USER_CAMPUS", "USER_MARRIAGE"],
|
||||
data() {
|
||||
return {
|
||||
id: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
// 当前登录人已是会员时,不显示保存和提交按钮。
|
||||
showActionButtons: true,
|
||||
formData: {
|
||||
families: []
|
||||
},
|
||||
// 民族
|
||||
showNationPicker: false,
|
||||
// 政治面貌
|
||||
showPoliticalPicker: false,
|
||||
// 学历
|
||||
showEducationPicker: false,
|
||||
// 学位
|
||||
showAcademicDegreePicker: false,
|
||||
// 校区
|
||||
showCampusPicker: false,
|
||||
campusColumns: [],
|
||||
// 生日
|
||||
showDatePicker: false,
|
||||
|
||||
showMarriagePicker: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
historyBack,
|
||||
|
||||
onSave() {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要保存吗?",
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消"
|
||||
}).then(() => {
|
||||
const loading = this.$toast.loading({
|
||||
message: "加载中...",
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
this.$axios.post("/platform/member/apply/submit/save", { data: JSON.stringify(this.formData) }).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.$pjaxReplace("/platform/member/apply/mine/h5")
|
||||
} else {
|
||||
this.$toast.fail("操作失败")
|
||||
console.log(res.msg)
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
if (!this.formData.personalData) {
|
||||
this.$toast.fail("请填写个人学习及工作经历")
|
||||
return
|
||||
}
|
||||
if (!this.formData.specialty) {
|
||||
this.$toast.fail("请填写特长及获奖情况")
|
||||
return
|
||||
}
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
const loading = this.$toast.loading({
|
||||
message: "加载中...",
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
this.$axios.post("/platform/member/apply/submit/submit", {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.$pjaxReplace("/platform/member/apply/mine/h5")
|
||||
} else {
|
||||
this.$toast.fail("操作失败")
|
||||
console.log(res.msg)
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onFinishTask() {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
if (!this.formData.personalData) {
|
||||
this.$toast.fail("请填写个人学习及工作经历")
|
||||
return
|
||||
}
|
||||
if (!this.formData.specialty) {
|
||||
this.$toast.fail("请填写特长及获奖情况")
|
||||
return
|
||||
}
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
const loading = this.$toast.loading({
|
||||
message: "加载中...",
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
this.$axios.post("/platform/member/apply/submit/submitAgain", {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: this.taskId
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.$pjaxReplace("/platform/member/apply/mine/h5")
|
||||
} else {
|
||||
this.$toast.fail("操作失败")
|
||||
console.log(res.msg)
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onDateConfirm(value) {
|
||||
this.formData.birthday = value
|
||||
this.showDatePicker = false
|
||||
},
|
||||
|
||||
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,
|
||||
position,
|
||||
unitId,
|
||||
unitName,
|
||||
unit,
|
||||
unionId,
|
||||
unionName,
|
||||
union,
|
||||
campus,
|
||||
userState,
|
||||
personType,
|
||||
preparedBy,
|
||||
idCard,
|
||||
mobile,
|
||||
email,
|
||||
families,
|
||||
arrivalAtSchoolDate,
|
||||
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.$moment(birthday).format("YYYY-MM-DD") : "")
|
||||
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 ? 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"))
|
||||
|
||||
// 处理校区信息
|
||||
if (campus) {
|
||||
this.$set(this.formData, "campus", campus) // 保存校区代码值
|
||||
// 根据校区代码值查找对应的名称
|
||||
if (this.campusColumns && this.campusColumns.length > 0) {
|
||||
const campusItem = this.campusColumns.find(item => item.value === campus)
|
||||
if (campusItem) {
|
||||
this.$set(this.formData, "campusName", campusItem.text)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$set(this.formData, "campus", "")
|
||||
this.$set(this.formData, "campusName", "")
|
||||
}
|
||||
}
|
||||
},
|
||||
toChinesNum(num) {
|
||||
let changeNum = ["零", "一", "二", "三", "四", "五", "六", "七", "八", "九"]
|
||||
let unit = ["", "十", "百", "千", "万"]
|
||||
num = parseInt(num)
|
||||
let getWan = (temp) => {
|
||||
let strArr = temp.toString().split("").reverse()
|
||||
let newNum = ""
|
||||
for (let i = 0; i < strArr.length; i++) {
|
||||
newNum = (i == 0 && strArr[i] == 0 ? "" : (i > 0 && strArr[i] == 0 && strArr[i - 1] == 0 ? "" : changeNum[strArr[i]] + (strArr[i] == 0 ? unit[0] : unit[i]))) + newNum
|
||||
}
|
||||
return newNum
|
||||
}
|
||||
let overWan = Math.floor(num / 10000)
|
||||
let noWan = num % 10000
|
||||
if (noWan.toString().length < 4) {
|
||||
noWan = "0" + noWan
|
||||
}
|
||||
return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num)
|
||||
},
|
||||
onCampusColumns(o) {
|
||||
this.$set(this.formData, "campusName", o.text) // 显示名称
|
||||
this.$set(this.formData, "campus", o.value) // 字典值
|
||||
this.showCampusPicker = false
|
||||
},
|
||||
async initDictOptions() {
|
||||
// 初始化校区字典数据
|
||||
const campusData = await this.$businessTool.getDictOptions("USER_CAMPUS")
|
||||
this.campusColumns = campusData.map(item => {
|
||||
return { value: item.code, text: item.name }
|
||||
})
|
||||
// 初始化完成后,如果已经有用户数据,更新校区显示名称
|
||||
if (this.formData.campus && this.campusColumns.length > 0) {
|
||||
const campusItem = this.campusColumns.find(item => item.value === this.formData.campus)
|
||||
if (campusItem) {
|
||||
this.$set(this.formData, "campusName", campusItem.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
nationColumns() {
|
||||
if (this.dict && this.dict.type && this.dict.type.USER_NATION) {
|
||||
return this.dict.type.USER_NATION.map(v => v.name)
|
||||
}
|
||||
return []
|
||||
},
|
||||
politicalColumns() {
|
||||
if (this.dict && this.dict.type && this.dict.type.USER_POLITICAL) {
|
||||
return this.dict.type.USER_POLITICAL.map(v => v.name)
|
||||
}
|
||||
return []
|
||||
},
|
||||
educationColumns() {
|
||||
if (this.dict && this.dict.type && this.dict.type.USER_EDUCATION) {
|
||||
return this.dict.type.USER_EDUCATION.map(v => v.name)
|
||||
}
|
||||
return []
|
||||
},
|
||||
academicDegreeColumns() {
|
||||
if (this.dict && this.dict.type && this.dict.type.USER_ACADEMIC_DEGREE) {
|
||||
return this.dict.type.USER_ACADEMIC_DEGREE.map(v => v.name)
|
||||
}
|
||||
return []
|
||||
},
|
||||
marriageColumns() {
|
||||
if (this.dict && this.dict.type && this.dict.type.USER_MARRIAGE) {
|
||||
return this.dict.type.USER_MARRIAGE.map(v => v.name)
|
||||
}
|
||||
return []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initDictOptions()
|
||||
this.init()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
|
||||
+224
@@ -0,0 +1,224 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="入会校工会审核" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-sticky>
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
show-action
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
@search="doSearch">
|
||||
<template #action>
|
||||
<div @click="doSearch">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="auditList" @change="doSearch" v-model="pageForm.audit"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/member/apply/unionGroupApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="doSearch">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="工号">{{row.loginName}}</table-column>
|
||||
<table-column label="所属工会">{{row.unionName}}</table-column>
|
||||
<table-column label="工作单位">{{row.unitName}}</table-column>
|
||||
<table-column label="填报时间">{{row.applyDateTime}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
|
||||
<i class="fa fa-check"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<info ref="infoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.taskName}}</div>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.tf_opinion"
|
||||
name="tf_opinion"
|
||||
label="审批意见"
|
||||
placeholder="请输入审批意见"
|
||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction(2)">拒绝</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</info>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
unionId: "",
|
||||
unitId: "",
|
||||
audit: false
|
||||
},
|
||||
unitList: [],
|
||||
auditList: [
|
||||
{ text: "已审核", value: true },
|
||||
{ text: "未审核", value: false }
|
||||
],
|
||||
|
||||
// 审核相关
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"info": INFO
|
||||
},
|
||||
methods: {
|
||||
historyBack,
|
||||
|
||||
onReady() {
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
|
||||
// 查看详情
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
},
|
||||
|
||||
onApproval(row) {
|
||||
this.showApprovalForm = true
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
const loading = this.$toast.loading({
|
||||
message: "加载中...",
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.infoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 撤回
|
||||
onRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要撤回吗?',
|
||||
}).then(() => {
|
||||
const loading = this.$toast.loading({
|
||||
message: "加载中...",
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
this.$axios.post('/flow/common/revokeTask', {taskId: row.startTaskId}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('撤回成功');
|
||||
this.doSearch();
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
|
||||
initUnion() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? null : this.$store.state.user.union.id
|
||||
this.$businessTool.listUnion(unionId).then((data) => {
|
||||
this.unionList = data
|
||||
this.unionList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (hasAdmin) {
|
||||
this.unionList.unshift({ text: "全部工会", value: null })
|
||||
}
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
})
|
||||
},
|
||||
flushUnits() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
|
||||
this.$businessTool.listUnit(unionId).then((data) => {
|
||||
this.unitList = data
|
||||
this.unitList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.unitList.unshift({ text: "全部单位", value: null })
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
const MOBILE_MEMBER_CHANGE_INFO = {
|
||||
template: `
|
||||
<div>
|
||||
<van-collapse v-model="activeName" accordion>
|
||||
<van-collapse-item name="basic">
|
||||
<template #title>
|
||||
<span style="color: #409eff">会员基础信息</span>
|
||||
</template>
|
||||
<van-cell-group>
|
||||
<van-cell title="姓名">{{ viewData.username }}</van-cell>
|
||||
<van-cell title="性别">{{ viewData.sex }}</van-cell>
|
||||
<van-cell title="联系方式">{{ viewData.mobile }}</van-cell>
|
||||
<van-cell title="所属工会">{{ viewData.unionName }}</van-cell>
|
||||
<van-cell title="所属单位">{{ viewData.unitName }}</van-cell>
|
||||
<van-cell title="在职状态">{{ viewData.userState }}</van-cell>
|
||||
<van-cell title="人员类型">{{ viewData.personType }}</van-cell>
|
||||
<van-cell title="出生日期">{{ $moment(viewData.birthday).format('YYYY-MM-DD') }}</van-cell>
|
||||
<van-cell title="学历">{{ viewData.education }}</van-cell>
|
||||
<van-cell title="政治面貌">{{ viewData.political }}</van-cell>
|
||||
<van-cell title="是否会员">{{ viewData.member ? '是' : '否' }}</van-cell>
|
||||
<van-cell title="是否福利会员">{{ viewData.welfareMember ? '是' : '否' }}</van-cell>
|
||||
<van-cell title="是否劳模">{{ viewData.isModelWorker ? '是' : '否' }}</van-cell>
|
||||
<van-cell title="个人简历">
|
||||
<div slot="label" class="van-cell-rich-text" v-html="viewData.personalData"></div>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-collapse-item>
|
||||
<van-collapse-item v-if="changeList && changeList.length > 0" title="会员变更信息" name="change">
|
||||
<template #title>
|
||||
<span style="color: #409eff">会员变更信息</span>
|
||||
</template>
|
||||
<table width="100%" style="line-height: 1.5rem;font-size: 13px; table-layout: fixed;border-collapse: collapse;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="background-color: #f2f2f2;border: 1px solid #ddd;">序号</th>
|
||||
<th style="background-color: #f2f2f2;border: 1px solid #ddd;">变更字段</th>
|
||||
<th style="width: 35%;background-color: #f2f2f2;border: 1px solid #ddd;">原数据</th>
|
||||
<th style="width: 35%;background-color: #f2f2f2;border: 1px solid #ddd;">新数据</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr style="text-align: center;border-bottom: 1px solid #ddd;" v-for="(item,index) in changeList" :key="index">
|
||||
<td style="border: 1px solid #ddd;">{{ index + 1 }}</td>
|
||||
<td style="border: 1px solid #ddd;">{{ item.name }}</td>
|
||||
<td style="border: 1px solid #ddd;">{{ removeHTMLTag(item.value) }}</td>
|
||||
<td style="border: 1px solid #ddd;">{{ removeHTMLTag(item.newValue) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
changeList: [],
|
||||
viewData: {},
|
||||
activeName: "basic"
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
removeHTMLTag,
|
||||
findAuditChangeInfo(recordId) {
|
||||
if (!recordId) {
|
||||
return
|
||||
}
|
||||
this.$axios.post("/platform/member/apply/branchUnionAudit/findAuditChangeInfo", { recordId: recordId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.changeList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
findUserInfo(userId) {
|
||||
if (!userId) {
|
||||
return
|
||||
}
|
||||
this.$axios.post("/platform/member/apply/common/findOne", { id: userId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
onOpen(data) {
|
||||
this.findAuditChangeInfo(data.recordId)
|
||||
this.$nextTick(() => {
|
||||
this.findUserInfo(data.userId)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
const MOBILE_MEMBER_INFO = {
|
||||
template: /*language=HTML*/ `
|
||||
<div class="detail-container">
|
||||
<van-cell-group title="基本信息">
|
||||
<van-cell title="工号">{{ viewData.loginname }}</van-cell>
|
||||
<van-cell title="姓名">{{ viewData.username }}</van-cell>
|
||||
<van-cell title="性别">{{ viewData.sex }}</van-cell>
|
||||
|
||||
<van-cell title="民族">{{ viewData.nation }}</van-cell>
|
||||
<van-cell title="出生日期">{{ $moment(viewData.birthday).format("YYYY年MM月DD日") }}</van-cell>
|
||||
<van-cell title="政治面貌">{{ viewData.political }}</van-cell>
|
||||
|
||||
<van-cell title="学历">{{ viewData.education }}</van-cell>
|
||||
<van-cell title="学位">{{ viewData.academicDegree }}</van-cell>
|
||||
<van-cell title="党政职务">{{ viewData.position }}</van-cell>
|
||||
|
||||
<van-cell title="工作单位">{{ viewData.unitName }}</van-cell>
|
||||
<van-cell title="所属工会">{{ viewData.unionName }}</van-cell>
|
||||
<van-cell title="所属校区">{{ viewData.campus }}</van-cell>
|
||||
|
||||
<van-cell title="身份证号码">{{ viewData.idCard }}</van-cell>
|
||||
<van-cell title="联系电话">{{ viewData.mobile }}</van-cell>
|
||||
<van-cell title="电子邮箱">{{ viewData.email }}</van-cell>
|
||||
|
||||
<van-cell title="在职状态">{{ viewData.userState }}</van-cell>
|
||||
<van-cell title="人员类型">{{ viewData.personType }}</van-cell>
|
||||
<van-cell title="人员性质">{{ viewData.preparedBy || '暂无' }}</van-cell>
|
||||
|
||||
<template v-if="viewData.loginname === $store.state.user.loginnmae">
|
||||
<van-cell title="家庭成员" class="column-cell">
|
||||
<table class="family-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="table-header">序号</th>
|
||||
<th class="table-header">与本人关系</th>
|
||||
<th class="table-header">姓名</th>
|
||||
<th class="table-header">单位</th>
|
||||
<th class="table-header">备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="table-row" v-for="(item, index) in viewData.families" :key="index">
|
||||
<td class="table-cell">{{ index + 1 }}</td>
|
||||
<td class="table-cell">{{ item.relation }}</td>
|
||||
<td class="table-cell">{{ item.name }}</td>
|
||||
<td class="table-cell">{{ item.unit }}</td>
|
||||
<td class="table-cell">{{ item.remark }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</van-cell>
|
||||
|
||||
<van-cell title="个人简历">
|
||||
<template #label>
|
||||
<div v-if="viewData.vita" class="text-left" v-html="viewData.vita"></div>
|
||||
<span style="font-size: 14px" v-else>无数据</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
</template>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
`,
|
||||
props: {
|
||||
userId: { type: String, required: true }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
viewData: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
userId: {
|
||||
handler: function () {
|
||||
this.findUserInfoByUserId()
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
findUserInfoByUserId() {
|
||||
if (!this.userId) {
|
||||
return
|
||||
}
|
||||
this.$axios.post("/platform/member/apply/common/findOne", { id: this.userId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,539 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<style>
|
||||
.top-col {
|
||||
background-color: white;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
width: calc((100% - 5px) / 2);
|
||||
}
|
||||
|
||||
.top-col:not(:last-child),
|
||||
.center-col:not(:last-child) {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.data-box{
|
||||
text-align: center;
|
||||
font-size:13px;
|
||||
margin:12px 0;
|
||||
}
|
||||
.th-row,.td-row{
|
||||
display:flex;
|
||||
height:30px;
|
||||
line-height:30px;
|
||||
padding:0 12px;
|
||||
}
|
||||
.th-row{background:#f8f8f8;}
|
||||
|
||||
/* 关键:比例 + 最小宽度0 */
|
||||
.col-index{flex:0 0 60px;} /* 序号固定60 */
|
||||
.col-name{flex:1 1 120px;min-width:0;} /* 名称占剩余,最小120 */
|
||||
.col-num{flex:0 0 80px;text-align:right;} /* 人数固定80 */
|
||||
|
||||
.common-ellipsis{
|
||||
overflow:hidden;
|
||||
white-space:nowrap;
|
||||
text-overflow:ellipsis;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="会员统计" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-row style="background-color: #f0f2f5" class="margin-top5" type="flex">
|
||||
<van-col span="12" class="top-col">
|
||||
<div class="col-title">会员数</div>
|
||||
<div class="top-col-member-number">
|
||||
{{memberNumberData.memberNum}}
|
||||
<span style="font-size: 14px"> 人</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}} 
|
||||
<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>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12" class="top-col">
|
||||
<div class="col-title">增长趋势</div>
|
||||
<div class="top-col-chart" id="growthTrendChart"></div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-row style="background-color: #f0f2f5; margin-top: 5px" type="flex">
|
||||
<van-col span="12" class="top-col">
|
||||
<div class="col-title">会员占比</div>
|
||||
<div class="top-col-chart" id="memberPercentageChart"></div>
|
||||
</van-col>
|
||||
<van-col span="12" class="top-col">
|
||||
<div class="col-title">性别占比</div>
|
||||
<div class="top-col-chart" id="memberSexPercentageChart"></div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-row style="background-color: #f0f2f5; margin-top: 5px" type="flex">
|
||||
<van-col span="24" class="center-col">
|
||||
<div class="col-title">在职状态</div>
|
||||
<div id="userStateMemberChart" style="width: 100%; height: 240px; box-sizing: border-box"></div>
|
||||
|
||||
<div class="col-title">人员类型</div>
|
||||
<div id="personTypeMemberChart" style="width: 100%; height: 240px; box-sizing: border-box"></div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-row style="background-color: #f0f2f5; margin-top: 5px" type="flex">
|
||||
<van-col span="24" class="center-col">
|
||||
<div class="col-title">工会会员数</div>
|
||||
<div id="unionMemberChart" style="width: 100%; height: 200px"></div>
|
||||
|
||||
<div class="data-box">
|
||||
<!-- 表头 -->
|
||||
<van-row class="th-row">
|
||||
<van-col class="col-index">序号</van-col>
|
||||
<van-col class="col-name">工会名称</van-col>
|
||||
<van-col class="col-num">会员人数</van-col>
|
||||
</van-row>
|
||||
|
||||
<!-- 数据行 -->
|
||||
<van-row
|
||||
class="td-row"
|
||||
v-for="(item,index) in unionMember"
|
||||
:key="index"
|
||||
:style="{background:index%2?'#fafafa':'#fff'}"
|
||||
>
|
||||
<van-col class="col-index">{{ index+1 }}</van-col>
|
||||
<van-col class="col-name common-ellipsis" :title="item.unionname">
|
||||
{{ item.unionname }}
|
||||
</van-col>
|
||||
<van-col class="col-num">{{ item.value }}</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
<script>
|
||||
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: {
|
||||
historyBack,
|
||||
/**
|
||||
* 会员数
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
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.$toast.fail(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,
|
||||
showContent: true,
|
||||
areaStyle: {
|
||||
fill: "#d6e3fd"
|
||||
},
|
||||
tooltip: {
|
||||
customContent: function (i, data) {
|
||||
if (labels[i]) {
|
||||
return labels[i] + "-" + data[0]?.data?.y + "人"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
}
|
||||
})
|
||||
chart.growthTrendChart.render()
|
||||
} else {
|
||||
this.$toast.fail(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,
|
||||
statistic: {
|
||||
content: {
|
||||
style: {
|
||||
fontSize: 16
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
chart.memberPercentageChart.render()
|
||||
} else {
|
||||
this.$toast.fail(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: {
|
||||
formatter: () => ""
|
||||
},
|
||||
interactions: [{ type: "element-active" }],
|
||||
color: ["#409EFF", "#F56C6C"]
|
||||
})
|
||||
chart.memberSexPercentageChart.render()
|
||||
} else {
|
||||
this.$toast.fail(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",
|
||||
label: {
|
||||
// 可手动配置 label 数据标签位置
|
||||
position: "middle", // 'top', 'bottom', 'middle',
|
||||
// 配置样式
|
||||
style: {
|
||||
fill: "#FFFFFF",
|
||||
opacity: 0.6
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
label: {
|
||||
autoHide: true,
|
||||
autoRotate: false
|
||||
}
|
||||
},
|
||||
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",
|
||||
label: {
|
||||
// 可手动配置 label 数据标签位置
|
||||
position: "middle", // 'top', 'bottom', 'middle',
|
||||
// 配置样式
|
||||
style: {
|
||||
fill: "#FFFFFF",
|
||||
opacity: 0.6
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
label: {
|
||||
autoHide: true,
|
||||
autoRotate: false
|
||||
}
|
||||
},
|
||||
meta: {
|
||||
label: {
|
||||
alias: "类型"
|
||||
},
|
||||
value: {
|
||||
alias: "会员数"
|
||||
}
|
||||
}
|
||||
})
|
||||
chart.personTypeMemberChart.render()
|
||||
} else {
|
||||
this.$toast.fail(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.Radar("userStateMemberChart", {
|
||||
data,
|
||||
xField: "label",
|
||||
yField: "value",
|
||||
appendPadding: [0, 10, 0, 10],
|
||||
meta: {
|
||||
value: {
|
||||
alias: "会员数量",
|
||||
min: 0,
|
||||
nice: true,
|
||||
formatter: (v) => parseInt(v)
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
tickLine: null
|
||||
},
|
||||
yAxis: {
|
||||
label: false,
|
||||
grid: {
|
||||
alternateColor: "rgba(0, 0, 0, 0.04)"
|
||||
}
|
||||
},
|
||||
// 开启辅助点
|
||||
point: {
|
||||
size: 2
|
||||
},
|
||||
area: {}
|
||||
})
|
||||
chart.userStateMemberChart.render()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
initData() {
|
||||
this.getMemberNumber()
|
||||
this.getGrowthTrend()
|
||||
this.getMemberPercentage()
|
||||
this.getMemberSexPercentage()
|
||||
this.getUnionMember()
|
||||
this.getPersonTypeMember()
|
||||
this.getUserStateMember()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,138 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<style></style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="会员查询" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
show-action
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
@search="doSearch">
|
||||
<template #action>
|
||||
<div @click="doSearch">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :options="unionList" @change="unionChange"
|
||||
v-model="pageForm.unionId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
|
||||
<table-list api="/platform/member/info/group/pageData" :page_form.sync="pageForm" ref="tableListRef" @ready="onReady">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="姓名">{{row.username}}</table-column>
|
||||
<table-column label="工号">{{row.loginname}}</table-column>
|
||||
<table-column label="性别">{{row.sex}}</table-column>
|
||||
<table-column label="所属工会">{{row.unionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.unitName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="viewInfo(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<div :style="{color:'#1890ff'}" style="text-align: right; position: fixed; bottom: 20px; right: 20px">
|
||||
<van-button :color="'#1890ff'" hairline size="small" type="primary">总人数:{{pageForm.totalCount}}人
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<van-action-sheet v-model="infoShow" title="会员详细信息">
|
||||
<member-info ref="memberInfoRef" :user-id="userId"></member-info>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../../common/mobileMemberInfo.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
unionId: "",
|
||||
unitId: ""
|
||||
},
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
|
||||
userId: "",
|
||||
infoShow: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"member-info": MOBILE_MEMBER_INFO
|
||||
},
|
||||
methods: {
|
||||
historyBack,
|
||||
|
||||
onReady() {
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
viewInfo(row) {
|
||||
this.userId = row.id
|
||||
this.infoShow = true
|
||||
},
|
||||
unionChange() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.flushUnits()
|
||||
this.doSearch()
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
async initUnion() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? null : this.$store.state.user.union.id
|
||||
this.unionList = await this.$businessTool.listUnion(unionId)
|
||||
this.unionList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (hasAdmin) {
|
||||
this.unionList.unshift({ text: "全部工会", value: null })
|
||||
}
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
|
||||
this.unitList = await this.$businessTool.listUnit(unionId)
|
||||
this.unitList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (hasAdmin && !this.pageForm.unionId) {
|
||||
this.unitList.unshift({ text: "全部单位", value: null })
|
||||
}
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.initUnion()
|
||||
this.flushUnits()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user