<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="report">
            <DrugSampleProduct ref="reportTabs"></DrugSampleProduct>
          </el-tab-pane>
          <el-tab-pane label="计划评审历史" name="his">
            <DrugProductSampleHis ref="hisTabs"></DrugProductSampleHis>
          </el-tab-pane>
        </el-tabs>
      </div>
    </div>
  </div>
</template>
<script>
import DrugProductSampleHis from './tabs/EnvPlanCheckHis'
import DrugSampleProduct from './tabs/EnvPlanCheck'
export default {
  components: { DrugProductSampleHis, DrugSampleProduct },
  data() {
    return {
      activeName: 'report'
    }
  },
  mounted() {
    this.activeName = 'report'
    this._page()
  },
  methods: {
    _changeTabs(tab, event) {
      if (tab.name === 'report') {
        this._page()
      } else {
        this.$refs.hisTabs._page()
      }
    },
    _page() {
      this.$refs.reportTabs._page()
    }
  }
}
</script>
