<template>
  <div class="app-container">
    <div class="bannerBg" style="">
      <van-nav-bar
        style="background:transparent;border-bottom-width:0;"
        @click-left="$router.back(-1)"
      >
        <template #left>
          <van-icon name="arrow-left" size="18" color="#fff" />
        </template>
        <template #title>
          <p style="color:#fff">{{item.deptName}}</p>
        </template>
      </van-nav-bar>
      <div style="display:flex;width:90%;margin:0 auto;">
        <div :class="{activeBtn : activeBtn==1,disactiveBtn :activeBtn!=1 }" @click="activeBtn=1"><van-icon size="20" style="vertical-align:middle;" :name="require('../../assets/images/housesteadSurvey/btn1'+(activeBtn!=1?'1':'')+'.png')" />
          入户核查
        </div>
        <div :class="{activeBtn : activeBtn==2,disactiveBtn :activeBtn!=2 }" @click="activeBtn=2"><van-icon size="20" style="vertical-align:middle;" :name="require('../../assets/images/housesteadSurvey/btn2'+(activeBtn!=2?'2':'')+'.png')" />
          农户信息
        </div>
        <div :class="{activeBtn : activeBtn==3,disactiveBtn :activeBtn!=3 }" @click="activeBtn=3"> <van-icon size="20" style="vertical-align:middle;" :name="require('../../assets/images/housesteadSurvey/btn3'+(activeBtn!=3?'3':'')+'.png')" />
          所有权人
        </div>
        <div :class="{activeBtn : activeBtn==4,disactiveBtn :activeBtn!=4 }"  @click="activeBtn=4,mapShow()">
          <van-icon size="20" style="vertical-align:middle;" :name="require('../../assets/images/housesteadSurvey/btn4'+(activeBtn!=4?'4':'')+'.png')" />
          切换地图
        </div>
      </div>
    </div>
    <div v-if="activeBtn==1">
      <van-search v-model="value" placeholder="请输入搜索关键词" show-action>
        <template #action>
          <van-icon name="add" color="rgba(122,201,67,1)" size="55" style="vertical-align:middle;"/>
        </template>
      </van-search>
      <van-tabs v-model="active" sticky title-active-color="#7AC943" color="#7AC943" swipeable @click="getZjdList">
        <van-tab title="全部" >
          <van-cell  v-for="(item,index) in list" :key="index" size="small":to="{name:'homesteadAdd',params:{item:item}}"  style="border-radius: 16px;
          box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:calc( 100% - 40px);margin:20px">
            <template #title>
              <p style="color:#22B7F2">{{item.syqr}}</p>
            </template>
            <template #default>
              <van-button plain round color="#7AC943" size="mini" style="vertical-align:middle;margin-top:15px;">查看详情</van-button>
            </template>
            <template #label>
              <p>宅基地代码  {{item.zjddm}} </p>
              <p>宗地面积 {{item.zdmj}}㎡ </p>
            </template>
            <template #icon>
              <van-icon name="clock" color="#22b7f2" style="margin-top:10px;margin-right:10px;"/>
            </template>
          </van-cell>
        </van-tab>
        <van-tab title="已核查" >
          <van-cell  v-for="(item,index) in list1" :key="index" size="small":to="{name:'homesteadAdd',params:{item:item}}"  style="border-radius: 16px;
          box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:calc( 100% - 40px);margin:20px">
            <template #title>
              <p style="color:#22B7F2">刘茂强</p>
            </template>
            <template #default>
              <van-button plain round color="#7AC943" size="mini" style="vertical-align:middle;margin-top:15px;">查看详情</van-button>
            </template>
            <template #label>
              <p>宅基地代码  {{item.zjddm}} </p>
              <p>宗地面积 {{item.zdmj}}㎡ </p>
            </template>
            <template #icon>
              <van-icon name="clock" color="#22b7f2" style="margin-top:10px;margin-right:10px;"/>
            </template>
          </van-cell>
        </van-tab>
        <van-tab title="未核查">
          <van-cell  v-for="(item,index) in list2" :key="index" size="small":to="{name:'homesteadAdd',params:{item:item}}"  style="border-radius: 16px;
          box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:calc( 100% - 40px);margin:20px">
            <template #title>
              <p style="color:#22B7F2">{{item.syqr}}</p>
            </template>
            <template #default>
              <van-button plain round color="#7AC943" size="mini" style="vertical-align:middle;margin-top:15px;">查看详情</van-button>
            </template>
            <template #label>
              <p>宅基地代码  {{item.zjddm}} </p>
              <p>宗地面积 {{item.zdmj}}㎡ </p>
            </template>
            <template #icon>
              <van-icon name="clock" color="#22b7f2" style="margin-top:10px;margin-right:10px;"/>
            </template>
          </van-cell>
        </van-tab>
      </van-tabs>
    </div>
    <div v-if="activeBtn==2" >
      <van-search v-model="value" placeholder="请输入农户姓名或证件号" show-action>
        <template #action>
          <van-icon name="add" color="rgba(122,201,67,1)" size="55" style="vertical-align:middle;"/>
        </template>
      </van-search>
      <van-cell  v-for="(item,index) in syqrlist" :key="index" size="small"  style="border-radius: 16px;box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:calc( 100% - 40px);margin:20px">
        <template #title>
          <p style="color:#22B7F2">刘茂强</p>
        </template>
        <template #default>
          <van-button plain round color="#7AC943" size="mini" style="vertical-align:middle;margin-top:15px;" @click="showsyqr=true">查看详情</van-button>
        </template>
        <template #label>
          <p>宅基地代码  4413215200216562255Z00026 </p>
          <p>宗地面积  119.87㎡ </p>
        </template>
        <template #icon>
          <van-icon name="clock" color="#22b7f2" style="margin-top:10px;margin-right:10px;"/>
        </template>
      </van-cell>
    </div>
    <div v-if="activeBtn==3">
      <van-form >
        <div style="border-radius: 16px;
          box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:calc( 100% - 40px);margin:20px;padding:5px;background:#fff;">
          <van-field
            v-model="qlrform.qydm"
            name="区域代码"
            label="区域代码"
            required
            placeholder="区域代码"
            input-align="right"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="qlrform.suyqrdm"
            name="所有权人代码"
            label="所有权人代码"
            required
            placeholder="所有权人代码"
            input-align="right"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="qlrform.suyqrmc"
            name="所有权人名称"
            label="所有权人名称"
            required
            placeholder="所有权人名称"
            input-align="right"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="qlrform.suyqxz"
            name="所有权性质"
            label="所有权性质"
            required
            placeholder="所有权性质"
            input-align="right"
            :rules="[{ required: true, message: '' }]"
            @click="showsuyqxz = true"
          />
          <van-popup v-model="showsuyqxz" position="bottom">
            <van-picker
              show-toolbar
              :columns="columns"
              @confirm="onConfirm"
              @cancel="showsuyqxz = false"
            />
          </van-popup>

          <van-field
            v-model="qlrform.dbrxm"
            name="代表人姓名"
            label="代表人姓名"
            required
            placeholder="代表人姓名"
            input-align="right"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="qlrform.dbrzjlx"
            name="代表人证件类型"
            label="代表人证件类型"
            required
            placeholder="代表人证件类型"
            input-align="right"
            :rules="[{ required: true, message: '' }]"
            @click="showdbrzjlx = true"
          />
          <van-popup v-model="showdbrzjlx" position="bottom">
            <van-picker
              show-toolbar
              :columns="columns"
              @confirm="onConfirm"
              @cancel="showdbrzjlx = false"
            />
          </van-popup>
          <van-field
            v-model="qlrform.dbrzjhm"
            name="代表人证件号码"
            label="代表人证件号码"
            required
            placeholder="代表人证件号码"
            input-align="right"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="qlrform.dbrlxdh"
            name="代表人联系电话"
            label="代表人联系电话"
            placeholder="代表人联系电话"
            input-align="right"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="qlrform.dbrtxdz"
            name="代表人通讯地址"
            label="代表人通讯地址"
            required
            placeholder="代表人通讯地址"
            input-align="right"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="qlrform.dbryzbm"
            name="代表人邮政编码"
            label="代表人邮政编码"
            required
            placeholder="代表人邮政编码"
            input-align="right"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field name="radio" label="是否成立农村集体经济组织" required input-align="right">
            <template #input>
              <van-radio-group v-model="qlrform.sfclncjtjjzz" direction="horizontal">
                <van-radio name="1">是</van-radio>
                <van-radio name="2">否 </van-radio>
              </van-radio-group>
            </template>
          </van-field>
          <van-field
            v-model="qlrform.dlrxm"
            name="代理人姓名"
            label="代理人姓名"
            placeholder="代理人姓名"
            input-align="right"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="qlrform.dlrzjlx"
            name="代理人证件类型"
            label="代理人证件类型"
            placeholder="代理人证件类型"
            input-align="right"
            :rules="[{ required: true, message: '' }]"
            @click="showdlrzjlx = true"
          />
          <van-popup v-model="showdlrzjlx" position="bottom">
            <van-picker
              show-toolbar
              :columns="columns"
              @confirm="onConfirm"
              @cancel="showdlrzjlx = false"
            />
          </van-popup>
          <van-field
            v-model="qlrform.dlrzjhm"
            name="代理人证件号码"
            label="代理人证件号码"
            placeholder="代理人证件号码"
            input-align="right"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="qlrform.dlrlxdh"
            name="代理人联系电话"
            label="代理人联系电话"
            placeholder="代理人联系电话"
            input-align="right"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="qlrform.dlrtxdz"
            name="代理人通讯地址"
            label="代理人通讯地址"
            placeholder="代理人通讯地址"
            input-align="right"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="qlrform.dlryzbm"
            name="代理人邮政编码"
            label="代理人邮政编码"
            placeholder="代理人邮政编码"
            input-align="right"
            :rules="[{ required: true, message: '' }]"
          />
        </div>
      <div style="border-radius: 16px;
          box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:calc( 100% - 40px);margin:20px;padding:5px;background:#fff;">
        <van-field
          v-model="qlrform.ncjtjjzzdm"
          name="农村集体经济组织代码"
          label="农村集体经济组织代码"
          placeholder="农村集体经济组织代码"
          input-align="right"
          :rules="[{ required: true, message: '' }]"
        />
        <van-field
          v-model="qlrform.ncjtjjzzmc"
          name="农村集体经济组织名称"
          label="农村集体经济组织名称"
          placeholder="农村集体经济组织名称"
          input-align="right"
          :rules="[{ required: true, message: '' }]"
        />
        <van-field
          v-model="qlrform.fbfdm"
          name="发包方代码"
          label="发包方代码"
          placeholder="发包方代码"
          input-align="right"
          :rules="[{ required: true, message: '' }]"
        />
        <van-field
          v-model="qlrform.fbfmc"
          name="发包方名称"
          label="发包方名称"
          placeholder="发包方名称"
          input-align="right"
          :rules="[{ required: true, message: '' }]"
        />
        <van-field
          v-model="qlrform.sjly"
          name="数据来源"
          label="数据来源"
          placeholder="数据来源"
          input-align="right"
          :rules="[{ required: true, message: '' }]"
          @click="showsjly = true"
        />
        <van-popup v-model="showsjly" position="bottom">
          <van-picker
            show-toolbar
            :columns="columns"
            @confirm="onConfirm"
            @cancel="showsjly = false"
          />
        </van-popup>
        <van-field
          v-model="qlrform.bz"
          name="备注"
          label="备注"
          placeholder="备注"
          input-align="right"
          :rules="[{ required: true, message: '' }]"
        />
      </div>
        <div style="margin: 16px;">
          <van-button round block color="#7AC943" native-type="submit">保存</van-button>
        </div>
      </van-form>
    </div>
    <div v-if="activeBtn==4">
        <div id="mapWrapAll" style="width: 100%;height: 100vh"></div>
    </div>
    <van-popup v-model="show1" style="height:100%;width:100%;">
      <div class="bannerBg">
        <van-nav-bar
          style="background:transparent;border-bottom-width:0;"
          @click-left="show1=!show1"
        >
          <template #left>
            <van-icon name="arrow-left" size="18" color="#fff" />
          </template>
          <template #title>
            <p style="color:#fff">户主信息</p>
          </template>
        </van-nav-bar>
      </div>
      <div style="margin:20px;">
        <van-form @submit="onSubmit">
          <p class="title" style="position:relative;padding-left:20px;line-height:32px;">户主信息</p>
          <van-field
            v-model="hzform.hzxm"
            name="户主名称"
            label="户主名称"
            placeholder="户主名称"
            required
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="hzform.hzzjlx"
            name="户主证件类型"
            label="户主证件类型"
            placeholder="户主证件类型"
            input-align="right"
            required
            :rules="[{ required: true, message: '' }]"
            @click="showhzzjlx = true"
          />
          <van-popup v-model="showhzzjlx" position="bottom">
            <van-picker
              show-toolbar
              :columns="columns"
              @confirm="onConfirm"
              @cancel="showhzzjlx = false"
            />
          </van-popup>
          <van-field
            v-model="hzform.hzzjhm"
            name="户主证件号码"
            label="户主证件号码"
            placeholder="户主证件号码"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="hzform.txdz"
            name="通讯地址"
            label="通讯地址"
            placeholder="通讯地址"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="hzform.hncysl"
            name="户内成员数量"
            label="户内成员数量"
            placeholder="户内成员数量"
            :rules="[{ required: true, message: '' }]"
          />
          <div style="text-align:center;overflow:auto;">
            <van-button plain round color="#7AC943" size="mini" style="margin:0 auto;">查看户内成员信息</van-button>
          </div>
          <div style="margin: 16px;">
            <van-button round block color="#7AC943" native-type="submit">保存</van-button>
          </div>
        </van-form>
      </div>
    </van-popup>
    <van-popup v-model="showsyqr" style="height:100%;width:100%;">
      <div class="bannerBg">
        <van-nav-bar
          style="background:transparent;border-bottom-width:0;"
          @click-left="showsyqr=!showsyqr"
        >
          <template #left>
            <van-icon name="arrow-left" size="18" color="#fff" />
          </template>
          <template #title>
            <p style="color:#fff">使用权利人</p>
          </template>
        </van-nav-bar>
      </div>
      <div style="margin:20px;">
        <van-form @submit="onSubmit">
          <p class="title" style="position:relative;padding-left:20px;line-height:32px;">使用权人</p>
          <van-field
            v-model="form1.suyqrdm"
            name="所有权人代码"
            label="所有权人代码"
            placeholder="所有权人代码"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form1.nhdm"
            name="农户代码"
            label="农户代码"
            placeholder="农户代码"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form1.zjddm"
            name="宅基地代码"
            label="宅基地代码"
            placeholder="宅基地代码"
            :rules="[{ required: true, message: '' }]"
          />

          <van-field
            v-model="form1.nmfwdm"
            name="农民房屋代码"
            label="农民房屋代码"
            placeholder="农民房屋代码"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form1.shyqrdbxm"
            name="使用权人代表姓名"
            label="使用权人代表姓名"
            placeholder="使用权人代表姓名"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form1.shyqrdbzjlx"
            name="使用权人代表证件类型"
            label="使用权人代表证件类型"
            placeholder="使用权人代表证件类型"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form1.shyqrdbzjhm"
            name="使用权人代表证件号码"
            label="使用权人代表证件号码"
            placeholder="使用权人代表证件号码"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form1.bdcdyh"
            name="不动产单元号"
            label="不动产单元号"
            placeholder="不动产单元号"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form1.bdcqzh"
            name="不动产权证号"
            label="不动产权证号"
            placeholder="不动产权证号"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form1.qzysxlh"
            name="权证印刷序列号"
            label="权证印刷序列号"
            placeholder="权证印刷序列号"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form1.fzjg"
            name="发证机关"
            label="发证机关"
            placeholder="发证机关"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form1.sshy"
            name="所属行业"
            label="所属行业"
            placeholder="所属行业"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field name="radio" label="国家/地区">
            <template #input>
              <van-radio-group v-model="form1.gj" direction="horizontal">
                <van-radio name="1">中国</van-radio>
                <van-radio name="2">其他</van-radio>
              </van-radio-group>
            </template>
          </van-field>
          <van-field
            v-model="form1.qlbl"
            name="权利比例"
            label="权利比例"
            placeholder="权利比例"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form1.hjszss"
            name="户籍所在省市"
            label="户籍所在省市"
            placeholder="户籍所在省市"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field name="radio" label="性别">
            <template #input>
              <van-radio-group v-model="form1.xb" direction="horizontal">
                <van-radio name="1">男</van-radio>
                <van-radio name="2">女</van-radio>
              </van-radio-group>
            </template>
          </van-field>
          <van-field
            v-model="form1.dh"
            name="电话"
            label="电话"
            placeholder="电话"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form1.dz"
            name="地址"
            label="地址"
            placeholder="地址"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form1.ftzdmj"
            name="分摊宗地面积"
            label="分摊宗地面积"
            placeholder="分摊宗地面积"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form1.sfsyqrzjgy"
            name="是否使用权人之间共有"
            label="是否使用权人之间共有"
            placeholder="是否使用权人之间共有"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form1.qlrlx"
            name="权利人类型"
            label="权利人类型"
            placeholder="权利人类型"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form1.gyfs"
            name="共有方式"
            label="共有方式"
            placeholder="共有方式"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form1.sfbncjtjjzzcy"
            name="是否本农村集体经济组织成员"
            label="是否本农村集体经济组织成员"
            placeholder="是否本农村集体经济组织成员"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form1.hklx"
            name="户口类型"
            label="户口类型"
            placeholder="户口类型"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form1.bz"
            name="备注"
            label="备注"
            placeholder="备注"
            :rules="[{ required: true, message: '' }]"
          />
          <div style="text-align:center;overflow:auto;">
            <van-button plain round color="#7AC943" size="mini" style="margin:0 auto;" native-type="button" @click="showhncylist=true">查看户内成员列表</van-button>
          </div>
          <div style="margin: 16px;">
            <van-button round block color="#7AC943" native-type="submit">保存</van-button>
          </div>
        </van-form>
      </div>
    </van-popup>
    <van-popup v-model="showhncylist" style="height:100%;width:100%;">
      <div class="bannerBg">
        <van-nav-bar
          style="background:transparent;border-bottom-width:0;"
          @click-left="showhncylist=!showhncylist"
        >
          <template #left>
            <van-icon name="arrow-left" size="18" color="#fff" />
          </template>
          <template #title>
            <p style="color:#fff">户内成员列表</p>
          </template>
        </van-nav-bar>
      </div>
      <van-swipe-cell v-for="(item,index) in hncylist" :key="index" @click.native="showPopuphncy" style="border-radius: 16px;box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:calc( 100% - 40px);margin:20px auto;background:#fff;">
        <div style="padding:20px;">
          <p style="color:#22B7F2;font-size:20px;line-height:30px;"><van-icon name="wap-home" color="#22b7f2" size="20" style="margin-right:10px;"/>刘茂强</p>
          <div style="display:flex;line-height:20px">
            <p style="flex:1;text-align:left;">证件号码</p>
            <p  style="flex:1;text-align:right;">4413215200216562255Z00026</p>
          </div>
          <div style="display:flex;line-height:20px">
            <p style="flex:1;text-align:left;">权利人类型</p>
            <p style="flex:1;text-align:right;">个人</p>
          </div>
        </div>
        <template #right>
          <van-button square text="删除" type="danger" class="delete-button" />
        </template>
      </van-swipe-cell>
      <div style="border-radius: 16px;box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:calc( 100% - 40px);margin:20px;background:#fff;padding:20px;">
        <div style="text-align:center;" >
          <p style="color:#22B7F2;font-size:20px;line-height:30px;" @click="showPopuphncy"><van-icon name="plus" color="#22b7f2" size="20" style="margin-right:10px;"/>添加户内成员信息</p>
        </div>
      </div>
    </van-popup>
    <van-popup v-model="showhncy" style="height:100%;width:100%;">
      <div class="bannerBg">
        <van-nav-bar
          style="background:transparent;border-bottom-width:0;"
          @click-left="showhncy=!showhncy"
        >
          <template #left>
            <van-icon name="arrow-left" size="18" color="#fff" />
          </template>
          <template #title>
            <p style="color:#fff">户内成员</p>
          </template>
        </van-nav-bar>
      </div>
      <div style="margin:20px;">
        <van-form @submit="onSubmit">
          <van-field
            v-model="form5.nhdm"
            name="农户代码"
            label="农户代码"
            placeholder="农户代码"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form5.xm"
            name="姓名"
            label="姓名"
            placeholder="姓名"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form5.zjlx"
            name="证件类型"
            label="证件类型"
            placeholder="证件类型"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form5.yhzgx"
            name="与户主关系"
            label="与户主关系"
            placeholder="与户主关系"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form5.zjhm"
            name="证件号码"
            label="证件号码"
            placeholder="证件号码"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form5.xb"
            name="性别"
            label="性别"
            placeholder="性别"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form5.lxdh"
            name="联系电话"
            label="联系电话"
            placeholder="联系电话"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form5.hklx"
            name="户口类型"
            label="户口类型"
            placeholder="户口类型"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form5.hyzk"
            name="婚姻状况"
            label="婚姻状况"
            placeholder="婚姻状况"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form5.jzwqk"
            name="建筑物情况"
            label="建筑物情况"
            placeholder="建筑物情况"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form5.sfbjtjjzzcy"
            name="是否本集体经济组织成员"
            label="是否本集体经济组织成员"
            placeholder="是否本集体经济组织成员"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form5.cybz"
            name="成员备注"
            label="成员备注"
            placeholder="成员备注"
            :rules="[{ required: true, message: '' }]"
          />
          <van-field
            v-model="form5.cybzsm"
            name="成员备注说明"
            label="成员备注说明"
            placeholder="成员备注说明"
            :rules="[{ required: true, message: '' }]"
          />
          <div style="margin: 16px;">
            <van-button round block color="#7AC943" native-type="submit">保存</van-button>
          </div>
        </van-form>
      </div>
    </van-popup>
  </div>
</template>

<script>
    import { currentLocation,} from "@/api/homestead/index";
    import {listZjdzd} from "@/api/homesteadSurvey/zjdzd";
    import {listZrz,getZrzZjdDmList} from "@/api/homesteadSurvey/zrz";
    import {listFsss,getFsssZjdDmList} from "@/api/homesteadSurvey/fsss";
    import $ from "jquery";
    export default {
      name: "homesteadList",
      data() {
        return {
          // 使用权人表单弹出
          showsyqr:false,
          showhncylist:false,
          showhncy:false,
          activeBtn:1,
          value:'',
          active:null,
          // 全部列表
          list:[],
          // 已核查列表
          list1:[],
          // 未核查列表
          list2:[],
          // 使用权列表
          syqrlist:[1,1,1,],
          // 户内成员表单
          form5: {},
          // 户内成员列表
          hncylist:[11,1,1],
          currentRate:20,
          geoJson:null,
          // 使用权人
          form1:[],
          // 户主列表
          hzform:{},
          // 权利人列表
          qlrform:[],
          // 权利人性质弹出框
          showsuyqxz:false,
          // 代理人证件类型弹出框
          showdlrzjlx:false,
          // 代表人证件类型弹出框
          showdbrzjlx:false,
          // 数据来源弹出框
          showsjly:false,
          columns:[],
          show1:false,
          showhzzjlx: false,
          // 路由传过来的任务基本信息。
          item: {},
          //地图使用 --start
          openMap: false,
          mapTheGeomZrzId: null,
          mapTheGeomZjdId: null,
          mapTheGeomFsssId: null,
          drawInsert:null,
          mapZjdData:{},
          mapZrzData:{},
          mapFsssData:{},
          mapHaDataValue:false,
          mapHasDateStatus: 0, //0附属设施  1自然幢  2宅基地
          //地图使用 --end
        };
      },
      mounted(){
        currentLocation().then((res) => {
          if (res.code == 200) {
            let content = res.data;
            this.geoJson = content.geoJson;
          }
        });
      },
      created(){
        this.item = this.$route.params.item
        this.getZjdList();
      },
      methods: {
        showPopuphncy(){
          this.showhncy = true
        },
        getZjdList(){
          console.log(this.active)
           if(this.active==1){
            let params = {
              "deptId" : this.item.deptId,
              "houserDataConfirmStatus" : "CONFIRMED"
            }
            listZjdzd(params).then((response) => {
              if (response.code == 200) {
                this.list1 = response.rows
              }
            });
          }else if(this.active==2){
            let params = {
              "deptId" : this.item.deptId,
              "houserDataConfirmStatus" : "UNCONFIRMED"
            }
            listZjdzd(params).then((response) => {
              if (response.code == 200) {
                this.list2 = response.rows
              }
            });
          }else{
               let params = {
                 "deptId" : this.item.deptId,
               }
               listZjdzd(params).then((response) => {
                 if (response.code == 200) {
                   this.list = response.rows
                 }
               });
           }
        },
        onConfirm(){},
        onSubmit(){},
        mapShow() {
          listZjdzd().then((response) => {
            if (response.code == 200) {
              this.mapTheGeomZjdId = response.rows;
              // listZrz().then((response) => {
              //   if (response.code == 200) {
              //     this.mapTheGeomZrzId = response.rows;
              //   }
              //   listFsss().then((response) => {
              //     if (response.code == 200) {
              //       this.mapTheGeomFsssId = response.rows;
              //     }
              setTimeout(() => {
                this.GetMapsInit();
              }, 500);
              //     });
              //   });
            }
          });
        },
        //地图加载 -----start
        GetMapsInit() {
          //加载地图编辑
          var that = this;
          var map;
          // document.getElementById("mapAll").innerHTML = '';
          var hc_land;
          var projection = new ol.proj.Projection({
            //地图投影类型
            code: "EPSG:3857",
            units: "degrees",
            //extent:extent
          });

          var aerial = new ol.layer.Tile({
            source: new ol.source.XYZ({
              url: "http://t0.tianditu.gov.cn/img_w/wmts?" +
                "SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles" +
                "&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=cc4aba6e967096098249efa069733067",
            }),
            isGroup: true,
            name: "卫星影像图",
          });

          var yingxzi = new ol.layer.Tile({
            source: new ol.source.XYZ({
              url: "https://t0.tianditu.gov.cn/DataServer?T=cia_w&x={x}&y={y}&l={z}&tk=cc4aba6e967096098249efa069733067",
            }),
            isGroup: true,
            name: "天地图文字标注--卫星影像图",
          });
          //加载地图
          map = new ol.Map({
            controls: ol.control.defaults({attribution: false, zoom: false, rotate: false}).extend([]), //隐藏放大缩小按钮
            layers: [aerial, yingxzi],
            projection: projection,
            target: "mapWrapAll",
            view: new ol.View({
              //center: ol.proj.fromLonLat([115.452752, 31.789033]),
              zoom: 15,
              minZoom: 0, //地图缩小限制
              maxZoom: 18.3, //地图放大限制
            }),
          });
          console.log(map);
          //判断当前账套是否有数据
          var mapTalkAbout = true;
          //宅基地定位开始 ---------start
          if(this.mapTheGeomZjdId.length >0) {
            for (var i = 0; this.mapTheGeomZjdId.length > i; i++) {
              if (this.mapTheGeomZjdId[i] !=null && this.mapTheGeomZjdId[i].theGeom != null && this.mapTheGeomZjdId[i].theGeom != "") {
                mapTalkAbout =false;
                this.mapTheGeomZjdId[i].createBy = 'mapTheGeomZjdId';
                var styleYqr = "";
                if(this.mapTheGeomZjdId[i].houseDataConfirmStatus == "CONFIRMED"){
                  styleYqr = new ol.style.Style({
                    fill: new ol.style.Fill({
                      //矢量图层填充颜色，以及透明度
                      color: "#AE57A4",
                    }),
                    stroke: new ol.style.Stroke({
                      //边界样式
                      color: "#28FF28",
                      width: 3,
                    }),
                  });
                } else {
                  styleYqr = new ol.style.Style({
                    fill: new ol.style.Fill({
                      //矢量图层填充颜色，以及透明度
                      color: "#AE57A4",
                    }),
                    stroke: new ol.style.Stroke({
                      //边界样式
                      color: "rgba(255, 45, 45,1)",
                      width: 3,
                    }),
                  });
                }
                hc_land = new ol.layer.Vector({
                  title: "add Layer",
                  source: new ol.source.Vector({
                    projection: projection,
                    features: new ol.format.GeoJSON().readFeatures("{\n" +
                      "    \"type\": \"Feature\",\n" +
                      "    \"geometry\":" + this.mapTheGeomZjdId[i].theGeom + ",    \"properties\":" + JSON.stringify(this.mapTheGeomZjdId[i]) + "}"),
                  }),
                  style: styleYqr
                });
                map.addLayer(hc_land);
                var maxXMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxX;
                var maxYMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxY;
                var minXMap = hc_land.values_.source.featuresRtree_.rbush_.data.minX;
                var minYMap = hc_land.values_.source.featuresRtree_.rbush_.data.minY;
                //定位查询位置
                var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
                map.getView().animate({
                  // 只设置需要的属性即可
                  center: center, // 中心点
                  zoom: 15.8, // 缩放级别
                  rotation: undefined, // 缩放完成view视图旋转弧度
                  duration: 1000, // 缩放持续时间，默认不需要设置
                });
                //自然幢定位开始 ---------start
                getZrzZjdDmList(this.mapTheGeomZjdId[i].zjddm).then((response) => {
                  if (response.code == 200) {
                    this.mapTheGeomZrzId = response.data;
                    if(this.mapTheGeomZrzId.length >0) {
                      for (var i = 0; this.mapTheGeomZrzId.length > i; i++) {
                        if (this.mapTheGeomZrzId[i] !=null && this.mapTheGeomZrzId[i].theGeom != null && this.mapTheGeomZrzId[i].theGeom != "") {
                          this.mapTheGeomZrzId[i].createBy = 'mapTheGeomZrzId';
                          var styleZrz = "";
                          if(this.mapTheGeomZjdId[i].houseDataConfirmStatus == "CONFIRMED"){
                            styleZrz = new ol.style.Style({
                              fill: new ol.style.Fill({
                                //矢量图层填充颜色，以及透明度
                                color: "#FFD306",
                              }),
                              stroke: new ol.style.Stroke({
                                //边界样式
                                color: "#28FF28",
                                width: 3,
                              }),
                            });
                          } else {
                            styleZrz = new ol.style.Style({
                              fill: new ol.style.Fill({
                                //矢量图层填充颜色，以及透明度
                                color: "#FFD306",
                              }),
                              stroke: new ol.style.Stroke({
                                //边界样式
                                color: "rgba(255, 45, 45,1)",
                                width: 3,
                              }),
                            });
                          }
                          hc_land = new ol.layer.Vector({
                            title: "add Layer",
                            source: new ol.source.Vector({
                              projection: projection,
                              features: new ol.format.GeoJSON().readFeatures("{\n" +
                                "    \"type\": \"Feature\",\n" +
                                "    \"geometry\":" + this.mapTheGeomZrzId[i].theGeom + ",    \"properties\":" + JSON.stringify(this.mapTheGeomZrzId[i]) + "}"),
                            }),
                            style: styleZrz
                          });
                          map.addLayer(hc_land);
                        }
                      }
                    }
                  }
                });
                //自然幢定位结束 ---------end

                //附属设施定位开始 ---------start
                getFsssZjdDmList(this.mapTheGeomZjdId[i].zjddm).then((response) => {
                  console.log(response);
                  if (response.code == 200) {
                    this.mapTheGeomFsssId = response.data;
                    if(this.mapTheGeomFsssId.length >0) {
                      for (var i = 0; this.mapTheGeomFsssId.length > i; i++) {
                        if (this.mapTheGeomFsssId[i] !=null && this.mapTheGeomFsssId[i].theGeom != null && this.mapTheGeomFsssId[i].theGeom != "") {
                          this.mapTheGeomFsssId[i].createBy = 'mapTheGeomFsssId';
                          var styleFsss = "";
                          if(this.mapTheGeomZjdId[i].houseDataConfirmStatus == "CONFIRMED"){
                            styleFsss = new ol.style.Style({
                              fill: new ol.style.Fill({
                                //矢量图层填充颜色，以及透明度
                                color: "#00FFFF",
                              }),
                              stroke: new ol.style.Stroke({
                                //边界样式
                                color: "#28FF28",
                                width: 3,
                              }),
                            });
                          } else {
                            styleFsss = new ol.style.Style({
                              fill: new ol.style.Fill({
                                //矢量图层填充颜色，以及透明度
                                color: "#00FFFF",
                              }),
                              stroke: new ol.style.Stroke({
                                //边界样式
                                color: "rgba(255, 45, 45,1)",
                                width: 3,
                              }),
                            });
                          }
                          hc_land = new ol.layer.Vector({
                            title: "add Layer",
                            source: new ol.source.Vector({
                              projection: projection,
                              features: new ol.format.GeoJSON().readFeatures("{\n" +
                                "    \"type\": \"Feature\",\n" +
                                "    \"geometry\":" + this.mapTheGeomFsssId[i].theGeom + ",    \"properties\":" + JSON.stringify(this.mapTheGeomFsssId[i]) + "}"),
                            }),
                            style: styleFsss
                          });
                          map.addLayer(hc_land);
                        }
                      }
                    }
                  }
                });
                //附属设施定位结束 ---------end
              }
            }
          }
          //宅基地定位结束 ---------end

          //点击查询详细信息
          map.on("singleclick", function (evt) {
            let feature = map.forEachFeatureAtPixel(
              evt.pixel,
              (feature) => feature
            );
            if(feature) {
              document.getElementById("info").innerHTML = "";
              that.mapHaDataValue = true;
              var ifConsole = feature.values_.createBy;
              if (ifConsole =="mapTheGeomFsssId") {
                let obj = {};
                that.mapHasDateStatus = 0;
                obj.deptName = feature.values_.deptName;//行政区划名称
                obj.zjddm = feature.values_.zjddm;//宅基地代码
                obj.houseDataConfirmStatus = feature.values_.houseDataConfirmStatus; //状态
                obj.fssslx = feature.values_.fssslx; //附属设施类型
                obj.jzmj = feature.values_.jzmj; //建筑面积
                obj.qsly = feature.values_.qsly;//权属来源
                obj.fwzt = feature.values_.fwzt; //房屋状态
                obj.sfsp = feature.values_.sfsp; //是否审批
                obj.sffz = feature.values_.sffz; //是否发证
                obj.jglx = feature.values_.jglx; //结构类型
                obj.sfzzsy = feature.values_.sfzzsy; //是否正在使用
                obj.jzwqk = feature.values_.jzwqk; //建筑物情况
                obj.tdzk = feature.values_.tdzk; //审批或建设前土地状况
                obj.sfsgcf = feature.values_.sfsgcf; //是否受过处罚
                obj.sysNormalDisable = feature.values_.sysNormalDisable; //是否停用
                //附属设施类型字典项
                that.getDicts("fsss_type").then((response) => {
                  var assetTypeOptions = response.data;
                  if(obj.fssslx !=null && obj.fssslx !=""){
                    for(var i=0;assetTypeOptions.length >i; i++){
                      if(obj.fssslx == assetTypeOptions[i].dictValue) {
                        obj.fssslx = assetTypeOptions[i].dictLabel;
                        break;
                      }
                    }
                  }
                });
                //权属类型字典项
                that.getDicts("acquisition_method").then((response) => {
                  var assetTypeOptions = response.data;
                  if(obj.qsly !=null && obj.qsly !=""){
                    for(var i=0;assetTypeOptions.length >i; i++){
                      if(obj.qsly == assetTypeOptions[i].dictValue) {
                        obj.qsly = assetTypeOptions[i].dictLabel;
                        break;
                      }
                    }
                  }
                });
                //房屋状态字典项
                that.getDicts("fwzt").then((response) => {
                  var assetTypeOptions = response.data;
                  if(obj.fwzt !=null && obj.fwzt !=""){
                    for(var i=0;assetTypeOptions.length >i; i++){
                      if(obj.fwzt == assetTypeOptions[i].dictValue) {
                        obj.fwzt = assetTypeOptions[i].dictLabel;
                        break;
                      }
                    }
                  }
                });
                //是否审批字典项
                that.getDicts("sys_yes_no").then((response) => {
                  var assetTypeOptions = response.data;
                  if(obj.sfsp !=null && obj.sfsp !=""){
                    for(var i=0;assetTypeOptions.length >i; i++){
                      if(obj.sfsp == assetTypeOptions[i].dictValue) {
                        obj.sfsp = assetTypeOptions[i].dictLabel;
                        break;
                      }
                    }
                  }
                });
                //是否发证字典项
                that.getDicts("sys_yes_no").then((response) => {
                  var assetTypeOptions = response.data;
                  if(obj.sffz !=null && obj.sffz !=""){
                    for(var i=0;assetTypeOptions.length >i; i++){
                      if(obj.sffz == assetTypeOptions[i].dictValue) {
                        obj.sffz = assetTypeOptions[i].dictLabel;
                        break;
                      }
                    }
                  }
                });
                //结构类型字典项
                that.getDicts("house_jglx").then((response) => {
                  var assetTypeOptions = response.data;
                  if(obj.jglx !=null && obj.jglx !=""){
                    for(var i=0;assetTypeOptions.length >i; i++){
                      if(obj.jglx == assetTypeOptions[i].dictValue) {
                        obj.jglx = assetTypeOptions[i].dictLabel;
                        break;
                      }
                    }
                  }
                });
                //是否正在使用字典项
                that.getDicts("sys_yes_no").then((response) => {
                  var assetTypeOptions = response.data;
                  if(obj.sfzzsy !=null && obj.sfzzsy !=""){
                    for(var i=0;assetTypeOptions.length >i; i++){
                      if(obj.sfzzsy == assetTypeOptions[i].dictValue) {
                        obj.sfzzsy = assetTypeOptions[i].dictLabel;
                        break;
                      }
                    }
                  }
                });
                //房屋状态字典项
                that.getDicts("fwzt").then((response) => {
                  var assetTypeOptions = response.data;
                  if(obj.fwzt !=null && obj.fwzt !=""){
                    for(var i=0;assetTypeOptions.length >i; i++){
                      if(obj.fwzt == assetTypeOptions[i].dictValue) {
                        obj.fwzt = assetTypeOptions[i].dictLabel;
                        break;
                      }
                    }
                  }
                });
                //土地状况字典项
                that.getDicts("land_state").then((response) => {
                  var assetTypeOptions = response.data;
                  if(obj.tdzk !=null && obj.tdzk !=""){
                    for(var i=0;assetTypeOptions.length >i; i++){
                      if(obj.tdzk == assetTypeOptions[i].dictValue) {
                        obj.tdzk = assetTypeOptions[i].dictLabel;
                        break;
                      }
                    }
                  }
                });
                //是否受过处罚字典项
                that.getDicts("land_state").then((response) => {
                  var assetTypeOptions = response.data;
                  if(obj.sfsgcf !=null && obj.sfsgcf !=""){
                    for(var i=0;assetTypeOptions.length >i; i++){
                      if(obj.sfsgcf == assetTypeOptions[i].dictValue) {
                        obj.sfsgcf = assetTypeOptions[i].dictLabel;
                        break;
                      }
                    }
                  }
                });
                that.mapFsssData = obj;
              } else if(ifConsole =="mapTheGeomZrzId"){
                let obj = {};
                that.mapHasDateStatus = 1;
                obj.deptName = feature.values_.deptName;//部门名称
                obj.zjddm = feature.values_.zjddm;//宅基地代码
                obj.nmfwzh = feature.values_.nmfwzh;//农民房屋幢号
                obj.zrzh = feature.values_.zrzh;//自然幢号
                obj.jgrq = feature.values_.jgrq;//竣工日期
                obj.jzwgd = feature.values_.jzwgd;//建筑物高度
                obj.zzdmj = feature.values_.zzdmj;//幢占地面积
                obj.zydmj = feature.values_.zydmj;//幢用地面积
                obj.scjzmj = feature.values_.scjzmj;//实测建筑面积
                obj.zcs = feature.values_.zcs;//总层数
                obj.dscs = feature.values_.dscs;//地上层数
                obj.dxcs = feature.values_.dxcs;//地下层数
                obj.fwjg = feature.values_.fwjg;//房屋结构
                obj.sjly = feature.values_.sjly;//数据来源
                obj.status = feature.values_.status;//状态
                obj.houseDataConfirmStatus = feature.values_.houseDataConfirmStatus;//数据调查确认状态
                //字典项转化
                //房屋结构字典项
                that.getDicts("housing_structure").then((response) => {
                  var assetTypeOptions = response.data;
                  if(obj.fwjg !=null && obj.fwjg !=""){
                    for(var i=0;assetTypeOptions.length >i; i++){
                      if(obj.fwjg == assetTypeOptions[i].dictValue) {
                        obj.fwjg = assetTypeOptions[i].dictLabel;
                        break;
                      }
                    }
                  }
                });
                //房屋结构字典项
                that.getDicts("sjly").then((response) => {
                  var assetTypeOptions = response.data;
                  if(obj.sjly !=null && obj.sjly !=""){
                    for(var i=0;assetTypeOptions.length >i; i++){
                      if(obj.sjly == assetTypeOptions[i].dictValue) {
                        obj.sjly = assetTypeOptions[i].dictLabel;
                        break;
                      }
                    }
                  }
                });
                that.mapZrzData = obj;
              } else if(ifConsole =="mapTheGeomZjdId"){
                let obj = {};
                that.mapHasDateStatus = 2;
                obj.deptName = feature.values_.deptName;//行政区划名称
                obj.suyqrdm = feature.values_.suyqrdm;//所有权人代码
                obj.nhdm = feature.values_.nhdm;//农户代码
                obj.zjddm = feature.values_.zjddm;//宅基地代码
                obj.zdbh = feature.values_.zdbh;//宗地编号
                obj.zddm = feature.values_.zddm;//宗地代码
                obj.zl = feature.values_.zl;//坐落
                obj.zldwdm = feature.values_.zldwdm;//坐落单位代码
                obj.zdmj = feature.values_.zdmj;//宗地面积
                obj.yt = feature.values_.yt;//用途
                obj.ytmc = feature.values_.ytmc;//用途名称
                obj.dj = feature.values_.dj;//宗地编号
                obj.jg = feature.values_.jg;//价格万元
                obj.qllx = feature.values_.qllx;//权利类型
                obj.qlxz = feature.values_.qlxz;//权利性质
                obj.qlsdfs = feature.values_.qlsdfs;//权利设定方式
                obj.rjl = feature.values_.rjl;//容积率
                obj.jzmd = feature.values_.jzmd;//建筑密度
                obj.jzxg = feature.values_.jzxg;//建筑限高
                obj.zdszd = feature.values_.zdszd;//宗地四至-东
                obj.zdszn = feature.values_.zdszn;//宗地四至-南
                obj.zdszx = feature.values_.zdszx;//宗地四至-西
                obj.zdszb = feature.values_.zdszb;//宗地四至-北
                obj.zdt = feature.values_.zdt;//宗地图
                obj.tfh = feature.values_.tfh;//图幅号
                obj.djh = feature.values_.djh;//地籍号
                obj.sjly = feature.values_.sjly;//数据来源
                obj.lyzk = feature.values_.lyzk;//当前利用状况
                obj.xzkssj = feature.values_.xzkssj;//闲置开始时间
                obj.sffz = feature.values_.sffz;//是否发证
                obj.zjdzsh = feature.values_.zjdzsh;//宅基地证书号
                obj.zjdxctp = feature.values_.zjdxctp;//宅基地现场图片
                obj.zjdqdfs = feature.values_.zjdqdfs;//宅基地取得方式
                obj.bccjl = feature.values_.bccjl;//被惩处经历
                obj.bccbz = feature.values_.bccbz;//被惩处备注
                obj.yctcyx = feature.values_.yctcyx;//有偿退出意向
                obj.zjdpzmj = feature.values_.zjdpzmj;//宅基地批准面积
                obj.zjdxzyy = feature.values_.zjdxzyy;//宅基地闲置原因
                obj.lzyx = feature.values_.lzyx;//流转意向
                obj.sysNormalDisable = feature.values_.sysNormalDisable;//是否停用
                //字典项转化
                //是否发证字典项
                that.getDicts("sys_yes_no").then((response) => {
                  var assetTypeOptions = response.data;
                  if(obj.sffz !=null && obj.sffz !=""){
                    for(var i=0;assetTypeOptions.length >i; i++){
                      if(obj.sffz == assetTypeOptions[i].dictValue) {
                        obj.sffz = assetTypeOptions[i].dictLabel;
                        break;
                      }
                    }
                  }
                });
                //利用状态字典项
                that.getDicts("zjdlyzk").then((response) => {
                  var assetTypeOptions = response.data;
                  if(obj.lyzk !=null && obj.lyzk !=""){
                    for(var i=0;assetTypeOptions.length >i; i++){
                      if(obj.lyzk == assetTypeOptions[i].dictValue) {
                        obj.lyzk = assetTypeOptions[i].dictLabel;
                        break;
                      }
                    }
                  }
                });
                //流转意向字典项
                that.getDicts("is_have").then((response) => {
                  var assetTypeOptions = response.data;
                  if(obj.lzyx !=null && obj.lzyx !=""){
                    for(var i=0;assetTypeOptions.length >i; i++){
                      if(obj.lzyx == assetTypeOptions[i].dictValue) {
                        obj.lzyx = assetTypeOptions[i].dictLabel;
                        break;
                      }
                    }
                  }
                });
                //有偿退出意向字典项
                that.getDicts("is_have").then((response) => {
                  var assetTypeOptions = response.data;
                  if(obj.yctcyx !=null && obj.yctcyx !=""){
                    for(var i=0;assetTypeOptions.length >i; i++){
                      if(obj.yctcyx == assetTypeOptions[i].dictValue) {
                        obj.yctcyx = assetTypeOptions[i].dictLabel;
                        break;
                      }
                    }
                  }
                });
                //被惩处经历字典项
                that.getDicts("is_have").then((response) => {
                  var assetTypeOptions = response.data;
                  if(obj.bccjl !=null && obj.bccjl !=""){
                    for(var i=0;assetTypeOptions.length >i; i++){
                      if(obj.bccjl == assetTypeOptions[i].dictValue) {
                        obj.bccjl = assetTypeOptions[i].dictLabel;
                        break;
                      }
                    }
                  }
                });
                //宅基地取得方式字典项
                that.getDicts("acquisition_method").then((response) => {
                  var assetTypeOptions = response.data;
                  if(obj.zjdqdfs !=null && obj.zjdqdfs !=""){
                    for(var i=0;assetTypeOptions.length >i; i++){
                      if(obj.zjdqdfs == assetTypeOptions[i].dictValue) {
                        obj.zjdqdfs = assetTypeOptions[i].dictLabel;
                        break;
                      }
                    }
                  }
                });
                //权利设定方式字典项
                that.getDicts("right_setting_mode").then((response) => {
                  var assetTypeOptions = response.data;
                  if(obj.qlsdfs !=null && obj.qlsdfs !=""){
                    for(var i=0;assetTypeOptions.length >i; i++){
                      if(obj.qlsdfs == assetTypeOptions[i].dictValue) {
                        obj.qlsdfs = assetTypeOptions[i].dictLabel;
                        break;
                      }
                    }
                  }
                });
                //数据来源字典项
                that.getDicts("sjly").then((response) => {
                  var assetTypeOptions = response.data;
                  if(obj.sjly !=null && obj.sjly !=""){
                    for(var i=0;assetTypeOptions.length >i; i++){
                      if(obj.sjly == assetTypeOptions[i].dictValue) {
                        obj.sjly = assetTypeOptions[i].dictLabel;
                        break;
                      }
                    }
                  }
                });
                that.mapZjdData = obj;
              } else {
                that.mapHaDataValue = false;
              }
            }else {
              that.mapHaDataValue = false;
            }
          });
          //当前账套没有任何空间数据
          if(mapTalkAbout){
            let deptName = this.$store.state.user.loginDeptId + "";
            getQueryLand(deptName).then((response) => {
              if (response.code == 200) {
                let InsertCode = response.data;
                if (InsertCode != null) {
                  var lat = InsertCode.lat;
                  var lng = InsertCode.lng;
                  var center;
                  if(lat !=null && lng !=null && lat !="" && lng !=""){
                    center = [lng,lat];
                  }else {
                    center =[115.452752, 31.789033];
                  }
                  map.getView().animate({
                    // 只设置需要的属性即可
                    center: ol.proj.fromLonLat(center), // 中心点
                    zoom: 17.9, // 缩放级别
                    rotation: undefined, // 缩放完成view视图旋转弧度
                    duration: 1000, // 缩放持续时间，默认不需要设置
                  });
                }
              }
            });
          }
        },
      }
    }
</script>

<style  scoped>

  >>> .bannerBg{
    width: 100%;
    color:#fff;
    padding:10px;
    background: linear-gradient(134deg,#7ac943 1%, #22b7f2);
  }
>>> .van-hairline--bottom::after {
       border-bottom-width: 0;
     }
  >>> .activeBtn{
    flex:1;background:#fff;height:50px;border-radius:25px;margin:10px;color:#7AC943;line-height:50px;text-align:center;font-size:20px;box-shadow: 0px 5px 6px 0px rgba(0,0,0,0.16);
  }
>>> .disactiveBtn{
  flex:1;background:rgba(255,255,255,.4);height:50px;border-radius:25px;margin:10px;color:#fff;line-height:50px;text-align:center;font-size:20px;box-shadow: 0px 5px 6px 0px rgba(0,0,0,0.16);
}
  >>> .van-cell__label{
    color: #969799;
    font-size: 12px;
    line-height: 20px;
    margin:0
  }
  >>>.map_area {
    width: 50vw;
    height: 50vh;
    z-index:1;
    background:#000;
    position: fixed;
    left: 0;
    top: 0;
  }
  >>> .van-field__label{
    width:50%;
  }
</style>
