|
@@ -42,9 +42,9 @@
|
|
</div>
|
|
</div>
|
|
<div class="min-for-text-box">
|
|
<div class="min-for-text-box">
|
|
<div>
|
|
<div>
|
|
- <div class="min-for-text-box-one" v-for="(minItemOne,minIndexOne) in item.riskPlanSensorList" :key="minItemOne.funNum">
|
|
|
|
|
|
+ <div class="min-for-text-box-one" v-for="(minItemOne,minIndexOne) in item.riskPlanSensorList" :key="minItemOne.sensorType">
|
|
<div>
|
|
<div>
|
|
- <p>启动条件:<span v-for="(sensorItem,sensorIndex) in sensorList" :key="sensorIndex" v-if="sensorItem.funNum == minItemOne.funNum">{{sensorItem.describe}}</span></p>
|
|
|
|
|
|
+ <p>启动条件:<span v-for="(sensorItem,sensorIndex) in sensorList" :key="sensorIndex" v-if="sensorItem.hardwareTypeCode == minItemOne.sensorType">{{sensorItem.hardwareTypeName}}</span></p>
|
|
<p>监测区间:{{minItemOne.minMonitor}}-{{minItemOne.maxMonitor}}</p>
|
|
<p>监测区间:{{minItemOne.minMonitor}}-{{minItemOne.maxMonitor}}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -106,13 +106,13 @@
|
|
<p style="line-height:60px;font-size:14px;margin-left:19px;">启动条件:</p>
|
|
<p style="line-height:60px;font-size:14px;margin-left:19px;">启动条件:</p>
|
|
<div style="display: flex" v-for="(item,index) in dialogForm.riskPlanSensorList" :key="index">
|
|
<div style="display: flex" v-for="(item,index) in dialogForm.riskPlanSensorList" :key="index">
|
|
<div style="flex:1;">
|
|
<div style="flex:1;">
|
|
- <el-form-item label="监测设备:" :prop="'riskPlanSensorList.'+index+'.funNum'" :rules="rules.funNum">
|
|
|
|
- <el-select v-model="item.funNum" placeholder="请选择监测设备">
|
|
|
|
|
|
+ <el-form-item label="监测设备:" :prop="'riskPlanSensorList.'+index+'.sensorType'" :rules="rules.sensorType">
|
|
|
|
+ <el-select v-model="item.sensorType" placeholder="请选择监测设备" @change="(val)=>sensorChange(val,index)">
|
|
<el-option
|
|
<el-option
|
|
v-for="item in sensorList"
|
|
v-for="item in sensorList"
|
|
- :key="item.funNum"
|
|
|
|
- :label="item.describe"
|
|
|
|
- :value="item.funNum">
|
|
|
|
|
|
+ :key="item.hardwareTypeCode"
|
|
|
|
+ :label="item.hardwareTypeName"
|
|
|
|
+ :value="item.hardwareTypeCode">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -193,7 +193,7 @@
|
|
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 { optionHardware } from "@/api/laboratory/hardware";
|
|
import { optionHardware } from "@/api/laboratory/hardware";
|
|
- import { optionSensor } from "@/api/laboratory/sensor";
|
|
|
|
|
|
+ import { getSensorList } from "@/api/laboratory/sensor";
|
|
import { selectRiskPlanLeveListRiskPlanId,putPlan,planLevelAdd,planLevelPut,planLevelDel,getLabRiskPlanJoinSub } from "@/api/evacuation3_2/index";
|
|
import { selectRiskPlanLeveListRiskPlanId,putPlan,planLevelAdd,planLevelPut,planLevelDel,getLabRiskPlanJoinSub } from "@/api/evacuation3_2/index";
|
|
export default {
|
|
export default {
|
|
name: "newAddPlan",
|
|
name: "newAddPlan",
|
|
@@ -222,7 +222,7 @@
|
|
ifExit: [
|
|
ifExit: [
|
|
{ required: true, message: "请选择是否执行疏散", trigger: "change" },
|
|
{ required: true, message: "请选择是否执行疏散", trigger: "change" },
|
|
],
|
|
],
|
|
- funNum: [
|
|
|
|
|
|
+ sensorType: [
|
|
{ required: true, message: "请选择监测设备", trigger: "change" },
|
|
{ required: true, message: "请选择监测设备", trigger: "change" },
|
|
],
|
|
],
|
|
minMonitor: [
|
|
minMonitor: [
|
|
@@ -269,6 +269,15 @@
|
|
this.getOptionData();
|
|
this.getOptionData();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ //传感器选中事件
|
|
|
|
+ sensorChange(val,index){
|
|
|
|
+ let self = this;
|
|
|
|
+ for(let i=0;i<self.sensorList.length;i++){
|
|
|
|
+ if(self.sensorList[i].hardwareTypeCode == val){
|
|
|
|
+ this.$set(self.dialogForm.riskPlanSensorList[index],'funNum',self.sensorList[i].hardwareTypeName);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
//修改预案名称
|
|
//修改预案名称
|
|
setNameButton(type){
|
|
setNameButton(type){
|
|
if(type == 1){
|
|
if(type == 1){
|
|
@@ -311,7 +320,7 @@
|
|
},
|
|
},
|
|
//查询传感器/设备下啦列表
|
|
//查询传感器/设备下啦列表
|
|
getOptionData(){
|
|
getOptionData(){
|
|
- optionSensor({}).then(response => {
|
|
|
|
|
|
+ getSensorList({}).then(response => {
|
|
this.sensorList = response.data;
|
|
this.sensorList = response.data;
|
|
this.sensorListData = JSON.parse(JSON.stringify(response.data))
|
|
this.sensorListData = JSON.parse(JSON.stringify(response.data))
|
|
});
|
|
});
|
|
@@ -362,7 +371,7 @@
|
|
return
|
|
return
|
|
}
|
|
}
|
|
this.dialogForm.riskPlanSensorList.push({
|
|
this.dialogForm.riskPlanSensorList.push({
|
|
- funNum:null,
|
|
|
|
|
|
+ sensorType:null,
|
|
})
|
|
})
|
|
}else if(type == 2){
|
|
}else if(type == 2){
|
|
if(this.dialogForm.riskPlanHardwareList.length>8){
|
|
if(this.dialogForm.riskPlanHardwareList.length>8){
|
|
@@ -397,7 +406,7 @@
|
|
return
|
|
return
|
|
}
|
|
}
|
|
for(let x=0;x<self.dialogForm.riskPlanSensorList.length;x++){
|
|
for(let x=0;x<self.dialogForm.riskPlanSensorList.length;x++){
|
|
- if(self.dialogForm.riskPlanSensorList[i].funNum == self.dialogForm.riskPlanSensorList[x].funNum && i != x){
|
|
|
|
|
|
+ if(self.dialogForm.riskPlanSensorList[i].sensorType == self.dialogForm.riskPlanSensorList[x].sensorType && i != x){
|
|
if(self.dialogForm.riskPlanSensorList[i].minMonitor >= self.dialogForm.riskPlanSensorList[x].minMonitor &&
|
|
if(self.dialogForm.riskPlanSensorList[i].minMonitor >= self.dialogForm.riskPlanSensorList[x].minMonitor &&
|
|
self.dialogForm.riskPlanSensorList[i].minMonitor <= self.dialogForm.riskPlanSensorList[x].maxMonitor){
|
|
self.dialogForm.riskPlanSensorList[i].minMonitor <= self.dialogForm.riskPlanSensorList[x].maxMonitor){
|
|
self.msgError('监测区间不能重复,请重新输入');
|
|
self.msgError('监测区间不能重复,请重新输入');
|
|
@@ -423,7 +432,7 @@
|
|
for(let x=0;x<self.dialogForm.riskPlanSensorList.length;x++){
|
|
for(let x=0;x<self.dialogForm.riskPlanSensorList.length;x++){
|
|
for(let i=0;i<self.labRiskPlanLevels.length;i++){
|
|
for(let i=0;i<self.labRiskPlanLevels.length;i++){
|
|
for(let o=0;o<self.labRiskPlanLevels[i].riskPlanSensorList.length;o++){
|
|
for(let o=0;o<self.labRiskPlanLevels[i].riskPlanSensorList.length;o++){
|
|
- if(self.dialogForm.riskPlanSensorList[x].funNum==self.labRiskPlanLevels[i].riskPlanSensorList[o].funNum){
|
|
|
|
|
|
+ if(self.dialogForm.riskPlanSensorList[x].sensorType==self.labRiskPlanLevels[i].riskPlanSensorList[o].sensorType){
|
|
num ++
|
|
num ++
|
|
if(self.dialogForm.riskPlanSensorList[x].minMonitor>=self.labRiskPlanLevels[i].riskPlanSensorList[o].minMonitor&&
|
|
if(self.dialogForm.riskPlanSensorList[x].minMonitor>=self.labRiskPlanLevels[i].riskPlanSensorList[o].minMonitor&&
|
|
self.dialogForm.riskPlanSensorList[x].minMonitor<=self.labRiskPlanLevels[i].riskPlanSensorList[o].maxMonitor){
|
|
self.dialogForm.riskPlanSensorList[x].minMonitor<=self.labRiskPlanLevels[i].riskPlanSensorList[o].maxMonitor){
|
|
@@ -448,7 +457,7 @@
|
|
for(let x=0;x<self.dialogForm.riskPlanSensorList.length;x++){
|
|
for(let x=0;x<self.dialogForm.riskPlanSensorList.length;x++){
|
|
for(let i=0;i<self.form.labRiskPlanLevels.length;i++){
|
|
for(let i=0;i<self.form.labRiskPlanLevels.length;i++){
|
|
for(let o=0;o<self.form.labRiskPlanLevels[i].riskPlanSensorList.length;o++){
|
|
for(let o=0;o<self.form.labRiskPlanLevels[i].riskPlanSensorList.length;o++){
|
|
- if(self.dialogForm.riskPlanSensorList[x].funNum==self.form.labRiskPlanLevels[i].riskPlanSensorList[o].funNum){
|
|
|
|
|
|
+ if(self.dialogForm.riskPlanSensorList[x].sensorType==self.form.labRiskPlanLevels[i].riskPlanSensorList[o].sensorType){
|
|
num ++
|
|
num ++
|
|
if(self.dialogForm.riskPlanSensorList[x].minMonitor>=self.form.labRiskPlanLevels[i].riskPlanSensorList[o].minMonitor&&
|
|
if(self.dialogForm.riskPlanSensorList[x].minMonitor>=self.form.labRiskPlanLevels[i].riskPlanSensorList[o].minMonitor&&
|
|
self.dialogForm.riskPlanSensorList[x].minMonitor<=self.form.labRiskPlanLevels[i].riskPlanSensorList[o].maxMonitor){
|
|
self.dialogForm.riskPlanSensorList[x].minMonitor<=self.form.labRiskPlanLevels[i].riskPlanSensorList[o].maxMonitor){
|
|
@@ -481,8 +490,8 @@
|
|
if(this.dialogIndex != i){
|
|
if(this.dialogIndex != i){
|
|
for(let o=0;o<self.form.labRiskPlanLevels[i].riskPlanSensorList.length;o++){
|
|
for(let o=0;o<self.form.labRiskPlanLevels[i].riskPlanSensorList.length;o++){
|
|
for(let x=0;x<self.sensorList.length;x++){
|
|
for(let x=0;x<self.sensorList.length;x++){
|
|
- if(self.form.labRiskPlanLevels[i].riskPlanSensorList[o].funNum == self.sensorList[x].funNum){
|
|
|
|
- text.push(self.sensorList[x].describe);
|
|
|
|
|
|
+ if(self.form.labRiskPlanLevels[i].riskPlanSensorList[o].sensorType == self.sensorList[x].hardwareTypeCode){
|
|
|
|
+ text.push(self.sensorList[x].hardwareTypeName);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -490,8 +499,8 @@
|
|
}
|
|
}
|
|
for(let i=0;i<self.dialogForm.riskPlanSensorList.length;i++){
|
|
for(let i=0;i<self.dialogForm.riskPlanSensorList.length;i++){
|
|
for(let x=0;x<self.sensorList.length;x++){
|
|
for(let x=0;x<self.sensorList.length;x++){
|
|
- if(self.dialogForm.riskPlanSensorList[i].funNum == self.sensorList[x].funNum){
|
|
|
|
- text.push(self.sensorList[x].describe);
|
|
|
|
|
|
+ if(self.dialogForm.riskPlanSensorList[i].sensorType == self.sensorList[x].hardwareTypeCode){
|
|
|
|
+ text.push(self.sensorList[x].hardwareTypeName);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -512,16 +521,16 @@
|
|
for(let i=0;i<self.form.labRiskPlanLevels.length;i++){
|
|
for(let i=0;i<self.form.labRiskPlanLevels.length;i++){
|
|
for(let o=0;o<self.form.labRiskPlanLevels[i].riskPlanSensorList.length;o++){
|
|
for(let o=0;o<self.form.labRiskPlanLevels[i].riskPlanSensorList.length;o++){
|
|
for(let x=0;x<self.sensorList.length;x++){
|
|
for(let x=0;x<self.sensorList.length;x++){
|
|
- if(self.form.labRiskPlanLevels[i].riskPlanSensorList[o].funNum == self.sensorList[x].funNum){
|
|
|
|
- text.push(self.sensorList[x].describe);
|
|
|
|
|
|
+ if(self.form.labRiskPlanLevels[i].riskPlanSensorList[o].sensorType == self.sensorList[x].hardwareTypeCode){
|
|
|
|
+ text.push(self.sensorList[x].hardwareTypeName);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
for(let i=0;i<self.dialogForm.riskPlanSensorList.length;i++){
|
|
for(let i=0;i<self.dialogForm.riskPlanSensorList.length;i++){
|
|
for(let x=0;x<self.sensorList.length;x++){
|
|
for(let x=0;x<self.sensorList.length;x++){
|
|
- if(self.dialogForm.riskPlanSensorList[i].funNum == self.sensorList[x].funNum){
|
|
|
|
- text.push(self.sensorList[x].describe);
|
|
|
|
|
|
+ if(self.dialogForm.riskPlanSensorList[i].sensorType == self.sensorList[x].hardwareTypeCode){
|
|
|
|
+ text.push(self.sensorList[x].hardwareTypeName);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -589,8 +598,8 @@
|
|
if(index != i){
|
|
if(index != i){
|
|
for(let o=0;o<self.form.labRiskPlanLevels[i].riskPlanSensorList.length;o++){
|
|
for(let o=0;o<self.form.labRiskPlanLevels[i].riskPlanSensorList.length;o++){
|
|
for(let x=0;x<self.sensorList.length;x++){
|
|
for(let x=0;x<self.sensorList.length;x++){
|
|
- if(self.form.labRiskPlanLevels[i].riskPlanSensorList[o].funNum == self.sensorList[x].funNum){
|
|
|
|
- text.push(self.sensorList[x].describe);
|
|
|
|
|
|
+ if(self.form.labRiskPlanLevels[i].riskPlanSensorList[o].sensorType == self.sensorList[x].hardwareTypeCode){
|
|
|
|
+ text.push(self.sensorList[x].hardwareTypeName);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|