<template>
  <div class="app-container">
    <van-nav-bar
      title="需求项目"
      left-arrow
      fixed
      placeholder
      @click-left="onClickLeft"
    />
    <p class="title">{{noticeDetail.projectName}}</p>
    <van-row>
      <van-col>需求项目类别：{{noticeDetail.projectNumber}}</van-col>
    </van-row>
    <van-row>
      <van-col>需求价格描述：{{noticeDetail.price}}</van-col>
    </van-row>
    <van-row>
      <van-col>需求方名称：{{noticeDetail.needname}}</van-col>
    </van-row>
    <van-row>
      <van-col>需求方地址：{{noticeDetail.address}}</van-col>
    </van-row>
    <van-row>
      <van-col>单位性质：{{noticeDetail.company}}</van-col>
    </van-row>
    <van-row>
      <van-col>单位法人：{{noticeDetail.legalPerson}}</van-col>
    </van-row>
    <van-row>
      <van-col>联系人：{{noticeDetail.realname}}</van-col>
    </van-row>
    <van-row>
      <van-col>联系电话：{{noticeDetail.phone}}</van-col>
    </van-row>
    <van-row>
      <van-col>身份证号：{{noticeDetail.idCardNum}}</van-col>
    </van-row>
    <van-row>
      <van-col>邮箱：{{noticeDetail.email}}</van-col>
    </van-row>
    <van-row>
      <van-col>需求开始时间：{{noticeDetail.needStartTime}}</van-col>
    </van-row>
    <van-row>
      <van-col>需求结束时间：{{noticeDetail.needStopTime}}</van-col>
    </van-row>
    <van-row>
      <van-col>用途与经营描述：{{noticeDetail.description}}</van-col>
    </van-row>
    <van-row>
      <van-col>附件图片：</van-col>
    </van-row>
    <van-row>
      <van-col><img :src="'/api'+item.fileUrl" v-for="(item , index) in noticeDetail.attachments" alt="" width="100%"></van-col>
    </van-row>
  </div>
</template>

<script>
import { needProject } from "@/api/notice/index";
export default {
  name: "noticeDetail",
  data() {
    return {
      noticeDetail:''
    };
  },
  created() {
    this.getDetail();

  },
  methods: {
    //成交公告集合
    getDetail(){
      needProject(this.$route.query.id,{translate_dict:1}).then(response => {
        this.noticeDetail = response.data;
        //转出方式字典
        // this.getDicts("rollout_type").then(res => {
        //   this.noticeDetail.rollout = this.selectDictLabel(res.data,response.data.rollout);
        // });
        // //交易方式字典
        // this.getDicts("deal_type").then(res => {
        //   this.noticeDetail.dealType = this.selectDictLabel(res.data,response.data.dealType);
        // });
        // //面积单位字典
        // this.getDicts("area_unit").then(res => {
        //   this.noticeDetail.allCountUnit = this.selectDictLabel(res.data,response.data.allCountUnit);
        // });
        // //成交价格字典
        // this.getDicts("price_unit").then(res => {
        //   this.noticeDetail.unit = this.selectDictLabel(res.data,response.data.unit);
        // });
      });
    },

  },
};
</script>

<style scoped lang="scss">
.app-container {
  padding: 0.5rem 5%;
}
.title{
  font-size: 0.5rem;
  margin-bottom: 0.5rem;
}
.van-row{
  margin-bottom: 0.4rem;
}
.van-col{
  font-size: 0.4rem;
  color: #666666;
}
</style>
