<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.zjddm"
          label="宅基地代码"
          input-align="right"
        />
        <van-field
          readonly
          v-model="circulation.zjdlyzk"
          label="宅基地利用情况"
          input-align="right"
          label-width="auto"
        />
        <van-field label="宅基地闲置原因" v-model="circulation.zjdxzyy" readonly input-align="right" label-width="auto"/>
        <van-field
          readonly
          v-model="circulation.zjdxzqssj"
          label="宅基地闲置起始时间"
          input-align="right"
          label-width="auto"
        />
        <van-field
          readonly
          v-model="circulation.dcsj"
          label="调查时间"
          input-align="right"
          label-width="auto"
        />
        <van-field label="备注" v-model="circulation.bz" readonly type="textarea" input-align="right" label-width="auto"/>
      </div>
    </div>
</template>

<script>
import { getZjdly } from "@/api/onlineHome/homestead/homesteadUtilize";
export default {
  name: "homesteadUtilizeDetail",
  data() {
    return {
      circulation:[]
    };
  },
  created() {
    this.getDetail();
  },
  methods: {
    getDetail(){
      getZjdly(this.$route.query.id).then(response => {
        console.log(response)
        //退出权利类型
        this.houseGetDicts("zjdlyzk").then((res) => {
          this.circulation.zjdlyzk = this.selectDictLabel(res.data, response.data.zjdlyzk);
        });
        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>
