<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">
            <MeterReviewEntrust ref="waitTabs"></MeterReviewEntrust>
          </el-tab-pane>
          <el-tab-pane label="历史评审" name="his">
            <MeterReviewEntrustHis ref="hisTabs"></MeterReviewEntrustHis>
          </el-tab-pane>
        </el-tabs>
      </div>
    </div>
  </div>
</template>

<script>
import MeterReviewEntrust from './MeterContractApproval'
import MeterReviewEntrustHis from './MeterContractApprovalHis'
export default {
  name: 'MeterSendEntrustIndex',
  components: {
    MeterReviewEntrust,
    MeterReviewEntrustHis
  },
  data() {
    return {
      activeName: 'wait'
    }
  },
  mounted() {
    this.activeName = 'wait'
    this._page()
  },
  methods: {
    _changeTabs(tab, event) {
      if (tab.name === 'wait') {
        this._page()
      } else {
        this.$refs.hisTabs._page()
      }
    },
    _page() {
      this.$refs.waitTabs._page()
    }
  }
}
</script>

<style scoped>
</style>
