<!--
  @description: 采购方澄清 详情查看
  @Modifier: 杨胜国
  @routerPath:/procurement/procurementDriveSupplier/procEvaluateClarifySupplier/procEvaluateClarifySupDetail
  @date: 2021-02-08 10:48:06
-->
<template>
  <div>
    <table class="tableData">
      <tr>
        <td>
          澄清标题
        </td>
        <td colspan="3">
          {{ formData.bidClarificationTitle }}
        </td>
      </tr>
      <!-- <tr>
        <td>
          澄清内容文件
        </td>
        <td colspan="3">
          <downloadFile :data="bidClarificationContent" />
        </td>
      </tr> -->
      <tr>
        <td>
          澄清文件
        </td>
        <td colspan="3">
          <downloadFile :data="bidClarificationAttachment" />
        </td>
      </tr>
      <tr>
        <td>
          澄清回复文件
        </td>
        <td colspan="3">
          <downloadFile :data="bidClarificationSupContent" />
        </td>
      </tr>
      <tr>
        <td>
          附件
        </td>
        <td colspan="3">
          <downloadFile :data="bidClarificationSupAttachment" />
        </td>
      </tr>
    </table>
    <div class="but_footer">
      <div class="but_footer-h" />
      <div class="but_footer-but">
        <el-button @click="back">
          返 回
        </el-button>
      </div>
    </div>
  </div>
</template>

<script>
/* api*/
import { getEditQuestionInfo } from '@/api/procurement/procurementProject'// 澄清
/* 混合开发方法-参数字段*/
import { clarificationMixin } from '../../mixins/clarificationMixin'// 澄清质疑-公用参数

/* 组件*/
import downloadFile from '@comp/common/updownload/downloadFile'
export default {
  name: 'ClarificationQuestionAdd',
  components: {
    downloadFile
  },
  mixins: [clarificationMixin],
  data() {
    return {
      formData: {
        bidClarificationTitle: this.$route.params.bidClarificationTitle // 澄清标题
      },
      // 标中澄清内容文件
      bidClarificationSupContent: {
        bizId: this.$route.params.bidClarificationSupplierId,
        fileType: 'procurement_bid_clarification_receipt_content'
      },
      // 标中澄清附件
      bidClarificationSupAttachment: {
        bizId: this.$route.params.bidClarificationSupplierId,
        fileType: 'procurement_bid_clarification_receipt_attachment'
      }
    }
  },
  created() {
    // 获取问题详情
    // this.getEditQuestionInfo()
    // 初始化
    this.init()
  },
  methods: {
    init() {
      // 采购附件id赋值
      this.bidClarificationContent.bizId = this.bidClarificationAttachment.bizId = this.$route.params.bidClarificationId
    },
    // 采购人-新增时获取澄清版本
    getEditQuestionInfo() {
      const params = {
        bidClarificationSupplierId: this.$route.params.bidClarificationSupplierId
      }
      getEditQuestionInfo(params).then(response => {
        this.formData = response.data
        this.questionContent.bizId = response.data.questionId
      }).catch(() => {
      })
    },
    back() {
      this.$router.push({
        name: 'procEvaluateClarifySupList'
      })
    }
  }
}
</script>

<style scoped>
</style>
