<!--
@description: 采购单变更公告工作流pdf查看
@Modifier: lxl
@routerPath:procurementProjectList/changeFlowDetail
@date: 2020-8-25 14:43:15
-->
<template>
  <div class="p0-16">
    <div v-html="htmlContent" />
    <!--   下载报价单/关闭 -- 按钮 -->
    <!-- <div class="but_footer">
      <div class="but_footer-h">
        <div class="but_footer-but">
          <el-button @click="closeClick">
            关闭
          </el-button>
        </div>
      </div>
    </div> -->
  </div>
</template>

<script>
/* api */
import { getChangeBulletinHtml } from '@/api/procurement/procurementEexception' // 公开类采购变更记录查看
// eslint-disable-next-line no-unused-vars
import { changeInvitaitonHtmlById } from '@/api/procurement/procurementInvitation' // 邀请类采购单变更记录查询
/* 公共方法*/
import { procurementAlterMixin } from '../procurementProjectAlter/mixins/procurementAlterMixin'
export default {
  name: 'ChangeFlowDetail',
  // inject: ['getTenderBase'],
  mixins: [procurementAlterMixin],

  data() {
    return {
      // tenderBase: this.getTenderBase(), // 获取项目信息
      // procurementRole: this.$route.meta.procurementRole, // 11 项目经理 12供应商
      // 获取公告内容pdf
      id: this.$route.query.bizId, // 获取变更数据id
      htmlContent: ''
    }
  },
  created() {
    this.queryChangeMessageRequest()
  },
  methods: {
    // 查看变更记录请求
    queryChangeMessageRequest() {
      // 公开类项目
      const params = {
        changeRecordId: this.id
      }
      getChangeBulletinHtml(params).then(res => {
        this.htmlContent = res.data
      }).catch(() => {

      })
      // 邀请类项目
      // changeInvitaitonHtmlById(id).then(res => {
      //   this.htmlContent = res.data
      // }).catch(() => {

      // })
    }
    // // 关闭
    // closeClick() {
    //   // procurementRole 11 代表项目经理 12代表供应商
    //   if (this.procurementRole === '11') {
    //     // 返回项目经理采购公告变更页面
    //     this.$router.push({ path: '/procurement/procurementDrive/procurementContentTabs/procurementAlterRecord',
    //       query: {
    //         ...this.$route.query
    //       }})
    //     return
    //   }
    //   // 返回供应商采购公告变更页面
    //   this.$router.push({ path: '/procurement/procurementDriveSupplier/procurementSupplierBulletin/procurementSupplierAlterRecord',
    //     query: {
    //       ...this.$route.query
    //     }})
    // }
  }
}
</script>

<style scoped>

</style>
