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