<template>
  <div class="full full-w-h">
    <left-lists @crossChange="crossChange" @lineChange="lineChange" class="full-h leftLists"/>
    <div class="full-h rightPart">
      <cross-indexes :key="id" :cross="clickModel" v-if="clickType==='cross'"/>
      <line-indexes :key="id" :line="clickModel" v-if="clickType==='line'"/>
    </div>
  </div>
</template>

<script>
import LeftLists from "@/views/signalEvaluation/leftLists/index.vue";
import CrossIndexes from "@/views/signalEvaluation/rightIndex/crossIndexes.vue";
import LineIndexes from "@/views/signalEvaluation/rightIndex/lineIndexes.vue";
import LoopVideo from "@/components/Standard/loopVideo.vue";
import DialogModel from "@/components/Standard/dialog-model.vue";
export default {
  components: {DialogModel, LoopVideo, LineIndexes, CrossIndexes, LeftLists},
  data(){
    return{
      clickType: null,
      clickModel: null,
      showVideo: false,
      channel: '',
      cameraTimeBetween:{},
      id:''
    }
  },
  created() {
  },
  mounted() {
  },
  computed:{
    componentKey(){
      return `key${this.id}`
    }
  },
  methods:{
    crossChange(e){
      console.log('e',e)
      this.clickModel = e;
      this.id = e.crossId
      this.clickType = 'cross'
    },
    lineChange(e){
      console.log('e',e)
      this.id = e.mainlineName
      this.clickModel = e;
      this.clickType = 'line'
    }
  },
  beforeDestroy() {
  }
}
</script>

<style lang="less" scoped>
.full{
  display: flex;
  justify-content: space-between;
}
.leftLists{
  width: 400px;
}
.rightPart{
  width: calc(100% - 420px);
}
</style>