<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.projectName}}</van-col>
    </van-row>
    <van-row>
      <van-col>项目编号：{{noticeDetail.projectCode}}</van-col>
    </van-row>
    <van-row>
      <van-col>转出方式：{{noticeDetail.rollout}}</van-col>
    </van-row>
    <van-row>
      <van-col>交易方式：{{noticeDetail.dealType}}</van-col>
    </van-row>
    <van-row>
      <van-col>成交时间：{{noticeDetail.dealTime}}</van-col>
    </van-row>
    <van-row>
      <van-col>标的区域：{{noticeDetail.deptName}}</van-col>
    </van-row>
    <van-row>
      <van-col>转出方：{{noticeDetail.outName}}</van-col>
    </van-row>
    <van-row>
      <van-col>受让方：{{noticeDetail.memberType == 1 ? noticeDetail.realname:noticeDetail.companyName}}</van-col>
    </van-row>
    <van-row>
      <van-col>公示开始时间：{{noticeDetail.dealPublicityStartTime}}</van-col>
    </van-row>
    <van-row>
      <van-col>公示结束时间：{{noticeDetail.dealPublicityStopTime}}</van-col>
    </van-row>
    <van-row>
      <van-col>转出面积/数量 ：{{noticeDetail.allCount}}{{noticeDetail.allCountUnit}}</van-col>
    </van-row>
    <van-row>
      <van-col>转出年限：{{noticeDetail.outStartTime}}至{{noticeDetail.outStopTime}}</van-col>
    </van-row>
    <van-row>
      <van-col>成交价格：{{noticeDetail.dealMoney}}{{noticeDetail.unit}}</van-col>
    </van-row>
    <van-row>
      <van-col>成交金额：{{noticeDetail.dealMoneySum}}元</van-col>
    </van-row>
    <van-row>
      <van-col>备注：</van-col>
    </van-row>
  </div>
</template>

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

  },
  methods: {
    //成交公告集合
    getDetail(){
      console.log(this.$route.query.id)
      noticeDetails(this.$route.query.id).then(response => {
        console.log(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>
