动火作业删除按钮权限,安全环保检查单独删除隐患按钮权限
parent
ee54bbd2f2
commit
fc3df5a162
|
@ -20,7 +20,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-col :span="10">
|
||||
<el-form-item label="负责部门:" prop="DEPARTMENT_ID">
|
||||
<SelectTree
|
||||
v-if="treeData.length !== 0 && FIRE_CHECK_ID != ''"
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
<div class="app-container">
|
||||
<el-form ref="searchForm" :model="searchForm" label-width="80px">
|
||||
<el-row>
|
||||
<el-col span="6">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="作业编号" prop="keySource">
|
||||
<el-input v-model="searchForm.keyJobNumber" placeholder="请输入作业编号" class="filter-item" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="6">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="特级动火审批状态" prop="keyHiddenDescr" label-width="130px">
|
||||
<el-select v-model="searchForm.keyState" placeholder="请选择">
|
||||
<el-option v-for="item in statusSuperList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
|
@ -95,7 +95,7 @@
|
|||
<!-- <el-button :disabled="row.STATE !='-2'" type="primary" icon="el-icon-document" size="mini" @click="goDetail(row.HOTWORKAPPLICATION_ID,'repulse')">打回</el-button>-->
|
||||
<el-button icon="el-icon-view" size="mini" @click="goInfo(row.HOTWORKAPPLICATION_ID,'see')">查看</el-button>
|
||||
<!--<el-button v-if="row.STATE=='-6' && row.CREATOR == loginUserID" type="danger" icon="el-icon-delete" plain @click="batchDel(row.HOTWORKAPPLICATION_ID)">删除</el-button>-->
|
||||
<el-button v-if="row.CREATOR == loginUserID || loginUserID == '1' || loginRoleNumber == 'R20201225624685'" type="danger" icon="el-icon-delete" plain @click="batchDel(row.HOTWORKAPPLICATION_ID)">删除</el-button>
|
||||
<el-button v-if="(row.CREATOR == loginUserID || loginUserID == '1' || loginRoleNumber == 'R20201225624685') && row.STATE != 11" type="danger" icon="el-icon-delete" plain @click="batchDel(row.HOTWORKAPPLICATION_ID)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="350">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="danger" icon="el-icon-delete" @click="handleDelete(row)">删除</el-button>
|
||||
<el-button v-if="(row.APPLY_USER_ID == loginUserID || loginUserID == '1' || loginRoleNumber == 'R20201225624685') && row.APPLY_STATUS != 8" type="danger" icon="el-icon-delete" @click="handleDelete(row)">删除</el-button>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="goChart(row)">流程图</el-button>
|
||||
<el-button type="primary" icon="el-icon-document" size="mini" @click="goDetail(row.HOTWORK_ID)">审批表详情</el-button>
|
||||
</template>
|
||||
|
@ -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) => {
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
<td width="300">
|
||||
<el-button icon="el-icon-view" size="mini" @click="goView(item.HIDDEN_ID)">查看</el-button>
|
||||
<el-button type="success" icon="el-icon-view" size="mini" @click="checkFlow(item)">流程图</el-button>
|
||||
<el-button v-if="pd.INSPECTION_STATUS == '0' || pd.INSPECTION_STATUS =='2'" type="danger" icon="el-icon-view" size="mini" @click="goDelete(item)">删除</el-button>
|
||||
<el-button v-if="( pd.INSPECTION_STATUS == '0' && isDeleteDisplay) || ( isDeleteDisplay && pd.INSPECTION_STATUS =='2' )" type="danger" icon="el-icon-view" size="mini" @click="goDelete(item)">删除</el-button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue