<template>
        <a-tabs default-active-key="1" @change="callback" class="card-container">
          <a-tab-pane key="1" tab="库存过期查看">
            <itdm-sample-expire-real-list :key="timer1"></itdm-sample-expire-real-list>
          </a-tab-pane>
          <a-tab-pane key="2" tab="设备过期" force-render>
            <itdm-device-gq :key="timer2"></itdm-device-gq>
          </a-tab-pane>
          <a-tab-pane key="3" tab="传感器过期" force-render>
            <itdm-chuanganqi-gq :key="timer3"></itdm-chuanganqi-gq>
          </a-tab-pane>
        </a-tabs>
</template>

<script>
import ItdmSampleExpireRealList from '../inventory/ItdmSampleExpireRealList.vue';
import ItdmDeviceGq from './itdmDeviceGq.vue';
import itdmChuanganqiGq from './itdmChuanganqiGq.vue';


  export default {
    name: 'itdmDeviceDataList',
    components: {
        ItdmSampleExpireRealList,
        ItdmDeviceGq,
        itdmChuanganqiGq
    },
    data () {
      return {
        timer1: '',
        timer2: '',
        timer3: '',
      }
    },
    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()
        }
      },
    }
  }
</script>

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