<!--
@description: 采购单变更公告记录弹框
@Modifier: gmy
@date: 2020-8-25 14:43:15
-->
<template>
  <el-dialog
    v-dialogDrag
    :visible.sync="dialogData.dialog"
    :close-on-click-modal="false"
    :title="'变更公告'"
    width="1086px"
    custom-class="el-dialog__body-p8"
  >
    <div>
      <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>
  </el-dialog>
</template>

<script>
/* api */
import { changeBulletinHtmlById } from '@/api/procurement/procurementBulletin' // 公开类采购变更记录查看
/* 公共方法*/
import { procurementAlterMixin } from './mixins/procurementAlterMixin'
export default {
  name: 'OfferQuotationPdfDetailVue',
  mixins: [procurementAlterMixin],
  props: {
    // 弹框展示状态
    dialogData: {
      type: Object,
      default: function() {
        return {
          alterBizId: ''
        }
      }
    }
  },
  data() {
    return {
      // 获取公告内容pdf
      htmlContent: ''
    }
  },
  created() {
    this.queryChangeMessageRequest()
  },
  methods: {
    // 查看变更记录请求
    queryChangeMessageRequest() {
      const alertBizId = this.dialogData.alterBizId
      // 公开类项目
      changeBulletinHtmlById(alertBizId).then(res => {
        this.htmlContent = res.data
      }).catch(() => {

      })
    },
    // 关闭
    closeClick() {
      this.dialogData.dialog = false
    }
  }
}
</script>

<style scoped>

</style>
