移动端
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

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