<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.assignee" />
    <van-cell title="建设单位" :value="attestationDetail.bulidPart" />
    <van-cell title="项目负责人" :value="attestationDetail.partLinkman" />
    <van-cell title="中标价格" :value="attestationDetail.transactionPrice" />
    <van-cell title="中标日期" :value="attestationDetail.dealTime" />
    <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 {attachmentQuery, tenderWinDetail} from "@/api/notice/index";
export default {
  name: "noticeDetail",
  data() {
    return {
      attestationDetail:'',
      attachmentQueryList:[]
    };
  },
  created() {
    this.getDetail();
  },
  methods: {
    //成交公告集合
    getDetail(){
      console.log(this.$route.query.id)
      tenderWinDetail(this.$route.query.id,{translate_dict:1}).then(response => {
        this.attestationDetail = response.data;
      });
      let query = {
        tableName: 't_transaction_tender_win',
        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>
