<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="check">
            <SampleBackupsManage ref="checkTabs"></SampleBackupsManage>
          </el-tab-pane>
          <el-tab-pane label="历史任务" name="checkHis">
            <SampleBackupsQuery ref="checkHisTabs"></SampleBackupsQuery>
          </el-tab-pane>
        </el-tabs>
      </div>
    </div>
  </div>
</template>

<script>
import SampleBackupsManage from './DataCheck'
import SampleBackupsQuery from './DataCheckHis'

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