<!--
  @description: 新增澄清
  @Modifier: 郝定康
  @routerPath:/procurement/procurementDrive/procClarification/procClarificationReleaseDetail
  @date: 2021-02-09 13:41:28
-->
<template>
  <div>
    <table class="tableData">
      <tr>
        <td>
          澄清标题
        </td>
        <td colspan="3">
          {{ formData.clarificationTitle }}
        </td>
      </tr>
      <tr>
        <td>
          澄清版本号
        </td>
        <td colspan="3">
          {{ formData.versionNumber }}
        </td>
        <!-- <td v-if="$route.params.clarificationType === '01'">
          是否变更时间
        </td>
        <td v-if="$route.params.clarificationType === '01'">
          {{ filterDictText(isChangeTimeList, formData.isChangeTime) }}
        </td> -->
      </tr>
      <!--是否变更时间 01-->
      <tr v-show="formData.isChangeTime==='01'">
        <td>
          报价截止时间
        </td>
        <td>
          {{ formData.quoteEndTime }}
        </td>
        <td>
          报价有效期
        </td>
        <td>
          {{ formData.quoteValidity }}
        </td>
      </tr>
      <!-- <tr>
        <td>
          澄清内容文件
        </td>
        <td colspan="3">
          <downloadFile :data="clarificationContent" />
        </td>
      </tr> -->
      <tr>
        <td>
          澄清文件
        </td>
        <td colspan="3">
          <downloadFile :data="clarificationAttachment" />
        </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>
/* 接口*/
import { getEditClarificationInfo } from '@/api/procurement/procurementProject'// 澄清
/* 公共方法*/
import { filterDictText } from '@/assets/js/utils' // 常用方法
/* 混合开发方法-参数字段*/
import { clarificationGroupMixin } from '../../mixins/clarificationGroupMixin'// 澄清质疑-公用参数
import { clarificationMixin } from '../../mixins/clarificationMixin'// 澄清质疑-公用参数
/* 组件*/
import downloadFile from '@comp/common/updownload/downloadFile'
export default {
  name: 'ClarificationReleaseDetail',
  components: {
    downloadFile
  },
  mixins: [clarificationMixin, clarificationGroupMixin],
  data() {
    return {
      formData: {
      },
      // 澄清内容文件
      clarificationContent: {
        bizId: '',
        fileType: 'procurement_clarification_content'
      },
      // 澄清附件
      clarificationAttachment: {
        bizId: '',
        fileType: 'procurement_clarification_attachment'
      }
    }
  },
  created() {
    // 获取详情
    this.getInfo()
  },
  methods: {
    // 字典检索
    filterDictText,
    // 返回
    back() {
      // 如果是专家评标-澄清质疑 roleCode 11 采购员  OFF_EXPERT 评标专家
      if (this.roleCode === 'OFF_EXPERT') {
        this.$router.push({
          name: 'procClarificationExpertList'
        })
      } else {
        this.$router.push({
          name: 'procClarificationList'
        })
      }
    },
    // 获取详情
    getInfo() {
      const data = {
        clarificationId: this.$route.params.clarificationId
      }
      getEditClarificationInfo(data).then(res => {
        this.formData = res.data
        this.clarificationContent.bizId = this.clarificationAttachment.bizId = res.data.clarificationId
      })
    }
  }
}
</script>

<style scoped lang="less">

</style>
