From f033a6c128c0b8a893f7c5d2533c6b0e26d23873 Mon Sep 17 00:00:00 2001 From: huangyuxuan Date: Thu, 5 Sep 2024 14:48:47 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0](pet)=20?= =?UTF-8?q?=20-=20add.vue=20=20=20=20-=20=E5=AE=89=E5=85=A8=E7=8E=AF?= =?UTF-8?q?=E4=BF=9D=E6=A3=80=E6=9F=A5=E6=96=B0=E5=A2=9E=20=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E4=B8=BA=E7=9B=B8=E5=85=B3=E6=96=B9=E6=8C=89=E9=92=AE?= =?UTF-8?q?=20=E6=9B=B4=E6=96=B0=E9=83=A8=E9=97=A8=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A0=91=E9=80=BB=E8=BE=91=20=20-=20edit.vue?= =?UTF-8?q?=20=20=20=20-=20=E6=96=B0=E5=A2=9E=E7=94=A8=E6=88=B7=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E9=82=AE=E7=AE=B1=E5=BF=85=E5=A1=AB=EF=BC=8C=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E9=82=AE=E7=AE=B1=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Navbar.vue | 1 - src/views/corpInfo/user/components/edit.vue | 6 +- .../inspection/components/add.vue | 66 +++++++++++++++++-- 3 files changed, 64 insertions(+), 9 deletions(-) diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 3ef1396..8f4e844 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -309,7 +309,6 @@ export default { } }, setShowModel(model) { - console.log("test===========================") this.$store.dispatch('permission/setShowModel', model) }, toggleSideBar() { diff --git a/src/views/corpInfo/user/components/edit.vue b/src/views/corpInfo/user/components/edit.vue index eda6399..2ed7592 100644 --- a/src/views/corpInfo/user/components/edit.vue +++ b/src/views/corpInfo/user/components/edit.vue @@ -798,12 +798,12 @@ export default { { validator: hasUser, trigger: 'blur' } ], EMAIL: [ - { required: true, message: '请输入邮箱', trigger: 'blur' }, + { required: false, message: '请输入邮箱', trigger: 'blur' }, { pattern: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/, message: '请输入正确的邮箱' - }, - { validator: hasEmail, trigger: 'blur' } + } + // { validator: hasEmail, trigger: 'blur' } ], PERSON_TYPE: [{ required: true, message: '请选择人员类型', trigger: 'change' }], ROLE_NAME: [{ required: true, message: '请选择角色组', trigger: 'change' }], diff --git a/src/views/safetyenvironmental/inspection/components/add.vue b/src/views/safetyenvironmental/inspection/components/add.vue index 37b6a8e..eccae03 100644 --- a/src/views/safetyenvironmental/inspection/components/add.vue +++ b/src/views/safetyenvironmental/inspection/components/add.vue @@ -13,6 +13,16 @@ + + + + + + + + + + @@ -86,7 +96,7 @@ - + @@ -421,7 +431,8 @@ export default { CONFIRM_MESSAGE_SIGN: '', CONFIRM_MESSAGE_TIME: '', situationList: [{ INSPECTION_SITUATION_ID: '', SITUATION: '' }], // 检查情况 - hiddenList: [{ ...this.hiddenForm }] // 隐患信息集合 + hiddenList: [{ ...this.hiddenForm }], // 隐患信息集合 + IS_XGF: '' // 是否相关方 }, hiddenCurIndex: -1, hdFile: [], // 隐患附件 @@ -519,7 +530,7 @@ export default { this.INSPECTED_SITEUSER_List = [] } if (newVal != null && newVal != '') { - this.getUserList(newVal) + this.getXgfUserList(newVal) } }, immediate: false @@ -587,8 +598,9 @@ export default { this.INSPECTOR_List.push([]) }, updateInspecteDept(DEPARTMENT_ID, i) { - this.form.inspectorList[i].INSPECTION_USER_ID = '' - this.getInspectorList(DEPARTMENT_ID, i) + // this.form.inspectorList[i].INSPECTION_USER_ID = '' + // this.getInspectorList(DEPARTMENT_ID, i) + this.getXgfUserList(DEPARTMENT_ID) }, // 获取人员列表 getInspectorList(DEPARTMENT_ID, i) { @@ -1039,6 +1051,50 @@ export default { }) }) }, + // 获取相关方被检查单位数据 + getXgfTreeData(value) { + console.info(value) + if (value == '1') { + requestFN( + '/department/getXgfListTree', + {} + ).then((data) => { + this.treeData = this.listTransTree(JSON.parse(data.zTreeNodes), 'id', 'pId', 'nodes') + this.treeDataInspectDept = this.listTransTree(JSON.parse(data.zTreeNodes), 'id', 'pId', 'nodes') + }).catch((e) => { + }) + } else { + requestFN( + '/department/listTree', + {} + ).then((data) => { + this.treeData = this.listTransTree(JSON.parse(data.zTreeNodes), 'id', 'pId', 'nodes') + this.treeDataInspectDept = this.listTransTree(JSON.parse(data.zTreeNodes), 'id', 'pId', 'nodes') + }).catch((e) => { + }) + } + }, + // 获取相关方被检查单位现场负责人 + getXgfUserList(DEPARTMENT_ID) { + console.info(this.form.IS_XGF) + if (this.form.IS_XGF == '1') { + requestFN( + '/user/xgfListAll', + { DEPARTMENT_ID: DEPARTMENT_ID } + ).then((data) => { + this.INSPECTED_SITEUSER_List = data.userList + }).catch((e) => { + }) + } else { + requestFN( + '/user/listAll', + { DEPARTMENT_ID: DEPARTMENT_ID } + ).then((data) => { + this.INSPECTED_SITEUSER_List = data.userList + }).catch((e) => { + }) + } + }, // 获取隐患部位 下拉树 getHiddenReginTreeList() { return new Promise((resolve) => {