<!-- 应急疏散全屏 -->
<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>
    <fullH5PlayerVideo v-if="fullVideoType" :fullVideoProps="fullVideoProps"></fullH5PlayerVideo>
  </div>
</template>
<script>
  import performEvacuationHome from "./performEvacuationHome.vue"
  import performEvacuationData from "./performEvacuationData.vue"
  import fullH5PlayerVideo from '@/components/fullH5PlayerVideo/fullH5PlayerVideo.vue'
  export default {
    name: 'performEvacuationBig',
    components: {
      performEvacuationHome,
      performEvacuationData,
      fullH5PlayerVideo
    },
    data () {
      return {
        pageType:null,
        propsBigData:{
          buildId:null,
          floorId:null,
        },
        //全屏视频参数
        fullVideoProps:{},
        fullVideoType:false,
      }
    },
    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);
        }
      },
      //全屏开启-关闭轮播
      stopTime(cameraIndexCode){
        this.$set(this,'fullVideoProps',{cameraIndexCode:cameraIndexCode});
        this.$set(this,'fullVideoType',true);
      },
      //全屏关闭-开启轮播
      outFullScreen(){
        this.$set(this,'fullVideoType',false);
        this.$set(this,'fullVideoProps',{});
      },
    },
  }
</script>
<style scoped lang="scss">
  .performEvacuationBig{

  }
</style>
