<template>
        <a-tabs default-active-key="1" @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-tabs>
</template>

<script>
import ItdmWenxiangList from '../itdmWenxiang/ItdmWenxiangList.vue'
import ItdmWenxiangVoltageList from '../itdmWenxiangVoltage/ItdmWenxiangVoltageList.vue';
  export default {
    name: 'itdmDeviceDataList',
    components: {
        ItdmWenxiangList,
        ItdmWenxiangVoltageList
    },
    data () {
      return {
        timer1: '',
        timer2: '',
      }
    },
    methods: {
      submitCallback(){
        this.$emit('ok');
      },
      callback(key) {
        if (key == 1) {
          this.timer1 = new Date().getTime()
        } else if (key == 2) {
          this.timer2 = new Date().getTime()
        }
      },
    }
  }
</script>

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