<!--
  @description:  采购方澄清-回执查看
  @Modifier: 杨胜国
  @routerPath:/procurement/procurementDriveSupplier/procClarificationSupplier/procClarificationDetail
  @date: 2021-02-08 10:48:06
-->
<template>
  <div>
    <table class="tableData">
      <tr>
        <td>
          澄清内容
        </td>
        <td colspan="3">
          {{ formData.clarificationTitle }}
        </td>
      </tr>
      <tr>
        <td>
          澄清文件
        </td>
        <td colspan="3">
          <downloadFile :data="questionContent" />
        </td>
      </tr>
      <!-- <tr>
        <td>
          澄清内容文件
        </td>
        <td colspan="3">
          <downloadFile :data="clarificationContent" />
        </td>
      </tr> -->
      <tr>
        <td>
          回执文件
        </td>
        <td colspan="3">
          <downloadFile :data="clarificaContent" />
        </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 { getEditClarificationInfo } 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: {},
      // 问题附件
      questionContent: {
        bizId: '',
        fileType: 'procurement_clarification_attachment'
      },
      // 澄清内容文件
      clarificationContent: {
        bizId: '',
        fileType: 'procurement_clarification_content'
      },
      clarificaContent: {
        bizId: this.$route.params.clarificationReceiptId,
        fileType: 'procurement_clarification_receipt_content'
      }
    }
  },
  created() {
    // 获取问题详情
    this.getEditQuestionInfo()
  },
  methods: {
    // 获取澄清信息
    getEditQuestionInfo() {
      const params = {
        clarificationId: this.$route.params.clarificationId
      }
      getEditClarificationInfo(params).then(response => {
        this.formData = response.data
        this.questionContent.bizId = this.clarificationContent.bizId = response.data.clarificationId
      }).catch(() => {
      })
    },
    back() {
      this.$router.push({
        name: 'procClarificationSupList'
      })
    }
  }
}
</script>

<style scoped>
</style>
