|
@@ -174,7 +174,11 @@
|
|
|
</div>
|
|
|
<div class="plan-time-box">
|
|
|
<img src="@/assets/ZDimages/bigData3_2/icon_dp_bjsj.png">
|
|
|
- <p>2022年12月12日 17:34:03</p>
|
|
|
+ <p>{{item.riskPlanTriggerTime}}</p>
|
|
|
+ </div>
|
|
|
+ <div class="plan-text-box">
|
|
|
+ <p class="plan-title-p" :class="item.riskPlanLevel==1?'color-type-1':(item.riskPlanLevel==2?'color-type-2':(item.riskPlanLevel==3?'color-type-3':(item.riskPlanLevel==4?'color-type-4':'')))">{{item.riskPlanLevelName}}</p>
|
|
|
+ <p class="plan-text-p">{{item.riskPlanLevel==1?'发生风险:火灾预警':'发生风险预警'}}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -419,7 +423,7 @@
|
|
|
import { getDeviceList,addHxpChemical,getHornLastMess, subOnlineUser,
|
|
|
exitHazardTotal,getFireStatus,getFloorData,getBuildOrFloorList,
|
|
|
executeEvacuation,endEvacuation,openLight,closeLight,getRedisEvacuation,
|
|
|
- outfirepc,isCancelOutFile,selectTriggerInfo} from '@/api/evacuationBigData/index.js'
|
|
|
+ outfirepc,isCancelOutFile,selectTriggerInfo,riskPlanId} from '@/api/evacuationBigData/index.js'
|
|
|
export default {
|
|
|
name: 'newEvacuationBigData',
|
|
|
props:{
|
|
@@ -552,6 +556,8 @@
|
|
|
shadeMapList:[],
|
|
|
//实验室选中/报警数据
|
|
|
checkSubId:null,
|
|
|
+ //传参状态
|
|
|
+ planDataType:false,
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -560,14 +566,38 @@
|
|
|
}else{
|
|
|
this.$set(this,'routeType',false);
|
|
|
}
|
|
|
+ if(this.$route.query.subId){
|
|
|
+ this.$set(this,'buildingId',this.$route.query.buildingId);
|
|
|
+ this.$set(this,'floorId',this.$route.query.floorId);
|
|
|
+ this.$set(this,'subId',this.$route.query.subId);
|
|
|
+ this.$set(this,'checkSubId',this.$route.query.subId);
|
|
|
+ if(this.$route.query.riskPlanId){
|
|
|
+ this.riskPlanId(this.$route.query.riskPlanId);
|
|
|
+ }
|
|
|
+ this.$set(this,'planDataType',true);
|
|
|
+ this.initialization();
|
|
|
+ console.log('有参数',this.$route.query);
|
|
|
+ }else{
|
|
|
+ this.$set(this,'planDataType',false);
|
|
|
+ this.initialization();
|
|
|
+ console.log('无参数',this.$route.query);
|
|
|
+ }
|
|
|
},
|
|
|
mounted(){
|
|
|
//全局类MQTT
|
|
|
// this.onAllMQTT('on');
|
|
|
//初始化
|
|
|
- this.initialization();
|
|
|
+ // this.initialization();
|
|
|
},
|
|
|
methods:{
|
|
|
+ //标记当前查看的预案
|
|
|
+ riskPlanId(riskPlanId){
|
|
|
+ let obj = {
|
|
|
+ riskPlanId:riskPlanId,
|
|
|
+ ifcheck:1,
|
|
|
+ };
|
|
|
+ riskPlanId(obj).then(response => {})
|
|
|
+ },
|
|
|
//初始化
|
|
|
initialization(){
|
|
|
getBuildOrFloorList({type:2,parentId:''}).then(response => {
|
|
@@ -576,17 +606,21 @@
|
|
|
response.data[i].planType = false
|
|
|
}
|
|
|
this.$set(this,'buildingOptions',response.data);
|
|
|
- //处理实验室数量多的楼栋优先选择
|
|
|
- let num = 0;
|
|
|
- let index = null;
|
|
|
- for(let i=0;i<response.data.length;i++){
|
|
|
- if(response.data[i].subNum>num){
|
|
|
- num = response.data[i].subNum;
|
|
|
- index = i;
|
|
|
+ if(this.planDataType){
|
|
|
+ this.getBuildOrFloorList();
|
|
|
+ }else{
|
|
|
+ //处理实验室数量多的楼栋优先选择
|
|
|
+ let num = 0;
|
|
|
+ let index = null;
|
|
|
+ for(let i=0;i<response.data.length;i++){
|
|
|
+ if(response.data[i].subNum>num){
|
|
|
+ num = response.data[i].subNum;
|
|
|
+ index = i;
|
|
|
+ }
|
|
|
}
|
|
|
+ this.$set(this,'buildingId',response.data[index].id);
|
|
|
+ this.getBuildOrFloorList('automatic');
|
|
|
}
|
|
|
- this.$set(this,'buildingId',response.data[index].id);
|
|
|
- this.getBuildOrFloorList('automatic');
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -615,13 +649,12 @@
|
|
|
this.$set(this,'subText',subText);
|
|
|
this.buttonSubject();
|
|
|
}
|
|
|
-
|
|
|
- for(let i=0;i<self.planMapList.length;i++){
|
|
|
- if(self.planMapList[i].subId == item.subId){
|
|
|
- this.$set(self.planMapList[i],'planType',true)
|
|
|
- }
|
|
|
- }
|
|
|
if(item.planType){
|
|
|
+ for(let i=0;i<self.planMapList.length;i++){
|
|
|
+ if(self.planMapList[i].subId == item.subId){
|
|
|
+ this.$set(self.planMapList[i],'planType',true)
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}else{
|
|
|
this.msgError('操作失败,您不是该实验室的管理人员。')
|
|
@@ -1511,13 +1544,25 @@
|
|
|
}
|
|
|
this.$set(this,'floorText',floorText);
|
|
|
//自动选中楼层中该用户有权限的第一个实验室
|
|
|
- for(let i=0;i<response.data.buildFloorLayoutVoList.length;i++){
|
|
|
- if(response.data.buildFloorLayoutVoList[i].loginAdmin === true){
|
|
|
- let subText = response.data.buildFloorLayoutVoList[i].roomType == '-99'?response.data.buildFloorLayoutVoList[i].roomName:response.data.buildFloorLayoutVoList[i].subName +' - '+ response.data.buildFloorLayoutVoList[i].roomNum;
|
|
|
- this.$set(this,'subText',subText);
|
|
|
- this.$set(this,'subId',response.data.buildFloorLayoutVoList[i].subId);
|
|
|
- this.$set(this,'checkSubId',response.data.buildFloorLayoutVoList[i].subId);
|
|
|
- break
|
|
|
+ if(!this.planDataType){
|
|
|
+ console.log('无传参');
|
|
|
+ for(let i=0;i<response.data.buildFloorLayoutVoList.length;i++){
|
|
|
+ if(response.data.buildFloorLayoutVoList[i].loginAdmin === true){
|
|
|
+ let subText = response.data.buildFloorLayoutVoList[i].roomType == '-99'?response.data.buildFloorLayoutVoList[i].roomName:response.data.buildFloorLayoutVoList[i].subName +' - '+ response.data.buildFloorLayoutVoList[i].roomNum;
|
|
|
+ this.$set(this,'subText',subText);
|
|
|
+ this.$set(this,'subId',response.data.buildFloorLayoutVoList[i].subId);
|
|
|
+ this.$set(this,'checkSubId',response.data.buildFloorLayoutVoList[i].subId);
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ console.log('传参');
|
|
|
+ for(let i=0;i<response.data.buildFloorLayoutVoList.length;i++){
|
|
|
+ if(response.data.buildFloorLayoutVoList[i].subId == self.subId){
|
|
|
+ let subText = response.data.buildFloorLayoutVoList[i].roomType == '-99'?response.data.buildFloorLayoutVoList[i].roomName:response.data.buildFloorLayoutVoList[i].subName +' - '+ response.data.buildFloorLayoutVoList[i].roomNum;
|
|
|
+ this.$set(this,'subText',subText);
|
|
|
+ break
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
//处理实验室弹窗数据
|
|
@@ -1556,10 +1601,13 @@
|
|
|
}
|
|
|
}
|
|
|
this.$set(this,'planMapList',roomList);
|
|
|
+ //获取相关实验室数据
|
|
|
this.buttonSubject();
|
|
|
+ //查询当前是否有进行中的疏散
|
|
|
this.getRedisEvacuation();
|
|
|
//测试查询预案
|
|
|
this.selectTriggerInfo();
|
|
|
+ this.$set(this,'planDataType',false);
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -1626,19 +1674,19 @@
|
|
|
response.data[i].planType = false
|
|
|
}
|
|
|
this.$set(this,'floorOptions',response.data);
|
|
|
- if(type == 'automatic'){
|
|
|
- //处理实验室数量多的楼层优先选择
|
|
|
- let num = 0;
|
|
|
- let index = null;
|
|
|
- for(let i=0;i<response.data.length;i++){
|
|
|
- if(response.data[i].subNum>num){
|
|
|
- num = response.data[i].subNum;
|
|
|
- index = i;
|
|
|
+ if(!this.planDataType){
|
|
|
+ if(type == 'automatic'){
|
|
|
+ //处理实验室数量多的楼层优先选择
|
|
|
+ let num = 0;
|
|
|
+ let index = null;
|
|
|
+ for(let i=0;i<response.data.length;i++){
|
|
|
+ if(response.data[i].subNum>num){
|
|
|
+ num = response.data[i].subNum;
|
|
|
+ index = i;
|
|
|
+ }
|
|
|
}
|
|
|
+ this.$set(this,'floorId',response.data[index].id);
|
|
|
}
|
|
|
- this.$set(this,'floorId',response.data[index].id);
|
|
|
- }else{
|
|
|
- this.$set(this,'floorId',response.data[0].id);
|
|
|
}
|
|
|
//获取楼层消息
|
|
|
this.getHornLastMess();
|
|
@@ -1685,10 +1733,19 @@
|
|
|
let num = 0;
|
|
|
for(let i=0;i<response.data.length;i++){
|
|
|
if(response.data[i].subId == self.mapList[o].subId){
|
|
|
- num++
|
|
|
+ self.mapList[o].planType = true;
|
|
|
+ for(let x=0;x<self.planMapList.length;x++){
|
|
|
+ if(self.planMapList[x].subId == self.mapList[o].subId){
|
|
|
+ self.planMapList[x].riskPlanTriggerTime = response.data[i].riskPlanTriggerTime;
|
|
|
+ self.planMapList[x].riskAttribute = response.data[i].riskAttribute;
|
|
|
+ self.planMapList[x].riskPlanLevel = response.data[i].riskPlanLevel;
|
|
|
+ self.planMapList[x].riskPlanLevelName = response.data[i].riskPlanLevelName;
|
|
|
+ self.planMapList[x].planType = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- self.mapList[o].planType = num != 0;
|
|
|
+ // self.mapList[o].planType = num != 0;
|
|
|
}
|
|
|
}
|
|
|
//浮层实验室预案标记
|
|
@@ -2536,6 +2593,42 @@
|
|
|
font-size:14px;
|
|
|
}
|
|
|
}
|
|
|
+ .plan-text-box{
|
|
|
+ display: flex;
|
|
|
+ color:#fff;
|
|
|
+ margin-top:22px;
|
|
|
+ overflow: hidden;
|
|
|
+ .plan-title-p{
|
|
|
+ width:60px;
|
|
|
+ height:20px;
|
|
|
+ line-height:20px;
|
|
|
+ font-size:14px;
|
|
|
+ text-align: center;
|
|
|
+ margin:0 10px 0 18px;
|
|
|
+ border-radius:15px;
|
|
|
+ }
|
|
|
+ .plan-text-p{
|
|
|
+ width:170px;
|
|
|
+ height:20px;
|
|
|
+ line-height:20px;
|
|
|
+ font-size:14px;
|
|
|
+ overflow:hidden;
|
|
|
+ text-overflow:ellipsis;
|
|
|
+ white-space:nowrap;
|
|
|
+ }
|
|
|
+ .color-type-1{
|
|
|
+ background: #0183FA;
|
|
|
+ }
|
|
|
+ .color-type-2{
|
|
|
+ background: #FF9900;
|
|
|
+ }
|
|
|
+ .color-type-3{
|
|
|
+ background: #FF4800;
|
|
|
+ }
|
|
|
+ .color-type-4{
|
|
|
+ background: #FF0000;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
.check-plan-map-for-box{
|
|
|
z-index:1000!important;
|