解决了 Bug 半月放在每月上面 14877

解决了 Bug 部门和人员选择好之后 删除部门右侧的人员会清空 应该只删除掉删除的部门下的人员 14878
解决了 Bug 新增报错 14874
pull/11/head
songwenxuan 2024-04-01 08:36:07 +08:00
parent c4a4559043
commit 4d527d0522
2 changed files with 33 additions and 2 deletions

View File

@ -1058,7 +1058,37 @@ export default {
}, },
// //
handleRemove(selectedItems) { handleRemove(selectedItems) {
this.form.USER_ID = [] console.log(this.form.USER_ID)
const currentUserId = this.form.USER_ID
requestFN(
'/user/listUserByCorp',
{
DEPARTMENT_ID: selectedItems.id
}
).then((data) => {
const userList = data.userList
if (userList) {
for (let i = 0; i < userList.length; i++) {
for (let j = 0; j < this.form.USER_ID.length; j++) {
if (userList[i].USER_ID === this.form.USER_ID[j]) {
for (let k = 0; k < currentUserId.length; k++) {
if (this.form.USER_ID[j] === currentUserId[k]) {
console.log(this.form.USER_ID[j])
currentUserId.splice(k, 1)
break
}
}
break
}
}
}
}
this.listLoading = false
// this.peopleList = data.userList
}).catch((e) => {
this.listLoading = false
})
this.form.USER_ID = currentUserId
// //
if (this.form.INVOLVING_CORPS_DEPART_ID.includes(selectedItems.id)) { if (this.form.INVOLVING_CORPS_DEPART_ID.includes(selectedItems.id)) {
this.form.INVOLVING_CORPS_DEPART_ID.splice(this.form.INVOLVING_CORPS_DEPART_ID.indexOf(selectedItems.id), 1) this.form.INVOLVING_CORPS_DEPART_ID.splice(this.form.INVOLVING_CORPS_DEPART_ID.indexOf(selectedItems.id), 1)

View File

@ -104,7 +104,8 @@ export default {
rules: { rules: {
FIRE_REGION_NAME: [{ required: true, message: '消防区域不为空', trigger: 'blur' }], FIRE_REGION_NAME: [{ required: true, message: '消防区域不为空', trigger: 'blur' }],
DEPARTMENT_ID: [{ required: true, message: '负责部门不为空', trigger: 'blur' }], DEPARTMENT_ID: [{ required: true, message: '负责部门不为空', trigger: 'blur' }],
FIRE_REGION_CODE: [{ required: true, message: '区域编码不为空', trigger: 'blur' }] FIRE_REGION_CODE: [{ required: true, message: '区域编码不为空', trigger: 'blur' }],
PHOTO_UPLOAD_METHOD: [{ required: true, message: '区域编码不为空', trigger: 'blur' }]
}, },
formLabelWidth: '120px', formLabelWidth: '120px',
OTHERLEVELID: '', OTHERLEVELID: '',