<template>
        <a-tabs default-active-key="2" @change="callback" class="card-container">
<!--          <a-tab-pane key="1" tab="温箱试验数据">-->
<!--            <itdm-wenxiang-list @ok="submitCallback" :key="timer1"></itdm-wenxiang-list>-->
<!--          </a-tab-pane>-->
          <a-tab-pane key="2" tab="通用电压数据" force-render>
            <itdm-wenxiang-voltage-list :key="timer2"></itdm-wenxiang-voltage-list>
          </a-tab-pane>
          <a-tab-pane key="3" tab="0.5立方温箱试验数据" force-render>
            <ItdmWenxiangHistory05List :key="timer3"></ItdmWenxiangHistory05List>
          </a-tab-pane>
          <a-tab-pane key="4" tab="1立方温箱试验数据" force-render>
            <ItdmWenxiangHistory1List :key="timer4"></ItdmWenxiangHistory1List>
          </a-tab-pane>
          <a-tab-pane key="5" tab="8立方温箱试验数据" force-render>
            <ItdmWenxiangHistory8List :key="timer5"></ItdmWenxiangHistory8List>
          </a-tab-pane>
          <a-tab-pane key="6" tab="16立方温箱试验数据" force-render>
            <ItdmWenxiangHistory16List :key="timer6"></ItdmWenxiangHistory16List>
          </a-tab-pane>
          <a-tab-pane key="7" tab="48立方温箱试验数据" force-render>
            <ItdmWenxiangHistory48List :key="timer7"></ItdmWenxiangHistory48List>
          </a-tab-pane>
          <a-tab-pane key="8" tab="霉菌温箱试验数据" force-render>
            <ItdmWenxiangHistoryMjList :key="timer8"></ItdmWenxiangHistoryMjList>
          </a-tab-pane>
          <a-tab-pane key="9" tab="三综合温箱试验数据" force-render>
            <ItdmWenxiangHistorySzhList :key="timer9"></ItdmWenxiangHistorySzhList>
          </a-tab-pane>
        </a-tabs>
</template>

<script>
import ItdmWenxiangList from '../itdmWenxiang/ItdmWenxiangList.vue'
import ItdmWenxiangVoltageList from '../itdmWenxiangVoltage/ItdmWenxiangVoltageList.vue';
import ItdmWenxiangHistory05List from '../itdmWenxiangHistory/ItdmWenxiangHistory05List.vue'
import ItdmWenxiangHistory1List from '../itdmWenxiangHistory/ItdmWenxiangHistory1List'
import ItdmWenxiangHistory8List from '../itdmWenxiangHistory/ItdmWenxiangHistory8List.vue'
import ItdmWenxiangHistory16List from '../itdmWenxiangHistory/ItdmWenxiangHistory16List.vue'
import ItdmWenxiangHistory48List from '../itdmWenxiangHistory/ItdmWenxiangHistory48List.vue'
import ItdmWenxiangHistoryMjList from '../itdmWenxiangHistory/ItdmWenxiangHistoryMjList.vue'
import ItdmWenxiangHistorySzhList from '../itdmWenxiangHistory/ItdmWenxiangHistorySzhList.vue'


  export default {
    name: 'itdmDeviceDataList',
    components: {
      ItdmWenxiangList,
      ItdmWenxiangVoltageList,
      ItdmWenxiangHistory05List,
      ItdmWenxiangHistory1List,
      ItdmWenxiangHistory8List,
      ItdmWenxiangHistory16List,
      ItdmWenxiangHistory48List,
      ItdmWenxiangHistoryMjList,
      ItdmWenxiangHistorySzhList
    },
    data () {
      return {
        timer1: '',
        timer2: '',
        timer3: '',
        timer4: '',
        timer5: '',
        timer6: '',
        timer7: '',
        timer8: '',
        timer9: '',
      }
    },
    methods: {
      submitCallback(){
        this.$emit('ok');
      },
      callback(key) {
        if (key == 1) {
          this.timer1 = new Date().getTime()
        } else if (key == 2) {
          this.timer2 = new Date().getTime()
        } else if (key == 3) {
          this.timer3 = new Date().getTime()
        }else if (key == 4) {
          this.timer4 = new Date().getTime()
        }else if (key == 5) {
          this.timer5 = new Date().getTime()
        }else if (key == 6) {
          this.timer6 = new Date().getTime()
        }else if (key == 7) {
          this.timer7 = new Date().getTime()
        }else if (key == 8) {
          this.timer8 = new Date().getTime()
        }else if (key == 9) {
          this.timer9 = new Date().getTime()
        }
      },
    }
  }
</script>

<style scoped>
.ant-card-body{
    padding-top: 10px !important;
}
</style>