<template>
  <div class="app-container" style="height: calc(100vh)!important">
    <el-tabs class="h100" v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="1000计算方式" name="1000">
        <AnalysisChart ref="childRef" v-if="activeName === '1000'" :activeName="activeName" :noticeType="noticeType"></AnalysisChart>
      </el-tab-pane>
      <el-tab-pane label="1024计算方式" name="1024">
        <AnalysisChart ref="childRef" v-if="activeName === '1024'" :activeName="activeName" :noticeType="noticeType"></AnalysisChart>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script setup>
  import AnalysisChart from './analysisChart'
  export default {
    name: 'DialogView',
    components: {AnalysisChart},
    dicts: ['eps_bandwidth_type'],
    data() {
      return {
        activeName: '',
        noticeType: [],
      }
    },
    created() {},
    mounted() {
      this.storageKey = this.$route.query && this.$route.query['storageKey'];
      if (this.storageKey) {
        let paramsData = JSON.parse(localStorage.getItem(this.storageKey));
        this.activeName = paramsData.activeName;
      //   if (this.paramsData && this.paramsData.dictList) {
      //     this.switchData = this.paramsData.dictList.map((item,index) => {
      //       this.typeObj[item.value] = {type: item.value, indexVal: index};
      //       let obj = {
      //         label: item.label,
      //         value: item.value,
      //         checkType: true
      //       };
      //       return obj;
      //     });
      //   }
      //   if (this.paramsData && this.paramsData.list) {
      //     this.processData(this.paramsData.list);
      //   }
      //   if (this.paramsData && this.paramsData.resourceType) {
      //     this.fnNodeName(this.paramsData.resourceType);
      //   }
      }
    },
    // destroyed() {
    //   localStorage.removeItem(this.storageKey);
    // },
    methods: {
      handleClick() {
        this.noticeType = this.$refs.childRef.form.noticeType;
      }
    }
  }
</script>
<style scoped>
  ::v-deep .el-tabs__content {
    height: calc(100vh - 70px)!important;
  }
</style>
