fix:工会管理表单搜索人员缓存问题修复;会员变更查询数据序号异常问题修复
This commit is contained in:
+3
-2
@@ -98,8 +98,9 @@ public class MemberManageServiceImpl extends BaseServiceImpl<Sys_user> implement
|
|||||||
u.userAttribute,
|
u.userAttribute,
|
||||||
u.aidFundMemberUserType,
|
u.aidFundMemberUserType,
|
||||||
u.arrivalAtSchoolDate,
|
u.arrivalAtSchoolDate,
|
||||||
his.id hisId,
|
-- 无历史记录时保留人员,使用空标识和空类型集合,时间保留 NULL。
|
||||||
his.changeTypes,
|
COALESCE(his.id, '') hisId,
|
||||||
|
COALESCE(his.changeTypes, '[]') changeTypes,
|
||||||
his.changeTime
|
his.changeTime
|
||||||
FROM
|
FROM
|
||||||
vw_user u
|
vw_user u
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ const branchUnionGroupManage = {
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-dialog :title="formData.id ? '编辑' : '新增'" :visible.sync="dialogFormVisible" width="600px"
|
<el-dialog :title="formData.id ? '编辑' : '新增'" :visible.sync="dialogFormVisible" width="600px"
|
||||||
:close-on-click-modal="false">
|
:close-on-click-modal="false" @close="clearUserOptions">
|
||||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="100px">
|
<el-form ref="formRef" :model="formData" :rules="rules" label-width="100px">
|
||||||
<el-form-item label="小组编码" prop="code">
|
<el-form-item label="小组编码" prop="code">
|
||||||
<el-input v-model="formData.code" placeholder="小组编码" maxlength="10"
|
<el-input v-model="formData.code" placeholder="小组编码" maxlength="10"
|
||||||
@@ -103,6 +103,7 @@ const branchUnionGroupManage = {
|
|||||||
unitIds: [{ required: true, message: "请选择组成单位", trigger: "change" }],
|
unitIds: [{ required: true, message: "请选择组成单位", trigger: "change" }],
|
||||||
},
|
},
|
||||||
userOptions: [],
|
userOptions: [],
|
||||||
|
userOptionsRequestId: 0,
|
||||||
units: [],
|
units: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -173,13 +174,21 @@ const branchUnionGroupManage = {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
clearUserOptions() {
|
||||||
|
this.userOptions = []
|
||||||
|
// 关闭后使未完成的搜索失效,防止旧结果回填到下一次打开的弹窗。
|
||||||
|
this.userOptionsRequestId++
|
||||||
|
},
|
||||||
|
|
||||||
getUserOptions(keyword, userIds = null) {
|
getUserOptions(keyword, userIds = null) {
|
||||||
|
if (!this.dialogFormVisible && !userIds) return
|
||||||
|
const requestId = ++this.userOptionsRequestId
|
||||||
$.get("/platform/sys/unionGroup/listUser", {
|
$.get("/platform/sys/unionGroup/listUser", {
|
||||||
keyword,
|
keyword,
|
||||||
unionId: this.union_id,
|
unionId: this.union_id,
|
||||||
userIds: JSON.stringify(userIds)
|
userIds: JSON.stringify(userIds)
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0 && this.dialogFormVisible && requestId === this.userOptionsRequestId) {
|
||||||
this.userOptions = res.data
|
this.userOptions = res.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
+11
-11
@@ -170,6 +170,7 @@ layout("/layouts/platform.html"){
|
|||||||
<el-table-column align="center" header-align="center" label="更新时间"
|
<el-table-column align="center" header-align="center" label="更新时间"
|
||||||
min-width="145px" prop="changeTime"
|
min-width="145px" prop="changeTime"
|
||||||
show-overflow-tooltip sortable>
|
show-overflow-tooltip sortable>
|
||||||
|
<template scope="{row}">{{row.changeTime || '--'}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" header-align="center" label="异动类型"
|
<el-table-column align="center" header-align="center" label="异动类型"
|
||||||
prop="changeType" show-overflow-tooltip sortable>
|
prop="changeType" show-overflow-tooltip sortable>
|
||||||
@@ -649,17 +650,16 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getChangeTypes(changeTypes){
|
getChangeTypes(changeTypes){
|
||||||
if (!changeTypes) return null
|
if (!changeTypes) return '--'
|
||||||
const changeTypesList = JSON.parse(changeTypes)
|
const changeTypesList = Array.isArray(changeTypes) ? changeTypes : JSON.parse(changeTypes)
|
||||||
if (changeTypesList) {
|
if (!Array.isArray(changeTypesList) || changeTypesList.length === 0) return '--'
|
||||||
if (!changeTypesList || changeTypesList.length === 0 || !this.changeTypeData || this.changeTypeData.length === 0) return null
|
// 历史编码可能已不在当前枚举中,保留原编码,避免整张表格渲染中断。
|
||||||
return changeTypesList
|
return changeTypesList
|
||||||
.map((v) => {
|
.map((v) => {
|
||||||
return this.changeTypeData.find((item) => item.code === v).changeTypeName
|
const changeType = (this.changeTypeData || []).find((item) => item.code === v)
|
||||||
})
|
return changeType ? changeType.changeTypeName : (v || '未知异动类型')
|
||||||
.join(",")
|
})
|
||||||
}
|
.join(",")
|
||||||
return null
|
|
||||||
},
|
},
|
||||||
changeDateRangeChange(val) {
|
changeDateRangeChange(val) {
|
||||||
if (val && val.length > 0) {
|
if (val && val.length > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user