|
@@ -137,12 +137,11 @@
|
|
<p class="reset-button-one" @click="resetForm">重置</p>
|
|
<p class="reset-button-one" @click="resetForm">重置</p>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
- <!--<div style="display: flex;background: rgb(202,229,253);height:40px;line-height:40px;font-size:16px;padding:0 82px;">-->
|
|
|
|
- <!--<p style="margin-right:24px;">已选择 <span style="color:#0183FA;">1</span> 项</p>-->
|
|
|
|
- <!--<p style="color:#0183FA;cursor: pointer;" >全选本页</p>-->
|
|
|
|
- <!--<p style="color:#0183FA;margin:0 32px 0 30px;cursor: pointer;" >选择全部</p>-->
|
|
|
|
- <!--<p style="color:#FF8F1F;cursor: pointer;" >清除选项</p>-->
|
|
|
|
- <!--</div>-->
|
|
|
|
|
|
+ <div style="display: flex;background: rgb(202,229,253);height:40px;line-height:40px;font-size:16px;padding:0 82px;margin-bottom:20px;">
|
|
|
|
+ <p style="margin-right:24px;">已选择 <span style="color:#0183FA;">{{allNum}}</span> 项</p>
|
|
|
|
+ <p style="color:#0183FA;cursor: pointer;" @click="allButton(1)">全选本页</p>
|
|
|
|
+ <p style="color:#0183FA;margin:0 32px 0 30px;cursor: pointer;" @click="allButton(2)">选择全部</p>
|
|
|
|
+ </div>
|
|
<el-table ref="table" v-loading="loading" border :data="dialogTableData" @selection-change="handleSelectionChange" :row-key="getRowKeys">
|
|
<el-table ref="table" v-loading="loading" border :data="dialogTableData" @selection-change="handleSelectionChange" :row-key="getRowKeys">
|
|
<el-table-column type="selection" width="55" :reserve-selection="true" align="center" />
|
|
<el-table-column type="selection" width="55" :reserve-selection="true" align="center" />
|
|
<el-table-column label="实验室" width="220" align="center" prop="id" />
|
|
<el-table-column label="实验室" width="220" align="center" prop="id" />
|
|
@@ -221,7 +220,7 @@
|
|
import { optionSensor } from "@/api/laboratory/sensor";
|
|
import { optionSensor } from "@/api/laboratory/sensor";
|
|
import { listClassifiedAll } from "@/api/laboratory/classified";
|
|
import { listClassifiedAll } from "@/api/laboratory/classified";
|
|
import { listClasstypeAll } from "@/api/laboratory/classtype";
|
|
import { listClasstypeAll } from "@/api/laboratory/classtype";
|
|
- import { getLabRiskPlanJoinSub,getLabRiskPlanNoJoinSub,deleteRiskPlanJoinSub,riskPlanJoinSub } from "@/api/evacuation3_2/index";
|
|
|
|
|
|
+ import { getLabRiskPlanJoinSub,getLabRiskPlanNoJoinSub,deleteRiskPlanJoinSub,riskPlanJoinSub,riskPlanBatchJoinSub } from "@/api/evacuation3_2/index";
|
|
export default {
|
|
export default {
|
|
name: 'newAssociatedPage',
|
|
name: 'newAssociatedPage',
|
|
props:{
|
|
props:{
|
|
@@ -264,6 +263,7 @@
|
|
//设备
|
|
//设备
|
|
hardwareList:[],
|
|
hardwareList:[],
|
|
/***************关联危险源结束****************/
|
|
/***************关联危险源结束****************/
|
|
|
|
+ allNum:0,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created(){
|
|
created(){
|
|
@@ -297,6 +297,7 @@
|
|
let self = this;
|
|
let self = this;
|
|
if (type == 1){
|
|
if (type == 1){
|
|
this.resetForm();
|
|
this.resetForm();
|
|
|
|
+ this.$set(this,'allNum',0);
|
|
this.$set(this,'dialogAssociatedOpen',true);
|
|
this.$set(this,'dialogAssociatedOpen',true);
|
|
}else if(type == 2){
|
|
}else if(type == 2){
|
|
this.$set(this,'dialogAssociatedOpen',false);
|
|
this.$set(this,'dialogAssociatedOpen',false);
|
|
@@ -515,8 +516,40 @@
|
|
},
|
|
},
|
|
//勾选
|
|
//勾选
|
|
handleSelectionChange(selection){
|
|
handleSelectionChange(selection){
|
|
|
|
+ this.$set(this,'allNum',selection.length);
|
|
// console.log('selection',selection)
|
|
// console.log('selection',selection)
|
|
},
|
|
},
|
|
|
|
+ allButton(type){
|
|
|
|
+ let self = this;
|
|
|
|
+ if(type == 1){
|
|
|
|
+ let list = [];
|
|
|
|
+ for(let i=0;i<self.dialogTableData.length;i++){
|
|
|
|
+ list.push(self.dialogTableData[i].id);
|
|
|
|
+ }
|
|
|
|
+ let obj = {
|
|
|
|
+ riskPlanId:self.associationData.id,
|
|
|
|
+ subjectIds:list+''
|
|
|
|
+ }
|
|
|
|
+ riskPlanBatchJoinSub(obj).then(response => {
|
|
|
|
+ this.msgSuccess(response.msg);
|
|
|
|
+ this.resetQuery();
|
|
|
|
+ this.$set(this,'dialogAssociatedOpen',false);
|
|
|
|
+ });
|
|
|
|
+ }else if(type == 2){
|
|
|
|
+ let obj = {
|
|
|
|
+ riskPlanId:self.associationData.id,
|
|
|
|
+ searchValue:self.param.searchValue,
|
|
|
|
+ typeId:self.param.typeId,
|
|
|
|
+ level:self.param.leve,
|
|
|
|
+ subjectIds:'-1'
|
|
|
|
+ };
|
|
|
|
+ riskPlanBatchJoinSub(obj).then(response => {
|
|
|
|
+ this.msgSuccess(response.msg);
|
|
|
|
+ this.resetQuery();
|
|
|
|
+ this.$set(this,'dialogAssociatedOpen',false);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|