From 4d527d05226b1e2e534f170cca83e59b73e1be5a Mon Sep 17 00:00:00 2001 From: songwenxuan <1924103812@qq.com> Date: Mon, 1 Apr 2024 08:36:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=BA=86=20Bug=20=E5=8D=8A?= =?UTF-8?q?=E6=9C=88=E6=94=BE=E5=9C=A8=E6=AF=8F=E6=9C=88=E4=B8=8A=E9=9D=A2?= =?UTF-8?q?=2014877=20=E8=A7=A3=E5=86=B3=E4=BA=86=20Bug=20=E9=83=A8?= =?UTF-8?q?=E9=97=A8=E5=92=8C=E4=BA=BA=E5=91=98=E9=80=89=E6=8B=A9=E5=A5=BD?= =?UTF-8?q?=E4=B9=8B=E5=90=8E=20=E5=88=A0=E9=99=A4=E9=83=A8=E9=97=A8?= =?UTF-8?q?=E5=8F=B3=E4=BE=A7=E7=9A=84=E4=BA=BA=E5=91=98=E4=BC=9A=E6=B8=85?= =?UTF-8?q?=E7=A9=BA=20=E5=BA=94=E8=AF=A5=E5=8F=AA=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=8E=89=E5=88=A0=E9=99=A4=E7=9A=84=E9=83=A8=E9=97=A8=E4=B8=8B?= =?UTF-8?q?=E7=9A=84=E4=BA=BA=E5=91=98=2014878=20=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E4=BA=86=20Bug=20=E6=96=B0=E5=A2=9E=E6=8A=A5=E9=94=99=2014874?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../checklist/components/edit.vue | 32 ++++++++++++++++++- .../firefighting/region/components/edit.vue | 3 +- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/views/firefighting/checklist/components/edit.vue b/src/views/firefighting/checklist/components/edit.vue index 137f116..337fef5 100644 --- a/src/views/firefighting/checklist/components/edit.vue +++ b/src/views/firefighting/checklist/components/edit.vue @@ -1058,7 +1058,37 @@ export default { }, // 移除选中项时触发的事件 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)) { this.form.INVOLVING_CORPS_DEPART_ID.splice(this.form.INVOLVING_CORPS_DEPART_ID.indexOf(selectedItems.id), 1) diff --git a/src/views/firefighting/region/components/edit.vue b/src/views/firefighting/region/components/edit.vue index 2a2cb57..24c192a 100644 --- a/src/views/firefighting/region/components/edit.vue +++ b/src/views/firefighting/region/components/edit.vue @@ -104,7 +104,8 @@ export default { rules: { FIRE_REGION_NAME: [{ 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', OTHERLEVELID: '',