<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="review">
            <dataReview ref="reviewTab" />
          </el-tab-pane>
          <el-tab-pane label="历史复核" name="his">
            <dataReviewHis ref="hisTabs" />
          </el-tab-pane>
        </el-tabs>
      </div>
    </div>
  </div>
</template>
<script>
import dataReview from './tabs/dataReview'
import dataReviewHis from './tabs/dataReviewHis'
export default {
  components: { dataReview, dataReviewHis },
  data() {
    return {
      activeName: 'review'
    }
  },
  mounted() {
    this.activeName = 'review'
    this._page()
  },
  methods: {
    _changeTabs(tab, event) {
      if (tab.name === 'review') {
        this._page()
      } else {
        this.$refs.hisTabs._open()
      }
    },
    _page() {
      this.$refs.reviewTab._open()
    }
  }
}
</script>
