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()