<template>
  <div class="app-container">
    <van-nav-bar
      left-arrow
      fixed
      placeholder
      @click-left="$router.back(-1)"
    >
      <template #title>
        <p style="font-weight: bold;">农民房屋利用情况调查</p>
      </template>
    </van-nav-bar>
    <div class="main_box">
      <van-field readonly v-model="circulation.nmfwdm" label="农民房屋代码" input-align="right" label-width="auto" />
      <van-field readonly v-model="circulation.fwzt" label="房屋状态" input-align="right" label-width="auto" />
      <van-field readonly v-model="circulation.fwaqxjddj" label="房屋安全性鉴定等级" input-align="right" label-width="auto" />
      <van-field readonly v-model="circulation.nmfwlyzk" label="利用状况" input-align="right" label-width="auto" />
      <van-field readonly v-model="circulation.fwsfxz" label="房屋是否闲置" input-align="right" label-width="auto" />
      <van-field readonly v-model="circulation.fwxzyy" label="闲置原因" input-align="right" label-width="auto"/>
      <van-field readonly v-model="circulation.fwxzqssj" label="房屋闲置起始时间" input-align="right" label-width="auto" />
      <van-field readonly v-model="circulation.phlyms" label="盘或利用模式" input-align="right" label-width="auto" />
      <van-field readonly v-model="circulation.dcsj" label="调查时间" input-align="right" label-width="auto" />
      <van-field readonly v-model="circulation.nsy" label="年收益" input-align="right" label-width="auto" />
    </div>

    <p class="main_title">照片信息</p>
    <div class="main_box" style="padding: 5%;">
      <van-row>
        <van-col span="12">
          <p style="margin-bottom: 5%;color: #333333;font-size: 14px;">现场照片东</p>
          <MultiImageUploadComp :value="circulation.xczpd" :uploadDisabled="true"/>
        </van-col>
        <van-col span="12">
          <p style="margin-bottom: 5%;color: #333333;font-size: 14px;">现场照片南</p>
          <MultiImageUploadComp :value="circulation.xczpn" :uploadDisabled="true"/>
        </van-col>
      </van-row>
      <van-row>
        <van-col span="12">
          <p style="margin-bottom: 5%;color: #333333;font-size: 14px;">现场照片西</p>
          <MultiImageUploadComp :value="circulation.xczpx" :uploadDisabled="true"/>
        </van-col>
        <van-col span="12">
          <p style="margin-bottom: 5%;color: #333333;font-size: 14px;">现场照片北</p>
          <MultiImageUploadComp :value="circulation.xczpb" :uploadDisabled="true"/>
        </van-col>
      </van-row>
    </div>

    <p class="main_title">补偿信息</p>
    <div class="main_box">
      <van-field readonly v-model="circulation.bz" label="备注" type="textarea" input-align="right" label-width="auto"/>
    </div>
  </div>
</template>

<script>
  import { getZjdly } from "@/api/onlineHome/homestead/utilization";
  import MultiImageUploadComp from "@/components/house/MultiImageUploadComp"
  export default {
    name: "utilizationDetail",
    components: {MultiImageUploadComp},
    data() {
      return {
        circulation:{},
      };
    },
    created() {
      this.getDetail();
    },
    methods: {
      getDetail(){
        getZjdly(this.$route.query.id).then(response => {
          console.log(response)
          //退出权利类型
          this.houseGetDicts("fwzt").then((res) => {
            this.circulation.fwzt = this.selectDictLabel(res.data, response.data.fwzt);
          });
          this.houseGetDicts("fwaqxjddj").then((res) => {
            this.circulation.fwaqxjddj = this.selectDictLabel(res.data, response.data.fwaqxjddj);
          });
          this.houseGetDicts("nmfwlyzk").then((res) => {
            this.circulation.nmfwlyzk = this.selectDictLabel(res.data, response.data.lyzk);
          });
          this.houseGetDicts("sys_yes_no").then((res) => {
            this.circulation.fwsfxz = this.selectDictLabel(res.data, response.data.fwsfxz);
          });
          this.houseGetDicts("phlyms").then((res) => {
            this.circulation.phlyms = this.selectDictLabel(res.data, response.data.phlyms);
          });
          this.circulation = response.data;
        });
      }
    },
  }
</script>

<style scoped lang="scss">
  .app-container {
    padding: 2% 0;
  }
  .main_title{
    font-size: 0.4rem;
    color: #1D6FE9;
    margin: 0.2rem 6%;
    position: relative;
  }
  .main_box{
    width: 96%;
    margin: 0 auto;
    border-radius: 6px;
    box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
    overflow: hidden;
    background-color: #FFF;
  }
  .submitButton{
    width: 80%;
    margin: 0 auto;
    background-color: #1D6FE9;

  }
</style>
