|
|
|
@ -242,7 +242,15 @@ const loadPersonList = () => { |
|
|
|
console.log(params); |
|
|
|
getBureauUnitUsers(params, (res) => { |
|
|
|
if (res.code === 200 || res.code === 0) { |
|
|
|
const data = res.data || res.rows || []; |
|
|
|
let data = res.data || res.rows || []; |
|
|
|
// 前端过滤:移除已选择的人员 |
|
|
|
const selectedIds = props.selectedPersons.map(p => p.lawCertificateNum || p.userId || p.id).filter(Boolean); |
|
|
|
if (selectedIds.length > 0) { |
|
|
|
data = data.filter(item => { |
|
|
|
const id = item.lawCertificateNum || item.mobileNumber || item.userId || item.id || ''; |
|
|
|
return !selectedIds.includes(id); |
|
|
|
}); |
|
|
|
} |
|
|
|
const total = res.total || res.count || 0; |
|
|
|
if (personPageNum.value === 1) { |
|
|
|
personList.value = data; |
|
|
|
@ -283,7 +291,8 @@ const handleSelectPerson = (person) => { |
|
|
|
// 转换字段名称,将接口返回的 userName 转换为 name,phonenumber 转换为 id |
|
|
|
emit('selectPerson', { |
|
|
|
name: person.userName || person.name || '', |
|
|
|
id: person.lawCertificateNum || person.mobileNumber || '' |
|
|
|
id: person.lawCertificateNum || person.mobileNumber || '', |
|
|
|
userId: person.userId || '', |
|
|
|
}); |
|
|
|
localPersonPopup.value = false; |
|
|
|
}; |
|
|
|
|