移动端
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

6151 lines
249 KiB

  1. <template>
  2. <div class="app-container">
  3. <van-sticky>
  4. <div class="bannerBg" style="">
  5. <van-nav-bar
  6. style="background:transparent;border-bottom-width:0;"
  7. @click-left="onClickLeft"
  8. @click-right="showUploadList"
  9. >
  10. <template #left>
  11. <van-icon name="arrow-left" size=".5rem" color="#fff" />
  12. </template>
  13. <template #right>
  14. <van-icon v-if="$cookies.get('upload')!=null&&$cookies.get('upload')==1" name="photo-o" size=".5rem" color="#fff"/>
  15. </template>
  16. <template #title>
  17. <p style="color:#fff">{{item.deptName}}</p>
  18. </template>
  19. </van-nav-bar>
  20. <van-popup v-model:show="showImageList" position="bottom" style="height:40vh;padding:50px 10px 0" closeable
  21. close-icon="close">
  22. <p style="color:#000;position:absolute;top:0.426667rem;left:0.426667rem">图片上传</p>
  23. <div style="width:100%;height:calc( 40vh - 100px);overflow-y: scroll;">
  24. <van-uploader v-model="uploadImgList" :after-read="beforeReadImageList" @delete="deleteFileImageList" multiple :max-count="50" />
  25. </div>
  26. <van-row justify="space-around" style=" position:fixed;bottom:0;left:0;width:100%;height:50px;text-align: center;">
  27. <van-col span="12"><van-button type="primary" style="width:100px;" round @click="uploadImgList = [],uploadImgList1 = []">清空</van-button></van-col>
  28. <van-col span="12"><van-button type="primary" style="width:100px;" round @click="submitUploadList">上传</van-button></van-col>
  29. </van-row>
  30. </van-popup>
  31. <div style="display:flex;width:94%;margin:0 auto;justify-content:space-between;padding: 10px 0">
  32. <div style="display:flex;width:90%;margin:0 auto;">
  33. <div :class="{activeBtn : activeBtn==1,disactiveBtn :activeBtn!=1 }" @click="activeBtn=1,getDc()"
  34. ><van-icon size=".3rem" style="vertical-align:middle;" :name="require('../../assets/images/housesteadSurvey/btn1'+(activeBtn!=1?'1':'')+'.png')" />
  35. 入户核查
  36. </div>
  37. <div :class="{activeBtn : activeBtn==2,disactiveBtn :activeBtn!=2 }" @click="activeBtn=2,getNh()">
  38. <van-icon size=".3rem" style="vertical-align:middle;" :name="require('../../assets/images/housesteadSurvey/btn2'+(activeBtn!=2?'2':'')+'.png')" />
  39. 农户信息
  40. </div>
  41. <div :class="{activeBtn : activeBtn==3,disactiveBtn :activeBtn!=3 }" @click="activeBtn=3,getSyqr()">
  42. <van-icon size=".3rem" style="vertical-align:middle;" :name="require('../../assets/images/housesteadSurvey/btn3'+(activeBtn!=3?'3':'')+'.png')" />
  43. 所有权人
  44. </div>
  45. <div :class="{activeBtn : activeBtn==4,disactiveBtn :activeBtn!=4 }" @click="activeBtn=4,mapShow()">
  46. <van-icon size=".3rem" style="vertical-align:middle;" :name="require('../../assets/images/housesteadSurvey/btn4'+(activeBtn!=4?'4':'')+'.png')" />
  47. 切换地图
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. <div style="background:#fff;padding:10px 0;">
  53. <div style="border:1px solid rgb(122, 201, 67);width:90%;margin:0 auto;border-radius:15px;height:.8rem;display:flex;font-size:.3rem;">
  54. <div style="flex:1;text-align:center;">
  55. <span style="color:rgb(122, 201, 67);line-height:.8rem;">总户数:</span>
  56. <span style="color:rgb(250, 83, 83);line-height:.8rem;">{{totalH}} <span style="font-size:12px;">户</span></span>
  57. </div>
  58. <div style="flex:1;text-align:center;">
  59. <span style="color:rgb(122, 201, 67);line-height:.8rem">总人数:</span>
  60. <span style="color:rgb(250, 83, 83);line-height:.8rem">{{totalR}} <span style="font-size:12px;">人</span></span>
  61. </div>
  62. </div>
  63. </div>
  64. </van-sticky>
  65. <div v-if="activeBtn==1">
  66. <van-search v-model="zjdvalue" placeholder="请输入搜索关键词" show-action @search="onSearchzjd">
  67. <template #action>
  68. <van-icon name="add" color="rgba(122,201,67,1)" size=".8rem" @click="onClickzjd" style="vertical-align:middle;"/>
  69. </template>
  70. </van-search>
  71. <van-tabs v-model="active" title-active-color="#7AC943" color="#7AC943" @click="getZjdList">
  72. <van-tab >
  73. <template #title>全部<van-badge v-if="qbNums>=0" :content="qbNums" /></template>
  74. <!--<van-pull-refresh v-model="isLoadingzjd" @refresh="onRefreshzjd">-->
  75. <van-list
  76. v-model:loading="loading1"
  77. :finished="finished1"
  78. finished-text="没有更多了"
  79. @load="onRefreshzjd"
  80. :immediate-check="false"
  81. >
  82. <van-cell v-for="(item,index) in list" :key="index" size="small" :clickable="true" style="border-radius: 16px;
  83. box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:calc( 100% - 40px);margin:20px">
  84. <template #title>
  85. <p v-if="item.syqr!=null&&item.syqr!=''" style="color:#22B7F2">{{limitWords(item.syqr)}}
  86. <van-button v-if="item.houseDataConfirmStatus=='CONFIRMED'" plain round color="#7AC943" size="mini" style="vertical-align:middle;float:right;" @click="setCookies(item)">查看详情</van-button>
  87. <van-button v-if="item.houseDataConfirmStatus!='CONFIRMED'"plain round color="#FA5353" size="mini" style="vertical-align:middle;float:right;" @click="setCookies(item)">开始调查</van-button>
  88. <van-button plain round color="#FA5353" size="mini" v-if="item.houseDataConfirmStatus!='CONFIRMED'" style="vertical-align:middle;float:right;margin-right:10px" @click="deleteZjd(item,index)">删除</van-button>
  89. </p>
  90. <p v-if="item.syqr==null||item.syqr==''" style="color:#878787">无
  91. <van-button v-if="item.houseDataConfirmStatus=='CONFIRMED'" plain round color="#7AC943" size="mini" style="vertical-align:middle;float:right;" @click="setCookies(item)">查看详情</van-button>
  92. <van-button v-if="item.houseDataConfirmStatus!='CONFIRMED'"plain round color="#FA5353" size="mini" style="vertical-align:middle;float:right;" @click="setCookies(item)">开始调查</van-button>
  93. <van-button plain round color="#FA5353" size="mini" v-if="item.houseDataConfirmStatus!='CONFIRMED'" style="vertical-align:middle;float:right;margin-right:10px" @click="deleteZjd(item,index)">删除</van-button>
  94. </p>
  95. </template>
  96. <!--<template #default>
  97. </template>-->
  98. <template #label>
  99. <p>宅基地代码: {{item.zjddm}} </p>
  100. <p>宗地面积: {{item.zdmj}}㎡
  101. <span v-if="item.houseDataConfirmStatus=='CONFIRMED'&&item.zjdAudit=='0'" style="color:#ff976a;float:right;">待审核</span>
  102. <span v-if="item.houseDataConfirmStatus=='CONFIRMED'&&item.zjdAudit=='1'" style="color:#07c160;float:right;">已审核</span>
  103. <span v-if="item.houseDataConfirmStatus=='CONFIRMED'&&item.zjdAudit=='2'" style="color:#ee0a24;float:right;">已驳回</span>
  104. </p>
  105. </template>
  106. <template #icon>
  107. <van-icon name="clock" color="#22b7f2" style="margin-top:10px;margin-right:10px;"/>
  108. </template>
  109. </van-cell>
  110. </van-list>
  111. <!--</van-pull-refresh>-->
  112. </van-tab>
  113. <van-tab >
  114. <template #title>已核查<van-badge v-if="yhcNums>=0" :content="yhcNums" /></template>
  115. <!--<van-pull-refresh v-model="isLoadingzjd" @refresh="onRefreshzjd">-->
  116. <van-list
  117. v-model:loading="loading2"
  118. :finished="finished2"
  119. finished-text="没有更多了"
  120. @load="onRefreshzjd"
  121. :immediate-check="false"
  122. >
  123. <van-cell v-for="(item,index) in list1" :key="index" size="small" @click.native="setCookies(item)" style="border-radius: 16px;
  124. box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:calc( 100% - 40px);margin:20px">
  125. <template #title>
  126. <p v-if="item.syqr!=null&&item.syqr!=''" style="color:#22B7F2">{{limitWords(item.syqr)}}
  127. <van-button v-if="item.houseDataConfirmStatus=='CONFIRMED'" plain round color="#7AC943" size="mini" style="vertical-align:middle;float:right;" @click="setCookies(item)">查看详情</van-button>
  128. <van-button v-if="item.houseDataConfirmStatus!='CONFIRMED'" plain round color="#FA5353" size="mini" style="vertical-align:middle;float:right;" @click="setCookies(item)">开始调查</van-button>
  129. <van-button plain round color="#FA5353" size="mini" v-if="item.houseDataConfirmStatus!='CONFIRMED'" style="vertical-align:middle;float:right;margin-right:10px" @click="deleteZjd(item,index)">删除</van-button>
  130. </p>
  131. <p v-if="item.syqr==null||item.syqr==''" style="color:#878787">无
  132. <van-button v-if="item.houseDataConfirmStatus=='CONFIRMED'" plain round color="#7AC943" size="mini" style="vertical-align:middle;float:right;">查看详情</van-button>
  133. <van-button v-if="item.houseDataConfirmStatus!='CONFIRMED'" plain round color="#FA5353" size="mini" style="vertical-align:middle;float:right;">开始调查</van-button>
  134. <van-button plain round color="#FA5353" size="mini" v-if="item.houseDataConfirmStatus!='CONFIRMED'" style="vertical-align:middle;float:right;margin-right:10px" @click="deleteZjd(item,index)">删除</van-button>
  135. </p>
  136. </template>
  137. <!--<template #default>
  138. <van-button v-if="item.houseDataConfirmStatus=='CONFIRMED'" plain round color="#7AC943" size="mini" style="vertical-align:middle;margin-top:15px;">查看详情</van-button>
  139. <van-button v-if="item.houseDataConfirmStatus!='CONFIRMED'"plain round color="#FA5353" size="mini" style="vertical-align:middle;margin-top:15px;">开始调查</van-button>
  140. </template>-->
  141. <template #label>
  142. <p>宅基地代码: {{item.zjddm}} </p>
  143. <p>宗地面积: {{item.zdmj}}㎡
  144. <span v-if="item.zjdAudit=='0'" style="color:#ff976a;float:right;">待审核</span>
  145. <span v-if="item.zjdAudit=='1'" style="color:#07c160;float:right;">已审核</span>
  146. <span v-if="item.zjdAudit=='2'" style="color:#ee0a24;float:right;">已驳回</span>
  147. </p>
  148. </template>
  149. <template #icon>
  150. <van-icon name="clock" color="#22b7f2" style="margin-top:10px;margin-right:10px;"/>
  151. </template>
  152. </van-cell>
  153. </van-list>
  154. <!--</van-pull-refresh>-->
  155. </van-tab>
  156. <van-tab >
  157. <template #title>未核查<van-badge v-if="whcNums>=0" :content="whcNums" /></template>
  158. <!--<van-pull-refresh v-model="isLoadingzjd" @refresh="onRefreshzjd">-->
  159. <van-list
  160. v-model:loading="loading3"
  161. :finished="finished3"
  162. finished-text="没有更多了"
  163. @load="onRefreshzjd"
  164. :immediate-check="false"
  165. >
  166. <van-cell v-for="(item,index) in list2" :key="index" size="small" style="border-radius: 16px;
  167. box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:calc( 100% - 40px);margin:20px">
  168. <template #title>
  169. <p v-if="item.syqr!=null&&item.syqr!=''" style="color:#22B7F2">{{limitWords(item.syqr)}}
  170. <van-button v-if="item.houseDataConfirmStatus=='CONFIRMED'" plain round color="#7AC943" size="mini" style="vertical-align:middle;float:right;" @click="setCookies(item)">查看详情</van-button>
  171. <van-button v-if="item.houseDataConfirmStatus!='CONFIRMED'"plain round color="#FA5353" size="mini" style="vertical-align:middle;float:right;" @click="setCookies(item)">开始调查</van-button>
  172. <van-button plain round color="#FA5353" size="mini" v-if="item.houseDataConfirmStatus!='CONFIRMED'" style="vertical-align:middle;float:right;margin-right:10px" @click="deleteZjd(item,index)">删除</van-button>
  173. </p>
  174. <p v-if="item.syqr==null||item.syqr==''" style="color:#878787">无
  175. <van-button v-if="item.houseDataConfirmStatus=='CONFIRMED'" plain round color="#7AC943" size="mini" style="vertical-align:middle;float:right;" @click="setCookies(item)">查看详情</van-button>
  176. <van-button v-if="item.houseDataConfirmStatus!='CONFIRMED'"plain round color="#FA5353" size="mini" style="vertical-align:middle;float:right;" @click="setCookies(item)">开始调查</van-button>
  177. <van-button plain round color="#FA5353" size="mini" v-if="item.houseDataConfirmStatus!='CONFIRMED'" style="vertical-align:middle;float:right;margin-right:10px" @click="deleteZjd(item,index)">删除</van-button>
  178. </p>
  179. </template>
  180. <!--<template #default>
  181. <van-button v-if="item.houseDataConfirmStatus=='CONFIRMED'" plain round color="#7AC943" size="mini" style="vertical-align:middle;margin-top:15px;">查看详情</van-button>
  182. <van-button v-if="item.houseDataConfirmStatus!='CONFIRMED'"plain round color="#FA5353" size="mini" style="vertical-align:middle;margin-top:15px;">开始调查</van-button>
  183. </template>-->
  184. <template #label>
  185. <p>宅基地代码: {{item.zjddm}} </p>
  186. <p>宗地面积: {{item.zdmj}}㎡
  187. <span v-if="item.zjdAudit=='2'" style="color:#ee0a24;float:right;">已驳回</span>
  188. </p>
  189. </template>
  190. <template #icon>
  191. <van-icon name="clock" color="#22b7f2" style="margin-top:10px;margin-right:10px;"/>
  192. </template>
  193. </van-cell>
  194. </van-list>
  195. <!--</van-pull-refresh>-->
  196. </van-tab>
  197. </van-tabs>
  198. </div>
  199. <div v-if="activeBtn==2" >
  200. <van-search v-model="nhvalue" placeholder="请输入农户姓名或证件号" show-action @search="onSearchnh">
  201. <template #action>
  202. <van-icon name="add" color="rgba(122,201,67,1)" size=".8rem" @click="onClicknh" style="vertical-align:middle;"/>
  203. </template>
  204. </van-search>
  205. <van-pull-refresh v-model="isLoadingnh" @refresh="onRefreshnh">
  206. <van-cell v-for="(item,index) in nhlist" :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">
  207. <template #title>
  208. <p style="color:#22B7F2">{{item.hzxm}}
  209. <van-button plain round color="#7AC943" size="mini" style="vertical-align:middle;float:right;margin-left:10px;" @click="showPopuphncylist(item)">查看成员</van-button>
  210. <van-button plain round color="#7AC943" size="mini" style="vertical-align:middle;float:right;margin-left:10px;" @click="showPopupnh(item)">查看户主</van-button>
  211. <van-button plain round color="#FA5353" size="mini" v-if="!isFinished" style="vertical-align:middle;float:right;" @click="deletenh(item,index)">删除</van-button>
  212. </p>
  213. </template>
  214. <!-- <template #default>
  215. </template>-->
  216. <template #label>
  217. <p>证件号码:{{item.hzzjhm}}</p>
  218. <p>农户代码:{{item.nhdm}}</p>
  219. </template>
  220. <template #icon>
  221. <van-icon name="clock" color="#22b7f2" style="margin-top:10px;margin-right:10px;"/>
  222. </template>
  223. </van-cell>
  224. </van-pull-refresh>
  225. </div>
  226. <div v-if="activeBtn==3">
  227. <van-form @submit="onSubmitsyqr">
  228. <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;">
  229. <van-field
  230. autocomplete="off"
  231. v-model="qlrform.qydm"
  232. name="区域代码"
  233. label="区域代码"
  234. placeholder="禁止修改"
  235. disabled
  236. input-align="right"
  237. />
  238. <van-field
  239. autocomplete="off"
  240. v-model="qlrform.suyqrdm"
  241. name="所有权人代码"
  242. label="所有权人代码"
  243. disabled
  244. placeholder="自动生成"
  245. input-align="right"
  246. />
  247. <van-field
  248. autocomplete="off"
  249. v-model="qlrform.suyqrmc"
  250. name="所有权人名称"
  251. label="所有权人名称"
  252. required
  253. placeholder="所有权人名称"
  254. input-align="right"
  255. :rules="[{ required: true, message: '所有权人名称不能为空' }]"
  256. />
  257. <van-field
  258. autocomplete="off"
  259. v-model="qlrform.suyqxzName"
  260. name="所有权性质"
  261. label="所有权性质"
  262. required
  263. placeholder="所有权性质"
  264. input-align="right"
  265. :rules="[{ required: true, message: '所有权性质不能为空' }]"
  266. @click="showsuyqxz = true"
  267. />
  268. <van-field
  269. autocomplete="off"
  270. v-model="qlrform.suyqxz"
  271. style="display:none"
  272. />
  273. <van-popup v-model="showsuyqxz" position="bottom" input-align="right">
  274. <van-picker
  275. show-toolbar
  276. :columns="suyqxzOptions"
  277. value-key="dictLabel"
  278. @confirm="onConfirmsuyqxz"
  279. @cancel="showsuyqxz = false"
  280. />
  281. </van-popup>
  282. <van-field
  283. autocomplete="off"
  284. v-model="qlrform.dbrxm"
  285. name="代表人姓名"
  286. label="代表人姓名"
  287. required
  288. placeholder="代表人姓名"
  289. input-align="right"
  290. :rules="[{ required: true, message: '代表人姓名不能为空' }]"
  291. />
  292. <van-field
  293. autocomplete="off"
  294. v-model="qlrform.dbrzjlx"
  295. style="display:none"
  296. />
  297. <van-field
  298. autocomplete="off"
  299. v-model="qlrform.dbrzjlxName"
  300. name="代表人证件类型"
  301. label="代表人证件类型"
  302. required
  303. placeholder="代表人证件类型"
  304. input-align="right"
  305. :rules="[{ required: true, message: '代表人证件类型不能为空' }]"
  306. @click="showdbrzjlx = true"
  307. />
  308. <van-popup v-model="showdbrzjlx" position="bottom" input-align="right">
  309. <van-picker
  310. show-toolbar
  311. :columns="zjlxOptions"
  312. value-key="dictLabel"
  313. @confirm="onConfirmdbrzjlx"
  314. @cancel="showdbrzjlx = false"
  315. />
  316. </van-popup>
  317. <van-field
  318. autocomplete="off"
  319. v-model="qlrform.dbrzjhm"
  320. name="代表人证件号码"
  321. label="代表人证件号码"
  322. required
  323. placeholder="代表人证件号码"
  324. input-align="right"
  325. :rules="[{ required: true, message: '代表人证件号码不能为空' },{validator:validatorIdcardqlr,message:'身份证号格式错误!'}]"
  326. />
  327. <van-field
  328. autocomplete="off"
  329. v-model="qlrform.dbrlxdh"
  330. name="代表人联系电话"
  331. label="代表人联系电话"
  332. placeholder="代表人联系电话"
  333. type="number"
  334. input-align="right"
  335. required
  336. :rules="[{ required: true, message: '代表人联系电话不能为空' }]"
  337. />
  338. <van-field
  339. autocomplete="off"
  340. v-model="qlrform.dbrtxdz"
  341. name="代表人通讯地址"
  342. label="代表人通讯地址"
  343. required
  344. placeholder="代表人通讯地址"
  345. input-align="right"
  346. :rules="[{ required: true, message: '代表人通讯地址不能为空' }]"
  347. />
  348. <van-field
  349. autocomplete="off"
  350. v-model="qlrform.dbryzbm"
  351. name="代表人邮政编码"
  352. label="代表人邮政编码"
  353. required
  354. placeholder="代表人邮政编码"
  355. input-align="right"
  356. maxlength="6"
  357. :rules="[{ required: true, message: '代表人邮政编码不能为空' }]"
  358. />
  359. <van-field name="radio" label="是否成立农村集体经济组织" required input-align="right" autocomplete="off">
  360. <template #input>
  361. <van-radio-group v-model="qlrform.sfclncjtjjzz" direction="horizontal">
  362. <van-radio name="Y">是</van-radio>
  363. <van-radio name="N">否 </van-radio>
  364. </van-radio-group>
  365. </template>
  366. </van-field>
  367. <van-field
  368. autocomplete="off"
  369. v-model="qlrform.dlrxm"
  370. name="代理人姓名"
  371. label="代理人姓名"
  372. placeholder="代理人姓名"
  373. input-align="right"
  374. />
  375. <van-field
  376. autocomplete="off"
  377. v-model="qlrform.dlrzjlx"
  378. style="display:none"
  379. />
  380. <van-field
  381. autocomplete="off"
  382. v-model="qlrform.dlrzjlxName"
  383. name="代理人证件类型"
  384. label="代理人证件类型"
  385. placeholder="代理人证件类型"
  386. input-align="right"
  387. @click="showdlrzjlx = true"
  388. />
  389. <van-popup v-model="showdlrzjlx" position="bottom" input-align="right">
  390. <van-picker
  391. show-toolbar
  392. :columns="zjlxOptions"
  393. value-key="dictLabel"
  394. @confirm="onConfirmdlrzjlx"
  395. @cancel="showdlrzjlx = false"
  396. />
  397. </van-popup>
  398. <van-field
  399. autocomplete="off"
  400. v-model="qlrform.dlrzjhm"
  401. name="代理人证件号码"
  402. label="代理人证件号码"
  403. placeholder="代理人证件号码"
  404. input-align="right"
  405. />
  406. <van-field
  407. autocomplete="off"
  408. v-model="qlrform.dlrlxdh"
  409. name="代理人联系电话"
  410. label="代理人联系电话"
  411. placeholder="代理人联系电话"
  412. input-align="right"
  413. />
  414. <van-field
  415. autocomplete="off"
  416. v-model="qlrform.dlrtxdz"
  417. name="代理人通讯地址"
  418. label="代理人通讯地址"
  419. placeholder="代理人通讯地址"
  420. input-align="right"
  421. />
  422. <van-field
  423. autocomplete="off"
  424. v-model="qlrform.dlryzbm"
  425. name="代理人邮政编码"
  426. label="代理人邮政编码"
  427. placeholder="代理人邮政编码"
  428. input-align="right"
  429. />
  430. </div>
  431. <div style="border-radius: 16px;
  432. box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:calc( 100% - 40px);margin:20px;padding:5px;background:#fff;">
  433. <van-field
  434. autocomplete="off"
  435. v-model="qlrform.ncjtjjzzdm"
  436. name="农村集体经济组织代码"
  437. label="农村集体经济组织代码"
  438. placeholder="农村集体经济组织代码"
  439. input-align="right"
  440. />
  441. <van-field
  442. autocomplete="off"
  443. v-model="qlrform.ncjtjjzzmc"
  444. name="农村集体经济组织名称"
  445. label="农村集体经济组织名称"
  446. placeholder="农村集体经济组织名称"
  447. input-align="right"
  448. />
  449. <van-field
  450. autocomplete="off"
  451. v-model="qlrform.fbfdm"
  452. name="发包方代码"
  453. label="发包方代码"
  454. placeholder="发包方代码"
  455. input-align="right"
  456. />
  457. <van-field
  458. autocomplete="off"
  459. v-model="qlrform.fbfmc"
  460. name="发包方名称"
  461. label="发包方名称"
  462. placeholder="发包方名称"
  463. input-align="right"
  464. />
  465. <van-field
  466. autocomplete="off"
  467. v-model="qlrform.sjlyName"
  468. name="数据来源"
  469. label="数据来源"
  470. placeholder="数据来源"
  471. input-align="right"
  472. @click="showsjly = true"
  473. required
  474. :rules="[{ required: true, message: '数据来源不能为空' }]"
  475. />
  476. <van-field
  477. autocomplete="off"
  478. v-model="qlrform.sjly"
  479. style="display:none"
  480. />
  481. <van-popup v-model="showsjly" position="bottom" input-align="right">
  482. <van-picker
  483. show-toolbar
  484. :columns="sjlyOptions"
  485. value-key="dictLabel"
  486. @confirm="onConfirmsjly"
  487. @cancel="showsjly = false"
  488. />
  489. </van-popup>
  490. <van-field
  491. autocomplete="off"
  492. v-model="qlrform.bz"
  493. name="备注"
  494. label="备注"
  495. placeholder="备注"
  496. input-align="right"
  497. />
  498. </div>
  499. <div style="margin: 16px;" v-if="!isFinished">
  500. <van-button round block color="#7AC943" native-type="submit">保存</van-button>
  501. </div>
  502. </van-form>
  503. </div>
  504. <div v-if="activeBtn==4" style="overflow:hidden">
  505. <!-- <van-search placeholder="请输入宅基地号查询" v-if="false">
  506. <template #action>
  507. </template>
  508. </van-search>-->
  509. <div id="mapWrapAll" style="width: 100%;height: calc(100vh - 247px);"></div>
  510. <div id="info" style="display: none"></div>
  511. <div id="deleteHistory" style="display: none"></div>
  512. <div id="deleteHistoryMap" style="display: none"></div>
  513. <van-overlay :show="showSearch" @click="closeSearchBox" />
  514. <!--搜索栏目-->
  515. <div class="searchBar_wrap" :style="{bottom : bottomHeight}">
  516. <van-search
  517. v-model="seachText"
  518. show-action
  519. placeholder="请输入宗地或权利人信息"
  520. >
  521. <template #action>
  522. <div id="query">搜索</div>
  523. </template>
  524. </van-search>
  525. <div class="searchBox" style="display: none;">
  526. <van-cell center v-for="(item,index) in mapDataAll" :key="index">
  527. <template #title>
  528. <p><van-icon name="manager" /><span>{{item.syqr}}</span><span style="background: rgba(122, 201, 67, 0.4);color:#7ac943">{{item.paceType}}</span>
  529. <!--<span style="background: rgba(122, 201, 67, 0.4);color:#7ac943">{{item.typeTc}}</span>--></p>
  530. </template>
  531. <template #default>
  532. <p style="border: 1px solid #7ac943;color:#7ac943;" @click="zjdSs(item)">查看详情</p>
  533. </template>
  534. <template #label>
  535. <p style="font-size: 0.25rem;color: #666666;">宅基地代码 {{item.zjddm}}</p>
  536. <p style="font-size: 0.25rem;color: #666666;">宗地面积 {{item.zdmj}}㎡</p>
  537. </template>
  538. </van-cell>
  539. </div>
  540. </div>
  541. <!--图层-->
  542. <div class="rightZoom_wrap">
  543. <img src="../../assets/images/housesteadSurvey/tool1.png">
  544. <div class="amplification" @click="selectionPushMap">图层</div>
  545. </div>
  546. <!--放大缩小-->
  547. <div class="mapZoom_wrap">
  548. <div class="qtMap" id="mapAllQt">
  549. <img src="../../assets/images/housesteadSurvey/tool2.png">
  550. <p>全图</p>
  551. </div>
  552. <div class="clMap" @click="" id="area">
  553. <img src="../../assets/images/housesteadSurvey/tool3.png">
  554. <p>测量</p>
  555. </div>
  556. <div class="hcMap" @click="zjdHc">
  557. <img src="../../assets/images/housesteadSurvey/tool4.png">
  558. <p>核查</p>
  559. </div>
  560. <div class="htMap" @click="" id="htMapAll">
  561. <img src="../../assets/images/housesteadSurvey/tool5.png">
  562. <p>绘图</p>
  563. </div>
  564. <div class="dwMap" @click="" id="dwMapAll">
  565. <img src="../../assets/images/housesteadSurvey/tool6.png">
  566. <p>定位</p>
  567. </div>
  568. </div>
  569. <!--列表拉取详情-->
  570. <div class="homesteadList_wrap" v-show="homesteadListStatus">
  571. <div class="main_m">
  572. <div class="title_m">
  573. <div class="more_icon" @click="homesteadListShrink"></div>
  574. <div class="name">筛选列表</div>
  575. </div>
  576. <div style="padding: 10px 15px;">
  577. <van-checkbox name="all" shape="square" id="checkAll" v-model="checkAllFlag" @click="checkAllArray">全选</van-checkbox>
  578. <div style="height: 15px;"></div>
  579. <van-checkbox-group v-model="checked" @change="handleChecked" ref="checkboxGroup">
  580. <van-checkbox name="fsssSx" shape="square" style="margin-bottom: 5px;" id="fsssSx">
  581. <template #default>
  582. 附属设施<span style="display: inline-block;background: #00FFFF;height: 5px;width: 20px;vertical-align: middle;margin-left: 10px;"></span>
  583. </template>
  584. </van-checkbox>
  585. <van-checkbox name="zrzSx" shape="square" style="margin-bottom: 5px;" id="zrzSx">
  586. <template #default>
  587. 自<i style="margin-right: 0.5em;"></i>然<i style="margin-right: 0.5em;"></i>幢<span style="display: inline-block;background: #FFD306;height: 5px;width: 20px;vertical-align: middle;margin-left: 10px;"></span>
  588. </template>
  589. </van-checkbox>
  590. <van-checkbox name="zjdSx" shape="square" style="margin-bottom: 5px;" id="zjdSx">
  591. <template #default>
  592. 宅<i style="margin-right: 0.5em;"></i>基<i style="margin-right: 0.5em;"></i>地<span style="display: inline-block;background: #AE57A4;height: 5px;width: 20px;vertical-align: middle;margin-left: 10px;"></span>
  593. </template>
  594. </van-checkbox>
  595. </van-checkbox-group>
  596. </div>
  597. </div>
  598. </div>
  599. <van-overlay :show="selectionIconShow" @click="homesteadListShrink" />
  600. </div>
  601. <van-popup v-model="shownh" style="height:100%;width:100%;">
  602. <div class="bannerBg">
  603. <van-nav-bar
  604. style="background:transparent;border-bottom-width:0;"
  605. @click-left="shownh=false"
  606. >
  607. <template #left>
  608. <van-icon name="arrow-left" size="18" color="#fff" />
  609. </template>
  610. <template #title>
  611. <p style="color:#fff">{{nhform.id?"":"新增"}}户主信息</p>
  612. </template>
  613. </van-nav-bar>
  614. </div>
  615. <div style="margin:20px;">
  616. <van-form @submit="onSubmitnh">
  617. <van-field
  618. autocomplete="off"
  619. input-align="right"
  620. v-model="nhform.suyqrdm"
  621. name="所有权人代码"
  622. label="所有权人代码"
  623. placeholder="所有权人代码"
  624. required
  625. disabled
  626. :rules="[{ required: true, message: '所有权人代码不能为空' }]"
  627. />
  628. <van-field
  629. autocomplete="off"
  630. input-align="right"
  631. v-model="nhform.nhdm"
  632. name="农户代码"
  633. label="农户代码"
  634. placeholder="自动生成"
  635. disabled
  636. />
  637. <van-field
  638. autocomplete="off"
  639. input-align="right"
  640. v-model="nhform.hzxm"
  641. name="户主姓名"
  642. label="户主姓名"
  643. placeholder="户主姓名"
  644. required
  645. :rules="[{ required: true, message: '户主姓名不能为空' }]"
  646. />
  647. <van-field
  648. autocomplete="off"
  649. input-align="right"
  650. v-model="nhform.hzzjlxName"
  651. name="户主证件类型"
  652. label="户主证件类型"
  653. placeholder="户主证件类型"
  654. required
  655. readonly
  656. :rules="[{ required: true, message: '户主证件类型不能为空' }]"
  657. @click="showhzzjlx = true"
  658. />
  659. <van-field
  660. autocomplete="off"
  661. v-model="nhform.hzzjlx"
  662. style="display:none"
  663. />
  664. <van-field
  665. autocomplete="off"
  666. v-model="nhform.hzzjhm"
  667. input-align="right"
  668. name="户主证件号码"
  669. label="户主证件号码"
  670. placeholder="户主证件号码"
  671. required
  672. :rules="[{ required: true, message: '户主证件号码不能为空' },{validator:validatorIdcardnh,message:'身份证号格式错误!'}]"
  673. />
  674. <van-field
  675. autocomplete="off"
  676. input-align="right"
  677. v-model="nhform.txdz"
  678. name="通讯地址"
  679. label="通讯地址"
  680. placeholder="通讯地址"
  681. required
  682. :rules="[{ required: true, message: '通讯地址不能为空' }]"
  683. />
  684. <van-field
  685. autocomplete="off"
  686. input-align="right"
  687. v-model="nhform.hncysl"
  688. name="户内成员数量"
  689. label="户内成员数量"
  690. placeholder="户内成员数量"
  691. required
  692. :rules="[{ required: true, message: '户内成员数量不能为空' }]"
  693. />
  694. <van-field name="radio" label="婚姻状况" input-align="right" autocomplete="off">
  695. <template #input>
  696. <van-radio-group v-model="nhform.hyzk" direction="horizontal">
  697. <van-radio v-for="dict in hyzkOptions" :key="dict.dictValue" :name="dict.dictValue">{{dict.dictLabel}}</van-radio>
  698. </van-radio-group>
  699. </template>
  700. </van-field>
  701. <van-field
  702. autocomplete="off"
  703. input-align="right"
  704. v-model="nhform.phone"
  705. name="电话号码"
  706. label="电话号码"
  707. placeholder="电话号码"
  708. />
  709. <van-field
  710. autocomplete="off"
  711. input-align="right"
  712. v-model="nhform.occupationName"
  713. name="职业"
  714. label="职业"
  715. placeholder="职业"
  716. required
  717. readonly
  718. :rules="[{ required: true, message: '职业不能为空' }]"
  719. @click="showhzoccupation = true"
  720. />
  721. <van-field
  722. autocomplete="off"
  723. v-model="nhform.occupation"
  724. style="display:none"
  725. />
  726. <van-field
  727. autocomplete="off"
  728. input-align="right"
  729. v-model="nhform.jzqkName"
  730. name="居住情况"
  731. label="居住情况"
  732. placeholder="居住情况"
  733. required
  734. readonly
  735. :rules="[{ required: true, message: '居住情况不能为空' }]"
  736. @click="showhzjzqk = true"
  737. />
  738. <van-field
  739. autocomplete="off"
  740. v-model="nhform.jzqk"
  741. style="display:none"
  742. />
  743. <van-field
  744. autocomplete="off"
  745. input-align="right"
  746. v-model="nhform.jzhcssfyzfName"
  747. name="在集镇或城市是否有住房"
  748. label="在集镇或城市是否有住房"
  749. placeholder="在集镇或城市是否有住房"
  750. required
  751. readonly
  752. :rules="[{ required: true, message: '在集镇或城市是否有住房不能为空' }]"
  753. @click="showhzjzhcssfyzf = true"
  754. />
  755. <van-field
  756. autocomplete="off"
  757. v-model="nhform.jzhcssfyzf"
  758. style="display:none"
  759. />
  760. <van-field name="radio" label="在其他村庄是否有住房" input-align="right" autocomplete="off">
  761. <template #input>
  762. <van-radio-group v-model="nhform.zqtczsfyzf" direction="horizontal">
  763. <van-radio name="Y">是</van-radio>
  764. <van-radio name="N">否</van-radio>
  765. </van-radio-group>
  766. </template>
  767. </van-field>
  768. <van-field name="radio" label="是否本村村民" input-align="right" autocomplete="off">
  769. <template #input>
  770. <van-radio-group v-model="nhform.sfbccm" direction="horizontal">
  771. <van-radio name="Y">是</van-radio>
  772. <van-radio name="N">否</van-radio>
  773. </van-radio-group>
  774. </template>
  775. </van-field>
  776. <van-field name="radio" label="是否贫困户" input-align="right" autocomplete="off">
  777. <template #input>
  778. <van-radio-group v-model="nhform.sfpkh" direction="horizontal">
  779. <van-radio name="Y">是</van-radio>
  780. <van-radio name="N">否</van-radio>
  781. </van-radio-group>
  782. </template>
  783. </van-field>
  784. <van-field name="radio" label="是否五保户" input-align="right" autocomplete="off">
  785. <template #input>
  786. <van-radio-group v-model="nhform.sfwbh" direction="horizontal">
  787. <van-radio name="Y">是</van-radio>
  788. <van-radio name="N">否</van-radio>
  789. </van-radio-group>
  790. </template>
  791. </van-field>
  792. <van-field
  793. autocomplete="off"
  794. input-align="right"
  795. v-model="nhform.sjlyName"
  796. name="数据来源"
  797. label="数据来源"
  798. placeholder="数据来源"
  799. required
  800. readonly
  801. :rules="[{ required: true, message: '能为空' }]"
  802. @click="showhzsjly = true"
  803. />
  804. <van-field
  805. autocomplete="off"
  806. v-model="nhform.sjly"
  807. style="display:none"
  808. />
  809. <van-field
  810. autocomplete="off"
  811. input-align="right"
  812. v-model="nhform.bz"
  813. name="备注"
  814. label="备注"
  815. placeholder="备注"
  816. />
  817. <div style="text-align:center;overflow:auto;">
  818. <van-button plain round color="#7AC943" size="mini" style="margin:0 auto;" native-type="button" @click="showPopuphncylist(nhform)">查看户内成员列表</van-button>
  819. </div>
  820. <div style="margin: 16px;" v-if="!isFinished">
  821. <van-button round block color="#7AC943" native-type="submit">保存</van-button>
  822. </div>
  823. </van-form>
  824. </div>
  825. </van-popup>
  826. <!--户主数据来源-->
  827. <van-popup v-model="showhzsjly" position="bottom">
  828. <van-picker
  829. show-toolbar
  830. :columns="sjlyOptions"
  831. value-key="dictLabel"
  832. @confirm="onConfirmhzsjly"
  833. @cancel="showhzsjly = false"
  834. />
  835. </van-popup>
  836. <!--户内成员数据来源-->
  837. <van-popup v-model="showhncysjly" position="bottom">
  838. <van-picker
  839. show-toolbar
  840. :columns="sjlyOptions"
  841. value-key="dictLabel"
  842. @confirm="onConfirmhncysjly"
  843. @cancel="showhncysjly = false"
  844. />
  845. </van-popup>
  846. <!--集市或城市是否有住房-->
  847. <van-popup v-model="showhzjzhcssfyzf" position="bottom">
  848. <van-picker
  849. show-toolbar
  850. :columns="jzhcssfyzfOptions"
  851. value-key="dictLabel"
  852. @confirm="onConfirmhzjzhcssfyzf"
  853. @cancel="showhzjzhcssfyzf = false"
  854. />
  855. </van-popup>
  856. <!--户主证件类型-->
  857. <van-popup v-model="showhzzjlx" position="bottom">
  858. <van-picker
  859. show-toolbar
  860. :columns="zjlxOptions"
  861. value-key="dictLabel"
  862. @confirm="onConfirmhzzjlx"
  863. @cancel="showhzzjlx = false"
  864. />
  865. </van-popup>
  866. <!--户内成员证件类型-->
  867. <van-popup v-model="showhncyzjlx" position="bottom">
  868. <van-picker
  869. show-toolbar
  870. :columns="zjlxOptions"
  871. value-key="dictLabel"
  872. @confirm="onConfirmhncyzjlx"
  873. @cancel="showhncyzjlx = false"
  874. />
  875. </van-popup>
  876. <!--户内成员与户主关系-->
  877. <van-popup v-model="showhncyyhzgx" position="bottom">
  878. <van-picker
  879. show-toolbar
  880. :columns="yhzgxOptions"
  881. value-key="dictLabel"
  882. @confirm="onConfirmhncyyhzgx"
  883. @cancel="showhncyyhzgx = false"
  884. />
  885. </van-popup>
  886. <!--户内成员职业-->
  887. <van-popup v-model="showhncyoccupation" position="bottom">
  888. <van-picker
  889. show-toolbar
  890. :columns="occupationOptions"
  891. value-key="dictLabel"
  892. @confirm="onConfirmhncyoccupation"
  893. @cancel="showhncyoccupation = false"
  894. />
  895. </van-popup>
  896. <!--户内成员成员备注-->
  897. <van-popup v-model="showhncycybz" position="bottom">
  898. <van-picker
  899. show-toolbar
  900. :columns="cybzOptions"
  901. value-key="dictLabel"
  902. @confirm="onConfirmhncycybz"
  903. @cancel="showhncycybz = false"
  904. />
  905. </van-popup>
  906. <!--户内成员居住情况-->
  907. <van-popup v-model="showhncyjzqk" position="bottom">
  908. <van-picker
  909. show-toolbar
  910. :columns="jzqkOptions"
  911. value-key="dictLabel"
  912. @confirm="onConfirmhncyjzqk"
  913. @cancel="showhncyjzqk = false"
  914. />
  915. </van-popup>
  916. <!--户主职业-->
  917. <van-popup v-model="showhzoccupation" position="bottom">
  918. <van-picker
  919. show-toolbar
  920. :columns="occupationOptions"
  921. value-key="dictLabel"
  922. @confirm="onConfirmhzoccupation"
  923. @cancel="showhzoccupation = false"
  924. />
  925. </van-popup>
  926. <!--户主居住情况-->
  927. <van-popup v-model="showhzjzqk" position="bottom">
  928. <van-picker
  929. show-toolbar
  930. :columns="jzqkOptions"
  931. value-key="dictLabel"
  932. @confirm="onConfirmhzjzqk"
  933. @cancel="showhzjzqk = false"
  934. />
  935. </van-popup>
  936. <van-popup v-model="showhncylist" style="height:100%;width:100%;">
  937. <div class="bannerBg">
  938. <van-nav-bar
  939. style="background:transparent;border-bottom-width:0;"
  940. @click-left="showhncylist=false"
  941. >
  942. <template #left>
  943. <van-icon name="arrow-left" size="18" color="#fff" />
  944. </template>
  945. <template #title>
  946. <p style="color:#fff">户内成员列表</p>
  947. </template>
  948. </van-nav-bar>
  949. </div>
  950. <van-swipe-cell v-for="(item,index) in hncylist" :key="index" @click.native="showPopuphncy(item)" 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;">
  951. <div style="padding:20px;">
  952. <p style="color:#22B7F2;font-size:20px;line-height:30px;"><van-icon name="wap-home" color="#22b7f2" size="20" style="margin-right:10px;"/>
  953. {{item.xm}}</p>
  954. <div style="display:flex;line-height:20px">
  955. <p style="flex:1;text-align:left;">证件号码</p>
  956. <p style="flex:1;text-align:right;">{{item.zjhm}}</p>
  957. </div>
  958. <div style="display:flex;line-height:20px">
  959. <p style="flex:1;text-align:left;">与户主关系</p>
  960. <p style="flex:1;text-align:right;">{{yhzgxfy(item.yhzgx)}}</p>
  961. </div>
  962. </div>
  963. <template #right v-if="!isFinished">
  964. <van-button square text="设为户主" type="primary" style="height:100%" @click="setNh(item,index)"/>
  965. <van-button square text="删除" type="danger" style="height:100%" @click="deletehncy(item.id,index)" />
  966. </template>
  967. </van-swipe-cell>
  968. <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;" v-if="!isFinished">
  969. <div style="text-align:center;" >
  970. <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>
  971. </div>
  972. </div>
  973. </van-popup>
  974. <van-popup v-model="showhncy" style="height:100%;width:100%;">
  975. <div class="bannerBg">
  976. <van-nav-bar
  977. style="background:transparent;border-bottom-width:0;"
  978. @click-left="showhncy=!showhncy"
  979. >
  980. <template #left>
  981. <van-icon name="arrow-left" size="18" color="#fff" />
  982. </template>
  983. <template #title>
  984. <p style="color:#fff">户内成员</p>
  985. </template>
  986. </van-nav-bar>
  987. </div>
  988. <div style="margin:20px;">
  989. <van-form @submit="onSubmithncy">
  990. <van-field
  991. autocomplete="off"
  992. input-align="right"
  993. v-model="form5.nhdm"
  994. name="农户代码"
  995. label="农户代码"
  996. placeholder="农户代码"
  997. disabled
  998. required
  999. :rules="[{ required: true, message: '农户代码不能为空' }]"
  1000. />
  1001. <van-field
  1002. autocomplete="off"
  1003. input-align="right"
  1004. v-model="form5.xm"
  1005. name="姓名"
  1006. label="姓名"
  1007. placeholder="姓名"
  1008. required
  1009. :rules="[{ required: true, message: '姓名不能为空' }]"
  1010. />
  1011. <van-field
  1012. autocomplete="off"
  1013. input-align="right"
  1014. v-model="form5.zjlxName"
  1015. name="证件类型"
  1016. label="证件类型"
  1017. placeholder="证件类型"
  1018. required
  1019. :rules="[{ required: true, message: '证件类型不能为空' }]"
  1020. readonly
  1021. @click="showhncyzjlx = true"
  1022. />
  1023. <van-field
  1024. autocomplete="off"
  1025. v-model="form5.zjlx"
  1026. style="display:none"
  1027. />
  1028. <van-field
  1029. autocomplete="off"
  1030. input-align="right"
  1031. v-model="form5.yhzgxName"
  1032. name="与户主关系"
  1033. label="与户主关系"
  1034. placeholder="与户主关系"
  1035. required
  1036. :rules="[{ required: true, message: '与户主关系不能为空' }]"
  1037. @click="showhncyyhzgx = true"
  1038. />
  1039. <van-field
  1040. autocomplete="off"
  1041. v-model="form5.yhzgx"
  1042. style="display:none"
  1043. />
  1044. <van-field
  1045. autocomplete="off"
  1046. input-align="right"
  1047. v-model="form5.zjhm"
  1048. name="证件号码"
  1049. label="证件号码"
  1050. placeholder="证件号码"
  1051. required
  1052. :rules="[{ required: true, message: '证件号码不能为空' },{validator:validatorIdcardhncy,message:'身份证号格式错误!'}]"
  1053. />
  1054. <van-field autocomplete="off" name="radio" label="性别" input-align="right" required
  1055. :rules="[{ required: true, message: '性别不能为空' }]">
  1056. <template #input>
  1057. <van-radio-group v-model="form5.xb" direction="horizontal">
  1058. <van-radio name="1">男</van-radio>
  1059. <van-radio name="0">女</van-radio>
  1060. <van-radio name="2">未知</van-radio>
  1061. </van-radio-group>
  1062. </template>
  1063. </van-field>
  1064. <van-field
  1065. autocomplete="off"
  1066. input-align="right"
  1067. v-model="form5.lxdh"
  1068. name="联系电话"
  1069. label="联系电话"
  1070. placeholder="联系电话"
  1071. />
  1072. <van-field name="radio" label="户口类型" input-align="right" autocomplete="off">
  1073. <template #input>
  1074. <van-radio-group v-model="form5.hklx" direction="horizontal">
  1075. <van-radio name="1">农业</van-radio>
  1076. <van-radio name="0">非农业</van-radio>
  1077. </van-radio-group>
  1078. </template>
  1079. </van-field>
  1080. <van-field name="radio" label="婚姻状况" input-align="right" autocomplete="off">
  1081. <template #input>
  1082. <van-radio-group v-model="form5.hyzk" direction="horizontal">
  1083. <van-radio v-for="dict in hyzkOptions" :key="dict.dictValue" :name="dict.dictValue">{{dict.dictLabel}}</van-radio>
  1084. </van-radio-group>
  1085. </template>
  1086. </van-field>
  1087. <van-field name="radio" label="是否本集体经济组织成员" input-align="right" autocomplete="off">
  1088. <template #input>
  1089. <van-radio-group v-model="form5.sfbjtjjzzcy" direction="horizontal">
  1090. <van-radio name="Y">是</van-radio>
  1091. <van-radio name="N">否</van-radio>
  1092. </van-radio-group>
  1093. </template>
  1094. </van-field>
  1095. <van-field
  1096. autocomplete="off"
  1097. input-align="right"
  1098. v-model="form5.cybzName"
  1099. name="成员备注"
  1100. label="成员备注"
  1101. placeholder="成员备注"
  1102. @click="showhncycybz = true"
  1103. />
  1104. <van-field
  1105. autocomplete="off"
  1106. v-model="form5.cybz"
  1107. style="display:none"
  1108. />
  1109. <van-field
  1110. autocomplete="off"
  1111. input-align="right"
  1112. v-model="form5.cybzsm"
  1113. name="成员备注说明"
  1114. label="成员备注说明"
  1115. placeholder="成员备注说明"
  1116. />
  1117. <van-field
  1118. autocomplete="off"
  1119. input-align="right"
  1120. v-model="form5.occupationName"
  1121. name="职业"
  1122. label="职业"
  1123. placeholder="职业"
  1124. required
  1125. :rules="[{ required: true, message: '' }]"
  1126. @click="showhncyoccupation = true"
  1127. />
  1128. <van-field
  1129. autocomplete="off"
  1130. v-model="form5.occupation"
  1131. style="display:none"
  1132. />
  1133. <van-field
  1134. autocomplete="off"
  1135. input-align="right"
  1136. v-model="form5.jzqkName"
  1137. name="居住情况"
  1138. label="居住情况"
  1139. placeholder="居住情况"
  1140. required
  1141. :rules="[{ required: true, message: '' }]"
  1142. @click="showhncyjzqk = true"
  1143. />
  1144. <van-field
  1145. autocomplete="off"
  1146. v-model="form5.jzqk"
  1147. style="display:none"
  1148. />
  1149. <van-field name="radio" label="是否贫困户" input-align="right" autocomplete="off">
  1150. <template #input>
  1151. <van-radio-group v-model="form5.sfpkh" direction="horizontal">
  1152. <van-radio name="Y">是</van-radio>
  1153. <van-radio name="N">否</van-radio>
  1154. </van-radio-group>
  1155. </template>
  1156. </van-field>
  1157. <van-field name="radio" label="是否五保户" input-align="right" autocomplete="off">
  1158. <template #input>
  1159. <van-radio-group v-model="form5.sfwbh" direction="horizontal">
  1160. <van-radio name="Y">是</van-radio>
  1161. <van-radio name="N">否</van-radio>
  1162. </van-radio-group>
  1163. </template>
  1164. </van-field>
  1165. <van-field
  1166. autocomplete="off"
  1167. input-align="right"
  1168. v-model="form5.sjlyName"
  1169. name="数据来源"
  1170. label="数据来源"
  1171. placeholder="数据来源"
  1172. required
  1173. :rules="[{ required: true, message: '' }]"
  1174. @click="showhncysjly = true"
  1175. />
  1176. <van-field
  1177. autocomplete="off"
  1178. v-model="form5.sjly"
  1179. style="display:none"
  1180. />
  1181. <div style="margin: 16px;" v-if="!isFinished">
  1182. <van-button round block color="#7AC943" native-type="submit">保存</van-button>
  1183. </div>
  1184. </van-form>
  1185. </div>
  1186. </van-popup>
  1187. <!--绘制结束弹窗开始-->
  1188. <van-popup v-model:show="showhzht" style="width: 94%;border-radius: 15PX" :close-on-click-overlay="false">
  1189. <div style="padding: 5px 3% 3%;">
  1190. <h1 style="font-size: 0.35rem;font-weight: 400;border-bottom: 1px solid #ccc; line-height: 0.8rem;"><i style="display: inline-block;width: 1%;height: 0.4rem;background: #7ac943;vertical-align: middle;margin-right: 1%;"></i>是否完成绘制</h1>
  1191. <div style="text-align: center;margin-top: 3%;">
  1192. <p style="font-size: 0.3rem;display: inline-block;background: #ccc;padding: 2% 0;border-radius: 30PX;color: #FFF;margin-right: 10%;width: 40%" @click="deleteHistory">否</p>
  1193. <p style="font-size: 0.3rem;display: inline-block;background: #7ac943;padding: 2% 0;border-radius: 30PX;color: #FFF;width: 40%" @click="showhzlx = true,showhzht = false">是</p>
  1194. </div>
  1195. </div>
  1196. </van-popup>
  1197. <!-- background: #ccc -->
  1198. <van-popup v-model:show="showhzlx" style="width: 94%;border-radius: 15PX">
  1199. <div style="padding: 5px 3% 3%;">
  1200. <h1 style="font-size: 0.35rem;font-weight: 400;border-bottom: 1px solid #ccc; line-height: 0.8rem;"><i style="display: inline-block;width: 1%;height: 0.4rem;background: #7ac943;vertical-align: middle;margin-right: 1%;"></i>请选择绘制类型<van-icon name="cross" color="#666666" style="position: absolute;right: 2%;top: 0.1rem" @click="showhzlx = false,showhzht = true" /></h1>
  1201. <div style="text-align: center;margin-top: 3%;">
  1202. <p class="hzlxBtn" :style="{background: mapZjdData ? '#CCC':'#7ac943'}" @click="zjdTz">宅基地</p>
  1203. <p class="hzlxBtn" :style="{background: mapZjdData ? '#b026ff':'#CCC'}" @click="zrzTz">自然幢</p>
  1204. <p class="hzlxBtn" :style="{background: mapZjdData ? '#3ac2db':'#CCC'}" @click="fsssTz">附属设施</p>
  1205. </div>
  1206. </div>
  1207. </van-popup>
  1208. <!--绘制结束弹窗结束-->
  1209. </div>
  1210. </template>
  1211. <script>
  1212. import {listZjdzd,getQueryLand,getZjdzd,delZjdzdInfo,uploadFile,submitUploadImageList} from "@/api/homesteadSurvey/zjdzd";
  1213. import {addNh, delNh, exportNh, getNh, listNh, updateNh,setNhInfo} from "@/api/homesteadSurvey/nh";
  1214. import {addNhhncy, delNhhncy, exportNhhncy, getNhhncy, listNhhncy, updateNhhncy} from "@/api/homesteadSurvey/nhhncy";
  1215. import {listShyqr,setSyqrInfo} from "@/api/homesteadSurvey/shyqr";
  1216. import {listSuyqr,updateSuyqr,addSuyqr} from "@/api/homesteadSurvey/suyqr";
  1217. import {listZrz,getZrzZjdDmList,getZrz} from "@/api/homesteadSurvey/zrz";
  1218. import {listFsss,getFsssZjdDmList,getFsss} from "@/api/homesteadSurvey/fsss";
  1219. import {getGeoServerConfigKey} from "@/api/system/config";
  1220. import { listTown, getTown } from "@/api/homesteadSurvey/town";
  1221. import { listVillage} from "@/api/homesteadSurvey/village";
  1222. import $ from "jquery";
  1223. import {Dialog} from "vant";
  1224. import {ref} from "vue";
  1225. import axios from "axios";
  1226. export default {
  1227. name: "homesteadList",
  1228. data() {
  1229. return {
  1230. loading1:false,
  1231. finished1:false,
  1232. loading2:false,
  1233. finished2:false,
  1234. loading3:false,
  1235. finished3:false,
  1236. //全部
  1237. qbNums:0,
  1238. //已调查数量
  1239. yhcNums:0,
  1240. //未核查数量
  1241. whcNums:0,
  1242. // 总户数
  1243. totalH:0,
  1244. // 总人数
  1245. totalR:0,
  1246. zjdSx:true,
  1247. zrzSx :true,
  1248. fsssSx:true,
  1249. showhncysjly:false,
  1250. showhzsjly:false,
  1251. showhncycybz:false,
  1252. showhncyzjlx:false,
  1253. showhncyyhzgx:false,
  1254. showhzjzhcssfyzf:false,
  1255. showhncyoccupation:false,
  1256. showhncyjzqk:false,
  1257. showhzoccupation:false,
  1258. showhzjzqk:false,
  1259. // 下拉刷新
  1260. isLoadingnh:false,
  1261. countnh:0,
  1262. isLoadingzjd:false,
  1263. countqb:1,
  1264. countyhc:1,
  1265. countwhc:1,
  1266. // 使用权人表单弹出
  1267. shownh:false,
  1268. showhzht:false,
  1269. showhzlx:false,
  1270. showhncylist:false,
  1271. showhncy:false,
  1272. activeBtn:1,
  1273. value:'',
  1274. // 宅基地搜索框
  1275. zjdvalue:"",
  1276. // 使用权人搜索框
  1277. nhvalue:"",
  1278. active:2,
  1279. // 全部列表
  1280. list:[],
  1281. // 已核查列表
  1282. list1:[],
  1283. // 未核查列表
  1284. list2:[],
  1285. // 户主列表
  1286. nhlist:[],
  1287. // 户内成员表单
  1288. form5: {},
  1289. // 户内成员列表
  1290. hncylist:[],
  1291. currentRate:20,
  1292. // 使用权人
  1293. nhform:[],
  1294. // 户主列表
  1295. hzform:{},
  1296. // 权利人列表
  1297. qlrform:[],
  1298. // 权利人性质弹出框
  1299. showsuyqxz:false,
  1300. // 代理人证件类型弹出框
  1301. showdlrzjlx:false,
  1302. // 代表人证件类型弹出框
  1303. showdbrzjlx:false,
  1304. // 数据来源弹出框
  1305. showsjly:false,
  1306. // 证件类型字典
  1307. zjlxOptions: [],
  1308. // 所有权性质字典
  1309. suyqxzOption: [],
  1310. // 婚姻状况字典
  1311. hyzkOptions:[],
  1312. // 数据来源字典
  1313. sjlyOptions:[],
  1314. // 居住情况字典
  1315. jzqkOptions:[],
  1316. // 与户主关系字典
  1317. yhzgxOptions:[],
  1318. // 职业字典
  1319. occupationOptions:[],
  1320. // 集镇或城市是否有住房字典
  1321. jzhcssfyzfOptions:[],
  1322. // 成员备注字典
  1323. cybzOptions:[],
  1324. columns:[],
  1325. show1:false,
  1326. showhzzjlx: false,
  1327. // 路由传过来的任务基本信息。
  1328. item: {},
  1329. //地图使用 --start
  1330. openMap: false,
  1331. mapTheGeomZrzId: null,
  1332. mapTheGeomZjdId: null,
  1333. mapTheGeomFsssId: null,
  1334. drawInsert:null,
  1335. mapZjdData:"",
  1336. mapZrzData:"",
  1337. mapFsssData:"",
  1338. mapZjdDataTure:"",
  1339. mapZjdTeAll:{
  1340. active:"",
  1341. mapZjdAData:{},
  1342. mapZrzAData:{},
  1343. mapFsssAData:{},
  1344. },
  1345. mapHaDataValue:false,
  1346. mapHasDateStatus: 0, //0附属设施 1自然幢 2宅基地
  1347. selectionIconShow:false,
  1348. homesteadListStatus:false,
  1349. //地图绘制状态
  1350. draw: {
  1351. drawMapPolygon: false, //绘制地图
  1352. },
  1353. mapTownList: null,
  1354. mapVillageList: null,
  1355. coordinate:"",
  1356. checked:['zjdSx', 'zrzSx', 'fsssSx'],
  1357. checkAllMap: false,
  1358. sx:"",
  1359. drawingClick:true,
  1360. //搜索---start
  1361. seachText: "",
  1362. //搜索栏目-操作栏显隐
  1363. searchBarOperVisbile: false,
  1364. mapDataAll: [],
  1365. showSearch:false,
  1366. bottomHeight:'0px',
  1367. //搜索---end
  1368. //测面
  1369. textMjAll:"",
  1370. clickBbox:"",
  1371. textMjAllNum:"",
  1372. //核查
  1373. zjdHcDy:"",
  1374. //绘图
  1375. htZjdZrzFsss:"",
  1376. //筛选
  1377. checkAllFlag: true,
  1378. CheckedAllArr: [],//全选数组
  1379. dataForm: {
  1380. imageUrl: []
  1381. },
  1382. dataList: [["fsssSx"],["zjdSx"],["zrzSx"]], //地图使用 --end
  1383. checkBoxAll:[],
  1384. //地图跳转存之
  1385. mapAddJump:"",
  1386. mapAddJumpNum:"",
  1387. nhdm:"",
  1388. backTheGeom:"",
  1389. //地图服务地址
  1390. mapGeoServerUrl:"",
  1391. backMap:"",
  1392. // 任务完成标记
  1393. isFinished:false,
  1394. //
  1395. showImageList:false,
  1396. uploadImgList:[],
  1397. uploadImgList1:[],
  1398. // 字典列表json
  1399. dictTypeList:null,
  1400. };
  1401. },
  1402. mounted(){
  1403. },
  1404. created(){
  1405. axios.get('../static/dictyType.json').then(res => {
  1406. this.dictTypeList = res.data
  1407. this.zjlxOptions = this.dictTypeList.zjlx;
  1408. this.suyqxzOptions = this.dictTypeList.qsxz;
  1409. this.sjlyOptions = this.dictTypeList.sjly;
  1410. this.hyzkOptions = this.dictTypeList.hyzk;
  1411. this.occupationOptions = this.dictTypeList.occupation;
  1412. this.jzqkOptions = this.dictTypeList.living_condition;
  1413. this.jzhcssfyzfOptions = this.dictTypeList.jzhcssfyzf;
  1414. this.cybzOptions = this.dictTypeList.member_remark;
  1415. })
  1416. this.getDicts("family_status").then(response => {
  1417. console.log(response)
  1418. var arr = [];
  1419. response.data.forEach(function (item) {
  1420. if (item.dictLabel !== '户主') {
  1421. arr.push(item)
  1422. }
  1423. });
  1424. this.yhzgxOptions = arr;
  1425. });
  1426. if(this.$cookies.get("search") != null && this.$cookies.get("search") !="" && this.$cookies.get("search")!=undefined){
  1427. if(this.$cookies.get("search").activeBtn !=null){
  1428. if(this.$cookies.get("search").activeBtn == 4){
  1429. // if(location.href.indexOf("#reloaded")==-1){
  1430. // location.href=location.href+"#reloaded";
  1431. // location.reload();
  1432. // }
  1433. this.activeBtn = this.$cookies.get("search").activeBtn;
  1434. this.item = this.$cookies.get("item");
  1435. this.mapAddJump = this.$cookies.get("search").backMapZjdAData.deptId;
  1436. this.backTheGeom = this.$cookies.get("search").backMapZjdAData.theGeom;
  1437. this.mapZjdData = this.$cookies.get("search").backMapZjdAData;
  1438. this.mapZjdTeAll.mapZjdAData = this.$cookies.get("search").backMapZjdAData;
  1439. this.zjdHcDy = 1;
  1440. this.mapZjdDataTure = 1;
  1441. this.mapAddJumpNum =1;
  1442. this.mapShow();
  1443. this.getZjdList();
  1444. this.getTotalHR();
  1445. if(this.item.taskStatus=="FINISHED"){
  1446. this.isFinished = true
  1447. }else{
  1448. this.isFinished = false
  1449. }
  1450. }
  1451. }else {
  1452. this.item = this.$cookies.get("item");
  1453. this.getZjdList();
  1454. this.getTotalHR();
  1455. if(this.item.taskStatus=="FINISHED"){
  1456. this.isFinished = true
  1457. }else{
  1458. this.isFinished = false
  1459. }
  1460. }
  1461. }else {
  1462. this.item = this.$cookies.get("item");
  1463. this.getZjdList();
  1464. this.getTotalHR();
  1465. if(this.item.taskStatus=="FINISHED"){
  1466. this.isFinished = true
  1467. }else{
  1468. this.isFinished = false
  1469. }
  1470. }
  1471. },
  1472. methods: {
  1473. showUploadList(){
  1474. this.showImageList = true;
  1475. },
  1476. submitUploadList(){
  1477. submitUploadImageList(this.uploadImgList1).then(res => {
  1478. let _this = this
  1479. this.$toast({
  1480. icon: 'success', // 找到自己需要的图标
  1481. message: '上传成功',
  1482. duration:"1000",
  1483. onClose:function(){
  1484. _this.showImageList = false
  1485. }
  1486. })
  1487. })
  1488. },
  1489. // 图片上传前
  1490. beforeReadImageList(file){
  1491. let _this = this
  1492. if(file.length!=undefined){
  1493. file.map(res => {
  1494. let zjddm = res.file.name
  1495. //zjddm=zjddm.substring(0,zjddm.lastIndexOf("\("));
  1496. // 创建Canvas对象(画布)
  1497. let canvas = document.createElement('canvas')
  1498. // 获取对应的CanvasRenderingContext2D对象(画笔)
  1499. let context = canvas.getContext('2d')
  1500. // 创建新的图片对象
  1501. let img = new Image()
  1502. // 指定图片的DataURL(图片的base64编码数据)
  1503. img.src = res.content
  1504. // 监听浏览器加载图片完成,然后进行进行绘制
  1505. img.onload = () => {
  1506. /*const h = img.height
  1507. const w = img.width*/
  1508. let ch = img.height/6
  1509. let cw = img.width/6
  1510. let canvas = document.createElement('canvas')
  1511. let ctx = canvas.getContext('2d')
  1512. canvas.height = ch
  1513. canvas.width = cw
  1514. ctx.clearRect(0,0,cw,ch)
  1515. ctx.drawImage(img,0,0,cw,ch)
  1516. let base_img = canvas.toDataURL('image/jpeg')
  1517. let blobBin = atob(base_img.split(',')[1])
  1518. let d = []
  1519. for (let i=0;i<blobBin.length;i++){
  1520. d.push(blobBin.charCodeAt(i))
  1521. }
  1522. let data2 = new FormData();
  1523. data2.append("file", new Blob([new Uint8Array(d)],{type:'image/jpeg'}));
  1524. uploadFile(data2).then(response => {
  1525. let p={
  1526. "zjddm":zjddm,
  1527. "url":response.fileName
  1528. }
  1529. _this.uploadImgList1.push(p)
  1530. })
  1531. }
  1532. })
  1533. }else{
  1534. let zjddm = file.file.name
  1535. //zjddm=zjddm.substring(0,zjddm.lastIndexOf("\("));
  1536. // 创建Canvas对象(画布)
  1537. let canvas = document.createElement('canvas')
  1538. // 获取对应的CanvasRenderingContext2D对象(画笔)
  1539. let context = canvas.getContext('2d')
  1540. // 创建新的图片对象
  1541. let img = new Image()
  1542. // 指定图片的DataURL(图片的base64编码数据)
  1543. img.src = file.content
  1544. // 监听浏览器加载图片完成,然后进行进行绘制
  1545. img.onload = () => {
  1546. /*const h = img.height
  1547. const w = img.width*/
  1548. let ch = img.height/6
  1549. let cw = img.width/6
  1550. let canvas = document.createElement('canvas')
  1551. let ctx = canvas.getContext('2d')
  1552. canvas.height = ch
  1553. canvas.width = cw
  1554. ctx.clearRect(0,0,cw,ch)
  1555. ctx.drawImage(img,0,0,cw,ch)
  1556. let base_img = canvas.toDataURL('image/jpeg')
  1557. let blobBin = atob(base_img.split(',')[1])
  1558. let d = []
  1559. for (let i=0;i<blobBin.length;i++){
  1560. d.push(blobBin.charCodeAt(i))
  1561. }
  1562. let data2 = new FormData();
  1563. data2.append("file", new Blob([new Uint8Array(d)],{type:'image/jpeg'}));
  1564. uploadFile(data2).then(response => {
  1565. let p={
  1566. "zjddm":zjddm,
  1567. "url":response.fileName
  1568. }
  1569. _this.uploadImgList1.push(p)
  1570. })
  1571. }
  1572. }
  1573. },
  1574. deleteFileImageList(file){
  1575. let url = file.file.name
  1576. this.uploadImgList1.map((res,index) => {
  1577. if(res.zjddm==url){
  1578. this.uploadImgList1.remove(index);
  1579. }
  1580. })
  1581. },
  1582. validatorIdcardqlr(val){
  1583. if(this.qlrform.dbrzjlx=='01'){
  1584. if(this.vcheckID(val)){
  1585. return true
  1586. }else {
  1587. return false
  1588. }
  1589. }else{
  1590. return true
  1591. }
  1592. },
  1593. validatorIdcardnh(val){
  1594. if(this.nhform.hzzjlx=='01'){
  1595. if(this.vcheckID(val)){
  1596. return true
  1597. }else {
  1598. return false
  1599. }
  1600. }else{
  1601. return true
  1602. }
  1603. },
  1604. validatorIdcardhncy(val){
  1605. if(this.form5.zjlx=='01'){
  1606. if(this.vcheckID(val)){
  1607. return true
  1608. }else {
  1609. return false
  1610. }
  1611. }else{
  1612. return true
  1613. }
  1614. },
  1615. checkCode(val) {
  1616. var p = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
  1617. var factor = [ 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2 ];
  1618. var parity = [ 1, 0, 'X', 9, 8, 7, 6, 5, 4, 3, 2 ];
  1619. var code = val.substring(17);
  1620. if(p.test(val)) {
  1621. var sum = 0;
  1622. for(var i=0;i<17;i++) {
  1623. sum += val[i]*factor[i];
  1624. }
  1625. if(parity[sum % 11] == code.toUpperCase()) {
  1626. return true;
  1627. }
  1628. }
  1629. return false;
  1630. },
  1631. checkDate (val) {
  1632. var pattern = /^(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)$/;
  1633. if(pattern.test(val)) {
  1634. var year = val.substring(0, 4);
  1635. var month = val.substring(4, 6);
  1636. var date = val.substring(6, 8);
  1637. var date2 = new Date(year+"-"+month+"-"+date);
  1638. if(date2 && date2.getMonth() == (parseInt(month) - 1)) {
  1639. return true;
  1640. }
  1641. }
  1642. return false;
  1643. },
  1644. checkProv(val) {
  1645. var pattern = /^[1-9][0-9]/;
  1646. var provs = {11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古",21:"辽宁",22:"吉林",23:"黑龙江 ",31:"上海",32:"江苏",33:"浙江",34:"安徽",35:"福建",36:"江西",37:"山东",41:"河南",42:"湖北 ",43:"湖南",44:"广东",45:"广西",46:"海南",50:"重庆",51:"四川",52:"贵州",53:"云南",54:"西藏 ",61:"陕西",62:"甘肃",63:"青海",64:"宁夏",65:"新疆",71:"台湾",81:"香港",82:"澳门"};
  1647. if(pattern.test(val)) {
  1648. if(provs[val]) {
  1649. return true;
  1650. }
  1651. }
  1652. return false;
  1653. },
  1654. vcheckID(val){
  1655. if(this.checkCode(val)) {
  1656. var date = val.substring(6,14);
  1657. if(this.checkDate(date)) {
  1658. if(this.checkProv(val.substring(0,2))) {
  1659. return true;
  1660. }
  1661. }
  1662. }
  1663. return false;
  1664. },
  1665. deleteZjd(item,index){
  1666. Dialog.confirm({
  1667. title: '警告',
  1668. message: '将删除与此宅基地关联的使用权人,自然幢,房屋,附属设施等所有信息,同时删除后无法恢复,确认删除么?',
  1669. })
  1670. .then(() => {
  1671. // on confirm
  1672. delZjdzdInfo(item).then(res => {
  1673. if(res.code=="200"){
  1674. if(this.active==1){
  1675. this.list1.splice(index,1);
  1676. }else if(this.active==2){
  1677. this.list2.splice(index,1);
  1678. }else{
  1679. this.list.splice(index,1);
  1680. }
  1681. }
  1682. })
  1683. })
  1684. .catch(() => {
  1685. // on cancel
  1686. });
  1687. },
  1688. //删除户主
  1689. deletenh(item,index){
  1690. let yes = true
  1691. let params={
  1692. nhdm : item.nhdm,
  1693. deptId: item.deptId
  1694. }
  1695. listNhhncy(params).then((res) => {
  1696. console.log(res.rows.length)
  1697. if(res.rows.length>0){
  1698. yes = false
  1699. this.$toast({
  1700. icon: 'error', // 找到自己需要的图标
  1701. message: '无法删除,此户主存在户内成员!',
  1702. duration:"1000",
  1703. onClose:function(){
  1704. }
  1705. })
  1706. }else{
  1707. listShyqr(params).then((res) => {
  1708. if(res.rows.length>0){
  1709. yes = false
  1710. this.$toast({
  1711. icon: 'error', // 找到自己需要的图标
  1712. message: '无法删除,此户主已经成为使用权人!',
  1713. duration:"1000",
  1714. onClose:function(){
  1715. }
  1716. })
  1717. }else{
  1718. if(yes){
  1719. Dialog.confirm({
  1720. title: '警告',
  1721. message: '确认删除此使用权人么?',
  1722. })
  1723. .then(() => {
  1724. // on confirm
  1725. delNh(item.id).then(res => {
  1726. if(res.code=="200"){
  1727. this.nhlist.splice(index,1);
  1728. this.totalH--
  1729. this.totalR--
  1730. }
  1731. })
  1732. })
  1733. .catch(() => {
  1734. // on cancel
  1735. });
  1736. }
  1737. }
  1738. });
  1739. }
  1740. });
  1741. },
  1742. // 设为户主
  1743. setNh(item,index){
  1744. Dialog.confirm({
  1745. title: '警告',
  1746. message: '此操作将删除原户主,并将此成员设为新户主,是否确认操作?',
  1747. })
  1748. .then(() => {
  1749. // on confirm
  1750. delNhhncy(item.id).then(res => {
  1751. if(res.code=="200"){
  1752. this.hncylist.splice(index,1);
  1753. this.totalR--
  1754. }
  1755. })
  1756. // 更新户主信息
  1757. let pnh = {
  1758. deptId : item.deptId,
  1759. nhdm : item.nhdm,
  1760. hzxm:item.xm,
  1761. hzzjlx :item.zjlx,
  1762. hzzjhm :item.zjhm
  1763. }
  1764. setNhInfo(pnh).then(res => {
  1765. })
  1766. // 更新使用权人
  1767. let psyqr = {
  1768. deptId : item.deptId,
  1769. nhdm : item.nhdm,
  1770. shyqrdbxm : item.xm,
  1771. shyqrdbzjlx : item.zjlx,
  1772. shyqrdbzjhm : item.zjhm,
  1773. xb : item.xb
  1774. }
  1775. setSyqrInfo(psyqr).then(res => {
  1776. })
  1777. })
  1778. .catch(() => {
  1779. // on cancel
  1780. });
  1781. },
  1782. //删除户内成员
  1783. deletehncy(id,index){
  1784. Dialog.confirm({
  1785. title: '警告',
  1786. message: '删除后无法恢复,确认删除此成员么?',
  1787. })
  1788. .then(() => {
  1789. // on confirm
  1790. delNhhncy(id).then(res => {
  1791. if(res.code=="200"){
  1792. this.hncylist.splice(index,1);
  1793. this.totalR--
  1794. }
  1795. })
  1796. })
  1797. .catch(() => {
  1798. // on cancel
  1799. });
  1800. },
  1801. // 字数限制
  1802. limitWords(val){
  1803. if(val.length>11){
  1804. val = val.slice(0,10) +"..."
  1805. }
  1806. return val
  1807. },
  1808. // 与户主关系翻译
  1809. yhzgxfy(value){
  1810. let label
  1811. this.yhzgxOptions.map(res => {
  1812. if(res.dictValue == value){
  1813. label = res.dictLabel
  1814. }
  1815. })
  1816. return label
  1817. },
  1818. onRefreshzjd(){
  1819. this.isLoadingzjd = false;
  1820. let _this = this
  1821. if(this.active==1&&this.loading2){
  1822. let params = {
  1823. "deptId" : this.item.deptId,
  1824. "houseDataConfirmStatus" : "CONFIRMED",
  1825. "pageNum": this.countyhc+1,
  1826. "pageSize":10,
  1827. }
  1828. listZjdzd(params).then((response) => {
  1829. if(response.rows.length>0&&this.list1.length<response.total){
  1830. response.rows.map(res => {
  1831. this.list1.push(res)
  1832. })
  1833. this.countyhc++
  1834. this.loading2 = false
  1835. }else{
  1836. this.loading2 = false
  1837. this.finished2 = true
  1838. }
  1839. });
  1840. }else if(this.active==2&&this.loading3){
  1841. let params = {
  1842. "deptId" : this.item.deptId,
  1843. "houseDataConfirmStatus" : "UNCONFIRMED",
  1844. "pageNum": this.countwhc+1,
  1845. "pageSize":10,
  1846. }
  1847. listZjdzd(params).then((response) => {
  1848. if(response.rows.length>0&&this.list2.length<response.total){
  1849. response.rows.map(res => {
  1850. this.list2.push(res)
  1851. })
  1852. this.countwhc++
  1853. this.loading3 = false
  1854. }else{
  1855. this.finished3 = true
  1856. }
  1857. });
  1858. }else if(this.active==0&&this.loading1){
  1859. let params = {
  1860. "deptId" : this.item.deptId,
  1861. "pageNum": this.countqb+1,
  1862. "pageSize":10,
  1863. }
  1864. listZjdzd(params).then((response) => {
  1865. if(response.rows.length>0&&this.list.length<response.total){
  1866. response.rows.map(res => {
  1867. _this.list.push(res)
  1868. })
  1869. this.countqb++
  1870. this.loading1 = false
  1871. }else{
  1872. this.finished1 = true
  1873. }
  1874. });
  1875. }
  1876. },
  1877. getTotalHR(){
  1878. let params = {
  1879. "deptId" : this.item.deptId,
  1880. "pageNum": 1,
  1881. "pageSize":10,
  1882. }
  1883. listNh(params).then((response) => {
  1884. if(response.rows.length>=0){
  1885. this.totalH = response.total
  1886. }
  1887. listNhhncy(params).then((res) => {
  1888. if(res.rows.length>=0){
  1889. this.totalR = res.total + this.totalH
  1890. }
  1891. });
  1892. });
  1893. },
  1894. onRefreshnh(){
  1895. this.isLoadingnh = false
  1896. let params = {
  1897. "deptId" : this.item.deptId,
  1898. "pageNum": this.countnh+1,
  1899. "pageSize":10,
  1900. }
  1901. listNh(params).then((response) => {
  1902. if(response.rows.length>0&&this.nhlist.length<response.total){
  1903. response.rows.map(res => {
  1904. this.nhlist.unshift(res)
  1905. })
  1906. this.countnh++
  1907. }
  1908. });
  1909. },
  1910. setCookies(item){
  1911. this.$cookies.set("search",JSON.stringify(item));
  1912. this.$router.push({path:'/homesteadSurvey/add'});
  1913. },
  1914. // 入户核查搜索框新增。
  1915. onClickzjd(){
  1916. this.$cookies.remove("search");
  1917. this.$router.push({name:'homesteadAdd'});
  1918. },
  1919. // 农户信息搜索框新增。
  1920. onClicknh(){
  1921. this.shownh = true;
  1922. let params = {
  1923. "deptId" : this.item.deptId
  1924. }
  1925. this.qlrform={}
  1926. this.nhform={
  1927. "suyqrdm":null,
  1928. "deptId":this.item.deptId,
  1929. "hzzjlx":'01',
  1930. "hzzjlxName":"身份证",
  1931. "hyzk":'02',
  1932. "occupation":'1',
  1933. "occupationName":'务农',
  1934. "jzqk":'3',
  1935. "jzqkName":'常年居住',
  1936. "jzhcssfyzf":'1',
  1937. "jzhcssfyzfName":'无住房',
  1938. "zqtczsfyzf":'Y',
  1939. "sfbccm":'Y',
  1940. "sfpkh":'N',
  1941. "sfwbh":'N',
  1942. "sjly":'07',
  1943. "sjlyName":'农村集体产权制度改革',
  1944. }
  1945. listSuyqr(params).then((response) => {
  1946. if(response.rows.length>0){
  1947. this.qlrform = response.rows[0]
  1948. this.nhform.suyqrdm = this.qlrform.suyqrdm
  1949. this.nhform.txdz = response.rows[0].suyqrmc
  1950. }
  1951. });
  1952. },
  1953. // 返回
  1954. onClickLeft(){
  1955. this.$cookies.set("search","")
  1956. this.$router.push('/homesteadSurvey/index');
  1957. },
  1958. onConfirmhncysjly(value){
  1959. this.form5.sjlyName = value.dictLabel
  1960. this.form5.sjly = value.dictValue
  1961. this.showhncysjly= false
  1962. },
  1963. onConfirmhzsjly(value){
  1964. this.nhform.sjlyName = value.dictLabel
  1965. this.nhform.sjly = value.dictValue
  1966. this.showhzsjly= false
  1967. },
  1968. onConfirmhncycybz(value){
  1969. this.form5.cybzName = value.dictLabel
  1970. this.form5.cybz = value.dictValue
  1971. this.showhncycybz= false
  1972. },
  1973. onConfirmhzjzhcssfyzf(value){
  1974. this.nhform.jzhcssfyzfName = value.dictLabel
  1975. this.nhform.jzhcssfyzf = value.dictValue
  1976. this.showhzjzhcssfyzf= false
  1977. },
  1978. onConfirmhncyyhzgx(value){
  1979. this.form5.yhzgxName = value.dictLabel
  1980. this.form5.yhzgx = value.dictValue
  1981. this.showhncyyhzgx = false
  1982. },
  1983. onConfirmhncyzjlx(value){
  1984. this.form5.zjlxName = value.dictLabel
  1985. this.form5.zjlx = value.dictValue
  1986. this.showhncyzjlx = false
  1987. },
  1988. onConfirmhncyjzqk(value){
  1989. this.form5.jzqkName = value.dictLabel
  1990. this.form5.jzqk = value.dictValue
  1991. this.showhncyjzqk = false
  1992. },
  1993. onConfirmhzjzqk(value){
  1994. this.nhform.jzqkName = value.dictLabel
  1995. this.nhform.jzqk = value.dictValue
  1996. this.showhzjzqk = false
  1997. },
  1998. onConfirmhncyoccupation(value){
  1999. this.form5.occupationName = value.dictLabel
  2000. this.form5.occupation = value.dictValue
  2001. this.showhncyoccupation = false
  2002. },
  2003. onConfirmhzoccupation(value){
  2004. this.nhform.occupationName = value.dictLabel
  2005. this.nhform.occupation = value.dictValue
  2006. this.showhzoccupation = false
  2007. },
  2008. onConfirmhzzjlx(value){
  2009. this.nhform.hzzjlxName = value.dictLabel
  2010. this.nhform.hzzjlx = value.dictValue
  2011. this.showhzzjlx = false
  2012. },
  2013. onConfirmdbrzjlx(value){
  2014. this.qlrform.dbrzjlxName = value.dictLabel
  2015. this.qlrform.dbrzjlx = value.dictValue
  2016. this.showdbrzjlx = false
  2017. },
  2018. onConfirmsuyqxz(value){
  2019. this.qlrform.suyqxzName = value.dictLabel
  2020. this.qlrform.suyqxz = value.dictValue
  2021. this.showsuyqxz = false
  2022. },
  2023. onConfirmdlrzjlx(value){
  2024. this.qlrform.dlrzjlxName = value.dictLabel
  2025. this.qlrform.dlrzjlx = value.dictValue
  2026. this.showdlrzjlx = false
  2027. },
  2028. onConfirmsjly(value){
  2029. this.qlrform.sjlyName = value.dictLabel
  2030. this.qlrform.sjly = value.dictValue
  2031. this.showsjly = false
  2032. },
  2033. // 户主保存
  2034. onSubmitnh(){
  2035. if(this.nhform.id!=null){
  2036. updateNh(this.nhform).then(
  2037. response => {
  2038. let _this =this
  2039. this.$toast({
  2040. icon: 'success', // 找到自己需要的图标
  2041. message: '修改成功',
  2042. duration:"1000",
  2043. onClose:function(){
  2044. _this.getNh()
  2045. let psyqr = {
  2046. deptId : _this.nhform.deptId,
  2047. nhdm : _this.nhform.nhdm,
  2048. shyqrdbxm : _this.nhform.hzxm,
  2049. shyqrdbzjlx : _this.nhform.hzzjlx,
  2050. shyqrdbzjhm : _this.nhform.hzzjhm,
  2051. dh : _this.nhform.phone,
  2052. dz : _this.nhform.txdz
  2053. }
  2054. setSyqrInfo(psyqr).then(res => {
  2055. _this.shownh = false
  2056. })
  2057. }
  2058. })
  2059. }
  2060. );
  2061. }else{
  2062. this.nhform.deptId = this.item.deptId
  2063. addNh(this.nhform).then(
  2064. response => {
  2065. this.totalR+=1
  2066. this.totalH+=1
  2067. let _this =this
  2068. this.$toast({
  2069. icon: 'success', // 找到自己需要的图标
  2070. message: '保存成功',
  2071. duration:"1000",
  2072. onClose:function(){
  2073. _this.shownh = false
  2074. _this.getNh()
  2075. }
  2076. })
  2077. }
  2078. );
  2079. }
  2080. },
  2081. // 所有权人保存
  2082. onSubmitsyqr(){
  2083. if(this.qlrform.id!=null){
  2084. updateSuyqr(this.qlrform).then(
  2085. response => {
  2086. let _this =this
  2087. this.$toast({
  2088. icon: 'success', // 找到自己需要的图标
  2089. message: '修改成功',
  2090. duration:"1000"
  2091. })
  2092. }
  2093. );
  2094. }else{
  2095. this.qlrform.deptId = this.item.deptId
  2096. addSuyqr(this.qlrform).then(
  2097. response => {
  2098. let _this =this
  2099. this.$toast({
  2100. icon: 'success', // 找到自己需要的图标
  2101. message: '保存成功',
  2102. duration:"1000"
  2103. })
  2104. }
  2105. );
  2106. }
  2107. },
  2108. // 查询所有权人
  2109. getSyqr(){
  2110. //删除地图选中状态
  2111. $("#deleteHistoryMap").trigger("click");
  2112. let params = {
  2113. "deptId" : this.item.deptId
  2114. }
  2115. this.qlrform ={
  2116. "deptId":this.item.deptId,
  2117. "suyqxz":'40',
  2118. "suyqxzName":'集体土地所有权',
  2119. "dbrzjlx":'01',
  2120. "dbrzjlxName":'身份证',
  2121. "sfclncjtjjzz":'Y',
  2122. "sjly":'04',
  2123. "sjlyName":"农村宅基地使用权确权登记发证"
  2124. }
  2125. listSuyqr(params).then((response) => {
  2126. if(response.rows.length>0){
  2127. this.qlrform = response.rows[0]
  2128. if(this.qlrform.suyqxz==null||this.qlrform.suyqxz==""){
  2129. this.qlrform.suyqxz = "40"
  2130. this.qlrform.suyqxzName = "集体土地所有权"
  2131. }
  2132. if(this.qlrform.dbrzjlx==null||this.qlrform.dbrzjlx==""){
  2133. this.qlrform.dbrzjlx = "01"
  2134. this.qlrform.dbrzjlxName = "身份证"
  2135. }
  2136. if(this.qlrform.sfclncjtjjzz==null||this.qlrform.sfclncjtjjzz==""){
  2137. this.qlrform.sfclncjtjjzz = "Y"
  2138. }
  2139. if(this.qlrform.sjly==null||this.qlrform.sjly==""){
  2140. this.qlrform.sjly = "04"
  2141. this.qlrform.sjlyName = "农村宅基地使用权确权登记发证"
  2142. }
  2143. this.zjlxOptions.map(res => {
  2144. if(res.dictValue == this.qlrform.dbrzjlx){
  2145. this.qlrform.dbrzjlxName = res.dictLabel
  2146. }
  2147. if(res.dictValue == this.qlrform.dlrzjlx){
  2148. this.qlrform.dlrzjlxName = res.dictLabel
  2149. }
  2150. })
  2151. this.suyqxzOptions.map(res => {
  2152. if(res.dictValue == this.qlrform.suyqxz){
  2153. this.qlrform.suyqxzName = res.dictLabel
  2154. }
  2155. })
  2156. this.sjlyOptions.map(res => {
  2157. if(res.dictValue == this.qlrform.sjly){
  2158. this.qlrform.sjlyName = res.dictLabel
  2159. }
  2160. })
  2161. }
  2162. });
  2163. },
  2164. // 查询农户列表
  2165. getNh(){
  2166. //删除地图选中状态
  2167. $("#deleteHistoryMap").trigger("click");
  2168. let params = {
  2169. "deptId" : this.item.deptId
  2170. }
  2171. listNh(params).then((response) => {
  2172. this.nhlist = response.rows
  2173. this.totalN = response.total
  2174. });
  2175. },
  2176. //调查
  2177. getDc(){
  2178. //删除地图选中状态
  2179. $("#deleteHistoryMap").trigger("click");
  2180. },
  2181. // 农户信息搜索框
  2182. onSearchnh(){
  2183. let params = {
  2184. "deptId" : this.item.deptId,
  2185. "nhValue" : this.nhvalue
  2186. }
  2187. listNh(params).then((response) => {
  2188. this.nhlist = response.rows
  2189. });
  2190. },
  2191. // 宅基地搜索框
  2192. onSearchzjd(){
  2193. if(this.active==1){
  2194. let params = {
  2195. "deptId" : this.item.deptId,
  2196. "houseDataConfirmStatus" : "CONFIRMED",
  2197. "syqr" : this.zjdvalue
  2198. }
  2199. listZjdzd(params).then((response) => {
  2200. if (response.code == 200) {
  2201. this.list1 = response.rows
  2202. }
  2203. });
  2204. }else if(this.active==2){
  2205. let params = {
  2206. "deptId" : this.item.deptId,
  2207. "houseDataConfirmStatus" : "UNCONFIRMED",
  2208. "syqr" : this.zjdvalue
  2209. }
  2210. listZjdzd(params).then((response) => {
  2211. if (response.code == 200) {
  2212. this.list2 = response.rows
  2213. }
  2214. });
  2215. }else{
  2216. let params = {
  2217. "deptId" : this.item.deptId,
  2218. "syqr" : this.zjdvalue
  2219. }
  2220. listZjdzd(params).then((response) => {
  2221. if (response.code == 200) {
  2222. this.list = response.rows
  2223. }
  2224. });
  2225. }
  2226. },
  2227. // 户内成员弹窗
  2228. showPopuphncy(item){
  2229. this.showhncy = true
  2230. if(item.id==null||item.id==""){
  2231. this.form5 = {
  2232. "nhdm":this.nhdm,
  2233. "deptId":this.item.deptId,
  2234. "zjlx":'01',
  2235. "zjlxName":"身份证",
  2236. "yhzgx":"14",
  2237. "yhzgxName":"妻",
  2238. "hyzk":'02',
  2239. "hklx":'1',
  2240. "occupation":'1',
  2241. "occupationName":'务农',
  2242. "jzqk":'3',
  2243. "jzqkName":'常年居住',
  2244. "sfbjtjjzzcy":'Y',
  2245. "xb":'0',
  2246. "sfbccm":'Y',
  2247. "sfpkh":'N',
  2248. "sfwbh":'N',
  2249. "sjly":'07',
  2250. "sjlyName":'农村集体产权制度改革',
  2251. "cybz":'9',
  2252. "cybzName":'其他备注'
  2253. }
  2254. }else{
  2255. let _this = this
  2256. this.form5 = item
  2257. if(this.form5.nhdm==null||this.form5.nhdm==""){
  2258. this.form5.nhdm = this.nhform.nhdm
  2259. }
  2260. if(this.form5.deptId==null||this.form5.deptId==""){
  2261. this.form5.deptId = this.nhform.deptId
  2262. }
  2263. if(this.form5.zjlx==null||this.form5.zjlx==""){
  2264. this.form5.zjlx = "01"
  2265. this.form5.zjlxName = "身份证"
  2266. }
  2267. if(this.form5.yhzgx==null||this.form5.yhzgx==""){
  2268. this.form5.yhzgx = "14"
  2269. this.form5.yhzgxName = "妻"
  2270. }
  2271. if(this.form5.hyzk==null||this.form5.hyzk==""){
  2272. this.form5.hyzk = "02"
  2273. }
  2274. if(this.form5.hklx==null||this.form5.hklx==""){
  2275. this.form5.hklx = "1"
  2276. }
  2277. if(this.form5.occupation==null||this.form5.occupation==""){
  2278. this.form5.occupation = "1"
  2279. this.form5.occupationName = "务农"
  2280. }
  2281. if(this.form5.jzqk==null||this.form5.jzqk==""){
  2282. this.form5.jzqk = "3"
  2283. this.form5.jzqkName = "常年居住"
  2284. }
  2285. if(this.form5.sfbjtjjzzcy==null||this.form5.sfbjtjjzzcy==""){
  2286. this.form5.sfbjtjjzzcy = "Y"
  2287. }
  2288. if(this.form5.xb==null||this.form5.xb==""){
  2289. this.form5.xb = "0"
  2290. }
  2291. if(this.form5.sfbccm==null||this.form5.sfbccm==""){
  2292. this.form5.sfbccm = "Y"
  2293. }
  2294. if(this.form5.sfpkh==null||this.form5.sfpkh==""){
  2295. this.form5.sfpkh = "N"
  2296. }
  2297. if(this.form5.sfwbh==null||this.form5.sfwbh==""){
  2298. this.form5.sfwbh = "N"
  2299. }
  2300. if(this.form5.sjly==null||this.form5.sjly==""){
  2301. this.form5.sjly = "07"
  2302. this.form5.sjlyName = "农村集体产权制度改革"
  2303. }
  2304. if(this.form5.cybz==null||this.form5.cybz==""){
  2305. this.form5.cybz = "9"
  2306. this.form5.cybzName = "其他备注"
  2307. }
  2308. this.jzhcssfyzfOptions.map(res => {
  2309. if(res.dictValue == item.jzhcssfyzf){
  2310. this.form5.jzhcssfyzfName = res.dictLabel
  2311. }
  2312. })
  2313. this.zjlxOptions.map(res => {
  2314. if(res.dictValue == item.zjlx){
  2315. this.form5.zjlxName = res.dictLabel
  2316. }
  2317. })
  2318. this.occupationOptions.map(res => {
  2319. if(res.dictValue == item.occupation){
  2320. this.form5.occupationName = res.dictLabel
  2321. }
  2322. })
  2323. this.jzqkOptions.map(res => {
  2324. if(res.dictValue == item.jzqk){
  2325. this.form5.jzqkName = res.dictLabel
  2326. }
  2327. })
  2328. this.yhzgxOptions.map(res => {
  2329. if(res.dictValue == item.yhzgx){
  2330. this.form5.yhzgxName = res.dictLabel
  2331. }
  2332. })
  2333. this.cybzOptions.map(res => {
  2334. if(res.dictValue == item.cybz){
  2335. this.form5.cybzName = res.dictLabel
  2336. }
  2337. })
  2338. this.sjlyOptions.map(res => {
  2339. if(res.dictValue == item.sjly){
  2340. this.form5.sjlyName = res.dictLabel
  2341. }
  2342. })
  2343. }
  2344. },
  2345. // 户内成员列表
  2346. showPopuphncylist(item){
  2347. if(item.nhdm==null||item.nhdm==""){
  2348. this.$toast({
  2349. icon: 'error', // 找到自己需要的图标
  2350. message: '请先保存户主信息',
  2351. duration:"1000"
  2352. })
  2353. }else{
  2354. this.nhdm = item.nhdm
  2355. this.showhncylist = true
  2356. let params = {
  2357. "nhdm":item.nhdm,
  2358. "deptId":this.item.deptId
  2359. }
  2360. listNhhncy(params).then((response) => {
  2361. if (response.code == 200) {
  2362. this.hncylist = response.rows
  2363. }
  2364. });
  2365. }
  2366. },
  2367. showPopupnh(item){
  2368. this.shownh = true
  2369. this.nhform = item
  2370. this.jzhcssfyzfOptions.map(res => {
  2371. if(res.dictValue == item.jzhcssfyzf){
  2372. this.nhform.jzhcssfyzfName = res.dictLabel
  2373. }
  2374. })
  2375. this.zjlxOptions.map(res => {
  2376. if(res.dictValue == item.hzzjlx){
  2377. this.nhform.hzzjlxName = res.dictLabel
  2378. }
  2379. })
  2380. this.occupationOptions.map(res => {
  2381. if(res.dictValue == item.occupation){
  2382. this.nhform.occupationName = res.dictLabel
  2383. }
  2384. })
  2385. this.jzqkOptions.map(res => {
  2386. if(res.dictValue == item.jzqk){
  2387. this.nhform.jzqkName = res.dictLabel
  2388. }
  2389. })
  2390. this.sjlyOptions.map(res => {
  2391. if(res.dictValue == item.sjly){
  2392. this.nhform.sjlyName = res.dictLabel
  2393. }
  2394. })
  2395. },
  2396. getZjdList(){
  2397. let params = {
  2398. "deptId" : this.item.deptId,
  2399. "pageNum": 1,
  2400. "pageSize":10,
  2401. }
  2402. listZjdzd(params).then((response) => {
  2403. if (response.code == 200) {
  2404. this.list = response.rows
  2405. this.qbNums = response.total
  2406. /* if(response.rows.length>=10){
  2407. this.list = newList.slice(0,9)
  2408. }else {
  2409. this.list = newList
  2410. }
  2411. this.yhcNums = 0
  2412. this.whcNums = 0
  2413. this.list1 = []
  2414. this.list2 = []
  2415. response.rows.map(res => {
  2416. if(res.houseDataConfirmStatus == 'CONFIRMED'){
  2417. if(this.list1.length<10){
  2418. this.list1.push(res)
  2419. }
  2420. this.yhcNums ++
  2421. }else{
  2422. if(this.list2.length<10){
  2423. this.list2.push(res)
  2424. }
  2425. this.whcNums ++
  2426. }
  2427. })*/
  2428. }
  2429. });
  2430. let params1 = {
  2431. "deptId" : this.item.deptId,
  2432. "houseDataConfirmStatus" : "CONFIRMED",
  2433. "pageNum": 1,
  2434. "pageSize":10,
  2435. }
  2436. listZjdzd(params1).then((response) => {
  2437. if (response.code == 200) {
  2438. this.yhcNums = response.total
  2439. this.list1 = response.rows
  2440. }
  2441. });
  2442. let params2 = {
  2443. "deptId" : this.item.deptId,
  2444. "houseDataConfirmStatus" : "UNCONFIRMED",
  2445. "pageNum": 1,
  2446. "pageSize":10,
  2447. }
  2448. listZjdzd(params2).then((response) => {
  2449. if (response.code == 200) {
  2450. this.whcNums = response.total
  2451. this.list2 = response.rows
  2452. }
  2453. });
  2454. },
  2455. onConfirm(){},
  2456. /*onSubmithncy(){
  2457. if (this.form5.id != null) {
  2458. if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 1) {
  2459. if(this.form5.xb!='1'){
  2460. Dialog.confirm({
  2461. title: '警告',
  2462. message: '成员性别与身份证号中性别信息不符,是否继续保存?',
  2463. })
  2464. .then(() => {
  2465. // on confirm
  2466. updateNhhncy(this.form5).then(response => {
  2467. let _this =this
  2468. this.$toast({
  2469. icon: 'success', // 找到自己需要的图标
  2470. message: '修改成功',
  2471. duration:"1000",
  2472. onClose:function(){
  2473. _this.showhncy = false
  2474. let params = {
  2475. "nhdm":_this.form5.nhdm,
  2476. deptId:_this.form5.deptId
  2477. }
  2478. listNhhncy(params).then((response) => {
  2479. _this.hncylist = response.rows
  2480. })
  2481. }
  2482. })
  2483. });
  2484. })
  2485. .catch(() => {
  2486. // on cancel
  2487. });
  2488. }else{
  2489. updateNhhncy(this.form5).then(response => {
  2490. let _this =this
  2491. this.$toast({
  2492. icon: 'success', // 找到自己需要的图标
  2493. message: '修改成功',
  2494. duration:"1000",
  2495. onClose:function(){
  2496. _this.showhncy = false
  2497. let params = {
  2498. "nhdm":_this.form5.nhdm,
  2499. deptId:_this.form5.deptId
  2500. }
  2501. listNhhncy(params).then((response) => {
  2502. _this.hncylist = response.rows
  2503. })
  2504. }
  2505. })
  2506. });
  2507. }
  2508. } else {
  2509. if(this.form5.xb=='1'){
  2510. Dialog.confirm({
  2511. title: '警告',
  2512. message: '成员性别与身份证号中性别信息不符,是否继续保存?',
  2513. })
  2514. .then(() => {
  2515. // on confirm
  2516. updateNhhncy(this.form5).then(response => {
  2517. let _this =this
  2518. this.$toast({
  2519. icon: 'success', // 找到自己需要的图标
  2520. message: '修改成功',
  2521. duration:"1000",
  2522. onClose:function(){
  2523. _this.showhncy = false
  2524. let params = {
  2525. "nhdm":_this.form5.nhdm,
  2526. deptId:_this.form5.deptId
  2527. }
  2528. listNhhncy(params).then((response) => {
  2529. _this.hncylist = response.rows
  2530. })
  2531. }
  2532. })
  2533. });
  2534. })
  2535. .catch(() => {
  2536. // on cancel
  2537. });
  2538. }else{
  2539. updateNhhncy(this.form5).then(response => {
  2540. let _this =this
  2541. this.$toast({
  2542. icon: 'success', // 找到自己需要的图标
  2543. message: '修改成功',
  2544. duration:"1000",
  2545. onClose:function(){
  2546. _this.showhncy = false
  2547. let params = {
  2548. "nhdm":_this.form5.nhdm,
  2549. deptId:_this.form5.deptId
  2550. }
  2551. listNhhncy(params).then((response) => {
  2552. _this.hncylist = response.rows
  2553. })
  2554. }
  2555. })
  2556. });
  2557. }
  2558. }
  2559. } else {
  2560. if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 1) {
  2561. if(this.form5.xb!='1'){
  2562. Dialog.confirm({
  2563. title: '警告',
  2564. message: '成员性别与身份证号中性别信息不符,是否继续保存?',
  2565. })
  2566. .then(() => {
  2567. // on confirm
  2568. addNhhncy(this.form5).then(response => {
  2569. let _this =this
  2570. this.$toast({
  2571. icon: 'success', // 找到自己需要的图标
  2572. message: '保存成功',
  2573. duration:"1000",
  2574. onClose:function(){
  2575. _this.showhncy = false
  2576. _this.totalR+=1
  2577. _this.totalH+=1
  2578. let params = {
  2579. "nhdm":_this.form5.nhdm,
  2580. deptId:_this.form5.deptId
  2581. }
  2582. listNhhncy(params).then((response) => {
  2583. _this.hncylist = response.rows
  2584. })
  2585. }
  2586. })
  2587. });
  2588. })
  2589. .catch(() => {
  2590. // on cancel
  2591. });
  2592. }else{
  2593. addNhhncy(this.form5).then(response => {
  2594. let _this =this
  2595. this.$toast({
  2596. icon: 'success', // 找到自己需要的图标
  2597. message: '保存成功',
  2598. duration:"1000",
  2599. onClose:function(){
  2600. _this.showhncy = false
  2601. _this.totalR+=1
  2602. _this.totalH+=1
  2603. let params = {
  2604. "nhdm":_this.form5.nhdm,
  2605. deptId:_this.form5.deptId
  2606. }
  2607. listNhhncy(params).then((response) => {
  2608. _this.hncylist = response.rows
  2609. })
  2610. }
  2611. })
  2612. });
  2613. }
  2614. } else {
  2615. if(this.form5.xb=='1'){
  2616. Dialog.confirm({
  2617. title: '警告',
  2618. message: '成员性别与身份证号中性别信息不符,是否继续保存?',
  2619. })
  2620. .then(() => {
  2621. // on confirm
  2622. addNhhncy(this.form5).then(response => {
  2623. let _this =this
  2624. this.$toast({
  2625. icon: 'success', // 找到自己需要的图标
  2626. message: '保存成功',
  2627. duration:"1000",
  2628. onClose:function(){
  2629. _this.showhncy = false
  2630. _this.totalR+=1
  2631. _this.totalH+=1
  2632. let params = {
  2633. "nhdm":_this.form5.nhdm,
  2634. deptId:_this.form5.deptId
  2635. }
  2636. listNhhncy(params).then((response) => {
  2637. _this.hncylist = response.rows
  2638. })
  2639. }
  2640. })
  2641. });
  2642. })
  2643. .catch(() => {
  2644. // on cancel
  2645. });
  2646. }else{
  2647. addNhhncy(this.form5).then(response => {
  2648. let _this =this
  2649. this.$toast({
  2650. icon: 'success', // 找到自己需要的图标
  2651. message: '保存成功',
  2652. duration:"1000",
  2653. onClose:function(){
  2654. _this.showhncy = false
  2655. _this.totalR+=1
  2656. _this.totalH+=1
  2657. let params = {
  2658. "nhdm":_this.form5.nhdm,
  2659. deptId:_this.form5.deptId
  2660. }
  2661. listNhhncy(params).then((response) => {
  2662. _this.hncylist = response.rows
  2663. })
  2664. }
  2665. })
  2666. });
  2667. }
  2668. }
  2669. }
  2670. },*/
  2671. onSubmithncy(){
  2672. if (this.form5.id != null) {
  2673. if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 1) {
  2674. if(this.form5.xb!='1'){
  2675. Dialog.confirm({
  2676. title: '警告',
  2677. message: '成员性别与身份证号中性别信息不符,是否继续保存?',
  2678. })
  2679. .then(() => {
  2680. // on confirm
  2681. updateNhhncy(this.form5).then(response => {
  2682. let _this =this
  2683. this.$toast({
  2684. icon: 'success', // 找到自己需要的图标
  2685. message: '修改成功',
  2686. duration:"1000",
  2687. onClose:function(){
  2688. _this.showhncy = false
  2689. let params = {
  2690. "nhdm":_this.form5.nhdm,
  2691. deptId:_this.form5.deptId
  2692. }
  2693. listNhhncy(params).then((response) => {
  2694. _this.hncylist = response.rows
  2695. })
  2696. }
  2697. })
  2698. });
  2699. })
  2700. .catch(() => {
  2701. // on cancel
  2702. });
  2703. }else{
  2704. updateNhhncy(this.form5).then(response => {
  2705. let _this =this
  2706. this.$toast({
  2707. icon: 'success', // 找到自己需要的图标
  2708. message: '修改成功',
  2709. duration:"1000",
  2710. onClose:function(){
  2711. _this.showhncy = false
  2712. let params = {
  2713. "nhdm":_this.form5.nhdm,
  2714. deptId:_this.form5.deptId
  2715. }
  2716. listNhhncy(params).then((response) => {
  2717. _this.hncylist = response.rows
  2718. })
  2719. }
  2720. })
  2721. });
  2722. }
  2723. } else if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 0){
  2724. if(this.form5.xb!='0'){
  2725. Dialog.confirm({
  2726. title: '警告',
  2727. message: '成员性别与身份证号中性别信息不符,是否继续保存?',
  2728. })
  2729. .then(() => {
  2730. // on confirm
  2731. updateNhhncy(this.form5).then(response => {
  2732. let _this =this
  2733. this.$toast({
  2734. icon: 'success', // 找到自己需要的图标
  2735. message: '修改成功',
  2736. duration:"1000",
  2737. onClose:function(){
  2738. _this.showhncy = false
  2739. let params = {
  2740. "nhdm":_this.form5.nhdm,
  2741. deptId:_this.form5.deptId
  2742. }
  2743. listNhhncy(params).then((response) => {
  2744. _this.hncylist = response.rows
  2745. })
  2746. }
  2747. })
  2748. });
  2749. })
  2750. .catch(() => {
  2751. // on cancel
  2752. });
  2753. }else{
  2754. updateNhhncy(this.form5).then(response => {
  2755. let _this =this
  2756. this.$toast({
  2757. icon: 'success', // 找到自己需要的图标
  2758. message: '修改成功',
  2759. duration:"1000",
  2760. onClose:function(){
  2761. _this.showhncy = false
  2762. let params = {
  2763. "nhdm":_this.form5.nhdm,
  2764. deptId:_this.form5.deptId
  2765. }
  2766. listNhhncy(params).then((response) => {
  2767. _this.hncylist = response.rows
  2768. })
  2769. }
  2770. })
  2771. });
  2772. }
  2773. }else{
  2774. updateNhhncy(this.form5).then(response => {
  2775. let _this =this
  2776. this.$toast({
  2777. icon: 'success', // 找到自己需要的图标
  2778. message: '修改成功',
  2779. duration:"1000",
  2780. onClose:function(){
  2781. _this.showhncy = false
  2782. let params = {
  2783. "nhdm":_this.form5.nhdm,
  2784. deptId:_this.form5.deptId
  2785. }
  2786. listNhhncy(params).then((response) => {
  2787. _this.hncylist = response.rows
  2788. })
  2789. }
  2790. })
  2791. });
  2792. }
  2793. } else {
  2794. if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 1) {
  2795. if(this.form5.xb!='1'){
  2796. Dialog.confirm({
  2797. title: '警告',
  2798. message: '成员性别与身份证号中性别信息不符,是否继续保存?',
  2799. })
  2800. .then(() => {
  2801. // on confirm
  2802. addNhhncy(this.form5).then(response => {
  2803. let _this =this
  2804. this.$toast({
  2805. icon: 'success', // 找到自己需要的图标
  2806. message: '保存成功',
  2807. duration:"1000",
  2808. onClose:function(){
  2809. _this.totalR+=1
  2810. _this.showhncy = false
  2811. let params = {
  2812. "nhdm":_this.form5.nhdm,
  2813. deptId:_this.form5.deptId
  2814. }
  2815. listNhhncy(params).then((response) => {
  2816. _this.hncylist = response.rows
  2817. })
  2818. }
  2819. })
  2820. });
  2821. })
  2822. .catch(() => {
  2823. // on cancel
  2824. });
  2825. }else{
  2826. addNhhncy(this.form5).then(response => {
  2827. let _this =this
  2828. this.$toast({
  2829. icon: 'success', // 找到自己需要的图标
  2830. message: '保存成功',
  2831. duration:"1000",
  2832. onClose:function(){
  2833. _this.totalR+=1
  2834. _this.showhncy = false
  2835. let params = {
  2836. "nhdm":_this.form5.nhdm,
  2837. deptId:_this.form5.deptId
  2838. }
  2839. listNhhncy(params).then((response) => {
  2840. _this.hncylist = response.rows
  2841. })
  2842. }
  2843. })
  2844. });
  2845. }
  2846. } else if (this.form5.zjlx=='01'&&parseInt(this.form5.zjhm.substr(16, 1)) % 2 == 0){
  2847. if(this.form5.xb!='0'){
  2848. Dialog.confirm({
  2849. title: '警告',
  2850. message: '成员性别与身份证号中性别信息不符,是否继续保存?',
  2851. })
  2852. .then(() => {
  2853. // on confirm
  2854. addNhhncy(this.form5).then(response => {
  2855. let _this =this
  2856. this.$toast({
  2857. icon: 'success', // 找到自己需要的图标
  2858. message: '保存成功',
  2859. duration:"1000",
  2860. onClose:function(){
  2861. _this.totalR+=1
  2862. _this.showhncy = false
  2863. let params = {
  2864. "nhdm":_this.form5.nhdm,
  2865. deptId:_this.form5.deptId
  2866. }
  2867. listNhhncy(params).then((response) => {
  2868. _this.hncylist = response.rows
  2869. })
  2870. }
  2871. })
  2872. });
  2873. })
  2874. .catch(() => {
  2875. // on cancel
  2876. });
  2877. }else{
  2878. addNhhncy(this.form5).then(response => {
  2879. let _this =this
  2880. this.$toast({
  2881. icon: 'success', // 找到自己需要的图标
  2882. message: '保存成功',
  2883. duration:"1000",
  2884. onClose:function(){
  2885. _this.totalR+=1
  2886. _this.showhncy = false
  2887. let params = {
  2888. "nhdm":_this.form5.nhdm,
  2889. deptId:_this.form5.deptId
  2890. }
  2891. listNhhncy(params).then((response) => {
  2892. _this.hncylist = response.rows
  2893. })
  2894. }
  2895. })
  2896. });
  2897. }
  2898. }else{
  2899. addNhhncy(this.form5).then(response => {
  2900. let _this =this
  2901. this.$toast({
  2902. icon: 'success', // 找到自己需要的图标
  2903. message: '保存成功',
  2904. duration:"1000",
  2905. onClose:function(){
  2906. _this.totalR+=1
  2907. _this.showhncy = false
  2908. let params = {
  2909. "nhdm":_this.form5.nhdm,
  2910. deptId:_this.form5.deptId
  2911. }
  2912. listNhhncy(params).then((response) => {
  2913. _this.hncylist = response.rows
  2914. })
  2915. }
  2916. })
  2917. });
  2918. }
  2919. }
  2920. },
  2921. mapShow() {
  2922. //删除地图选中状态
  2923. $("#deleteHistoryMap").trigger("click");
  2924. //通过数据直接查询方式--------加载较慢 start
  2925. //镇边界获取
  2926. // listTown().then(response => {
  2927. // if (response.code == 200) {
  2928. // this.mapTownList = response.rows;
  2929. // //村边界获取
  2930. // listVillage(this.queryParams).then(response => {
  2931. // this.mapVillageList = response.rows;
  2932. // listZjdzd().then((response) => {
  2933. // if (response.code == 200) {
  2934. // this.mapTheGeomZjdId= response.rows;
  2935. // listZrz().then((response) => {
  2936. // if (response.code == 200) {
  2937. // this.mapTheGeomZrzId = response.rows;
  2938. // listFsss().then((response) => {
  2939. // if (response.code == 200) {
  2940. // this.mapTheGeomFsssId = response.rows;
  2941. // }
  2942. // setTimeout(() => {
  2943. // this.GetMapsInit();
  2944. // }, 300);
  2945. // });
  2946. // }
  2947. // });
  2948. // }
  2949. // });
  2950. // });
  2951. // }
  2952. // });
  2953. //通过数据直接查询方式--------加载较慢 end
  2954. getGeoServerConfigKey().then(response => {
  2955. this.mapGeoServerUrl = response.msg;
  2956. setTimeout(() => {
  2957. this.GetMapsInit();
  2958. }, 300);
  2959. });
  2960. var that = this;
  2961. setTimeout(function () {
  2962. var height = $(".searchBar_wrap").outerHeight(true) - $(".searchBar_wrap .van-search").outerHeight(true)
  2963. that.bottomHeight = -height+'px'
  2964. },500)
  2965. },
  2966. //地图加载 -----start
  2967. GetMapsInit() {
  2968. //加载地图编辑
  2969. var that = this;
  2970. var map;
  2971. //点击事件添加样式
  2972. var hc_land_on;
  2973. document.getElementById("mapWrapAll").innerHTML = '';
  2974. var hc_land;
  2975. var projection = new ol.proj.Projection({
  2976. //地图投影类型
  2977. code: "EPSG:3857",
  2978. units: "degrees",
  2979. //extent:extent
  2980. });
  2981. var aerial = new ol.layer.Tile({
  2982. source: new ol.source.XYZ({
  2983. // url: "http://t0.tianditu.gov.cn/img_w/wmts?" +
  2984. // "SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles" +
  2985. // "&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=cc4aba6e967096098249efa069733067",
  2986. url: "http://t{0-7}.tianditu.com/img_w/wmts?" +
  2987. "SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles" +
  2988. "&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=cc4aba6e967096098249efa069733067&TIMESTAMP="+ new Date().getTime(),
  2989. }),
  2990. isGroup: true,
  2991. name: "卫星影像图",
  2992. });
  2993. var yingxzi = new ol.layer.Tile({
  2994. source: new ol.source.XYZ({
  2995. url: "http://t{0-7}.tianditu.com/DataServer?T=cia_w&x={x}&y={y}&l={z}&tk=cc4aba6e967096098249efa069733067&TIMESTAMP="+ new Date().getTime(),
  2996. }),
  2997. isGroup: true,
  2998. name: "天地图文字标注--卫星影像图",
  2999. });
  3000. //加载地图
  3001. map = new ol.Map({
  3002. controls: ol.control.defaults({attribution: false, zoom: false, rotate: false}).extend([]), //隐藏放大缩小按钮
  3003. layers: [aerial, yingxzi],
  3004. projection: projection,
  3005. target: "mapWrapAll",
  3006. view: new ol.View({
  3007. //center: ol.proj.fromLonLat([115.452752, 31.789033]),
  3008. //center: ol.proj.fromLonLat([115.452752, 31.789033]),
  3009. zoom: 10,
  3010. minZoom: 5, //地图缩小限制
  3011. maxZoom: 18.3, //地图放大限制
  3012. resolution: Math.random() * 0.00000001,
  3013. }),
  3014. interactions: ol.interaction.defaults({
  3015. pinchRotate: false // 移动端禁止地图旋转
  3016. }),
  3017. });
  3018. //使用geoserver服务查询开始 -------------------start
  3019. //镇边界查询开始 ------------------------------start
  3020. // var zhenTc= new ol.layer.Tile({
  3021. // source: new ol.source.TileWMS({
  3022. // url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms",
  3023. // params: {
  3024. // LAYERS: 'zjd_dc:t_house_survey_border_town',
  3025. // TILED: true,
  3026. // //cql_filter: cql_filter,
  3027. // SRID: 3857,
  3028. // },
  3029. // }),
  3030. // });
  3031. // map.addLayer(zhenTc);
  3032. //镇边界查询开始 ------------------------------end
  3033. //村边界查询开始 ------------------------------start
  3034. var cql_filter = "dept_id='" + that.$cookies.get("item").deptId + "'";
  3035. var cunTc = new ol.layer.Image({
  3036. source: new ol.source.ImageWMS({
  3037. url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
  3038. params: {
  3039. LAYERS: 'zjd_dc:t_house_survey_border_village',
  3040. TILED: true,
  3041. cql_filter: cql_filter,
  3042. SRID: 3857,
  3043. TIMESTAMP: new Date().getTime(),
  3044. },
  3045. resolution: Math.random() * 0.00000001,
  3046. }),
  3047. });
  3048. //定位查询位置
  3049. let param_dw = {
  3050. srsName: "EPSG:3857",
  3051. service: "WFS",
  3052. version: "1.0.0",
  3053. request: "GetFeature",
  3054. typename: "zjd_dc:t_house_survey_border_village",
  3055. //featureNS: 'nsgk_hc',//命名空间 URI
  3056. cql_filter: cql_filter,
  3057. //featurePrefix: 'nationalwater',//工作区名称
  3058. //featureTypes: ['nationalwater:01fir'],//查询图层,可以是同一个工作区下多个图层,逗号隔开
  3059. outputFormat: "application/json",
  3060. //filter: ol.format.filter.equalTo(t,e,r)//前者是属性名,后者是对应值
  3061. };
  3062. let url_dw = that.mapGeoServerUrl + "/geoserver/zjd_dc/wfs"; //wfsurl;
  3063. url_dw = url_dw + "?";
  3064. for (let key in param_dw) {
  3065. url_dw = url_dw + key + "=" + param_dw[key] + "&";
  3066. }
  3067. url_dw = url_dw.substr(0, url_dw.length - 1);
  3068. fetch(url_dw, {
  3069. method: "POST", // *GET, POST, PUT, DELETE, etc.
  3070. })
  3071. .then((res) => {
  3072. var geojsonmap = res.json();
  3073. return geojsonmap;
  3074. })
  3075. .then((data) => {
  3076. if (that.backTheGeom != "" && that.backTheGeom != undefined && that.backTheGeom.substring(0, 1) == "{") {
  3077. hc_land_on = new ol.layer.Vector({
  3078. title: "add Layer",
  3079. source: new ol.source.Vector({
  3080. projection: projection,
  3081. features: new ol.format.GeoJSON().readFeatures(that.backTheGeom),
  3082. }),
  3083. style: new ol.style.Style({
  3084. stroke: new ol.style.Stroke({
  3085. //边界样式
  3086. color: "#CCFF66",
  3087. width: 6,
  3088. }),
  3089. }),
  3090. });
  3091. map.addLayer(hc_land_on);
  3092. var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
  3093. var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
  3094. var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
  3095. var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
  3096. //定位查询位置
  3097. var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  3098. that.clickBbox = center;
  3099. console.log(that.mapZjdData);
  3100. that.textMjAll = that.mapZjdData.zdmj;
  3101. map.getView().animate({
  3102. // 只设置需要的属性即可
  3103. center: center, // 中心点
  3104. zoom: 17.9, // 缩放级别
  3105. rotation: undefined, // 缩放完成view视图旋转弧度
  3106. duration: 1000, // 缩放持续时间,默认不需要设置
  3107. resolution: Math.random() * 0.00000001,
  3108. });
  3109. //this.backMap =1;
  3110. } else if (that.backTheGeom != "" && that.backTheGeom != undefined && that.backTheGeom.substring(0, 1) == "[") {
  3111. //that.newHt ="1";
  3112. var zbNew = JSON.stringify({
  3113. "type": "MultiPolygon",
  3114. "coordinates": [that.backTheGeom.replaceAll("\"", "")]
  3115. });
  3116. var leftJoin = zbNew.replace("\"[", "[");
  3117. var rightJoin = leftJoin.replace("\"]", "]");
  3118. hc_land_on = new ol.layer.Vector({
  3119. title: "add Layer",
  3120. source: new ol.source.Vector({
  3121. projection: projection,
  3122. features: new ol.format.GeoJSON().readFeatures("{\n" +
  3123. " \"type\": \"Feature\",\n" +
  3124. " \"geometry\":" + rightJoin + "}"),
  3125. }),
  3126. style: new ol.style.Style({
  3127. fill: new ol.style.Fill({
  3128. //矢量图层填充颜色,以及透明度
  3129. color: "rgba(204, 255, 204,0.3)",
  3130. }),
  3131. stroke: new ol.style.Stroke({
  3132. //边界样式
  3133. color: "#CCFF66",
  3134. width: 3,
  3135. }),
  3136. }),
  3137. });
  3138. map.addLayer(hc_land_on);
  3139. var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
  3140. var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
  3141. var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
  3142. var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
  3143. //定位查询位置
  3144. var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  3145. that.clickBbox = center;
  3146. console.log(that.mapZjdData);
  3147. that.textMjAll = that.mapZjdData.zdmj;
  3148. map.getView().animate({
  3149. // 只设置需要的属性即可
  3150. center: center, // 中心点
  3151. zoom: 16.9, // 缩放级别
  3152. rotation: undefined, // 缩放完成view视图旋转弧度
  3153. duration: 1000, // 缩放持续时间,默认不需要设置
  3154. resolution: Math.random() * 0.00000001,
  3155. });
  3156. //this.backMap =1;
  3157. } else {
  3158. let resolution = map.getView().getResolutionForExtent(data.bbox, map.getSize());
  3159. resolution:resolution + Math.random() * 0.00000001,
  3160. map.getView().fit(data.bbox);
  3161. map.getView().setResolution(resolution);
  3162. }
  3163. })
  3164. .catch((error) => {
  3165. console.log("【异常】", error);
  3166. });
  3167. map.addLayer(cunTc);
  3168. //村边界查询开始 ------------------------------end
  3169. //宅基地图层查询开始 ------------------start
  3170. //var cql_filter_all = "dept_id='" + that.$cookies.get("item").deptId + "'";
  3171. var zjdTc = new ol.layer.Image({
  3172. source: new ol.source.ImageWMS({
  3173. url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
  3174. params: {
  3175. LAYERS: 'zjd_dc:t_house_survey_zjdzd',
  3176. TILED: true,
  3177. cql_filter: cql_filter,
  3178. SRID: 3857,
  3179. TIMESTAMP: new Date().getTime(),
  3180. },
  3181. }),
  3182. });
  3183. map.addLayer(zjdTc);
  3184. //宅基地图层查询开始 ------------------start
  3185. //自然幢图层查询开始 ------------------start
  3186. var zrzTc = new ol.layer.Image({
  3187. source: new ol.source.ImageWMS({
  3188. url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
  3189. params: {
  3190. LAYERS: 'zjd_dc:t_house_survey_zrz',
  3191. TILED: true,
  3192. cql_filter: cql_filter,
  3193. SRID: 3857,
  3194. TIMESTAMP: new Date().getTime(),
  3195. },
  3196. }),
  3197. });
  3198. map.addLayer(zrzTc);
  3199. //自然幢图层查询开始 ------------------start
  3200. //附属设施图层查询开始 ------------------start
  3201. var fsssTc = new ol.layer.Image({
  3202. source: new ol.source.ImageWMS({
  3203. url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
  3204. params: {
  3205. LAYERS: 'zjd_dc:t_house_survey_fsss',
  3206. TILED: true,
  3207. cql_filter: cql_filter,
  3208. SRID: 3857,
  3209. TIMESTAMP: new Date().getTime(),
  3210. },
  3211. }),
  3212. });
  3213. map.addLayer(fsssTc);
  3214. //附属设施图层查询开始 ------------------start
  3215. //使用geoserver服务查询开始 -------------------end
  3216. // if(this.backMap ==1){
  3217. // var cql = "dept_id='" + that.$cookies.get("item").deptId + "'" + "and zjddm='" + this.mapZjdTeAll.mapZjdAData.zjddm + "'";
  3218. // var wmsSourceBack = new ol.source.ImageWMS({
  3219. // crossOrigin: 'anonymous',
  3220. // params: {
  3221. // LAYERS: 'zjd_dc:t_house_survey_all',
  3222. // 'VERSION': '1.1.0',
  3223. // 'FORMAT': "image/png",
  3224. // 'CQL_FILTER': cql
  3225. // },
  3226. // serverType: 'geoserver',
  3227. // url: that.mapGeoServerUrl + "/geoserver/zjd_dc/wms",
  3228. // });
  3229. // zjdTc.setSource(wmsSourceBack);
  3230. // ol.view.setResolution(ol.view.getResolution() + Math.random() * 0.00000001);//随机数缩放实现刷新
  3231. // }
  3232. //数据库直接加载数据渲染方式---------------------------------------------------start
  3233. //判断当前账套是否有数据
  3234. // var mapTalkAbout = true;
  3235. // //获取镇界线----start
  3236. // if(this.mapTownList.length >0){
  3237. // for (var i = 0; this.mapTownList.length > i; i++) {
  3238. // if (this.mapTownList[i] != null && this.mapTownList[i].theGeom != null && this.mapTownList[i].theGeom != "") {
  3239. // mapTalkAbout =false;
  3240. // this.mapTownList[i].createBy = 'mapTownList';
  3241. // var theGeomLine= this.mapTownList[i].theGeom.replaceAll("MultiPolygon","LineString");
  3242. // theGeomLine = theGeomLine.replaceAll("[[[[","[[");
  3243. // theGeomLine = theGeomLine.replaceAll("]]]]","]]");
  3244. // hc_land = new ol.layer.Vector({
  3245. // title: "add Layer",
  3246. // source: new ol.source.Vector({
  3247. // projection: projection,
  3248. // features: new ol.format.GeoJSON().readFeatures("{\n" +
  3249. // " \"type\": \"Feature\",\n" +
  3250. // " \"geometry\":" + theGeomLine + ", \"properties\":" + JSON.stringify(this.mapTownList[i]) + "}"),
  3251. // }),
  3252. // style: new ol.style.Style({
  3253. // fill: new ol.style.Fill({
  3254. // //矢量图层填充颜色,以及透明度
  3255. // color: "#AE57A4",
  3256. // }),
  3257. // stroke: new ol.style.Stroke({
  3258. // //边界样式
  3259. // color: "#FF0000",
  3260. // width: 3,
  3261. // }),
  3262. // // text: new ol.style.Text({
  3263. // // text: this.mapTownList[i].xzqmc,
  3264. // // font: '30px sans-serif',
  3265. // // textAlign: "center",
  3266. // // textBaseline: "middle",
  3267. // // //font: 'verdana',
  3268. // // fill: new ol.style.Fill({
  3269. // // color: "#ff0000"
  3270. // // }),
  3271. // // // backgroundFill: new ol.style.Fill({
  3272. // // // color: "#ff0000"
  3273. // // // }),
  3274. // // font: "30px sans-serif",
  3275. // // stroke: new ol.style.Stroke({
  3276. // // color: "#ffffff"
  3277. // // // width: 3
  3278. // // }),
  3279. // // offsetX: parseInt(0, 10),
  3280. // // offsetY: parseInt(0, 10),
  3281. // // placement: "line", //point 则自动计算面的中心k点然后标注 line 则根据面要素的边进行标注
  3282. // // overflow: false //超出面的部分不显示
  3283. // //}),
  3284. // }),
  3285. // });
  3286. // map.addLayer(hc_land);
  3287. // //console.log(hc_land.values_.source.featuresRtree_.rbush_.data);
  3288. // var maxXMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxX;
  3289. // var maxYMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxY;
  3290. // var minXMap = hc_land.values_.source.featuresRtree_.rbush_.data.minX;
  3291. // var minYMap = hc_land.values_.source.featuresRtree_.rbush_.data.minY;
  3292. // // //定位查询位置
  3293. // var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  3294. // // console.log(center);
  3295. // map.getView().animate({
  3296. // // 只设置需要的属性即可
  3297. // center: center, // 中心点
  3298. // zoom: 9.8, // 缩放级别
  3299. // rotation: undefined, // 缩放完成view视图旋转弧度
  3300. // duration: 1000, // 缩放持续时间,默认不需要设置
  3301. // });
  3302. // }
  3303. // }
  3304. // }
  3305. // //获取镇界线----end
  3306. // //获取村界线----start
  3307. // if(this.mapVillageList.length >0){
  3308. // for (var i = 0; this.mapVillageList.length > i; i++) {
  3309. // if (this.mapVillageList[i] != null && this.mapVillageList[i].theGeom != null && this.mapVillageList[i].theGeom != "") {
  3310. // mapTalkAbout =false;
  3311. // this.mapVillageList[i].createBy = 'mapVillageList';
  3312. // var theGeomLine= this.mapVillageList[i].theGeom.replaceAll("MultiPolygon","LineString");
  3313. // theGeomLine = theGeomLine.replaceAll("[[[[","[[");
  3314. // theGeomLine = theGeomLine.replaceAll("]]]]","]]");
  3315. // hc_land = new ol.layer.Vector({
  3316. // title: "add Layer",
  3317. // source: new ol.source.Vector({
  3318. // projection: projection,
  3319. // features: new ol.format.GeoJSON().readFeatures("{\n" +
  3320. // " \"type\": \"Feature\",\n" +
  3321. // " \"geometry\":" + theGeomLine + ", \"properties\":" + JSON.stringify(this.mapVillageList[i]) + "}"),
  3322. // }),
  3323. // style: new ol.style.Style({
  3324. // fill: new ol.style.Fill({
  3325. // //矢量图层填充颜色,以及透明度
  3326. // color: "#AE57A4",
  3327. // }),
  3328. // stroke: new ol.style.Stroke({
  3329. // //边界样式
  3330. // color: "#ff00ff",
  3331. // width: 3,
  3332. // }),
  3333. // // text: new ol.style.Text({
  3334. // // text: this.mapVillageList[i].dcmj,
  3335. // // font: '30px sans-serif',
  3336. // // textAlign: "center",
  3337. // // textBaseline: "middle",
  3338. // // //font: 'verdana',
  3339. // // fill: new ol.style.Fill({
  3340. // // color: "#ff00ff"
  3341. // // }),
  3342. // // // backgroundFill: new ol.style.Fill({
  3343. // // // color: "#ff0000"
  3344. // // // }),
  3345. // // font: "30px sans-serif",
  3346. // // stroke: new ol.style.Stroke({
  3347. // // color: "#ffffff"
  3348. // // // width: 3
  3349. // // }),
  3350. // // offsetX: parseInt(0, 10),
  3351. // // offsetY: parseInt(0, 10),
  3352. // // placement: "line", //point 则自动计算面的中心k点然后标注 line 则根据面要素的边进行标注
  3353. // // overflow: false //超出面的部分不显示
  3354. // // }),
  3355. // }),
  3356. // });
  3357. // map.addLayer(hc_land);
  3358. // }
  3359. // }
  3360. // }
  3361. // // //获取村界线----end
  3362. // //宅基地定位开始 ---------start
  3363. // if(this.mapTheGeomZjdId.length >0) {
  3364. // for (var i = 0; this.mapTheGeomZjdId.length > i; i++) {
  3365. // if (this.mapTheGeomZjdId[i] !=null && this.mapTheGeomZjdId[i].theGeom != null && this.mapTheGeomZjdId[i].theGeom != "") {
  3366. // mapTalkAbout =false;
  3367. // this.mapTheGeomZjdId[i].createBy = 'mapTheGeomZjdId';
  3368. // var styleYqr = "";
  3369. // if(this.mapTheGeomZjdId[i].houseDataConfirmStatus == "CONFIRMED"){
  3370. // styleYqr = new ol.style.Style({
  3371. // fill: new ol.style.Fill({
  3372. // //矢量图层填充颜色,以及透明度
  3373. // color: "#AE57A4",
  3374. // }),
  3375. // stroke: new ol.style.Stroke({
  3376. // //边界样式
  3377. // color: "#28FF28",
  3378. // width: 3,
  3379. // }),
  3380. // });
  3381. // } else {
  3382. // styleYqr = new ol.style.Style({
  3383. // fill: new ol.style.Fill({
  3384. // //矢量图层填充颜色,以及透明度
  3385. // color: "#AE57A4",
  3386. // }),
  3387. // stroke: new ol.style.Stroke({
  3388. // //边界样式
  3389. // color: "rgba(255, 45, 45,1)",
  3390. // width: 3,
  3391. // }),
  3392. // });
  3393. // }
  3394. // hc_land = new ol.layer.Vector({
  3395. // title: "add Layer",
  3396. // source: new ol.source.Vector({
  3397. // projection: projection,
  3398. // features: new ol.format.GeoJSON().readFeatures("{\n" +
  3399. // " \"type\": \"Feature\",\n" +
  3400. // " \"geometry\":" + this.mapTheGeomZjdId[i].theGeom + ", \"properties\":" + JSON.stringify(this.mapTheGeomZjdId[i]) + "}"),
  3401. // }),
  3402. // style: styleYqr
  3403. // });
  3404. // map.addLayer(hc_land);
  3405. // // var maxXMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxX;
  3406. // // var maxYMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxY;
  3407. // // var minXMap = hc_land.values_.source.featuresRtree_.rbush_.data.minX;
  3408. // // var minYMap = hc_land.values_.source.featuresRtree_.rbush_.data.minY;
  3409. // // //定位查询位置
  3410. // // var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  3411. // // map.getView().animate({
  3412. // // // 只设置需要的属性即可
  3413. // // center: center, // 中心点
  3414. // // zoom: 15.8, // 缩放级别
  3415. // // rotation: undefined, // 缩放完成view视图旋转弧度
  3416. // // duration: 1000, // 缩放持续时间,默认不需要设置
  3417. // // });
  3418. // //自然幢定位开始 ---------start
  3419. // getZrzZjdDmList(this.mapTheGeomZjdId[i].zjddm).then((response) => {
  3420. // if (response.code == 200) {
  3421. // this.mapTheGeomZrzId = response.data;
  3422. // if(this.mapTheGeomZrzId.length >0) {
  3423. // for (var i = 0; this.mapTheGeomZrzId.length > i; i++) {
  3424. // if (this.mapTheGeomZrzId[i] !=null && this.mapTheGeomZrzId[i].theGeom != null && this.mapTheGeomZrzId[i].theGeom != "") {
  3425. // this.mapTheGeomZrzId[i].createBy = 'mapTheGeomZrzId';
  3426. // var styleZrz = "";
  3427. // if(this.mapTheGeomZjdId[i].houseDataConfirmStatus == "CONFIRMED"){
  3428. // styleZrz = new ol.style.Style({
  3429. // fill: new ol.style.Fill({
  3430. // //矢量图层填充颜色,以及透明度
  3431. // color: "#FFD306",
  3432. // }),
  3433. // stroke: new ol.style.Stroke({
  3434. // //边界样式
  3435. // color: "#28FF28",
  3436. // width: 3,
  3437. // }),
  3438. // });
  3439. // } else {
  3440. // styleZrz = new ol.style.Style({
  3441. // fill: new ol.style.Fill({
  3442. // //矢量图层填充颜色,以及透明度
  3443. // color: "#FFD306",
  3444. // }),
  3445. // stroke: new ol.style.Stroke({
  3446. // //边界样式
  3447. // color: "rgba(255, 45, 45,1)",
  3448. // width: 3,
  3449. // }),
  3450. // });
  3451. // }
  3452. // hc_land = new ol.layer.Vector({
  3453. // title: "add Layer",
  3454. // source: new ol.source.Vector({
  3455. // projection: projection,
  3456. // features: new ol.format.GeoJSON().readFeatures("{\n" +
  3457. // " \"type\": \"Feature\",\n" +
  3458. // " \"geometry\":" + this.mapTheGeomZrzId[i].theGeom + ", \"properties\":" + JSON.stringify(this.mapTheGeomZrzId[i]) + "}"),
  3459. // }),
  3460. // style: styleZrz
  3461. // });
  3462. // map.addLayer(hc_land);
  3463. // }
  3464. // }
  3465. // }
  3466. // }
  3467. // });
  3468. // //自然幢定位结束 ---------end
  3469. //
  3470. // //附属设施定位开始 ---------start
  3471. // getFsssZjdDmList(this.mapTheGeomZjdId[i].zjddm).then((response) => {
  3472. // if (response.code == 200) {
  3473. // this.mapTheGeomFsssId = response.data;
  3474. // if(this.mapTheGeomFsssId.length >0) {
  3475. // for (var i = 0; this.mapTheGeomFsssId.length > i; i++) {
  3476. // if (this.mapTheGeomFsssId[i] !=null && this.mapTheGeomFsssId[i].theGeom != null && this.mapTheGeomFsssId[i].theGeom != "") {
  3477. // this.mapTheGeomFsssId[i].createBy = 'mapTheGeomFsssId';
  3478. // var styleFsss = "";
  3479. // if(this.mapTheGeomZjdId[i].houseDataConfirmStatus == "CONFIRMED"){
  3480. // styleFsss = new ol.style.Style({
  3481. // fill: new ol.style.Fill({
  3482. // //矢量图层填充颜色,以及透明度
  3483. // color: "#00FFFF",
  3484. // }),
  3485. // stroke: new ol.style.Stroke({
  3486. // //边界样式
  3487. // color: "#28FF28",
  3488. // width: 3,
  3489. // }),
  3490. // });
  3491. // } else {
  3492. // styleFsss = new ol.style.Style({
  3493. // fill: new ol.style.Fill({
  3494. // //矢量图层填充颜色,以及透明度
  3495. // color: "#00FFFF",
  3496. // }),
  3497. // stroke: new ol.style.Stroke({
  3498. // //边界样式
  3499. // color: "rgba(255, 45, 45,1)",
  3500. // width: 3,
  3501. // }),
  3502. // });
  3503. // }
  3504. // hc_land = new ol.layer.Vector({
  3505. // title: "add Layer",
  3506. // source: new ol.source.Vector({
  3507. // projection: projection,
  3508. // features: new ol.format.GeoJSON().readFeatures("{\n" +
  3509. // " \"type\": \"Feature\",\n" +
  3510. // " \"geometry\":" + this.mapTheGeomFsssId[i].theGeom + ", \"properties\":" + JSON.stringify(this.mapTheGeomFsssId[i]) + "}"),
  3511. // }),
  3512. // style: styleFsss
  3513. // });
  3514. // map.addLayer(hc_land);
  3515. // }
  3516. // }
  3517. // }
  3518. // }
  3519. // });
  3520. // //附属设施定位结束 ---------end
  3521. // }
  3522. // }
  3523. // }
  3524. // //宅基地定位结束 ---------end
  3525. //数据库直接加载数据渲染方式---------------------------------------------------end
  3526. //地图操作定义------------start
  3527. //定位定义------------start
  3528. var Zb;
  3529. var latitude;
  3530. var longitude;
  3531. var vector_drawing;
  3532. //定位定义------------end
  3533. //绘图定义---------------start
  3534. var drawing;
  3535. var draw_map;
  3536. //绘图定义---------------end
  3537. //测面绘图定义------------start
  3538. var draw_cm;
  3539. //定义矢量图层
  3540. var vector;
  3541. //创建一个帮助提示信息对象
  3542. var helpTooltip;
  3543. //创建一个测量提示信息对象
  3544. var measureTooltip;
  3545. //创建一个帮助提示框对象
  3546. var helpTooltipElement;
  3547. //测出距离
  3548. var measureTooltipElement;
  3549. //测面绘图定义-----------end
  3550. //地图操作定义------------end
  3551. //定位当前位置 ------start
  3552. $("#dwMapAll").on("click", function () {
  3553. //删除测量记录操作--------start
  3554. //将矢量图层从图中删除
  3555. //map.removeLayer(helpTooltip);
  3556. map.removeLayer(vector);
  3557. map.removeInteraction(draw_cm);
  3558. //map.removeOverlay(helpTooltipElement);
  3559. //map.removeLayer(measureTooltip);
  3560. //删除测量记录操作--------end
  3561. //删除绘制图层画图操作-------start
  3562. map.removeInteraction(draw_map);
  3563. map.removeLayer(drawing);
  3564. //删除绘制图层画图操作-------end
  3565. //开始定位当前位置
  3566. navigator.geolocation.getCurrentPosition(function(position) {
  3567. latitude = position.coords.latitude;// 获取纬度
  3568. longitude = position.coords.longitude;// 获取经度
  3569. });
  3570. if(latitude !=null && longitude !=null && latitude !="" && longitude !="" && latitude !=undefined && longitude !=undefined ){
  3571. Zb = [longitude,latitude];
  3572. }else {
  3573. Zb =[115.452752, 31.789033];
  3574. }
  3575. //获取坐标点LocationManager
  3576. // geoGps().then(response => {
  3577. //
  3578. // });
  3579. //矢量标注样式设置函数,设置image为图标ol.style.Icon
  3580. function createLabelStyle() {
  3581. return new ol.style.Style({
  3582. image: new ol.style.Icon({
  3583. //设置图标偏移
  3584. anchor: [0.5, 1],
  3585. //标注样式的起点位置
  3586. anchorOrigin: "top-right",
  3587. //X方向单位:分数
  3588. anchorXUnits: "fraction",
  3589. //Y方向单位:像素
  3590. anchorYUnits: "pixels",
  3591. //偏移起点位置的方向
  3592. offsetOrigin: "top-right",
  3593. //透明度
  3594. opacity: 0.9,
  3595. //图片路径
  3596. src: require("../../assets/images/housesteadSurvey/mark.png"),
  3597. }),
  3598. text: new ol.style.Text({
  3599. textAlign: "center", //位置
  3600. textBaseline: "middle", //基准线
  3601. font: "normal 12px 微软雅黑", //文字样式
  3602. //text: "标注点", //文本内容
  3603. fill: new ol.style.Fill({
  3604. //文本填充样式(即文字颜色)
  3605. color: "#ff0000",
  3606. }),
  3607. }),
  3608. zIndex: 9999,
  3609. });
  3610. }
  3611. var newcenterFeature = new ol.Feature({
  3612. geometry: new ol.geom.Point(ol.proj.fromLonLat(Zb)), //几何信息
  3613. name: "标注点",
  3614. });
  3615. var sourceMapLook = new ol.source.Vector({wrapX: false});
  3616. vector_drawing = new ol.layer.Vector({
  3617. source: sourceMapLook,
  3618. });
  3619. map.addLayer(vector_drawing);
  3620. newcenterFeature.setStyle(createLabelStyle()); //设置要素样式
  3621. sourceMapLook.addFeature(newcenterFeature);
  3622. map.getView().animate({
  3623. // 只设置需要的属性即可
  3624. center: ol.proj.fromLonLat(Zb), // 中心点
  3625. zoom: 17.8, // 缩放级别
  3626. rotation: undefined, // 缩放完成view视图旋转弧度
  3627. duration: 1000, // 缩放持续时间,默认不需要设置
  3628. resolution:Math.random() * 0.00000001,
  3629. });
  3630. });
  3631. //定位当前位置 ------end
  3632. //开始绘制图层- -----start
  3633. $("#htMapAll").on("click", function () {
  3634. if(that.drawingClick) {
  3635. that.drawingClick=false;
  3636. //删除之前 测距操作添加map中的绘图 --------start
  3637. //map.removeLayer(helpTooltip);
  3638. map.removeLayer(vector);
  3639. map.removeInteraction(draw_cm);
  3640. //map.removeOverlay(helpTooltipElement);
  3641. map.removeLayer(measureTooltipElement);
  3642. //删除之前 测距操作添加map中的绘图 --------end
  3643. //删除之前画图图层,重新绘制图层
  3644. map.removeInteraction(draw_map);
  3645. map.removeLayer(drawing);
  3646. //var source = new ol.source.Vector({wrapX: false});
  3647. drawing = new ol.layer.Vector({
  3648. source: new ol.source.Vector(),
  3649. });
  3650. map.addLayer(drawing);
  3651. function addInteraction() {
  3652. draw_map = new ol.interaction.Draw({
  3653. source: drawing.getSource(),
  3654. type: "Polygon",
  3655. });
  3656. draw_map.on("drawend", function (evt) {
  3657. var feature = evt.feature;
  3658. var geometry = feature.getGeometry();
  3659. that.coordinate = geometry.getCoordinates();
  3660. //_this.coordinateList = coordinate.toString();
  3661. //提示当前坐标是否绘制完成
  3662. if (that.coordinate != "" && that.coordinate != null) {
  3663. that.showhzht = true;
  3664. that.htZjdZrzFsss = JSON.stringify(that.coordinate);
  3665. console.log(that.mapZjdData);
  3666. // htMapAllFu();
  3667. } else {
  3668. $("#htMapAll").trigger("click");
  3669. }
  3670. });
  3671. map.addInteraction(draw_map);
  3672. }
  3673. function htMapAllFu() {
  3674. //that.drawMapPolygonFun();
  3675. //绘制多边形地图
  3676. that.$dialog
  3677. .confirm({
  3678. title: "提示",
  3679. message: "是否重新绘制画图",
  3680. })
  3681. .then(() => {
  3682. //$("#drawRemove").trigger("click");
  3683. map.removeInteraction(draw_map);
  3684. that.coordinate = "";
  3685. })
  3686. .catch(() => {
  3687. //删除画图点
  3688. map.removeInteraction(draw_map);
  3689. });
  3690. }
  3691. addInteraction();
  3692. } else {
  3693. that.drawingClick=true;
  3694. //删除之前 测距操作添加map中的绘图 --------start
  3695. //map.removeLayer(helpTooltip);
  3696. map.removeLayer(vector);
  3697. map.removeInteraction(draw_cm);
  3698. //map.removeOverlay(helpTooltipElement);
  3699. map.removeLayer(measureTooltipElement);
  3700. //删除之前 测距操作添加map中的绘图 --------end
  3701. //删除之前画图图层,重新绘制图层
  3702. map.removeInteraction(draw_map);
  3703. map.removeLayer(drawing);
  3704. //var source = new ol.source.Vector({wrapX: false});
  3705. }
  3706. });
  3707. //删除之前绘制图层
  3708. $("#deleteHistory").on("click", function () {
  3709. map.removeLayer(drawing);
  3710. that.showhzht = false;
  3711. });
  3712. //开始绘制图层- -----end
  3713. //切换功能删除之前选中状态
  3714. $("#deleteHistoryMap").on("click", function () {
  3715. map.removeLayer(hc_land_on);
  3716. that.mapZjdData = "";
  3717. that.mapZrzData = "";
  3718. that.mapFsssData = "";
  3719. //that.mapZjdTeAll.active ="1";
  3720. that.mapZjdTeAll.mapZjdAData = {};
  3721. that.mapZjdTeAll.mapZrzAData = {};
  3722. that.mapZjdTeAll.mapFsssAData = {};
  3723. that.mapZjdDataTure = "";
  3724. });
  3725. //清除画图鼠标点击事件
  3726. // $("#drawRemove").click(function () {
  3727. // map.removeLayer(drawing);
  3728. // });
  3729. //
  3730. //地图定义
  3731. var delete_map = ["mapZjd", "mapZrz","mapFsss"];
  3732. var hc_land_queryList =[];
  3733. var texiao_layer_zjd;
  3734. var texiao_layer_zrz;
  3735. var texiao_layer_fsss;
  3736. //按照查询条件人名 定位地图-----------------start
  3737. $("#query").on("click", function () {
  3738. //数据库查询数据------------------------------------------------------start
  3739. $("#deleteHistoryMap").trigger("click");
  3740. var val = that.seachText;
  3741. //删除之前查询图层
  3742. for(var i=0;hc_land_queryList.length>i;i++){
  3743. map.removeLayer(hc_land_queryList[i]);
  3744. }
  3745. hc_land_queryList = [];
  3746. that.mapDataAll =[];
  3747. if (val == "") {
  3748. that.$toast('请填写查询条件再查询');
  3749. } else {
  3750. var styleZjd = new ol.style.Style({
  3751. stroke: new ol.style.Stroke({
  3752. //边界样式
  3753. color: "#CCFF66",
  3754. width: 6,
  3755. }),
  3756. });
  3757. let params;
  3758. if(that.mapAddJumpNum == 1){
  3759. params = {
  3760. "deptId" : that.mapAddJump,
  3761. "syqr" : val
  3762. }
  3763. } else {
  3764. params = {
  3765. "deptId" : that.$cookies.get("item").deptId,
  3766. "syqr" : val
  3767. }
  3768. }
  3769. listZjdzd(params).then((response) => {
  3770. if(response.rows.length != 0){
  3771. that.mapDataAll = response.rows;
  3772. for(var hg=0; hg < that.mapDataAll.length; hg++){
  3773. var mapNum = that.mapDataAll[hg].houseDataConfirmStatus;
  3774. if(mapNum == "UNCONFIRMED"){
  3775. that.mapDataAll[hg].paceType = "未核查";
  3776. } else if (mapNum == "CONFIRMED"){
  3777. that.mapDataAll[hg].paceType = "已核查";
  3778. }else{
  3779. }
  3780. that.mapDataAll[hg].typeTc="宅基地";
  3781. if (that.mapDataAll[hg] !=null && that.mapDataAll[hg].theGeom != null && that.mapDataAll[hg].theGeom != "") {
  3782. that.mapDataAll[hg].createBy = 'mapTheGeomZjdId';
  3783. hc_land_queryList[hg] =new ol.layer.Vector({
  3784. title: "add Layer",
  3785. source: new ol.source.Vector({
  3786. projection: projection,
  3787. features: new ol.format.GeoJSON().readFeatures("{\n" +
  3788. " \"type\": \"Feature\",\n" +
  3789. " \"geometry\":" + that.mapDataAll[hg].theGeom + ", \"properties\":" + JSON.stringify(that.mapDataAll[hg]) + "}"),
  3790. }),
  3791. style: styleZjd
  3792. });
  3793. map.addLayer(hc_land_queryList[hg]);
  3794. var maxXMap = hc_land_queryList[hg].values_.source.featuresRtree_.rbush_.data.maxX;
  3795. var maxYMap = hc_land_queryList[hg].values_.source.featuresRtree_.rbush_.data.maxY;
  3796. var minXMap = hc_land_queryList[hg].values_.source.featuresRtree_.rbush_.data.minX;
  3797. var minYMap = hc_land_queryList[hg].values_.source.featuresRtree_.rbush_.data.minY;
  3798. //定位查询位置
  3799. var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  3800. map.getView().animate({
  3801. // 只设置需要的属性即可
  3802. center: center, // 中心点
  3803. zoom: 15.8, // 缩放级别
  3804. rotation: undefined, // 缩放完成view视图旋转弧度
  3805. duration: 1000, // 缩放持续时间,默认不需要设置
  3806. resolution:Math.random() * 0.00000001,
  3807. });
  3808. }
  3809. // listFsss(paramsZrz).then((response) => {
  3810. // that.mapDataAll.push(response.rows);
  3811. // });
  3812. }
  3813. // for(var queryFor=0; hc_land_queryList > queryFor; queryFor++ ){
  3814. // map.addLayer(hc_land_queryList[queryFor]);
  3815. // }
  3816. // var mapZrzFor = that.mapDataAll[0].length+1;
  3817. // console.log(mapZrzFor);
  3818. // for(var mapFor=0;mapZrzFor>mapFor;mapFor++){
  3819. // //查询自然幢
  3820. // let paramsZrz = {
  3821. // "deptId" : that.$cookies.get("item").deptId,
  3822. // "zjddm" : that.mapDataAll[0][mapFor].zjddm,
  3823. // "pageSize":20,
  3824. // }
  3825. // listZrz(paramsZrz).then((response) => {
  3826. // console.log(response);
  3827. // that.mapDataAll[0].
  3828. // that.mapDataAll[0].push(response.rows);
  3829. // });
  3830. // }
  3831. setTimeout(function () {
  3832. that.showSearch = true ;
  3833. $('.searchBox').css('display','block')
  3834. var height = $(".searchBar_wrap").outerHeight(true) - $(".searchBar_wrap .van-search").outerHeight(true)
  3835. document.styleSheets[0].insertRule(
  3836. "@keyframes test" +
  3837. "{" +
  3838. "0%{bottom: -" + height + "px;}" +
  3839. "100%{bottom: 0px;}" +
  3840. "}"
  3841. )
  3842. $('.searchBar_wrap').css({'animation':'test 0.5s ease-in-out 0s 1 alternate forwards','-webkit-animation':'test 0.5s ease-in-out 0s 1 alternate forwards'});
  3843. //}
  3844. },500);
  3845. } else {
  3846. that.$toast("暂无数据")
  3847. }
  3848. });
  3849. }
  3850. //数据库查询数据------------------------------------------------------end
  3851. //地图查询------------------------------------------------------------start
  3852. /**
  3853. * @api wfs服务空间查询
  3854. * @param {*} wfsurl
  3855. * @param {*} srsName
  3856. * @param {*} typeName
  3857. * @param {*} drawType
  3858. * @param {option 可选} geometryField
  3859. */
  3860. // var val = that.seachText;
  3861. // if (val == "") {
  3862. // that.$toast('请填写查询条件再查询');
  3863. // } else {
  3864. // //清除之前查询数据
  3865. // that.mapDataAll =[];
  3866. // //分类查询查询农地、农房
  3867. // var difang;
  3868. // //查询条件
  3869. // var cql_filter_cun;
  3870. // var cun = that.$cookies.get("item").deptId;
  3871. // difang = ["zjd_dc:t_house_survey_zjdzd", "zjd_dc:t_house_survey_zrz","zjd_dc:t_house_survey_fsss"];
  3872. // var tach = 0;
  3873. // var once = 0;
  3874. // for (var i = 0; i < difang.length; i++) {
  3875. // map.removeLayer(delete_map[i]);
  3876. // // 数字验证!
  3877. // var reg = /\d/;
  3878. // //验证汉子
  3879. // //var han = /^[\u4e00-\u9fa5]+$/;
  3880. // if (reg.test(val)) {
  3881. // //循环判断查询条件
  3882. // cql_filter_cun = "zjddm='" + val + "'" + "and dept_id='" + cun + "'";
  3883. // } else {
  3884. // //循环判断查询条件
  3885. // if (difang[i] == "zjd_dc:t_house_survey_zjdzd") {
  3886. // cql_filter_cun = "zjddm='" + val + "'" + "and dept_id='" + cun + "'";
  3887. // } else if(difang[i] == "zjd_dc:t_house_survey_zrz") {
  3888. // cql_filter_cun = "zjddm='" + val + "'" + "and dept_id='" + cun + "'";
  3889. // } else if(difang[i] == "zjd_dc:t_house_survey_fsss") {
  3890. // cql_filter_cun = "zjddm='" + val + "'" + "and dept_id='" + cun + "'";
  3891. // }
  3892. // }
  3893. // //for(var i=0; i< difang.length; i++){
  3894. // //cql_filter = "CM='"+cun +"'"+ "and XZQK='待流转待盘活'";
  3895. //
  3896. // //图层加载
  3897. //
  3898. // //业务图层 wms服务
  3899. // delete_map[i] = new ol.layer.Tile({
  3900. // source: new ol.source.TileWMS({
  3901. // url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms",
  3902. // params: {
  3903. // LAYERS: difang[i],
  3904. // //'LAYERS': 'new_shp:new_shp_all',
  3905. // TILED: true,
  3906. // cql_filter: cql_filter_cun,
  3907. // SRID: 3857,
  3908. // },
  3909. // }),
  3910. // });
  3911. //
  3912. // //}
  3913. // //定位查询位置
  3914. // let param_dw = {
  3915. // srsName: "EPSG:3857",
  3916. // service: "WFS",
  3917. // version: "1.0.0",
  3918. // request: "GetFeature",
  3919. // typename: difang[i],
  3920. // //featureNS: 'nsgk_hc',//命名空间 URI
  3921. // cql_filter: cql_filter_cun,
  3922. // //featurePrefix: 'nationalwater',//工作区名称
  3923. // //featureTypes: ['nationalwater:01fir'],//查询图层,可以是同一个工作区下多个图层,逗号隔开
  3924. // outputFormat: "application/json",
  3925. // //filter: ol.format.filter.equalTo(t,e,r)//前者是属性名,后者是对应值
  3926. // };
  3927. // let url_dw = that.mapGeoServerUrl+"/geoserver/zjd_dc/wfs"; //wfsurl;
  3928. // url_dw = url_dw + "?";
  3929. // for (let key in param_dw) {
  3930. // url_dw = url_dw + key + "=" + param_dw[key] + "&";
  3931. // }
  3932. // url_dw = url_dw.substr(0, url_dw.length - 1);
  3933. // fetch(url_dw, {
  3934. // method: "POST", // *GET, POST, PUT, DELETE, etc.
  3935. // })
  3936. // .then((res) => {
  3937. // var geojsonmap = res.json();
  3938. // return geojsonmap;
  3939. // })
  3940. // .then((data) => {
  3941. // tach = tach + 1;
  3942. // if (data.features != null && data.features != "") {
  3943. // for(var i=0; data.features.length >i; i++) {
  3944. // //特效动画实现 -----------------------------start
  3945. // console.log(tach,"++++++++++++++++++",once)
  3946. // var datamap = data.features[0].bbox;
  3947. // if (tach == 1 && once == 0) {
  3948. // console.log("zrz")
  3949. // texiao_layer_zjd = new ol.layer.Vector({
  3950. // source: new ol.source.Vector(),
  3951. // });
  3952. // map.addLayer(texiao_layer_zjd);
  3953. // var center = ol.extent.getCenter(datamap); //获取边界区域的中心位置
  3954. // var circle = new ol.Feature({
  3955. // geometry: new ol.geom.Point(center), //ol.proj.transform([104, 30], 'EPSG:4326', 'EPSG:3857') //投影坐标转为地理坐标
  3956. // });
  3957. //
  3958. // circle.setStyle(
  3959. // new ol.style.Style({
  3960. // image: new ol.style.Circle({
  3961. // radius: 0,
  3962. // stroke: new ol.style.Stroke({
  3963. // color: "yellow",
  3964. // size: 1,
  3965. // }),
  3966. // }),
  3967. // })
  3968. // );
  3969. // texiao_layer_zjd.getSource().addFeature(circle);
  3970. //
  3971. // // 关键的地方在此:监听postcompose事件,在里面重新设置circle的样式
  3972. // var radius = 0;
  3973. // map.on("postcompose", function () {
  3974. // // 增大半径,最大20
  3975. // radius++;
  3976. // radius = radius % 10;
  3977. // // 设置样式
  3978. // circle.setStyle(
  3979. // new ol.style.Style({
  3980. // image: new ol.style.Circle({
  3981. // radius: radius,
  3982. // stroke: new ol.style.Stroke({
  3983. // color: "yellow",
  3984. // size: 1,
  3985. // }),
  3986. // }),
  3987. // })
  3988. // );
  3989. // });
  3990. // } else if(tach == 2) {
  3991. // console.log("zrz")
  3992. // texiao_layer_zrz = new ol.layer.Vector({
  3993. // source: new ol.source.Vector(),
  3994. // });
  3995. // map.addLayer(texiao_layer_zrz);
  3996. // var center = ol.extent.getCenter(datamap); //获取边界区域的中心位置
  3997. // var circle = new ol.Feature({
  3998. // geometry: new ol.geom.Point(center), //ol.proj.transform([104, 30], 'EPSG:4326', 'EPSG:3857') //投影坐标转为地理坐标
  3999. // });
  4000. //
  4001. // circle.setStyle(
  4002. // new ol.style.Style({
  4003. // image: new ol.style.Circle({
  4004. // radius: 0,
  4005. // stroke: new ol.style.Stroke({
  4006. // color: "yellow",
  4007. // size: 1,
  4008. // }),
  4009. // }),
  4010. // })
  4011. // );
  4012. // texiao_layer_zrz.getSource().addFeature(circle);
  4013. //
  4014. // // 关键的地方在此:监听postcompose事件,在里面重新设置circle的样式
  4015. // var radius = 0;
  4016. // map.on("postcompose", function () {
  4017. // // 增大半径,最大20
  4018. // radius++;
  4019. // radius = radius % 10;
  4020. // // 设置样式
  4021. // circle.setStyle(
  4022. // new ol.style.Style({
  4023. // image: new ol.style.Circle({
  4024. // radius: radius,
  4025. // stroke: new ol.style.Stroke({
  4026. // color: "yellow",
  4027. // size: 1,
  4028. // }),
  4029. // }),
  4030. // })
  4031. // );
  4032. // });
  4033. // } else {
  4034. // console.log("fsss")
  4035. // texiao_layer_fsss = new ol.layer.Vector({
  4036. // source: new ol.source.Vector(),
  4037. // });
  4038. // map.addLayer(texiao_layer_fsss);
  4039. // var center = ol.extent.getCenter(datamap); //获取边界区域的中心位置
  4040. // var circle = new ol.Feature({
  4041. // geometry: new ol.geom.Point(center), //ol.proj.transform([104, 30], 'EPSG:4326', 'EPSG:3857') //投影坐标转为地理坐标
  4042. // });
  4043. //
  4044. // circle.setStyle(
  4045. // new ol.style.Style({
  4046. // image: new ol.style.Circle({
  4047. // radius: 0,
  4048. // stroke: new ol.style.Stroke({
  4049. // color: "yellow",
  4050. // size: 1,
  4051. // }),
  4052. // }),
  4053. // })
  4054. // );
  4055. // texiao_layer_fsss.getSource().addFeature(circle);
  4056. //
  4057. // // 关键的地方在此:监听postcompose事件,在里面重新设置circle的样式
  4058. // var radius = 0;
  4059. // map.on("postcompose", function () {
  4060. // // 增大半径,最大20
  4061. // radius++;
  4062. // radius = radius % 10;
  4063. // // 设置样式
  4064. // circle.setStyle(
  4065. // new ol.style.Style({
  4066. // image: new ol.style.Circle({
  4067. // radius: radius,
  4068. // stroke: new ol.style.Stroke({
  4069. // color: "yellow",
  4070. // size: 1,
  4071. // }),
  4072. // }),
  4073. // })
  4074. // );
  4075. // });
  4076. // }
  4077. // //特效动画实现 -----------------------------end
  4078. // that.mapDataAll.push(JSON.parse(JSON.stringify(data.features[i].properties)));
  4079. // }
  4080. // //定位实现
  4081. // let resolution = map.getView().getResolutionForExtent(data.bbox, map.getSize());
  4082. // map.getView().fit(data.bbox);
  4083. // map.getView().setResolution(resolution);
  4084. // console.log(that.mapDataAll);
  4085. // } else if (tach == 1) {
  4086. // once = once + 1;
  4087. // } else {
  4088. // if (once == 1 && tach == 3) {
  4089. // that.$toast("没有找到相关人员信息");
  4090. // //that.showSearch = false ;
  4091. // }else {
  4092. //
  4093. // }
  4094. // }
  4095. // })
  4096. // .catch((error) => {
  4097. // console.log("【异常】", error);
  4098. // });
  4099. // map.addLayer(delete_map[i]);
  4100. // }
  4101. //地图查询------------------------------------------------------------end
  4102. });
  4103. //按照查询 定位地图-----------------end
  4104. //筛选附属设施-----------------------------------start
  4105. $("#fsssSx").click(function () {
  4106. if(!that.fsssSx){
  4107. map.addLayer(fsssTc);
  4108. }else {
  4109. map.removeLayer(fsssTc);
  4110. }
  4111. });
  4112. $("#zrzSx").click(function () {
  4113. if(!that.zrzSx){
  4114. map.addLayer(zrzTc);
  4115. }else {
  4116. map.removeLayer(zrzTc);
  4117. }
  4118. });
  4119. $("#zjdSx").click(function () {
  4120. if(!that.zjdSx){
  4121. map.addLayer(zjdTc);
  4122. }else {
  4123. map.removeLayer(zjdTc);
  4124. }
  4125. });
  4126. $("#checkAll").click(function () {
  4127. if(!that.fsssSx && !that.zjdSx && !that.zrzSx){
  4128. map.addLayer(zjdTc);
  4129. map.addLayer(zrzTc);
  4130. map.addLayer(fsssTc);
  4131. }else {
  4132. map.removeLayer(zrzTc);
  4133. map.removeLayer(zjdTc);
  4134. map.removeLayer(fsssTc);
  4135. }
  4136. });
  4137. //筛选附属设施-----------------------------------end
  4138. // //获取类型开始 侧面-----------------------------------------------------------------start
  4139. //样式加载定义
  4140. var vector_drawing_delete;
  4141. $("#area").click(function () {
  4142. console.log(that.textMjAll);
  4143. console.log(that.clickBbox);
  4144. if(that.textMjAll ==null || that.textMjAll ==""){
  4145. that.textMjAll =0;
  4146. }
  4147. if((that.textMjAll != "" && that.clickBbox !="") || (that.textMjAll == 0 && that.clickBbox !="")){
  4148. map.removeLayer(vector_drawing_delete);
  4149. function createLabelStyle() {
  4150. return new ol.style.Style({
  4151. text: new ol.style.Text({
  4152. text: that.textMjAll+"㎡",
  4153. textAlign: "center", //位置
  4154. textBaseline: "middle", //基准线
  4155. font: "normal 12px 微软雅黑", //文字样式
  4156. //text: "标注点", //文本内容
  4157. fill: new ol.style.Fill({
  4158. //文本填充样式(即文字颜色)
  4159. color: "#FFFFFF",
  4160. width: 10,
  4161. }),
  4162. overflow: false //超出面的部分不显示
  4163. }),
  4164. zIndex: 9999,
  4165. });
  4166. }
  4167. var newcenterFeature = new ol.Feature({
  4168. geometry: new ol.geom.Point(that.clickBbox), //几何信息
  4169. //name: "标注点",
  4170. });
  4171. var sourceMapLook = new ol.source.Vector({wrapX: false});
  4172. vector_drawing_delete = new ol.layer.Vector({
  4173. source: sourceMapLook,
  4174. });
  4175. map.addLayer(vector_drawing_delete);
  4176. newcenterFeature.setStyle(createLabelStyle()); //设置要素样式
  4177. sourceMapLook.addFeature(newcenterFeature);
  4178. //map.addLayer(styleFsss);
  4179. } else if(that.textMjAllNum == "1"){
  4180. that.$toast("该图层面积暂无信息");
  4181. } else {
  4182. that.$toast("选择图层进行面积显示");
  4183. }
  4184. });
  4185. // $("#area").click(function () {
  4186. // console.log("进入测面")
  4187. // //删除绘制图层画图操作-------start
  4188. // map.removeInteraction(draw_map);
  4189. // map.removeLayer(drawing);
  4190. // //删除绘制图层画图操作-------end
  4191. // //开始绘制 测面--------------------------------------------------------------start
  4192. // //定义矢量数据源
  4193. // var source = new ol.source.Vector();
  4194. //
  4195. // vector = new ol.layer.Vector({
  4196. // source: source,
  4197. // style: new ol.style.Style({
  4198. // fill: new ol.style.Fill({
  4199. // color: "rgba(255,255,255,0.2)",
  4200. // }),
  4201. // stroke: new ol.style.Stroke({
  4202. // color: "#e21e0a",
  4203. // width: 2,
  4204. // }),
  4205. // //image: new ol.style.Circle({
  4206. // // radius: 7,
  4207. // // fill: new ol.style.Fill({
  4208. // // color:'#ffcc33'
  4209. // // })
  4210. // //})
  4211. // }),
  4212. // });
  4213. //
  4214. // //将矢量图层添加到地图中 线的颜色加入map中
  4215. // map.addLayer(vector);
  4216. //
  4217. // var sketch;
  4218. //
  4219. // var continuePolygonMsg = "单击以继续绘制多边形";
  4220. //
  4221. // /**
  4222. // * Message to show when the user is drawing a line.
  4223. // * @type {string}
  4224. // */
  4225. // //var continueLineMsg = '单击继续绘制直线';
  4226. //
  4227. // //鼠标移动触发的函数
  4228. // var pointerMoveHandler = function (evt) {
  4229. // //Indicates if the map is currently being dragged.
  4230. // //Only set for POINTERDRAG and POINTERMOVE events. Default is false.
  4231. // //如果是平移地图则直接结束
  4232. // if (evt.dragging) {
  4233. // return;
  4234. // }
  4235. // //帮助提示信息
  4236. // var helpMsg = "单击开始绘图";
  4237. //
  4238. // if (sketch) {
  4239. // //Get the feature's default geometry.
  4240. // //A feature may have any number of named geometries.
  4241. // //获取绘图对象的几何要素
  4242. // var geom = sketch.getGeometry();
  4243. // //如果当前绘制的几何要素是多边形,则将绘制提示信息设置为多边形绘制提示信息
  4244. // //如果当前绘制的几何要素是多线段,则将绘制提示信息设置为多线段绘制提示信息
  4245. // helpMsg = continuePolygonMsg;
  4246. // }
  4247. // //设置帮助提示要素的内标签为帮助提示信息
  4248. // helpTooltipElement.innerHTML = helpMsg;
  4249. // //设置帮助提示信息的位置
  4250. // //The coordinate in view projection corresponding to the original browser event.
  4251. // helpTooltip.setPosition(evt.coordinate);
  4252. // //移除帮助提示要素的隐藏样式
  4253. // $(helpTooltipElement).removeClass("hidden");
  4254. // };
  4255. //
  4256. // map.on("pointermove", pointerMoveHandler);
  4257. //
  4258. // map.getViewport().addEventListener("mouseout", function () {
  4259. // helpTooltipElement.classList.add("hidden");
  4260. // });
  4261. //
  4262. // //添加交互式绘图对象的函数
  4263. // function addInteraction() {
  4264. // // 获取当前选择的绘制类型
  4265. // //var type = typeSelect.value == 'length' ? 'Polygon' : 'LineString';
  4266. // //创建一个交互式绘图对象
  4267. // var type = "Polygon";
  4268. // draw_cm = new ol.interaction.Draw({
  4269. // //绘制的数据源
  4270. // source: source,
  4271. // //绘制类型
  4272. // type: type,
  4273. // //样式
  4274. // style: new ol.style.Style({
  4275. // fill: new ol.style.Fill({
  4276. // color: "rgba(255,255,255,0.2)",
  4277. // }),
  4278. // stroke: new ol.style.Stroke({
  4279. // color: "rgba(0,0,0,0.5)",
  4280. // lineDash: [10, 10],
  4281. // width: 2,
  4282. // }),
  4283. // // image: new ol.style.Circle({
  4284. // // radius: 5,
  4285. // // stroke: new ol.style.Stroke({
  4286. // // color:'rgba(0,0,0,0.7)'
  4287. // // }),
  4288. // // fill: new ol.style.Fill({
  4289. // //color: 'rgba(255,255,255,0.2)'
  4290. // // })
  4291. // //})
  4292. // }),
  4293. // });
  4294. // //将交互绘图对象添加到地图中
  4295. // map.addInteraction(draw_cm);
  4296. //
  4297. // //创建测量提示框
  4298. // createMeasureTooltip();
  4299. // //创建帮助提示框
  4300. // createHelpTooltip();
  4301. //
  4302. // //定义一个事件监听
  4303. // var listener;
  4304. // //定义一个控制鼠标点击次数的变量
  4305. // var count = 0;
  4306. // //绘制开始事件
  4307. // draw_cm.on(
  4308. // "drawstart",
  4309. // function (evt) {
  4310. // //The feature being drawn.
  4311. // sketch = evt.feature;
  4312. // //提示框的坐标
  4313. // var tooltipCoord = evt.coordinate;
  4314. // //监听几何要素的change事件
  4315. // //Increases the revision counter and dispatches a 'change' event.
  4316. //
  4317. // listener = sketch.getGeometry().on("change", function (evt) {
  4318. // //The event target.
  4319. // //获取绘制的几何对象
  4320. // var geom = evt.target;
  4321. // //定义一个输出对象,用于记录面积和长度
  4322. // var output;
  4323. // map.removeEventListener("singleclick");
  4324. // map.removeEventListener("dblclick");
  4325. // //输出多边形的面积
  4326. // output = formatArea(geom);
  4327. // //Return an interior point of the polygon.
  4328. // //获取多变形内部点的坐标
  4329. // tooltipCoord = geom.getInteriorPoint().getCoordinates();
  4330. //
  4331. // //设置测量提示框的内标签为最终输出结果
  4332. // measureTooltipElement.innerHTML = output;
  4333. // //设置测量提示信息的位置坐标
  4334. // measureTooltip.setPosition(tooltipCoord);
  4335. // });
  4336. //
  4337. // //地图单击事件
  4338. // map.on("singleclick", function (evt) {
  4339. // //设置测量提示信息的位置坐标,用来确定鼠标点击后测量提示框的位置
  4340. // measureTooltip.setPosition(evt.coordinate);
  4341. // //如果是第一次点击,则设置测量提示框的文本内容为起点
  4342. // if (count == 0) {
  4343. // measureTooltipElement.innerHTML = "起点";
  4344. // }
  4345. // //根据鼠标点击位置生成一个点
  4346. // var point = new ol.geom.Point(evt.coordinate);
  4347. // //将该点要素添加到矢量数据源中
  4348. // source.addFeature(new ol.Feature(point));
  4349. // //更改测量提示框的样式,使测量提示框可见
  4350. // measureTooltipElement.className = "tooltip tooltip-static";
  4351. // //创建测量提示框
  4352. // createMeasureTooltip();
  4353. // //点击次数增加
  4354. // count++;
  4355. // });
  4356. //
  4357. // //地图双击事件
  4358. // map.on("dblclick", function (evt) {
  4359. // //根据
  4360. // var point = new ol.geom.Point(evt.coordinate);
  4361. // source.addFeature(new ol.Feature(point));
  4362. // });
  4363. // },
  4364. // this
  4365. // );
  4366. // //绘制结束事件
  4367. // draw_cm.on(
  4368. // "drawend",
  4369. // function (evt) {
  4370. // count = 0;
  4371. // //设置测量提示框的样式
  4372. // measureTooltipElement.className = "tooltip tooltip-static";
  4373. // //Set the offset for this overlay.
  4374. // //设置偏移量
  4375. // measureTooltip.setOffset([0, -7]);
  4376. // //清空绘制要素
  4377. // sketch = null;
  4378. // //清空测量提示要素
  4379. // measureTooltipElement = null;
  4380. // //创建测量提示框
  4381. // createMeasureTooltip();
  4382. // //Removes an event listener using the key returned by on() or once().
  4383. // //移除事件监听
  4384. // ol.Observable.unByKey(listener);
  4385. // //移除地图单击事件
  4386. // map.removeEventListener("singleclick");
  4387. // },
  4388. // this
  4389. // );
  4390. // }
  4391. // /**
  4392. // * Creates a new help tooltip
  4393. // */
  4394. // function createHelpTooltip() {
  4395. // if (helpTooltipElement) {
  4396. // helpTooltipElement.parentNode.removeChild(helpTooltipElement);
  4397. // }
  4398. // helpTooltipElement = document.createElement("div");
  4399. // helpTooltipElement.className = "ol-tooltip hidden";
  4400. // helpTooltip = new ol.Overlay({
  4401. // element: helpTooltipElement,
  4402. // offset: [15, 0],
  4403. // positioning: "center-left",
  4404. // });
  4405. // map.addOverlay(helpTooltip);
  4406. // }
  4407. //
  4408. // /**
  4409. // * Creates a new measure tooltip
  4410. // */
  4411. // function createMeasureTooltip() {
  4412. // if (measureTooltipElement) {
  4413. // measureTooltipElement.parentNode.removeChild(measureTooltipElement);
  4414. // }
  4415. // measureTooltipElement = document.createElement("div");
  4416. // measureTooltipElement.className = "ol-tooltip ol-tooltip-measure";
  4417. // measureTooltip = new ol.Overlay({
  4418. // element: measureTooltipElement,
  4419. // offset: [0, -15],
  4420. // positioning: "bottom-center",
  4421. // });
  4422. // map.addOverlay(measureTooltip);
  4423. // }
  4424. //
  4425. // //格式化测量面积
  4426. // var formatArea = function (polygon) {
  4427. // //定义面积变量
  4428. // var area;
  4429. // //获取平面面积
  4430. // area = polygon.getArea();
  4431. // //定义输出变量
  4432. // var output;
  4433. // //当面积大于10000时,转换为平方千米,否则为平方米
  4434. // if (area > 10000) {
  4435. // output =
  4436. // Math.round((area / 1000000) * 100) / 100 + " " + "km<sup>2</sup>";
  4437. // } else {
  4438. // output = Math.round(area * 100) / 100 + " " + "m<sup>2</sup>";
  4439. // }
  4440. // return output;
  4441. // };
  4442. //
  4443. // addInteraction();
  4444. // });
  4445. // //侧面结束-----------------------------------------------------------------end
  4446. //全图展示-----------------start
  4447. $("#mapAllQt").click(function (){
  4448. //定位查询位置
  4449. let param_dw = {
  4450. srsName: "EPSG:3857",
  4451. service: "WFS",
  4452. version: "1.0.0",
  4453. request: "GetFeature",
  4454. typename: "zjd_dc:t_house_survey_border_village",
  4455. //featureNS: 'nsgk_hc',//命名空间 URI
  4456. cql_filter: cql_filter,
  4457. //featurePrefix: 'nationalwater',//工作区名称
  4458. //featureTypes: ['nationalwater:01fir'],//查询图层,可以是同一个工作区下多个图层,逗号隔开
  4459. outputFormat: "application/json",
  4460. //filter: ol.format.filter.equalTo(t,e,r)//前者是属性名,后者是对应值
  4461. };
  4462. let url_dw = that.mapGeoServerUrl+"/geoserver/zjd_dc/wfs"; //wfsurl;
  4463. url_dw = url_dw + "?";
  4464. for (let key in param_dw) {
  4465. url_dw = url_dw + key + "=" + param_dw[key] + "&";
  4466. }
  4467. url_dw = url_dw.substr(0, url_dw.length - 1);
  4468. fetch(url_dw, {
  4469. method: "POST", // *GET, POST, PUT, DELETE, etc.
  4470. })
  4471. .then((res) => {
  4472. var geojsonmap = res.json();
  4473. return geojsonmap;
  4474. })
  4475. .then((data) => {
  4476. let resolution = map.getView().getResolutionForExtent(data.bbox,map.getSize());
  4477. resolution:resolution + Math.random() * 0.00000001,
  4478. map.getView().fit(data.bbox);
  4479. map.getView().setResolution(resolution);
  4480. // var datamap = data.bbox;
  4481. // var center = ol.extent.getCenter(datamap);
  4482. // map.getView().animate({
  4483. // // 只设置需要的属性即可
  4484. // center: center, // 中心点
  4485. // rotation: undefined, // 缩放完成view视图旋转弧度
  4486. // });
  4487. })
  4488. .catch((error) => {
  4489. console.log("【异常】", error);
  4490. });
  4491. });
  4492. //业务图层 wfs服务 属性查询开始 ------------------start
  4493. /**
  4494. * @api wfs服务空间查询
  4495. * @param {*} wfsurl
  4496. * @param {*} srsName
  4497. * @param {*} typeName
  4498. * @param {*} drawType
  4499. * @param {option 可选} geometryField
  4500. */
  4501. //查询全部图层 -------查询叠加图层出现覆盖问题
  4502. var wmsSource = new ol.source.TileWMS({
  4503. url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms",
  4504. params: {
  4505. LAYERS: "zjd_dc:t_house_survey_all",
  4506. TILED: true,
  4507. SRID: 3857,
  4508. serverType: "geoserver",
  4509. crossOrigin: "anonymous",
  4510. },
  4511. resolution:Math.random() * 0.00000001,
  4512. });
  4513. //查询宅基地图层
  4514. var ZjdwmsSource = new ol.source.TileWMS({
  4515. url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms",
  4516. params: {
  4517. LAYERS: "zjd_dc:t_house_survey_zjdzd",
  4518. TILED: true,
  4519. SRID: 3857,
  4520. serverType: "geoserver",
  4521. crossOrigin: "anonymous",
  4522. },
  4523. resolution:Math.random() * 0.00000001,
  4524. });
  4525. //查询自然幢图层
  4526. var ZrzwmsSource = new ol.source.TileWMS({
  4527. url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms",
  4528. params: {
  4529. LAYERS: "zjd_dc:t_house_survey_zrz",
  4530. TILED: true,
  4531. SRID: 3857,
  4532. serverType: "geoserver",
  4533. crossOrigin: "anonymous",
  4534. },
  4535. resolution:Math.random() * 0.00000001,
  4536. });
  4537. //查询附属设施图层
  4538. var FssswmsSource = new ol.source.TileWMS({
  4539. url: that.mapGeoServerUrl+"/geoserver/zjd_dc/wms",
  4540. params: {
  4541. LAYERS: "zjd_dc:t_house_survey_fsss",
  4542. TILED: true,
  4543. SRID: 3857,
  4544. serverType: "geoserver",
  4545. crossOrigin: "anonymous",
  4546. },
  4547. resolution:Math.random() * 0.00000001,
  4548. });
  4549. map.on("pointermove", function (evt) {
  4550. if (evt.dragging) {
  4551. return;
  4552. }
  4553. var pixel = map.getEventPixel(evt.originalEvent);
  4554. var hit = map.forEachLayerAtPixel(pixel, function () {
  4555. return true;
  4556. });
  4557. map.getTargetElement().style.cursor = hit ? "pointer" : "";
  4558. });
  4559. //属性查询结束 ------------------end
  4560. //点击查询详细信息
  4561. map.on("singleclick", function (evt) {
  4562. console.log(evt);
  4563. let feature = map.forEachFeatureAtPixel(
  4564. evt.pixel,
  4565. (feature) => feature
  4566. );
  4567. var viewResolution = map.getView().getResolution(); ///** @type {number} */ (view.getResolution());
  4568. var zb = evt.coordinate;
  4569. var url;
  4570. var url_bbox;
  4571. that.clickBbox ="";
  4572. that.textMjAll = "";
  4573. if(that.drawingClick) {
  4574. //点击空白删除之前图层
  4575. map.removeLayer(hc_land_on);
  4576. //map.removeLayer(hc_land_query);
  4577. //for(var i=0;hc_land_query>i;i++){
  4578. //map.removeLayer(hc_land_query);
  4579. for(var i=0;hc_land_queryList.length>i;i++){
  4580. map.removeLayer(hc_land_queryList[i]);
  4581. }
  4582. //}c
  4583. if (that.fsssSx && that.zjdSx && that.zrzSx) {
  4584. url = wmsSource.getFeatureInfoUrl(
  4585. evt.coordinate,
  4586. viewResolution,
  4587. "EPSG:3857",
  4588. {INFO_FORMAT: "text/html"}
  4589. );
  4590. url_bbox = wmsSource.getFeatureInfoUrl(
  4591. evt.coordinate,
  4592. viewResolution,
  4593. "EPSG:3857",
  4594. {INFO_FORMAT: "application/json"}
  4595. );
  4596. } else {
  4597. if (that.zjdSx) {
  4598. url = ZjdwmsSource.getFeatureInfoUrl(
  4599. evt.coordinate,
  4600. viewResolution,
  4601. "EPSG:3857",
  4602. {INFO_FORMAT: "text/html"}
  4603. );
  4604. url_bbox = ZjdwmsSource.getFeatureInfoUrl(
  4605. evt.coordinate,
  4606. viewResolution,
  4607. "EPSG:3857",
  4608. {INFO_FORMAT: "application/json"}
  4609. );
  4610. } else if (that.fsssSx) {
  4611. url = FssswmsSource.getFeatureInfoUrl(
  4612. evt.coordinate,
  4613. viewResolution,
  4614. "EPSG:3857",
  4615. {INFO_FORMAT: "text/html"}
  4616. );
  4617. url_bbox = FssswmsSource.getFeatureInfoUrl(
  4618. evt.coordinate,
  4619. viewResolution,
  4620. "EPSG:3857",
  4621. {INFO_FORMAT: "application/json"}
  4622. );
  4623. } else if (that.zrzSx) {
  4624. url = ZrzwmsSource.getFeatureInfoUrl(
  4625. evt.coordinate,
  4626. viewResolution,
  4627. "EPSG:3857",
  4628. {INFO_FORMAT: "text/html"}
  4629. );
  4630. url_bbox = ZrzwmsSource.getFeatureInfoUrl(
  4631. evt.coordinate,
  4632. viewResolution,
  4633. "EPSG:3857",
  4634. {INFO_FORMAT: "application/json"}
  4635. );
  4636. } else {
  4637. url = wmsSource.getFeatureInfoUrl(
  4638. evt.coordinate,
  4639. viewResolution,
  4640. "EPSG:3857",
  4641. {INFO_FORMAT: "text/html"}
  4642. );
  4643. url_bbox = wmsSource.getFeatureInfoUrl(
  4644. evt.coordinate,
  4645. viewResolution,
  4646. "EPSG:3857",
  4647. {INFO_FORMAT: "application/json"}
  4648. );
  4649. }
  4650. }
  4651. if (url_bbox) {
  4652. fetch(url_bbox).then((res) => {
  4653. var geojsonmap = res.json();
  4654. return geojsonmap;
  4655. })
  4656. .then((data) => {
  4657. var center = ol.extent.getCenter(data.bbox); //获取边界区域的中心位置
  4658. center = [center[0], center[1] - 16];
  4659. that.clickBbox = center;
  4660. })
  4661. .catch((error) => {
  4662. that.mapZjdData = "";
  4663. that.mapZrzData = "";
  4664. that.mapFsssData = "";
  4665. //that.mapZjdTeAll.active ="1";
  4666. that.mapZjdTeAll.mapZjdAData = {};
  4667. that.mapZjdTeAll.mapZrzAData = {};
  4668. that.mapZjdTeAll.mapFsssAData = {};
  4669. that.mapZjdDataTure = "";
  4670. console.log("【异常】", error);
  4671. });
  4672. }
  4673. if (url) {
  4674. fetch(url)
  4675. .then(function (response) {
  4676. return response.text();
  4677. })
  4678. .then(function (html) {
  4679. document.getElementById("info").innerHTML = html;
  4680. if (html.indexOf("<table") != -1) {
  4681. that.mapZjdData = "";
  4682. that.mapZrzData = "";
  4683. that.mapFsssData = "";
  4684. //that.mapZjdTeAll.active ="1";
  4685. that.mapZjdTeAll.mapZjdAData = {};
  4686. that.mapZjdTeAll.mapZrzAData = {};
  4687. that.mapZjdTeAll.mapFsssAData = {};
  4688. that.mapZjdDataTure = "";
  4689. setTimeout(() => {
  4690. if ($("#info .featureInfo .featureInfo").text() == "t_house_survey_zjdzd") {
  4691. map.removeLayer(hc_land_on);
  4692. that.mapHasDateStatus = 2;
  4693. let obj = {};
  4694. let trs = $("#info .featureInfo").find("tr:eq(1)");
  4695. let zjdXq = trs.find("td").eq(0).text();
  4696. let zjdIdNum = zjdXq.replace("t_house_survey_zjdzd.", "");
  4697. obj.id = zjdIdNum; // 主键id
  4698. obj.deptName = trs.find("td").eq(3).text();//行政区划名称
  4699. obj.zjddm = trs.find("td").eq(6).text();//宅基地代码
  4700. obj.zdmj = trs.find("td").eq(11).text();//宗地面积
  4701. obj.active = 1;
  4702. var vector_drawing_map;
  4703. let params = {
  4704. "deptId": that.$cookies.get("item").deptId,
  4705. "zjddm": obj.zjddm,
  4706. }
  4707. that.$cookies.set("search", "")
  4708. //that.$cookies.set("map", "")
  4709. console.log(document.cookie.split(';').length)
  4710. console.log(params);
  4711. listZjdzd(params).then((response) => {
  4712. if (response.rows[0].zdmj != "") {
  4713. that.textMjAll = response.rows[0].zdmj;
  4714. } else {
  4715. that.textMjAllNum = "1";
  4716. }
  4717. that.mapZjdData = response.rows[0];
  4718. that.mapZjdData.active = 1;
  4719. that.mapZjdTeAll.mapZjdAData = that.mapZjdData;
  4720. that.mapZjdDataTure = 1;
  4721. that.zjdHcDy = obj.zjddm;
  4722. var styleZjd = new ol.style.Style({
  4723. stroke: new ol.style.Stroke({
  4724. //边界样式
  4725. color: "#CCFF66",
  4726. width: 6,
  4727. }),
  4728. });
  4729. hc_land_on = new ol.layer.Vector({
  4730. title: "add Layer",
  4731. source: new ol.source.Vector({
  4732. projection: projection,
  4733. features: new ol.format.GeoJSON().readFeatures("{\n" +
  4734. " \"type\": \"Feature\",\n" +
  4735. " \"geometry\":" + that.mapZjdData.theGeom + ", \"properties\":" + JSON.stringify(that.mapZjdData) + "}"),
  4736. }),
  4737. style: styleZjd
  4738. });
  4739. map.addLayer(hc_land_on);
  4740. var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
  4741. var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
  4742. var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
  4743. var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
  4744. //定位查询位置
  4745. var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  4746. map.getView().animate({
  4747. // 只设置需要的属性即可
  4748. center: center, // 中心点
  4749. zoom: 17.8, // 缩放级别
  4750. rotation: undefined, // 缩放完成view视图旋转弧度
  4751. duration: 1000, // 缩放持续时间,默认不需要设置
  4752. resolution:Math.random() * 0.00000001,
  4753. });
  4754. function createLabelStyleMap() {
  4755. return new ol.style.Style({
  4756. text: new ol.style.Text({
  4757. text: that.mapZjdData.syqr,
  4758. textAlign: "center", //位置
  4759. textBaseline: "middle", //基准线
  4760. font: "normal 16px 微软雅黑", //文字样式
  4761. //text: "标注点", //文本内容
  4762. fill: new ol.style.Fill({
  4763. //文本填充样式(即文字颜色)
  4764. color: "#FF0000",
  4765. width: 10,
  4766. }),
  4767. overflow: false //超出面的部分不显示
  4768. }),
  4769. zIndex: 9999,
  4770. });
  4771. }
  4772. var newcenterFeatureMap = new ol.Feature({
  4773. geometry: new ol.geom.Point(center), //几何信息
  4774. //name: "标注点",
  4775. });
  4776. var sourceMapLookMap = new ol.source.Vector({wrapX: false});
  4777. vector_drawing_map = new ol.layer.Vector({
  4778. source: sourceMapLookMap,
  4779. });
  4780. map.addLayer(vector_drawing_map);
  4781. newcenterFeatureMap.setStyle(createLabelStyleMap()); //设置要素样式
  4782. sourceMapLookMap.addFeature(newcenterFeatureMap);
  4783. });
  4784. //let cloneObj = JSON.parse(JSON.stringify(obj));
  4785. //that.mapZjdData = cloneObj;
  4786. } else if ($("#info .featureInfo .featureInfo").text() == "t_house_survey_zrz") {
  4787. //that.mapZjdTeAll.mapZjdAData ={};
  4788. that.mapZjdDataTure = "";
  4789. that.mapZjdTeAll.mapFsssAData = {};
  4790. map.removeLayer(hc_land_on);
  4791. let obj = {};
  4792. that.mapHasDateStatus = 1;
  4793. let trs = $("#info .featureInfo").find("tr:eq(1)");
  4794. let zrzXq = trs.find("td").eq(0).text();
  4795. let zrzIdNum = zrzXq.replace("t_house_survey_zrz.", "");
  4796. obj.id = zrzIdNum; // 主键id
  4797. obj.deptName = trs.find("td").eq(3).text();//行政区划名称
  4798. obj.zjddm = trs.find("td").eq(4).text();//宅基地代码
  4799. obj.scjzmj = trs.find("td").eq(12).text();//实测建筑面积
  4800. let params = {
  4801. "deptId": that.$cookies.get("item").deptId,
  4802. "zjddm": obj.zjddm,
  4803. }
  4804. that.$cookies.set("search", "")
  4805. //that.$cookies.set("map", "")
  4806. listZjdzd(params).then((response) => {
  4807. that.mapZjdData = response.rows[0];
  4808. //that.mapZjdAData.active = 1;
  4809. that.mapZjdTeAll.mapZjdAData = that.mapZjdData;
  4810. getZrz(obj.id).then((response) => {
  4811. if (response.data.scjzmj != "") {
  4812. that.textMjAll = response.data.scjzmj;
  4813. } else {
  4814. that.textMjAllNum = "1";
  4815. }
  4816. that.mapZrzData = response.data;
  4817. that.mapZrzData.active = 3;
  4818. that.mapZjdTeAll.mapZrzAData = that.mapZrzData;
  4819. that.zjdHcDy = obj.zjddm;
  4820. var styleZjd = new ol.style.Style({
  4821. stroke: new ol.style.Stroke({
  4822. //边界样式
  4823. color: "#CCFF66",
  4824. width: 6,
  4825. }),
  4826. });
  4827. hc_land_on = new ol.layer.Vector({
  4828. title: "add Layer",
  4829. source: new ol.source.Vector({
  4830. projection: projection,
  4831. features: new ol.format.GeoJSON().readFeatures("{\n" +
  4832. " \"type\": \"Feature\",\n" +
  4833. " \"geometry\":" + that.mapZrzData.theGeom + ", \"properties\":" + JSON.stringify(that.mapZrzData) + "}"),
  4834. }),
  4835. style: styleZjd
  4836. });
  4837. map.addLayer(hc_land_on);
  4838. var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
  4839. var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
  4840. var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
  4841. var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
  4842. //定位查询位置
  4843. var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  4844. map.getView().animate({
  4845. // 只设置需要的属性即可
  4846. center: center, // 中心点
  4847. zoom: 17.8, // 缩放级别
  4848. rotation: undefined, // 缩放完成view视图旋转弧度
  4849. duration: 1000, // 缩放持续时间,默认不需要设置
  4850. resolution:Math.random() * 0.00000001,
  4851. });
  4852. });
  4853. });
  4854. } else if ($("#info .featureInfo .featureInfo").text() == "t_house_survey_fsss") {
  4855. that.mapZjdTeAll.mapZrzAData = {};
  4856. that.mapZjdDataTure = "";
  4857. //that.mapZjdTeAll.mapZjdAData ={};
  4858. map.removeLayer(hc_land_on);
  4859. let obj = {};
  4860. that.mapHasDateStatus = 0;
  4861. let trs = $("#info .featureInfo").find("tr:eq(1)");
  4862. let fsssXq = trs.find("td").eq(0).text();
  4863. let fsssIdNum = fsssXq.replace("t_house_survey_fsss.", "");
  4864. obj.id = fsssIdNum; // 主键id
  4865. obj.deptName = trs.find("td").eq(4).text();//行政区划名称
  4866. obj.zjddm = trs.find("td").eq(1).text();//宅基地代码
  4867. // obj.houseDataConfirmStatus = trs.find("td").eq(6).text(); //状态
  4868. // obj.fssslx = trs.find("td").eq(7).text(); //附属设施类型
  4869. obj.jzmj = trs.find("td").eq(8).text(); //建筑面积
  4870. let params = {
  4871. "deptId": that.$cookies.get("item").deptId,
  4872. "zjddm": obj.zjddm,
  4873. "pageSize": 20,
  4874. }
  4875. that.$cookies.remove("search")
  4876. //that.$cookies.set("map", "")
  4877. listZjdzd(params).then((response) => {
  4878. that.mapZjdData = response.rows[0];
  4879. that.mapZjdData.active = 1;
  4880. that.mapZjdTeAll.mapZjdAData = that.mapZjdData;
  4881. getFsss(obj.id).then((response) => {
  4882. if (response.data.jzmj != "") {
  4883. that.textMjAll = response.data.jzmj;
  4884. } else {
  4885. that.textMjAllNum = "1";
  4886. }
  4887. //that.mapfsssData.active = 4;
  4888. that.mapfsssData = response.data;
  4889. console.log(that.mapfsssData);
  4890. that.mapZjdTeAll.mapFsssAData = that.mapfsssData;
  4891. that.zjdHcDy = obj.zjddm;
  4892. var styleZjd = new ol.style.Style({
  4893. stroke: new ol.style.Stroke({
  4894. //边界样式
  4895. color: "#CCFF66",
  4896. width: 6,
  4897. }),
  4898. });
  4899. hc_land_on = new ol.layer.Vector({
  4900. title: "add Layer",
  4901. source: new ol.source.Vector({
  4902. projection: projection,
  4903. features: new ol.format.GeoJSON().readFeatures("{\n" +
  4904. " \"type\": \"Feature\",\n" +
  4905. " \"geometry\":" + that.mapfsssData.theGeom + ", \"properties\":" + JSON.stringify(that.mapfsssData) + "}"),
  4906. }),
  4907. style: styleZjd
  4908. });
  4909. map.addLayer(hc_land_on);
  4910. var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
  4911. var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
  4912. var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
  4913. var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
  4914. //定位查询位置
  4915. var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  4916. map.getView().animate({
  4917. // 只设置需要的属性即可
  4918. center: center, // 中心点
  4919. zoom: 17.8, // 缩放级别
  4920. rotation: undefined, // 缩放完成view视图旋转弧度
  4921. duration: 1000, // 缩放持续时间,默认不需要设置
  4922. resolution:Math.random() * 0.00000001,
  4923. });
  4924. });
  4925. });
  4926. // if(obj.jzmj != ""){
  4927. // that.textMjAll = obj.jzmj;
  4928. // } else {
  4929. // that.textMjAllNum = "1";
  4930. // }
  4931. } else {
  4932. }
  4933. }, 300);
  4934. } else {
  4935. }
  4936. });
  4937. }
  4938. }
  4939. //数据库查询详情时使用----------------------------------------start
  4940. // if(feature) {
  4941. // //document.getElementById("info").innerHTML = "";
  4942. // that.mapHaDataValue = true;
  4943. // var ifConsole = feature.values_.createBy;
  4944. // if (ifConsole =="mapTheGeomFsssId") {
  4945. // let obj = {};
  4946. // that.mapHasDateStatus = 0;
  4947. // obj.deptName = feature.values_.deptName;//行政区划名称
  4948. // obj.zjddm = feature.values_.zjddm;//宅基地代码
  4949. // obj.houseDataConfirmStatus = feature.values_.houseDataConfirmStatus; //状态
  4950. // obj.fssslx = feature.values_.fssslx; //附属设施类型
  4951. // obj.jzmj = feature.values_.jzmj; //建筑面积
  4952. // obj.qsly = feature.values_.qsly;//权属来源
  4953. // obj.fwzt = feature.values_.fwzt; //房屋状态
  4954. // obj.sfsp = feature.values_.sfsp; //是否审批
  4955. // obj.sffz = feature.values_.sffz; //是否发证
  4956. // obj.jglx = feature.values_.jglx; //结构类型
  4957. // obj.sfzzsy = feature.values_.sfzzsy; //是否正在使用
  4958. // obj.jzwqk = feature.values_.jzwqk; //建筑物情况
  4959. // obj.tdzk = feature.values_.tdzk; //审批或建设前土地状况
  4960. // obj.sfsgcf = feature.values_.sfsgcf; //是否受过处罚
  4961. // obj.sysNormalDisable = feature.values_.sysNormalDisable; //是否停用
  4962. // //附属设施类型字典项
  4963. // that.getDicts("fsss_type").then((response) => {
  4964. // var assetTypeOptions = response.data;
  4965. // if(obj.fssslx !=null && obj.fssslx !=""){
  4966. // for(var i=0;assetTypeOptions.length >i; i++){
  4967. // if(obj.fssslx == assetTypeOptions[i].dictValue) {
  4968. // obj.fssslx = assetTypeOptions[i].dictLabel;
  4969. // break;
  4970. // }
  4971. // }
  4972. // }
  4973. // });
  4974. // //权属类型字典项
  4975. // that.getDicts("acquisition_method").then((response) => {
  4976. // var assetTypeOptions = response.data;
  4977. // if(obj.qsly !=null && obj.qsly !=""){
  4978. // for(var i=0;assetTypeOptions.length >i; i++){
  4979. // if(obj.qsly == assetTypeOptions[i].dictValue) {
  4980. // obj.qsly = assetTypeOptions[i].dictLabel;
  4981. // break;
  4982. // }
  4983. // }
  4984. // }
  4985. // });
  4986. // //房屋状态字典项
  4987. // that.getDicts("fwzt").then((response) => {
  4988. // var assetTypeOptions = response.data;
  4989. // if(obj.fwzt !=null && obj.fwzt !=""){
  4990. // for(var i=0;assetTypeOptions.length >i; i++){
  4991. // if(obj.fwzt == assetTypeOptions[i].dictValue) {
  4992. // obj.fwzt = assetTypeOptions[i].dictLabel;
  4993. // break;
  4994. // }
  4995. // }
  4996. // }
  4997. // });
  4998. // //是否审批字典项
  4999. // that.getDicts("sys_yes_no").then((response) => {
  5000. // var assetTypeOptions = response.data;
  5001. // if(obj.sfsp !=null && obj.sfsp !=""){
  5002. // for(var i=0;assetTypeOptions.length >i; i++){
  5003. // if(obj.sfsp == assetTypeOptions[i].dictValue) {
  5004. // obj.sfsp = assetTypeOptions[i].dictLabel;
  5005. // break;
  5006. // }
  5007. // }
  5008. // }
  5009. // });
  5010. // //是否发证字典项
  5011. // that.getDicts("sys_yes_no").then((response) => {
  5012. // var assetTypeOptions = response.data;
  5013. // if(obj.sffz !=null && obj.sffz !=""){
  5014. // for(var i=0;assetTypeOptions.length >i; i++){
  5015. // if(obj.sffz == assetTypeOptions[i].dictValue) {
  5016. // obj.sffz = assetTypeOptions[i].dictLabel;
  5017. // break;
  5018. // }
  5019. // }
  5020. // }
  5021. // });
  5022. // //结构类型字典项
  5023. // that.getDicts("house_jglx").then((response) => {
  5024. // var assetTypeOptions = response.data;
  5025. // if(obj.jglx !=null && obj.jglx !=""){
  5026. // for(var i=0;assetTypeOptions.length >i; i++){
  5027. // if(obj.jglx == assetTypeOptions[i].dictValue) {
  5028. // obj.jglx = assetTypeOptions[i].dictLabel;
  5029. // break;
  5030. // }
  5031. // }
  5032. // }
  5033. // });
  5034. // //是否正在使用字典项
  5035. // that.getDicts("sys_yes_no").then((response) => {
  5036. // var assetTypeOptions = response.data;
  5037. // if(obj.sfzzsy !=null && obj.sfzzsy !=""){
  5038. // for(var i=0;assetTypeOptions.length >i; i++){
  5039. // if(obj.sfzzsy == assetTypeOptions[i].dictValue) {
  5040. // obj.sfzzsy = assetTypeOptions[i].dictLabel;
  5041. // break;
  5042. // }
  5043. // }
  5044. // }
  5045. // });
  5046. // //房屋状态字典项
  5047. // that.getDicts("fwzt").then((response) => {
  5048. // var assetTypeOptions = response.data;
  5049. // if(obj.fwzt !=null && obj.fwzt !=""){
  5050. // for(var i=0;assetTypeOptions.length >i; i++){
  5051. // if(obj.fwzt == assetTypeOptions[i].dictValue) {
  5052. // obj.fwzt = assetTypeOptions[i].dictLabel;
  5053. // break;
  5054. // }
  5055. // }
  5056. // }
  5057. // });
  5058. // //土地状况字典项
  5059. // that.getDicts("land_state").then((response) => {
  5060. // var assetTypeOptions = response.data;
  5061. // if(obj.tdzk !=null && obj.tdzk !=""){
  5062. // for(var i=0;assetTypeOptions.length >i; i++){
  5063. // if(obj.tdzk == assetTypeOptions[i].dictValue) {
  5064. // obj.tdzk = assetTypeOptions[i].dictLabel;
  5065. // break;
  5066. // }
  5067. // }
  5068. // }
  5069. // });
  5070. // //是否受过处罚字典项
  5071. // that.getDicts("land_state").then((response) => {
  5072. // var assetTypeOptions = response.data;
  5073. // if(obj.sfsgcf !=null && obj.sfsgcf !=""){
  5074. // for(var i=0;assetTypeOptions.length >i; i++){
  5075. // if(obj.sfsgcf == assetTypeOptions[i].dictValue) {
  5076. // obj.sfsgcf = assetTypeOptions[i].dictLabel;
  5077. // break;
  5078. // }
  5079. // }
  5080. // }
  5081. // });
  5082. // that.mapFsssData = obj;
  5083. // } else if(ifConsole =="mapTheGeomZrzId"){
  5084. // let obj = {};
  5085. // that.mapHasDateStatus = 1;
  5086. // obj.deptName = feature.values_.deptName;//部门名称
  5087. // obj.zjddm = feature.values_.zjddm;//宅基地代码
  5088. // obj.nmfwzh = feature.values_.nmfwzh;//农民房屋幢号
  5089. // obj.zrzh = feature.values_.zrzh;//自然幢号
  5090. // obj.jgrq = feature.values_.jgrq;//竣工日期
  5091. // obj.jzwgd = feature.values_.jzwgd;//建筑物高度
  5092. // obj.zzdmj = feature.values_.zzdmj;//幢占地面积
  5093. // obj.zydmj = feature.values_.zydmj;//幢用地面积
  5094. // obj.scjzmj = feature.values_.scjzmj;//实测建筑面积
  5095. // obj.zcs = feature.values_.zcs;//总层数
  5096. // obj.dscs = feature.values_.dscs;//地上层数
  5097. // obj.dxcs = feature.values_.dxcs;//地下层数
  5098. // obj.fwjg = feature.values_.fwjg;//房屋结构
  5099. // obj.sjly = feature.values_.sjly;//数据来源
  5100. // obj.status = feature.values_.status;//状态
  5101. // obj.houseDataConfirmStatus = feature.values_.houseDataConfirmStatus;//数据调查确认状态
  5102. // //字典项转化
  5103. // //房屋结构字典项
  5104. // that.getDicts("housing_structure").then((response) => {
  5105. // var assetTypeOptions = response.data;
  5106. // if(obj.fwjg !=null && obj.fwjg !=""){
  5107. // for(var i=0;assetTypeOptions.length >i; i++){
  5108. // if(obj.fwjg == assetTypeOptions[i].dictValue) {
  5109. // obj.fwjg = assetTypeOptions[i].dictLabel;
  5110. // break;
  5111. // }
  5112. // }
  5113. // }
  5114. // });
  5115. // //房屋结构字典项
  5116. // that.getDicts("sjly").then((response) => {
  5117. // var assetTypeOptions = response.data;
  5118. // if(obj.sjly !=null && obj.sjly !=""){
  5119. // for(var i=0;assetTypeOptions.length >i; i++){
  5120. // if(obj.sjly == assetTypeOptions[i].dictValue) {
  5121. // obj.sjly = assetTypeOptions[i].dictLabel;
  5122. // break;
  5123. // }
  5124. // }
  5125. // }
  5126. // });
  5127. // that.mapZrzData = obj;
  5128. // } else if(ifConsole =="mapTheGeomZjdId"){
  5129. // let obj = {};
  5130. // that.mapHasDateStatus = 2;
  5131. // obj.deptName = feature.values_.deptName;//行政区划名称
  5132. // obj.suyqrdm = feature.values_.suyqrdm;//所有权人代码
  5133. // obj.nhdm = feature.values_.nhdm;//农户代码
  5134. // obj.zjddm = feature.values_.zjddm;//宅基地代码
  5135. // obj.zdbh = feature.values_.zdbh;//宗地编号
  5136. // obj.zddm = feature.values_.zddm;//宗地代码
  5137. // obj.zl = feature.values_.zl;//坐落
  5138. // obj.zldwdm = feature.values_.zldwdm;//坐落单位代码
  5139. // obj.zdmj = feature.values_.zdmj;//宗地面积
  5140. // obj.yt = feature.values_.yt;//用途
  5141. // obj.ytmc = feature.values_.ytmc;//用途名称
  5142. // obj.dj = feature.values_.dj;//宗地编号
  5143. // obj.jg = feature.values_.jg;//价格万元
  5144. // obj.qllx = feature.values_.qllx;//权利类型
  5145. // obj.qlxz = feature.values_.qlxz;//权利性质
  5146. // obj.qlsdfs = feature.values_.qlsdfs;//权利设定方式
  5147. // obj.rjl = feature.values_.rjl;//容积率
  5148. // obj.jzmd = feature.values_.jzmd;//建筑密度
  5149. // obj.jzxg = feature.values_.jzxg;//建筑限高
  5150. // obj.zdszd = feature.values_.zdszd;//宗地四至-东
  5151. // obj.zdszn = feature.values_.zdszn;//宗地四至-南
  5152. // obj.zdszx = feature.values_.zdszx;//宗地四至-西
  5153. // obj.zdszb = feature.values_.zdszb;//宗地四至-北
  5154. // obj.zdt = feature.values_.zdt;//宗地图
  5155. // obj.tfh = feature.values_.tfh;//图幅号
  5156. // obj.djh = feature.values_.djh;//地籍号
  5157. // obj.sjly = feature.values_.sjly;//数据来源
  5158. // obj.lyzk = feature.values_.lyzk;//当前利用状况
  5159. // obj.xzkssj = feature.values_.xzkssj;//闲置开始时间
  5160. // obj.sffz = feature.values_.sffz;//是否发证
  5161. // obj.zjdzsh = feature.values_.zjdzsh;//宅基地证书号
  5162. // obj.zjdxctp = feature.values_.zjdxctp;//宅基地现场图片
  5163. // obj.zjdqdfs = feature.values_.zjdqdfs;//宅基地取得方式
  5164. // obj.bccjl = feature.values_.bccjl;//被惩处经历
  5165. // obj.bccbz = feature.values_.bccbz;//被惩处备注
  5166. // obj.yctcyx = feature.values_.yctcyx;//有偿退出意向
  5167. // obj.zjdpzmj = feature.values_.zjdpzmj;//宅基地批准面积
  5168. // obj.zjdxzyy = feature.values_.zjdxzyy;//宅基地闲置原因
  5169. // obj.lzyx = feature.values_.lzyx;//流转意向
  5170. // obj.sysNormalDisable = feature.values_.sysNormalDisable;//是否停用
  5171. // obj.active = 1;
  5172. // //字典项转化
  5173. // //是否发证字典项
  5174. // that.getDicts("sys_yes_no").then((response) => {
  5175. // var assetTypeOptions = response.data;
  5176. // if(obj.sffz !=null && obj.sffz !=""){
  5177. // for(var i=0;assetTypeOptions.length >i; i++){
  5178. // if(obj.sffz == assetTypeOptions[i].dictValue) {
  5179. // obj.sffz = assetTypeOptions[i].dictLabel;
  5180. // break;
  5181. // }
  5182. // }
  5183. // }
  5184. // });
  5185. // //利用状态字典项
  5186. // that.getDicts("zjdlyzk").then((response) => {
  5187. // var assetTypeOptions = response.data;
  5188. // if(obj.lyzk !=null && obj.lyzk !=""){
  5189. // for(var i=0;assetTypeOptions.length >i; i++){
  5190. // if(obj.lyzk == assetTypeOptions[i].dictValue) {
  5191. // obj.lyzk = assetTypeOptions[i].dictLabel;
  5192. // break;
  5193. // }
  5194. // }
  5195. // }
  5196. // });
  5197. // //流转意向字典项
  5198. // that.getDicts("is_have").then((response) => {
  5199. // var assetTypeOptions = response.data;
  5200. // if(obj.lzyx !=null && obj.lzyx !=""){
  5201. // for(var i=0;assetTypeOptions.length >i; i++){
  5202. // if(obj.lzyx == assetTypeOptions[i].dictValue) {
  5203. // obj.lzyx = assetTypeOptions[i].dictLabel;
  5204. // break;
  5205. // }
  5206. // }
  5207. // }
  5208. // });
  5209. // //有偿退出意向字典项
  5210. // that.getDicts("is_have").then((response) => {
  5211. // var assetTypeOptions = response.data;
  5212. // if(obj.yctcyx !=null && obj.yctcyx !=""){
  5213. // for(var i=0;assetTypeOptions.length >i; i++){
  5214. // if(obj.yctcyx == assetTypeOptions[i].dictValue) {
  5215. // obj.yctcyx = assetTypeOptions[i].dictLabel;
  5216. // break;
  5217. // }
  5218. // }
  5219. // }
  5220. // });
  5221. // //被惩处经历字典项
  5222. // that.getDicts("is_have").then((response) => {
  5223. // var assetTypeOptions = response.data;
  5224. // if(obj.bccjl !=null && obj.bccjl !=""){
  5225. // for(var i=0;assetTypeOptions.length >i; i++){
  5226. // if(obj.bccjl == assetTypeOptions[i].dictValue) {
  5227. // obj.bccjl = assetTypeOptions[i].dictLabel;
  5228. // break;
  5229. // }
  5230. // }
  5231. // }
  5232. // });
  5233. // //宅基地取得方式字典项
  5234. // that.getDicts("acquisition_method").then((response) => {
  5235. // var assetTypeOptions = response.data;
  5236. // if(obj.zjdqdfs !=null && obj.zjdqdfs !=""){
  5237. // for(var i=0;assetTypeOptions.length >i; i++){
  5238. // if(obj.zjdqdfs == assetTypeOptions[i].dictValue) {
  5239. // obj.zjdqdfs = assetTypeOptions[i].dictLabel;
  5240. // break;
  5241. // }
  5242. // }
  5243. // }
  5244. // });
  5245. // //权利设定方式字典项
  5246. // that.getDicts("right_setting_mode").then((response) => {
  5247. // var assetTypeOptions = response.data;
  5248. // if(obj.qlsdfs !=null && obj.qlsdfs !=""){
  5249. // for(var i=0;assetTypeOptions.length >i; i++){
  5250. // if(obj.qlsdfs == assetTypeOptions[i].dictValue) {
  5251. // obj.qlsdfs = assetTypeOptions[i].dictLabel;
  5252. // break;
  5253. // }
  5254. // }
  5255. // }
  5256. // });
  5257. // //数据来源字典项
  5258. // that.getDicts("sjly").then((response) => {
  5259. // var assetTypeOptions = response.data;
  5260. // if(obj.sjly !=null && obj.sjly !=""){
  5261. // for(var i=0;assetTypeOptions.length >i; i++){
  5262. // if(obj.sjly == assetTypeOptions[i].dictValue) {
  5263. // obj.sjly = assetTypeOptions[i].dictLabel;
  5264. // break;
  5265. // }
  5266. // }
  5267. // }
  5268. // });
  5269. // that.mapZjdData = obj;
  5270. // console.log(obj.zjddm);
  5271. // that.zjdHcDy = obj.zjddm;
  5272. // } else {
  5273. // that.mapHaDataValue = false;
  5274. // }
  5275. // }else {
  5276. // that.mapHaDataValue = false;
  5277. // }
  5278. //数据库查询详情时使用----------------------------------------end
  5279. });
  5280. //数据库循环加载时使用 --------------------加载较慢 ------start
  5281. //当前账套没有任何空间数据
  5282. // if(mapTalkAbout){
  5283. // let deptName = this.$store.state.user.loginDeptId + "";
  5284. // getQueryLand(deptName).then((response) => {
  5285. // if (response.code == 200) {
  5286. // let InsertCode = response.data;
  5287. // if (InsertCode != null) {
  5288. // var lat = InsertCode.lat;
  5289. // var lng = InsertCode.lng;
  5290. // var center;
  5291. // if(lat !=null && lng !=null && lat !="" && lng !=""){
  5292. // center = [lng,lat];
  5293. // }else {
  5294. // center =[115.452752, 31.789033];
  5295. // }
  5296. // map.getView().animate({
  5297. // // 只设置需要的属性即可
  5298. // center: ol.proj.fromLonLat(center), // 中心点
  5299. // zoom: 17.9, // 缩放级别
  5300. // rotation: undefined, // 缩放完成view视图旋转弧度
  5301. // duration: 1000, // 缩放持续时间,默认不需要设置
  5302. // });
  5303. // }
  5304. // }
  5305. // });
  5306. // }
  5307. //数据库循环加载时使用 --------------------加载较慢 ------start
  5308. },
  5309. /*右侧列表 --展开收缩*/
  5310. selectionPushMap() {
  5311. this.selectionIconShow = true;
  5312. this.homesteadListStatus = true;
  5313. $(".homesteadList_wrap").animate(
  5314. {
  5315. right: "0",
  5316. },
  5317. 300
  5318. );
  5319. },
  5320. homesteadListShrink() {
  5321. this.selectionIconShow = false;
  5322. // this.checked =["zjdSx","zrzSx","fsssSx"];
  5323. $(".homesteadList_wrap").animate(
  5324. {
  5325. right: "-300px",
  5326. },
  5327. 300
  5328. );
  5329. setTimeout(() => {
  5330. this.homesteadListStatus = false;
  5331. }, 300);
  5332. },
  5333. checkClick(res){
  5334. // 1、全选与不全选模块
  5335. $(".checkall").change(function() {
  5336. $(".item-list-checkbox .checkitem").prop("checked", $(this).prop("checked"));
  5337. if($(this).prop("checked")){
  5338. }else {
  5339. }
  5340. });
  5341. // 2、小复选框模块
  5342. $(".checkitem").change(function() {
  5343. if ($(".checkitem:checked").length === $(".checkitem").length) {
  5344. $(".checkall").prop("checked", true);
  5345. } else {
  5346. $(".checkall").prop("checked", false);
  5347. }
  5348. })
  5349. },
  5350. //绘制多边形地图
  5351. drawMapPolygonFun() {
  5352. },
  5353. guidProduct(){
  5354. return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
  5355. var r = Math.random() * 16 | 0,
  5356. v = c == 'x' ? r : (r & 0x3 | 0x8);
  5357. return v.toString(16);
  5358. });
  5359. },
  5360. //宅基地点击地图核查
  5361. zjdHc(){
  5362. if(this.zjdHcDy != "" && this.zjdHcDy != "undefined"){
  5363. if(this.mapZjdData !=undefined && this.mapZjdData !="" && this.mapZjdDataTure !=""){
  5364. this.mapZjdTeAll.active =1;
  5365. //this.$cookies.set("search",this.mapZjdTeAll);
  5366. this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
  5367. //this.$router.push({path:'/homesteadSurvey/add'});
  5368. }else if(this.mapZrzData !=undefined && this.mapZrzData !=""){
  5369. if(this.mapZjdTeAll.mapZjdAData !=""){
  5370. this.mapZjdTeAll.active = 3;
  5371. //this.$cookies.set("search",this.mapZjdTeAll);
  5372. this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
  5373. } else {
  5374. this.$toast("必须有宅基地数据才能进入自然幢核查");
  5375. }
  5376. }else {
  5377. if(this.mapZjdTeAll.mapZjdAData !="") {
  5378. this.mapZjdTeAll.active = 4;
  5379. //this.$cookies.set("search", this.mapZjdTeAll);
  5380. this.$router.push({path: '/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
  5381. } else {
  5382. this.$toast("必须有宅基地数据才能进入附属设施核查");
  5383. }
  5384. }
  5385. } else {
  5386. this.$dialog.alert({
  5387. title: '宅基地核查',
  5388. message: "请从地图中选择图层并点击核查",
  5389. theme: 'round-button',
  5390. }).then(() => {
  5391. // on close
  5392. });
  5393. }
  5394. },
  5395. //搜索详情跳转
  5396. zjdSs(item){
  5397. this.mapZjdTeAll.mapZjdAData ={};
  5398. this.mapZjdTeAll.mapZrzAData ={};
  5399. this.mapZjdTeAll.mapFsssAData ={};
  5400. //this.mapZjdTeAll.active =1;
  5401. if(item.typeTc =="宅基地"){
  5402. getZjdzd(item.id).then((response) => {
  5403. this.mapZjdData = response.data;
  5404. this.mapZjdTeAll.active = 1;
  5405. this.mapZjdTeAll.mapZjdAData = this.mapZjdData;
  5406. //this.$cookies.set("search",this.mapZjdTeAll);
  5407. setTimeout(() => {
  5408. this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
  5409. }, 500);
  5410. });
  5411. }else if(item.typeTc =="自然幢"){
  5412. //let =
  5413. getZjdzd(item.id).then((response) => {
  5414. this.mapZrzData = response.data;
  5415. this.mapZjdTeAll.active = 3;
  5416. this.mapZjdTeAll.mapZrzAData = this.mapZrzData;
  5417. //this.$cookies.set("search",this.mapZjdTeAll);
  5418. setTimeout(() => {
  5419. this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
  5420. }, 500);
  5421. });
  5422. }else if(item.typeTc =="附属设施"){
  5423. getFsss(item.id).then((response) => {
  5424. this.mapFsssData = response.data;
  5425. this.mapZjdTeAll.active = 4;
  5426. this.mapZjdTeAll.mapFsssAData = this.mapFsssData;
  5427. //this.$cookies.set("search",this.mapZjdTeAll);
  5428. setTimeout(() => {
  5429. this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
  5430. }, 500);
  5431. });
  5432. }else{
  5433. this.$toast("无数据请检查后进入核查页面");
  5434. }
  5435. },
  5436. //地图查询
  5437. toggleSearch() {
  5438. $("#query").trigger("click");
  5439. },
  5440. //
  5441. checkAllArray(value){
  5442. if(this.checked.length<3){
  5443. this.$refs.checkboxGroup.toggleAll(true);
  5444. }else{
  5445. this.$refs.checkboxGroup.toggleAll(false);
  5446. }
  5447. },
  5448. //筛选//全选
  5449. checkAll(val) {
  5450. this.$refs.checkboxGroup.value.toggleAll(true);
  5451. return;
  5452. let checkedCount = this.CheckedAllArr.length
  5453. if (val) {
  5454. //全选
  5455. this.CheckedAllArr = this.dataList.map(item => item.id)
  5456. } else{
  5457. //取消全选
  5458. if (checkedCount === this.dataList.length) {
  5459. //如果不增加这个条件判断点击某一项时会全部取消
  5460. this.CheckedAllArr = []
  5461. }
  5462. }
  5463. },
  5464. //单选
  5465. handleChecked(value) {
  5466. // this.checkAllFlag = this.CheckedAllArr.length == this.dataList.length;
  5467. if (value.length<3){
  5468. this.checkAllFlag = false;
  5469. }else{
  5470. this.checkAllFlag = true;
  5471. }
  5472. value.indexOf('zjdSx') == -1 ? this.zjdSx = false : this.zjdSx = true;
  5473. value.indexOf('zrzSx') == -1 ? this.zrzSx = false : this.zrzSx = true;
  5474. value.indexOf('fsssSx') == -1 ? this.fsssSx = false : this.fsssSx = true;
  5475. },
  5476. closeSearchBox(){
  5477. this.showSearch = false ;
  5478. var height = $(".searchBar_wrap").outerHeight(true) - $(".searchBar_wrap .van-search").outerHeight(true)
  5479. document.styleSheets[0].insertRule(
  5480. "@keyframes test2" +
  5481. "{" +
  5482. "0%{bottom: 0px}" +
  5483. "100%{bottom: -" + height + "px;}" +
  5484. "}"
  5485. )
  5486. $('.searchBar_wrap').css({'animation':'test2 0.5s ease-in-out 0s 1 alternate forwards','-webkit-animation':'test2 0.5s ease-in-out 0s 1 alternate forwards'});
  5487. },
  5488. zjdTz(){
  5489. if(this.mapZjdData =="" && this.mapZjdDataTure =="" && this.mapZjdData !=undefined){
  5490. this.mapZjdTeAll.active =1;
  5491. this.mapZjdTeAll.mapZjdAData.deptId =this.$cookies.get("item").deptId;
  5492. this.mapZjdTeAll.mapZjdAData.theGeom =this.htZjdZrzFsss;
  5493. //this.mapZjdTeAll.mapZjdAData.deptId = this.$cookies.get("item").deptId;
  5494. //this.$cookies.set("search",this.mapZjdTeAll);
  5495. this.$cookies.set("search","")
  5496. this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
  5497. }else {
  5498. this.$toast("已选择宅基地,请选择自然幢或附属设施按钮");
  5499. }
  5500. },
  5501. zrzTz(){
  5502. if(this.mapZjdData !=undefined && this.mapZjdData !="" && this.mapZjdDataTure !=""){
  5503. this.mapZjdTeAll.active =3;
  5504. this.mapZjdTeAll.mapZrzAData.theGeom =this.htZjdZrzFsss;
  5505. this.mapZjdTeAll.mapZrzAData.deptId =this.$cookies.get("item").deptId;
  5506. //this.mapZjdTeAll.mapZrzAData.deptId = this.$cookies.get("item").deptId;
  5507. //this.$cookies.set("search",this.mapZjdTeAll);
  5508. this.$cookies.set("search","")
  5509. this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
  5510. }else {
  5511. this.$toast("请先在地图上选择宅基地后,再选择自然幢按钮");
  5512. }
  5513. },
  5514. fsssTz(){
  5515. if(this.mapZjdData !=undefined && this.mapZjdData !="" && this.mapZjdDataTure !=""){
  5516. this.mapZjdTeAll.active =4;
  5517. this.mapZjdTeAll.mapFsssAData.theGeom =this.htZjdZrzFsss;
  5518. this.mapZjdTeAll.mapFsssAData.deptId =this.$cookies.get("item").deptId;
  5519. //this.mapZjdTeAll.mapFsssAData.deptId = this.$cookies.get("item").deptId;
  5520. //this.$cookies.set("search",this.mapZjdTeAll);
  5521. this.$cookies.set("search","")
  5522. this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}});
  5523. }else {
  5524. this.$toast("请先在地图上选择宅基地后,再选择附属设施按钮");
  5525. }
  5526. },
  5527. //绘图重置清除之前图层
  5528. deleteHistory(){
  5529. $("#deleteHistory").trigger("click");
  5530. }
  5531. },
  5532. }
  5533. </script>
  5534. <style scoped lang="scss">
  5535. /deep/ .van-swipe-cell__wrapper{
  5536. margin-right:-3px;
  5537. }
  5538. .hzlxBtn{
  5539. font-size: 0.3rem;
  5540. display: inline-block;
  5541. padding: 2% 0;
  5542. border-radius: 30PX;
  5543. color: #FFF;
  5544. margin-right: 2%;
  5545. width: 30%;
  5546. &:last-child{
  5547. margin: 0;
  5548. }
  5549. }
  5550. .van-cell__title{
  5551. flex:2
  5552. }
  5553. .bannerBg{
  5554. width: 100%;
  5555. color:#fff;
  5556. /*padding:10px;*/
  5557. background: linear-gradient(134deg,#7ac943 1%, #22b7f2);
  5558. }
  5559. .van-hairline--bottom::after {
  5560. border-bottom-width: 0;
  5561. }
  5562. .activeBtn{
  5563. background:#fff;
  5564. height:50px;
  5565. border-radius:25px;
  5566. color:#7AC943;
  5567. line-height:50px;
  5568. text-align:center;
  5569. font-size:20px;
  5570. width: 26%;
  5571. margin:0 10px;
  5572. box-shadow: 0px 5px 6px 0px rgba(0,0,0,0.16);
  5573. }
  5574. .disactiveBtn{
  5575. background:rgba(255,255,255,.4);
  5576. height:50px;
  5577. border-radius:25px;
  5578. color:#fff;
  5579. line-height:50px;
  5580. text-align:center;
  5581. font-size:20px;
  5582. width: 26%;
  5583. margin:0 10px;
  5584. box-shadow: 0px 5px 6px 0px rgba(0,0,0,0.16);
  5585. }
  5586. /*.van-cell__label{*/
  5587. /* color: #969799;*/
  5588. /* font-size: 12px;*/
  5589. /* line-height: 20px;*/
  5590. /* margin:0*/
  5591. /*}*/
  5592. .map_area {
  5593. width: 50vw;
  5594. height: 50vh;
  5595. z-index:1;
  5596. background:#000;
  5597. position: fixed;
  5598. left: 0;
  5599. top: 0;
  5600. }
  5601. .van-field__label{
  5602. width:50%;
  5603. }
  5604. .rightZoom_wrap {
  5605. position: absolute;
  5606. right: 3%;
  5607. top: 35%;
  5608. margin-top: -200px;
  5609. background: #fff;
  5610. margin-bottom: 16px;
  5611. border-radius: 10px;
  5612. text-align: center;
  5613. padding: 15px 20px;
  5614. img{
  5615. margin: 0 auto;
  5616. }
  5617. .amplification {
  5618. line-height: 1;
  5619. font-size: 18px;
  5620. text-align: center;
  5621. margin-top: 5px;
  5622. }
  5623. }
  5624. .mapZoom_wrap {
  5625. position: absolute;
  5626. right: 3%;
  5627. top: 50%;
  5628. margin-top: -200px;
  5629. background: #fff;
  5630. margin-bottom: 16px;
  5631. border-radius: 10px;
  5632. padding: 0px 20px;
  5633. div{
  5634. padding: 15px 0;
  5635. border-bottom: 1px solid #C9C9C9;
  5636. &:last-child{
  5637. border: none;
  5638. }
  5639. p{
  5640. margin-top: 5px;
  5641. }
  5642. }
  5643. .qtMap {
  5644. font-size: 18px;
  5645. text-align: center;
  5646. line-height: 1;
  5647. }
  5648. .clMap {
  5649. font-size: 18px;
  5650. text-align: center;
  5651. line-height: 1;
  5652. }
  5653. .hcMap {
  5654. font-size: 18px;
  5655. text-align: center;
  5656. line-height: 1;
  5657. }
  5658. .htMap {
  5659. font-size: 18px;
  5660. text-align: center;
  5661. line-height: 1;
  5662. }
  5663. .dwMap {
  5664. font-size: 18px;
  5665. text-align: center;
  5666. line-height: 1;
  5667. }
  5668. }
  5669. .rightIcon_wrap {
  5670. position: absolute;
  5671. right: 16px;
  5672. bottom: 160px;
  5673. .selectionIcon_wrap {
  5674. width: 74px;
  5675. background: #fff;
  5676. border-radius: 10px;
  5677. padding: 14px 0;
  5678. .icon {
  5679. width: 38px;
  5680. height: 38px;
  5681. background: url("../../assets/images/homestead/selection_icon.png")
  5682. no-repeat;
  5683. background-size: 100% 100%;
  5684. margin: 0 auto 4px;
  5685. }
  5686. .text {
  5687. font-size: 24px;
  5688. text-align: center;
  5689. }
  5690. }
  5691. .positioning_wrap {
  5692. width: 74px;
  5693. background: #fff;
  5694. margin-bottom: 16px;
  5695. border-radius: 10px;
  5696. height: 74px;
  5697. display: flex;
  5698. justify-content: center; /* 相对父元素水平居中 */
  5699. align-items: center; /* 子元素相对父元素垂直居中*/
  5700. .icon {
  5701. width: 38px;
  5702. height: 38px;
  5703. background: url("../../assets/images/homestead/positioning_icon.png")
  5704. no-repeat;
  5705. background-size: 100% 100%;
  5706. margin: 0 auto;
  5707. }
  5708. }
  5709. }
  5710. .homesteadList_wrap {
  5711. // display: none;
  5712. display: flex;
  5713. position: absolute;
  5714. right: -200px;
  5715. top: 0px;
  5716. bottom: 0px;
  5717. width: 300px;
  5718. background: #fff;
  5719. z-index: 999;
  5720. border-top-left-radius: 15px;
  5721. border-bottom-left-radius: 15px;
  5722. flex-direction: column;
  5723. .noInfo_data {
  5724. font-size: 28px;
  5725. text-align: center;
  5726. height: 300px;
  5727. line-height: 300px;
  5728. color: #666;
  5729. }
  5730. .title_m {
  5731. color: #333;
  5732. line-height: 36px;
  5733. padding: 20px 40px 22px;
  5734. .name {
  5735. font-size: 36px;
  5736. line-height: 42px;
  5737. height: 42px;
  5738. }
  5739. .more_icon {
  5740. width: 38px;
  5741. height: 38px;
  5742. background: url("../../assets/images/homestead/selectionNext_icon.png")
  5743. no-repeat;
  5744. float: right;
  5745. margin-top: 2px;
  5746. }
  5747. }
  5748. .main_m {
  5749. overflow-y: auto;
  5750. padding: 10px 0;
  5751. // height: 300px;
  5752. flex: 1;
  5753. .flex_block {
  5754. height: 70px;
  5755. display: flex;
  5756. // justify-content: center; /* 相对父元素水平居中 */
  5757. align-items: center; /* 子元素相对父元素垂直居中 */
  5758. padding: 0 40px;
  5759. &.active {
  5760. box-shadow: 0px 0px 10px rgba(24, 45, 51, 0.5);
  5761. }
  5762. .name_text {
  5763. font-size: 28px;
  5764. flex: 0.5;
  5765. overflow: hidden; /*超出部分隐藏*/
  5766. white-space: nowrap; /*不换行*/
  5767. text-overflow: ellipsis; /*超出部分文字以...显示*/
  5768. }
  5769. .square_text {
  5770. font-size: 28px;
  5771. flex: 0.4;
  5772. }
  5773. .operation_mian {
  5774. flex: 0 0 150px;
  5775. .describe {
  5776. font-size: 20px;
  5777. padding: 6px 5px;
  5778. float: right;
  5779. color: #fff;
  5780. border-radius: 30px;
  5781. overflow: hidden;
  5782. text-overflow: ellipsis;
  5783. white-space: nowrap;
  5784. max-width: 150px;
  5785. &.yph {
  5786. background: #b026ff;
  5787. }
  5788. &.dlzdph {
  5789. background: #ff6f36;
  5790. }
  5791. &.ylz {
  5792. background: #7fff4c;
  5793. }
  5794. &.dlz {
  5795. background: rgb(255, 232, 76);
  5796. }
  5797. &.ylzdph {
  5798. background: #ff7dd0;
  5799. }
  5800. &.zy {
  5801. background: rgb(100, 30, 100);
  5802. }
  5803. &.xz {
  5804. background: rgb(60, 100, 180);
  5805. }
  5806. &.chdb {
  5807. background: #fe0303;
  5808. }
  5809. }
  5810. }
  5811. }
  5812. }
  5813. .footerBtn_wrap {
  5814. flex: 0 0 90px;
  5815. display: flex;
  5816. justify-content: center; /* 相对父元素水平居中 */
  5817. align-items: center; /* 子元素相对父元素垂直居中 */
  5818. .options {
  5819. flex: 1;
  5820. font-size: 38px;
  5821. display: flex;
  5822. justify-content: center; /* 相对父元素水平居中 */
  5823. align-items: center; /* 子元素相对父元素垂直居中 */
  5824. height: 90px;
  5825. &:first-child {
  5826. border-bottom-left-radius: 15px;
  5827. }
  5828. &.active {
  5829. background: #3cbf5b;
  5830. color: #fff;
  5831. }
  5832. }
  5833. }
  5834. }
  5835. .checkbox {
  5836. width: 200px;
  5837. margin: 30px auto;
  5838. }
  5839. .thead-checkbox {
  5840. background-color: lightgray;
  5841. }
  5842. .item-checkbox {
  5843. border: 1px solid darkgray;
  5844. }
  5845. .van-sticky{position: fixed;top: 0;right: 0; left: 0;z-index: 9999;}
  5846. .searchBar_wrap {
  5847. // display: none;
  5848. position: fixed;
  5849. left: 0;
  5850. bottom: 0;
  5851. width: 100%;
  5852. padding: 0px 16px 0px 13px;
  5853. background: #fff;
  5854. border-top-left-radius: 15px;
  5855. border-top-right-radius: 15px;
  5856. z-index: 9;
  5857. .searchBox{
  5858. height: 40vh;
  5859. overflow-y: scroll;
  5860. .van-cell{
  5861. /*&:first-child{*/
  5862. /* box-shadow: none;*/
  5863. /* margin:0;*/
  5864. /*}*/
  5865. box-shadow: 0px 0px 5px #cccccc;
  5866. border-radius: 15PX;
  5867. width: 98%;
  5868. margin: 0 auto;
  5869. margin-bottom: 0.35rem;
  5870. &:first-child{
  5871. margin-top: 5px;
  5872. }
  5873. }
  5874. .van-cell__title{
  5875. flex: 0.8;
  5876. p{
  5877. color: rgb(34, 183, 242);
  5878. .van-icon{
  5879. vertical-align: middle;
  5880. }
  5881. span{
  5882. vertical-align: middle;
  5883. &:nth-child(2){
  5884. overflow: hidden;
  5885. white-space: nowrap;
  5886. text-overflow: ellipsis;
  5887. display: inline-block;
  5888. width: 60%;
  5889. }
  5890. &:nth-child(3){
  5891. font-size: 0.25rem;
  5892. border-radius: 5PX;
  5893. padding: 5PX 15PX;
  5894. margin-left: 5%;
  5895. }
  5896. }
  5897. }
  5898. }
  5899. .van-cell__value{
  5900. flex: 0.2;
  5901. p{
  5902. font-size: 0.25rem;
  5903. display: inline-block;
  5904. border-radius: 1rem;
  5905. line-height: 1;
  5906. padding: 10%;
  5907. }
  5908. }
  5909. }
  5910. .actionBar_wrap {
  5911. display: flex;
  5912. position: absolute;
  5913. top: 0;
  5914. left: 0;
  5915. width: 100%;
  5916. height: 100%;
  5917. background: #fff;
  5918. border-top-left-radius: 15px;
  5919. border-top-right-radius: 15px;
  5920. .m_list {
  5921. flex: 1;
  5922. display: flex;
  5923. justify-content: center; /* 相对父元素水平居中 */
  5924. align-items: center; /* 子元素相对父元素垂直居中 */
  5925. .tensile,
  5926. .positioning,
  5927. .spacing,
  5928. .scale {
  5929. width: 76px;
  5930. height: 72px;
  5931. background: #ffffff;
  5932. border-radius: 8px;
  5933. box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.16);
  5934. .icon {
  5935. width: 76px;
  5936. height: 72px;
  5937. }
  5938. &.active {
  5939. background: #333;
  5940. &.tensile {
  5941. .icon {
  5942. background: url("../../assets/images/homestead/operation/tensile_active.png")
  5943. center center no-repeat;
  5944. background-size: 38px 50px;
  5945. }
  5946. }
  5947. &.positioning {
  5948. .icon {
  5949. background: url("../../assets/images/homestead/operation/positioning_active.png")
  5950. center center no-repeat;
  5951. background-size: 38px 48px;
  5952. }
  5953. }
  5954. &.spacing {
  5955. .icon {
  5956. background: url("../../assets/images/homestead/operation/spacing_active.png")
  5957. center center no-repeat;
  5958. background-size: 46px 46px;
  5959. }
  5960. }
  5961. &.scale {
  5962. .icon {
  5963. background: url("../../assets/images/homestead/operation/scale_active.png")
  5964. center center no-repeat;
  5965. background-size: 48px 48px;
  5966. }
  5967. }
  5968. }
  5969. }
  5970. .tensile {
  5971. .icon {
  5972. background: url("../../assets/images/homestead/operation/tensile.png")
  5973. center center no-repeat;
  5974. background-size: 38px 50px;
  5975. }
  5976. }
  5977. .positioning {
  5978. .icon {
  5979. background: url("../../assets/images/homestead/operation/positioning.png")
  5980. center center no-repeat;
  5981. background-size: 38px 48px;
  5982. }
  5983. }
  5984. .spacing {
  5985. .icon {
  5986. background: url("../../assets/images/homestead/operation/spacing.png")
  5987. center center no-repeat;
  5988. background-size: 46px 46px;
  5989. }
  5990. }
  5991. .scale {
  5992. .icon {
  5993. background: url("../../assets/images/homestead/operation/scale.png")
  5994. center center no-repeat;
  5995. background-size: 48px 48px;
  5996. }
  5997. }
  5998. .closes {
  5999. background: url("../../assets/images/homestead/searchBar_close.png")
  6000. no-repeat;
  6001. background-size: 100% 100%;
  6002. width: 72px;
  6003. height: 72px;
  6004. &.gray {
  6005. background: url("../../assets/images/homestead/searchBar_close_gray.png")
  6006. no-repeat;
  6007. background-size: 100% 100%;
  6008. }
  6009. }
  6010. .correct {
  6011. background: url("../../assets/images/homestead/searchBar_save.png")
  6012. no-repeat;
  6013. background-size: 100% 100%;
  6014. width: 72px;
  6015. height: 72px;
  6016. }
  6017. }
  6018. }
  6019. .searchBar_area {
  6020. flex: 1;
  6021. height: 80px;
  6022. background: #f1f1f1;
  6023. border: 1px solid #dfdfdf;
  6024. border-radius: 10px;
  6025. padding: 0 28px;
  6026. display: flex;
  6027. .bar_icon {
  6028. width: 50px;
  6029. height: 50px;
  6030. background: url("../../assets/images/homestead/searchBar_bar.png")
  6031. center center no-repeat;
  6032. background-size: 100% 100%;
  6033. margin-top: 14px;
  6034. margin-right: 15px;
  6035. }
  6036. .bar_ipt {
  6037. flex: 1;
  6038. input {
  6039. width: 100%;
  6040. height: 100%;
  6041. background: none;
  6042. border: 0 none;
  6043. font-size: 32px;
  6044. }
  6045. }
  6046. .bar_text {
  6047. flex: 0 0 80px;
  6048. font-size: 32px;
  6049. color: #333333;
  6050. font-family: PingFang SC, PingFang SC-Regular;
  6051. font-weight: 400;
  6052. display: flex;
  6053. justify-content: center; /* 相对父元素水平居中 */
  6054. align-items: center; /* 子元素相对父元素垂直居中 */
  6055. }
  6056. }
  6057. .searchBar_more {
  6058. flex: 0 0 80px;
  6059. background: url("../../assets/images/homestead/searchBar_add.png") center
  6060. center no-repeat;
  6061. background-size: 80% 80%;
  6062. margin-left: 15px;
  6063. }
  6064. }
  6065. </style>