<!--
  @description: 驱动内-招标公告内容/资审公告内容
  @Modifier: 肖文龙
  @routerPath:bidding/projectDrive/bulletin/makeTenderingBulletinPdf
  @date: 2020/4/22
-->
<template>
  <div>
    <div class="page-title" style="text-align:right;">
      <!-- 新增信息 -->
      <el-button type="primary" style="margin-right: 20px" @click="lookInformation">
        查看基本信息
      </el-button>
    </div>
    <bulletinPdfDetail />
    <!--当前页面从哪进来的  01 驱动内列表页-->
    <div v-if="bulletinPageType==='01'" class="but_footer">
      <div class="but_footer-h" />
      <div class="but_footer-but">
        <el-button @click="back()">
          返 回
        </el-button>
      </div>
    </div>
    <lookBasicInformationDialog ref="lookBasicInformationDialog" />
  </div>
</template>

<script>
/* 组件*/
import bulletinPdfDetail from './bulletinPdf-detail' // 招标公告/资审公告
import lookBasicInformationDialog from './lookBasicInformation-dialog' // 查看基本信息
export default {
  name: 'MakeTenderingBulletinPdfDetail',
  components: {
    bulletinPdfDetail,
    lookBasicInformationDialog
  },
  data() {
    return {
      tenderBase: this.$store.getters.tenderBase, // 项目信息
      bulletinPageType: this.$route.query.bulletinPageType // 当前页面从哪进来的  01 驱动内列表页 02 驱动内直接展示详情页
    }
  },
  methods: {
    // 查看基本信息
    lookInformation() {
      this.$refs.lookBasicInformationDialog.open()
    },
    // 返回
    back() {
      const query = { ...this.$route.query }
      let path = ''
      if (this.tenderBase.bulletinType === '01') { // 招标公告
        path = '/bidding/projectDrive/bulletin/bidBulletinList'
      } else if (this.tenderBase.bulletinType === '21') { // 资审公告
        path = '/bidding/projectDrive/zsBulletin/bidBulletinList'
      }
      this.$router.push({
        path: path,
        query: {
          id: query.id, // 项目id
          tenderName: query.tenderName, // 项目名称
          stageIds: query.stageIds, // 阶段Id
          packId: query.packId// 标段Id
        }
      })
    }
  }
}
</script>

<style scoped lang="less">

</style>
