<template>
  <div class="app-container">
    <van-nav-bar
      title="招标公告"
      left-arrow
      fixed
      placeholder
      @click-left="onClickLeft"
    />
<!--    <p class="title">{{attestationDetail.projectName}}</p>-->
    <van-cell title="招标方名称" :value="attestationDetail.tenderName" />
    <van-cell title="资金来源" :value="attestationDetail.moneySource" />
    <van-cell title="招标代理公司" :value="attestationDetail.agentName" />
    <van-cell title="招标方联系人" :value="attestationDetail.linkman" />
    <van-cell title="招标方联系电话" :value="attestationDetail.linkphone" />
    <van-cell title="联系地址" :value="attestationDetail.linkaddress" />
    <van-cell title="招标方意见" :value="attestationDetail.tenderOpinion" />
    <van-cell title="代理公司意见" :value="attestationDetail.agentOpinion" />
    <van-cell title="建设地点" :value="attestationDetail.address" />
    <van-cell title="建设工期" :value="attestationDetail.timeLimit" />
    <van-cell title="项目规模" :value="attestationDetail.scale" />
    <van-cell title="招标内容" :value="attestationDetail.tenderContent" />
    <van-cell title="投标人要求" :value="attestationDetail.condition" />
<!--    <van-cell title="保证金" :value="attestationDetail.deposit" />-->
    <van-cell title="预算总额(元)" :value="attestationDetail.price" />
    <van-cell title="招标发布日期" :value="attestationDetail.logintime" />
    <van-cell title="招标书领取开始日期" :value="attestationDetail.startTime" />
    <van-cell title="招标书领取结束日期" :value="attestationDetail.stopTime" />

    <van-divider>附件</van-divider>

    <van-cell :title="item.fileName" :url="'/api'+item.fileUrl" is-link v-for="(item,index) in attachmentQueryList">
      <!-- 使用 right-icon 插槽来自定义右侧图标 -->
      <template #icon>
        <img src="../../assets/images/file_icon.png" style="display: block;width: 24px;margin-right: 5px;" alt="">
      </template>
    </van-cell>

  </div>
</template>

<script>
import { tenderDetail, attachmentQuery } from "@/api/notice/index";
export default {
  name: "noticeDetail",
  data() {
    return {
      attestationDetail:'',
      attachmentQueryList:[]
    };
  },
  created() {
    this.getDetail();
  },
  methods: {
    //成交公告集合
    getDetail(){
      tenderDetail(this.$route.query.id,{translate_dict:1}).then(response => {
        this.attestationDetail = response.data;
        // //公司性质字典
        // this.getDicts("company_nature").then(res => {
        //   this.attestationDetail.companyNature = this.selectDictLabel(res.data,response.data.companyNature);
        // });
      });
      let query = {
        tableName: 't_transaction_tender',
        bizPath: 'transaction',
        tableId:this.$route.query.id
      }
      attachmentQuery(query).then(response => {
        this.attachmentQueryList = response.rows;
      });
    },

  },
};
</script>

<style scoped lang="scss">
.app-container {
  padding: 0 0 0.5rem;
  background: #ffffff;
}
.title{
  font-size: 0.5rem;
  margin-bottom: 0.5rem;
}
.van-row{
  margin-bottom: 0.4rem;
}
.van-col{
  font-size: 0.4rem;
  color: #666666;
}
/deep/ .van-cell__title{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  word-break: break-all;
  overflow: hidden;
}
</style>
