<!-- 应急疏散全屏 -->
<template>
  <div class="performEvacuationBig">
    <perform-evacuation-home v-if="pageType == 1" :propsBigData="propsBigData"></perform-evacuation-home>
    <perform-evacuation-data v-if="pageType == 2" :propsBigData="propsBigData"></perform-evacuation-data>
  </div>
</template>
<script>
  import performEvacuationHome from "./performEvacuationHome.vue"
  import performEvacuationData from "./performEvacuationData.vue"
  export default {
    name: 'performEvacuationBig',
    components: {
      performEvacuationHome,
      performEvacuationData
    },
    data () {
      return {
        pageType:null,
        propsBigData:{
          buildId:null,
          floorId:null,
        },
      }
    },
    created () {
      if(this.$route.query.type == 2){
        this.$set(this,'propsBigData',{
          buildId:this.$route.query.buildId,
          floorId:this.$route.query.floorId,
        });
        this.$set(this,'pageType',2);
      }else if(this.$route.query.type == 1){
        this.$set(this,'propsBigData',{
          buildId:this.$route.query.buildId,
          floorId:this.$route.query.floorId,
        });
        this.$set(this,'pageType',1);
      }else{

      }
    },
    mounted () {

    },
    methods: {
      goPage(type,data){
        if(this.$route.query.buildId){
          delete this.$route.query.buildId;
        }
        if(this.$route.query.subId){
          delete this.$route.query.subId;
        }
        if(this.$route.query.floorId){
          delete this.$route.query.floorId;
        }
        if(this.$route.query.groupId){
          delete this.$route.query.groupId;
        }
        if(type == 1){
          //二级返回至一级
          this.$set(this,'propsBigData',JSON.parse(JSON.stringify(data)));
          this.$set(this,'pageType',type);
        } else if(type == 2){
          //一级跳转至二级
          this.$set(this,'propsBigData',JSON.parse(JSON.stringify(data)));
          this.$set(this,'pageType',type);
        }
      },
    },
  }
</script>
<style scoped lang="scss">
  .performEvacuationBig{

  }
</style>
