From fc3df5a162f568d89429dd6c6410d0fbc87f6183 Mon Sep 17 00:00:00 2001 From: limingyu Date: Wed, 3 Apr 2024 09:28:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E7=81=AB=E4=BD=9C=E4=B8=9A=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=8C=89=E9=92=AE=E6=9D=83=E9=99=90=EF=BC=8C=E5=AE=89?= =?UTF-8?q?=E5=85=A8=E7=8E=AF=E4=BF=9D=E6=A3=80=E6=9F=A5=E5=8D=95=E7=8B=AC?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=9A=90=E6=82=A3=E6=8C=89=E9=92=AE=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../checklist/components/edit.vue | 2 +- src/views/hotwork/hotwork/components/list.vue | 6 ++-- .../hotwork_cfd/hotwork/components/list.vue | 28 ++++++++++++++----- .../archive/components/info.vue | 17 +++++++++-- 4 files changed, 39 insertions(+), 14 deletions(-) diff --git a/src/views/firefighting/checklist/components/edit.vue b/src/views/firefighting/checklist/components/edit.vue index 337fef5..49bda77 100644 --- a/src/views/firefighting/checklist/components/edit.vue +++ b/src/views/firefighting/checklist/components/edit.vue @@ -20,7 +20,7 @@ - + - + - + @@ -95,7 +95,7 @@ 查看 - 删除 + 删除 diff --git a/src/views/hotwork_cfd/hotwork/components/list.vue b/src/views/hotwork_cfd/hotwork/components/list.vue index 6f6d184..26917ef 100644 --- a/src/views/hotwork_cfd/hotwork/components/list.vue +++ b/src/views/hotwork_cfd/hotwork/components/list.vue @@ -69,7 +69,7 @@ @@ -225,10 +225,13 @@ export default { { ID: '-98', NAME: '已作废(未进行气体检测)' } ], STATUS: '', - DEPTIDS: '' + DEPTIDS: '', + loginUserID: '', + loginRoleNumber: JSON.parse(sessionStorage.getItem('user')).RNUMBER } }, created() { + this.getEditMyInfo() this.getList() }, methods: { @@ -263,6 +266,17 @@ export default { this.listLoading = false }) }, + // 获取登录人信息 + getEditMyInfo() { + requestFN( + '/user/goEditMyInfo', + {} + ).then((data) => { + this.loginUserID = data.pd.USER_ID // 主职角色ID + }).catch((e) => { + + }) + }, // 判断按钮权限,用于是否显示按钮 hasButton() { var keys = 'hotwork:add,hotwork:del,hotwork:edit,toExcel' @@ -404,15 +418,15 @@ export default { cancelButtonText: '取消', type: 'warning' }).then(() => { - this.$message({ - type: 'success', - message: '删除成功!' - }) this.listLoading = true requestFN( '/hotwork/cfd/deleteInFlow', { HOTWORK_ID: row.HOTWORK_ID } ).then((data) => { - this.$message.error('删除成功') + this.$message({ + type: 'success', + message: '删除成功!' + }) + // this.$message.error('删除成功') this.listLoading = false this.getList() }).catch((e) => { diff --git a/src/views/safetyenvironmental/archive/components/info.vue b/src/views/safetyenvironmental/archive/components/info.vue index f8ff359..cdc7b26 100644 --- a/src/views/safetyenvironmental/archive/components/info.vue +++ b/src/views/safetyenvironmental/archive/components/info.vue @@ -78,7 +78,7 @@ 查看 流程图 - 删除 + 删除 @@ -219,8 +219,11 @@ export default { INSPECTION_STATUS: '', // 状态(0.暂存 1.检查人待确认、2.被检查人待确认、3.归档 -1.检查人异议打回 -2被检查人申辩) CREATTIME: '', situationList: [''], // 检查情况 - hiddenList: [] // 隐患信息集合 - } + hiddenList: [], // 隐患信息集合, + INSPECTION_USER_ID: '' // 检查人ID数组 + }, + isDeleteDisplay: false, + loginUserId: JSON.parse(sessionStorage.getItem('user')).USER_ID } }, created() { @@ -251,6 +254,14 @@ export default { this.$set(item.hiddenVideos[0], 'IMGFILEPATH', this.findvideocover(item.hiddenVideos[0])) } }) + // 判断登录人是否为检查人员,并判断是否能删除 + if (this.pd.INSPECTION_USER_ID != null && this.pd.INSPECTION_USER_ID != '') { + this.pd.INSPECTION_USER_ID.split(',').forEach(item => { + if (item == this.loginUserId) { + this.isDeleteDisplay = true + } + }) + } this.listLoading = false console.info(this.pd) resolve()