<template>
  <div>
    <div class="layout-content-padding">
      <div class="layout-content-main">
        <el-tabs v-model="activeName" @tab-click="_changeTabs">
          <el-tab-pane label="副样管理" name="wait">
            <SampleBackupsManage ref="waitTabs"></SampleBackupsManage>
          </el-tab-pane>
          <el-tab-pane label="副样查询" name="query">
            <SampleBackupsQuery ref="queryTabs"></SampleBackupsQuery>
          </el-tab-pane>
        </el-tabs>
      </div>
    </div>
  </div>
</template>

<script>
import SampleBackupsManage from './tab/SampleduplicateManage'
import SampleBackupsQuery from './tab/SampleduplicateQuery'

export default {
  components: {
    SampleBackupsManage,
    SampleBackupsQuery
  },
  data() {
    return {
      activeName: 'wait'
    }
  },
  mounted() {
    this.activeName = 'wait'
    this.$refs.waitTabs._page()
  },
  methods: {
    _changeTabs(tab, event) {
      if (tab.name === 'wait') {
        this.$refs.waitTabs._page()
      } else if (tab.name === 'applyRecord') {
        // this.$refs.applyRecordTabs._page()
      } else {
        this.$refs.queryTabs._page()
      }
    }
  }
}
</script>
