移动端
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

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