<!--
  @description:采购立项-采购人-报价
  @Modifier:gmy
  @routerPath:/procurement/procurementDrive/offerPurchase
  @date:2020/5/27-13:27
-->
<template>
  <router-view />
</template>

<script>

export default {
  name: 'ProcurementOfferContentVue',
  inject: ['getTenderBase'], // 引入项目信息

  data() {
    return {
    }
  },
  // watch: {
  //   '$route': function(to, from) {
  //     // 获取采购方式
  //     const { tenderMethod } = this.getTenderBase()
  //     // 调用跳转路由方法
  //     this.pushRouter(tenderMethod)
  //   }
  // },
  created() {
    // 获取采购方式
    const { tenderMethod } = this.getTenderBase()
    // 调用跳转路由方法
    this.pushRouter(tenderMethod)
  },
  methods: {
    pushRouter(tenderMethod) {
      // router携带参数
      let path = ''// 路由地址
      // 竞价类
      if (tenderMethod === '14') {
        path = '/procurement/procurementDrive/offerPurchase/offerBiddingOuterNo'
      } else { // 非竞价类
        path = '/procurement/procurementDrive/offerPurchase/offerEnquirtEnquiry'
      }
      // 路由跳转
      this.$router.push({ path: path
      })
    }
  }}
</script>

<style scoped>

</style>
