|
@@ -3,7 +3,7 @@
|
|
|
<div class="app-container performEvacuation">
|
|
|
<div class="performEvacuation-page scrollbar-box" v-if="pageType == 1">
|
|
|
<div class="top-title-box building-box">
|
|
|
- <el-select v-model="buildingId" placeholder="请选择">
|
|
|
+ <el-select v-model="buildingId" @change="selectChange" placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in buildingList"
|
|
|
:key="item.value"
|
|
@@ -17,16 +17,6 @@
|
|
|
<div class="for-button-min-box" :class="buttonId == item.id ?'button-one':'button-two'"
|
|
|
@click="buttonListClick(item.id,index)"
|
|
|
v-for="(item,index) in floorList" :key="index">{{item.name}}</div>
|
|
|
- <!--<div class="for-button-null-box">疏散路径:</div>-->
|
|
|
- <!--<el-select v-model="form.lightDirection" clearable-->
|
|
|
- <!--@change="selectChange" placeholder="请选择疏散路径">-->
|
|
|
- <!--<el-option-->
|
|
|
- <!--v-for="item in routeList"-->
|
|
|
- <!--:key="item.id"-->
|
|
|
- <!--:label="item.name"-->
|
|
|
- <!--:value="item.id">-->
|
|
|
- <!--</el-option>-->
|
|
|
- <!--</el-select>-->
|
|
|
</div>
|
|
|
<div class="map-big-box">
|
|
|
<div class="map-min-box" :class="buttonId == '5'?'map-min-box-1':(buttonId == '6'?'map-min-box-2':(buttonId == '7'?'map-min-box-3':''))">
|
|
@@ -107,7 +97,15 @@
|
|
|
methods:{
|
|
|
getBuilding(id){
|
|
|
getBuilding(id).then(response => {
|
|
|
- this.$set(this,'floorList',response.data);
|
|
|
+ // this.$set(this,'floorList',response.data);
|
|
|
+ // 过滤了三楼
|
|
|
+ let list = [];
|
|
|
+ for(let i=0;i<response.data.length;i++){
|
|
|
+ if(response.data[i].id != 7){
|
|
|
+ list.push(response.data[i]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$set(this,'floorList',list);
|
|
|
if(response.data[0]){
|
|
|
this.$set(this,'buttonId',response.data[0].id);
|
|
|
this.$set(this,'fjList',response.data[0].list);
|
|
@@ -138,10 +136,17 @@
|
|
|
buttonListClick(id,index){
|
|
|
this.$set(this,'buttonId',id);
|
|
|
this.$set(this,'fjList',this.floorList[index].list);
|
|
|
+ this.$set(this,'subId',"");
|
|
|
+ this.$set(this,'title',"");
|
|
|
},
|
|
|
goPage(type){
|
|
|
- if(this.pageType != type){
|
|
|
- this.pageType = type;
|
|
|
+ if(type == 2){
|
|
|
+ this.pageType = 2;
|
|
|
+ }else if(type == 1){
|
|
|
+ this.treeselectByUser();
|
|
|
+ this.$set(this,'subId',"");
|
|
|
+ this.$set(this,'title',"");
|
|
|
+ this.pageType = 1;
|
|
|
}
|
|
|
},
|
|
|
//获取当前疏散页面
|
|
@@ -174,6 +179,7 @@
|
|
|
},
|
|
|
//确认疏散
|
|
|
goEvacuation(){
|
|
|
+ let self = this;
|
|
|
if(!this.subId){
|
|
|
this.msgError("请选择需要查看的实验室");
|
|
|
return
|
|
@@ -181,12 +187,25 @@
|
|
|
localStorage.setItem('evacuationSubId',this.subId)
|
|
|
localStorage.setItem('evacuationTitel',this.title)
|
|
|
localStorage.setItem('evacuationButtonId',this.buttonId)
|
|
|
+ localStorage.setItem('evacuationBuildingId',this.buildingId)
|
|
|
+ let address = "";
|
|
|
+ for(let i=0;i<self.buildingList.length;i++){
|
|
|
+ if(self.buildingList[i].value == self.buildingId){
|
|
|
+ address = self.buildingList[i].label
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for(let i=0;i<self.floorList.length;i++){
|
|
|
+ if(self.floorList[i].id == self.buttonId){
|
|
|
+ address = address +'-'+self.floorList[i].name;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ localStorage.setItem('evacuationAddress',address)
|
|
|
this.pageType = 2;
|
|
|
},
|
|
|
//选择疏散方向
|
|
|
selectChange(e){
|
|
|
- console.log("e",e)
|
|
|
- this.form.lightDirection = e;
|
|
|
+ this.$set(this,'buildingId',e);
|
|
|
+ this.getBuilding(this.buildingId);
|
|
|
},
|
|
|
}
|
|
|
}
|