动火作业删除按钮权限,安全环保检查单独删除隐患按钮权限

pull/11/head
limingyu 2024-04-03 09:28:04 +08:00
parent ee54bbd2f2
commit fc3df5a162
4 changed files with 39 additions and 14 deletions

View File

@ -20,7 +20,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="5"> <el-col :span="10">
<el-form-item label="负责部门:" prop="DEPARTMENT_ID"> <el-form-item label="负责部门:" prop="DEPARTMENT_ID">
<SelectTree <SelectTree
v-if="treeData.length !== 0 && FIRE_CHECK_ID != ''" v-if="treeData.length !== 0 && FIRE_CHECK_ID != ''"

View File

@ -2,12 +2,12 @@
<div class="app-container"> <div class="app-container">
<el-form ref="searchForm" :model="searchForm" label-width="80px"> <el-form ref="searchForm" :model="searchForm" label-width="80px">
<el-row> <el-row>
<el-col span="6"> <el-col :span="6">
<el-form-item label="作业编号" prop="keySource"> <el-form-item label="作业编号" prop="keySource">
<el-input v-model="searchForm.keyJobNumber" placeholder="请输入作业编号" class="filter-item" /> <el-input v-model="searchForm.keyJobNumber" placeholder="请输入作业编号" class="filter-item" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col span="6"> <el-col :span="6">
<el-form-item label="特级动火审批状态" prop="keyHiddenDescr" label-width="130px"> <el-form-item label="特级动火审批状态" prop="keyHiddenDescr" label-width="130px">
<el-select v-model="searchForm.keyState" placeholder="请选择"> <el-select v-model="searchForm.keyState" placeholder="请选择">
<el-option v-for="item in statusSuperList" :key="item.id" :label="item.name" :value="item.id" /> <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 :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 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.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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@ -69,7 +69,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="350"> <el-table-column label="操作" align="center" width="350">
<template slot-scope="{row}"> <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-plus" @click="goChart(row)"></el-button>
<el-button type="primary" icon="el-icon-document" size="mini" @click="goDetail(row.HOTWORK_ID)"></el-button> <el-button type="primary" icon="el-icon-document" size="mini" @click="goDetail(row.HOTWORK_ID)"></el-button>
</template> </template>
@ -225,10 +225,13 @@ export default {
{ ID: '-98', NAME: '已作废(未进行气体检测)' } { ID: '-98', NAME: '已作废(未进行气体检测)' }
], ],
STATUS: '', STATUS: '',
DEPTIDS: '' DEPTIDS: '',
loginUserID: '',
loginRoleNumber: JSON.parse(sessionStorage.getItem('user')).RNUMBER
} }
}, },
created() { created() {
this.getEditMyInfo()
this.getList() this.getList()
}, },
methods: { methods: {
@ -263,6 +266,17 @@ export default {
this.listLoading = false this.listLoading = false
}) })
}, },
//
getEditMyInfo() {
requestFN(
'/user/goEditMyInfo',
{}
).then((data) => {
this.loginUserID = data.pd.USER_ID // ID
}).catch((e) => {
})
},
// //
hasButton() { hasButton() {
var keys = 'hotwork:add,hotwork:del,hotwork:edit,toExcel' var keys = 'hotwork:add,hotwork:del,hotwork:edit,toExcel'
@ -404,15 +418,15 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$message({
type: 'success',
message: '删除成功!'
})
this.listLoading = true this.listLoading = true
requestFN( requestFN(
'/hotwork/cfd/deleteInFlow', { HOTWORK_ID: row.HOTWORK_ID } '/hotwork/cfd/deleteInFlow', { HOTWORK_ID: row.HOTWORK_ID }
).then((data) => { ).then((data) => {
this.$message.error('删除成功') this.$message({
type: 'success',
message: '删除成功!'
})
// this.$message.error('')
this.listLoading = false this.listLoading = false
this.getList() this.getList()
}).catch((e) => { }).catch((e) => {

View File

@ -78,7 +78,7 @@
<td width="300"> <td width="300">
<el-button icon="el-icon-view" size="mini" @click="goView(item.HIDDEN_ID)"></el-button> <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 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> </td>
</tr> </tr>
</tbody> </tbody>
@ -219,8 +219,11 @@ export default {
INSPECTION_STATUS: '', // (0. 1.2.3. -1. -2) INSPECTION_STATUS: '', // (0. 1.2.3. -1. -2)
CREATTIME: '', CREATTIME: '',
situationList: [''], // situationList: [''], //
hiddenList: [] // hiddenList: [], // ,
} INSPECTION_USER_ID: '' // ID
},
isDeleteDisplay: false,
loginUserId: JSON.parse(sessionStorage.getItem('user')).USER_ID
} }
}, },
created() { created() {
@ -251,6 +254,14 @@ export default {
this.$set(item.hiddenVideos[0], 'IMGFILEPATH', this.findvideocover(item.hiddenVideos[0])) 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 this.listLoading = false
console.info(this.pd) console.info(this.pd)
resolve() resolve()