|
@@ -94,7 +94,7 @@
|
|
|
<template slot-scope="scope">
|
|
|
<div class="table-button-box">
|
|
|
<p class="table-button-null"></p>
|
|
|
- <p class="table-button-p" v-if="scope.row.adminId == meUserId" @click="handleDelete(scope.row)">移除</p>
|
|
|
+ <p class="table-button-p" v-if="scope.row.adminId == meUserId || adminType" @click="handleDelete(scope.row)">移除</p>
|
|
|
<p class="table-button-null"></p>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -285,9 +285,12 @@
|
|
|
allNum: 0,
|
|
|
/***** 当前用户userId *****/
|
|
|
meUserId:localStorage.getItem('userId'),
|
|
|
+ adminType:false,
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ let userType = JSON.parse(localStorage.getItem('user')).userType
|
|
|
+ this.$set(this,'adminType',userType==0?true:false)
|
|
|
// this.getListAll();
|
|
|
},
|
|
|
mounted() {
|
|
@@ -345,13 +348,19 @@
|
|
|
})
|
|
|
newList.push(obj);
|
|
|
}else{
|
|
|
- nullNum++
|
|
|
- this.msgError(item.subName+'未配置危险源')
|
|
|
+ let obj = {
|
|
|
+ riskPlanId:this.associationData.id,
|
|
|
+ subId:item.subId,
|
|
|
+ hazardSensorRelationBos:[],
|
|
|
+ }
|
|
|
+ newList.push(obj);
|
|
|
+ // nullNum++
|
|
|
+ // this.msgError(item.subName+'未配置危险源')
|
|
|
}
|
|
|
})
|
|
|
- if(nullNum != 0){
|
|
|
- return
|
|
|
- }
|
|
|
+ // if(nullNum != 0){
|
|
|
+ // return
|
|
|
+ // }
|
|
|
laboratoryRiskPlanSubjectRelationBatchRelationSub(newList).then(response => {
|
|
|
self.msgSuccess(response.message)
|
|
|
self.resetQuery()
|