<template>
  <div class="moblie">
      <div v-if="validateTarget.productionNo" class="base" style="background-color: RGB(240,239,244);padding-top: 10vw;">
          <span style="color:red;">请认准我们的认证网站是:http://mbs.scdayou.com/admin/,谨防假冒网站地址!</span>
      </div>
      <div v-else class="base" style="background-color: RGB(240,239,244);padding-top: 10vw;">
          <span style="color:red;">未获取到报告信息，请联系客服人员。</span>
      </div>
      <div class="base">
          <div>评估机构</div>
          <div class="value">四川大友房地产土地资产评估有限公司</div>
      </div>
      <div class="base">
          <div>报告号</div>
          <div class="value">{{validateTarget.productionNo}}</div>
      </div>
      <div class="base">
        <div>委托方</div>
          <div class="value">{{ validateTarget.bailor }}</div>
      </div>
      <div class="base">
        <div>报告名称</div>
          <div class="value">{{ validateTarget.productionName }}</div>
      </div>
      <div class="base">
        <div>评估总面积</div>
          <div class="value">{{validateTarget.acreage?validateTarget.acreage+' 平方米':''}}</div>
      </div>
      <div class="base">
        <div>评估总价</div>
          <div class="value">{{validateTarget.amount?validateTarget.amount+ ' 万元':''}}</div>
      </div>
      <div class="base" v-if=validateTarget.valueTiming>
        <div>评估基准日</div>
          <div class="value">{{validateTarget.valueTiming}}</div>
      </div>
      <!-- <div class="base" v-if=validateTarget.productionTime>
        <div>报告出具日</div>
          <div class="value">{{validateTarget.productionTime}}</div>
      </div> -->
  </div>
</template>
  <script>
  
    export default {
      name: 'productionValidate',

      data() {
        return {
          validateTarget:{
            productionNo:null,
            bailor:null,
            productionName:null,
            acreage:null,
            amount:null,
            valueTiming:null,
            productionTime:null
          }
        }
      },
      created() {
        document.title = '报告验证';
        const businessType = this.$route.query.businessType;
        const businessId = this.$route.query.targetId;
        this.getValidateInfo(businessType,businessId);
      },
      methods: {
         getValidateInfo(businessType,businessId){
            this.$api.businessProduction.getValidateInfo(businessType,businessId).then(res=>{
              if (res.code === 200){
                  if (res.data){
                    this.validateTarget = res.data;
                  }
              }
            })
         }
      },
    }
  </script>
  <style  scoped>
    .moblie{
      width: 100vw; /* 宽度为视口宽度的50% */
      height: 100vh; /* 高度为视口高度的70% */
      background-color: RGB(240,239,244);
    }
    .base{
      width: 100vw;
      font-size: 15px;
      color:darkgrey;
      background-color: white;
      margin-bottom: 1px;
      padding: 5vw;
      font-family: 'Microsoft YaHei';
    }
    .value{
      margin-top: 3vw;
      color:black;
      font-size: 18px;
      padding-left: 5vw;
    }
  </style>
  