<template>
    <div class="home_wrapper">
    <van-nav-bar
      title="地块详情"
      left-arrow
      placeholder
      safe-area-inset-top
      @click-left="onClickLeft"
    />

      <div class="main">
        <p class="title"><i></i>地块信息</p>
        <van-field readonly v-model="form.deptName" label="区域位置名称" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.bsm" label="标识码" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.ysdm" label="要素代码" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.dkbm" label="地块代码" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.dkmc" label="地块名称" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.syqxz" label="所有权性质" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.dklb" label="地块类别" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.tdlylx" label="土地利用类型" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.dldj" label="地力等级" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.tdyt" label="土地用途" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.sfjbnt" label="是否基本农田" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.dkdz" label="地块东至" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.dkxz" label="地块西至" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.dknz" label="地块南至" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.dkbz" label="地块北至" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.dkbzxx" label="备注信息" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.zjrxm" label="指界人姓名" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.txmj" label="图显面积" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.scmjm" label="实测面积" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.sfzwd" label="是否账外地" placeholder="请输入" input-align="right" label-width="auto" />
      </div>

      <div class="main">
        <p class="title"><i></i>经营信息</p>
        <van-field readonly v-model="form.jymj" label="经营面积(亩)" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.jyfs" label="经营方式" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.jydxmc" label="经营对象名称" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.jykssj" label="经营开始时间" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.jyjssj" label="经营结束时间" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.cbje" label="承包金额(元)" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.surveyStatus" label="调查状态" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly v-model="form.bzxx" label="备注信息" placeholder="请输入" input-align="right" label-width="auto" />
        <van-field readonly label="实物图" placeholder="" input-align="right" label-width="auto" />
        <div v-if="!!form.dkImg">
          <el-tooltip effect="light" :content="item" placement="bottom" v-for="(item, index) in form.dkImg.split(',')" :key="index">
            <el-image style="height: 64px; width: 64px; margin: 2px; display: inline-block;" fit="scale-down" :src="baseRoutingUrll + item" :preview-src-list="form.dkImg.split(',').map((x) => baseRoutingUrll + x)"/>
          </el-tooltip>
        </div>
      </div>
    </div>
</template>

<script>
  // import { getMenuApp } from "@/api/app/index";
  import { getLandDetailByDkbm } from "@/api/resource/land"
  import Cookies from "js-cookie";
  export default {
    name: "appEdit",
    data() {
      return {
        value:'',
        // 项目路径
        baseRoutingUrll: '/api',//process.env.VUE_APP_BASE_API
        form:{}
      };
    },
    created() {
      this.getDetail()
    },
    methods: {
      onClickLeft(){
        history.back(-1);
      },
      getDetail(){
        getLandDetailByDkbm(this.$route.query.dkbm).then(response => {
          this.form = response.data;
        });
      }
    },
  };
</script>

<style scoped lang="scss">
  p{margin: 0;}
  .home_wrapper{
    width: 100vw;
    min-height: 100vh;
    background: #F6F9FB;
  }
  .van-nav-bar{
    background: linear-gradient( 173deg, #91E2D3 0%, #CDFCF0 100%);
    ::v-deep.van-icon{
      color: #000000;
    }
  }
  .main{
    width: 94%;
    margin: 3vw auto;
    padding: 3vw;
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;

  }
  .title{
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    i{
      width: 5px;
      height: 20px;
      display: block;
      background-color: #29D2AF;
      margin-right: 10px;
    }
  }
  .subClass{
    background: linear-gradient( 270deg, #53E4A5 0%, #24DBDB 100%);
    border-radius: 50px 50px 50px 50px;
    width: 90%;
    margin: 3vw auto;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
  }

</style>
