<!--
  @description: 采购结果非竞价综合评审步骤切换组件
  @author: gmy
  @routerPath:/procurement/procurementDrive/offerResultContent/offerResultSynthesize
  @date: 2020-5-26 20:37:58
-->
<template>
  <div class="set-up-project main">
    <div class="step-wrapper">
      <tabs ref="tabs" :active="active" :is-open-all="isOpenAll" :list="tabsList" />
      <!--页面步骤条-->
    </div>
    <div>
      <router-view ref="project" @stepPage="_stepPage" />
    </div>
  </div>
</template>

<script>
import tabs from '@comp/common/tabs'
export default {
  name: 'ProcurementResultViewVue',
  components: {
    tabs
  },
  data() {
    return {
      active: 2,
      isOpenAll: false, // 是否开启所有节点
      tabsList: [
        {
          name: '确定成交人',
          path: '/procurement/procurementDrive/offerResultContent/offerResultSynthesize/offerResultConfirmPerson' // 确定成交人
        },
        {
          name: '成交物资分配',
          path: '/procurement/procurementDrive/offerResultContent/offerResultSynthesize/offerResultGoodsAllot' // 物资分配
        }
      ]
    }
  },
  created() {
  },
  methods: {
    // 控制上一步 下一步跳转页面 子组件传给父组件
    // prev 上一步 next 下一步 或者是数字直接指定展示第几步的页面
    _stepPage(page, active) {
      // 调用步骤条-组件方法
      if (page === 'next') {
        this.active = active
      }
      this.$refs.tabs.tabPage(page, ...this.$route.query)
    }
  }
}
</script>

<style scoped>

</style>
