<!--
  @description:采购立项-供应商-可参与项目-采购公告
  @Modifier:gmy
  @routerPath:/procurement/procurementNotice
  @date:2020/3/25-11:27
-->
<template>
  <div>
    <div class="page-title title_border clearfix" style="padding: 0 8px">
      <section class="title p0-16 clearfix">
        <!-- 返回 -->
        <div class="title-back pointer fl" @click="back">
          <i class="iconfont icon-fanhui mr10" />{{ titleMessage }}
        </div>
        <div class="fr">
          <el-button
            type="primary"
            size="small"
            @click="participationPriject"
          >
            参与项目
          </el-button>
        </div>
      </section>
    </div>
    <procurementProjectLetterComp v-if="pdfData.packId" :tender-type="pdfData.tenderType" :pack-id="pdfData.packId" />
  </div>
</template>
<script>
import { procurementProjectMixins } from '../mixins/procurementProjectMixins'
import procurementProjectLetterComp from '@views/procurement/procurementProject/procurementProjectLetter/procurementProjectLetterComp.vue'
export default {
  name: 'ProjectManagerTenderList',
  components: {
    procurementProjectLetterComp
  },
  mixins: [procurementProjectMixins],
  data() {
    return {
      pdfData: {
        tenderId: '', // 项目Id
        packId: this.$route.query.packId,
        id: '', // 公告Id
        bizId: this.$route.query.bizId,
        tenderType: this.$route.query.tenderType,
        tenderMethod: '' // 采购方式
      },
      titleMessage: '采购公告'
    }
  },
  methods: {
    // 参与项目
    participationPriject() {
      // 获取项目的采购方式 14||15 前往竞价页面
      const tenderMethod = this.$route.query.tenderMethod
      // 获取项目标段Id
      const packIds = this.$route.query.packId
      this.$router.push({
        path: '/procurement/procurementContactsApply',
        query: {
          packId: packIds, // 项目标段id
          tenderMethod: tenderMethod // 采购方式
        }
      })
    },
    // 返回
    back() {
      // 获取采购方式
      const tenderMethod = this.$route.query.tenderMethod
      // 返回对应的页面
      this.$router.push(this.driveSupplierList[tenderMethod])
    }
  }
}
</script>
<style lang="less" scoped>
</style>
