移动端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

5295 rivejä
217 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">
  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="height: 200px;padding: 0 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: 30PX">
  1136. <p style="font-size: 0.3rem;display: inline-block;background: #ccc;padding: 15PX 10%;border-radius: 30PX;color: #FFF;margin-right: 10%;" @click="deleteHistory">否</p>
  1137. <p style="font-size: 0.3rem;display: inline-block;background: #7ac943;padding: 15PX 10%;border-radius: 30PX;color: #FFF;" @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="height: 200px;padding: 0 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: 30PX">
  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. console.log(JSON.stringify(item));
  1498. },
  1499. // 入户核查搜索框新增。
  1500. onClickzjd(){
  1501. this.$cookies.remove("search");
  1502. this.$router.push({name:'homesteadAdd'});
  1503. },
  1504. // 农户信息搜索框新增。
  1505. onClicknh(){
  1506. this.shownh = true;
  1507. let params = {
  1508. "deptId" : this.item.deptId
  1509. }
  1510. this.qlrform={}
  1511. this.nhform={
  1512. "suyqrdm":null,
  1513. "deptId":this.item.deptId,
  1514. "hzzjlx":'01',
  1515. "hzzjlxName":"身份证",
  1516. "hyzk":'02',
  1517. "occupation":'1',
  1518. "occupationName":'务农',
  1519. "jzqk":'3',
  1520. "jzqkName":'常年居住',
  1521. "jzhcssfyzf":'1',
  1522. "jzhcssfyzfName":'无住房',
  1523. "zqtczsfyzf":'Y',
  1524. "sfbccm":'Y',
  1525. "sfpkh":'N',
  1526. "sfwbh":'N',
  1527. "sjly":'07',
  1528. "sjlyName":'农村集体产权制度改革',
  1529. }
  1530. listSuyqr(params).then((response) => {
  1531. if(response.rows.length>0){
  1532. this.qlrform = response.rows[0]
  1533. this.nhform.suyqrdm = this.qlrform.suyqrdm
  1534. }
  1535. });
  1536. },
  1537. // 返回
  1538. onClickLeft(){
  1539. this.$router.push('/homesteadSurvey/index');
  1540. },
  1541. onConfirmhncysjly(value){
  1542. this.form5.sjlyName = value.dictLabel
  1543. this.form5.sjly = value.dictValue
  1544. this.showhncysjly= false
  1545. },
  1546. onConfirmhzsjly(value){
  1547. this.nhform.sjlyName = value.dictLabel
  1548. this.nhform.sjly = value.dictValue
  1549. this.showhzsjly= false
  1550. },
  1551. onConfirmhncycybz(value){
  1552. this.form5.cybzName = value.dictLabel
  1553. this.form5.cybz = value.dictValue
  1554. this.showhncycybz= false
  1555. },
  1556. onConfirmhzjzhcssfyzf(value){
  1557. this.nhform.jzhcssfyzfName = value.dictLabel
  1558. this.nhform.jzhcssfyzf = value.dictValue
  1559. this.showhzjzhcssfyzf= false
  1560. },
  1561. onConfirmhncyyhzgx(value){
  1562. this.form5.yhzgxName = value.dictLabel
  1563. this.form5.yhzgx = value.dictValue
  1564. this.showhncyyhzgx = false
  1565. },
  1566. onConfirmhncyzjlx(value){
  1567. this.form5.zjlxName = value.dictLabel
  1568. this.form5.zjlx = value.dictValue
  1569. this.showhncyzjlx = false
  1570. },
  1571. onConfirmhncyjzqk(value){
  1572. this.form5.jzqkName = value.dictLabel
  1573. this.form5.jzqk = value.dictValue
  1574. this.showhncyjzqk = false
  1575. },
  1576. onConfirmhzjzqk(value){
  1577. this.nhform.jzqkName = value.dictLabel
  1578. this.nhform.jzqk = value.dictValue
  1579. this.showhzjzqk = false
  1580. },
  1581. onConfirmhncyoccupation(value){
  1582. this.form5.occupationName = value.dictLabel
  1583. this.form5.occupation = value.dictValue
  1584. this.showhncyoccupation = false
  1585. },
  1586. onConfirmhzoccupation(value){
  1587. this.nhform.occupationName = value.dictLabel
  1588. this.nhform.occupation = value.dictValue
  1589. this.showhzoccupation = false
  1590. },
  1591. onConfirmhzzjlx(value){
  1592. this.nhform.hzzjlxName = value.dictLabel
  1593. this.nhform.hzzjlx = value.dictValue
  1594. this.showhzzjlx = false
  1595. },
  1596. onConfirmdbrzjlx(value){
  1597. this.qlrform.dbrzjlxName = value.dictLabel
  1598. this.qlrform.dbrzjlx = value.dictValue
  1599. this.showdbrzjlx = false
  1600. },
  1601. onConfirmsuyqxz(value){
  1602. this.qlrform.suyqxzName = value.dictLabel
  1603. this.qlrform.suyqxz = value.dictValue
  1604. this.showsuyqxz = false
  1605. },
  1606. onConfirmdlrzjlx(value){
  1607. this.qlrform.dlrzjlxName = value.dictLabel
  1608. this.qlrform.dlrzjlx = value.dictValue
  1609. this.showdlrzjlx = false
  1610. },
  1611. onConfirmsjly(value){
  1612. this.qlrform.sjlyName = value.dictLabel
  1613. this.qlrform.sjly = value.dictValue
  1614. this.showsjly = false
  1615. },
  1616. // 户主保存
  1617. onSubmitnh(){
  1618. if(this.nhform.id!=null){
  1619. updateNh(this.nhform).then(
  1620. response => {
  1621. let _this =this
  1622. this.$toast({
  1623. icon: 'success', // 找到自己需要的图标
  1624. message: '修改成功',
  1625. duration:"1000",
  1626. onClose:function(){
  1627. _this.shownh = false
  1628. _this.getNh()
  1629. }
  1630. })
  1631. }
  1632. );
  1633. }else{
  1634. this.nhform.deptId = this.item.deptId
  1635. addNh(this.nhform).then(
  1636. response => {
  1637. this.totalR+=1
  1638. this.totalH+=1
  1639. let _this =this
  1640. this.$toast({
  1641. icon: 'success', // 找到自己需要的图标
  1642. message: '保存成功',
  1643. duration:"1000",
  1644. onClose:function(){
  1645. _this.shownh = false
  1646. _this.getNh()
  1647. }
  1648. })
  1649. }
  1650. );
  1651. }
  1652. },
  1653. // 所有权人保存
  1654. onSubmitsyqr(){
  1655. if(this.qlrform.id!=null){
  1656. updateSuyqr(this.qlrform).then(
  1657. response => {
  1658. let _this =this
  1659. this.$toast({
  1660. icon: 'success', // 找到自己需要的图标
  1661. message: '修改成功',
  1662. duration:"1000"
  1663. })
  1664. }
  1665. );
  1666. }else{
  1667. this.qlrform.deptId = this.item.deptId
  1668. addSuyqr(this.qlrform).then(
  1669. response => {
  1670. let _this =this
  1671. this.$toast({
  1672. icon: 'success', // 找到自己需要的图标
  1673. message: '保存成功',
  1674. duration:"1000"
  1675. })
  1676. }
  1677. );
  1678. }
  1679. },
  1680. // 查询所有权人
  1681. getSyqr(){
  1682. let params = {
  1683. "deptId" : this.item.deptId
  1684. }
  1685. this.qlrform ={
  1686. "deptId":this.item.deptId,
  1687. "suyqxz":'40',
  1688. "suyqxzName":'集体土地所有权',
  1689. "dbrzjlx":'01',
  1690. "dbrzjlxName":'身份证',
  1691. "sfclncjtjjzz":'Y',
  1692. "sjly":'04',
  1693. "sjlyName":"农村宅基地使用权确权登记发证"
  1694. }
  1695. listSuyqr(params).then((response) => {
  1696. if(response.rows.length>0){
  1697. this.qlrform = response.rows[0]
  1698. if(this.qlrform.suyqxz==null||this.qlrform.suyqxz==""){
  1699. this.qlrform.suyqxz = "40"
  1700. this.qlrform.suyqxzName = "集体土地所有权"
  1701. }
  1702. if(this.qlrform.dbrzjlx==null||this.qlrform.dbrzjlx==""){
  1703. this.qlrform.dbrzjlx = "01"
  1704. this.qlrform.dbrzjlxName = "身份证"
  1705. }
  1706. if(this.qlrform.sfclncjtjjzz==null||this.qlrform.sfclncjtjjzz==""){
  1707. this.qlrform.sfclncjtjjzz = "Y"
  1708. }
  1709. if(this.qlrform.sjly==null||this.qlrform.sjly==""){
  1710. this.qlrform.sjly = "04"
  1711. this.qlrform.sjlyName = "农村宅基地使用权确权登记发证"
  1712. }
  1713. this.zjlxOptions.map(res => {
  1714. if(res.dictValue == this.qlrform.dbrzjlx){
  1715. this.qlrform.dbrzjlxName = res.dictLabel
  1716. }
  1717. if(res.dictValue == this.qlrform.dlrzjlx){
  1718. this.qlrform.dlrzjlxName = res.dictLabel
  1719. }
  1720. })
  1721. this.suyqxzOptions.map(res => {
  1722. if(res.dictValue == this.qlrform.suyqxz){
  1723. this.qlrform.suyqxzName = res.dictLabel
  1724. }
  1725. })
  1726. this.sjlyOptions.map(res => {
  1727. if(res.dictValue == this.qlrform.sjly){
  1728. this.qlrform.sjlyName = res.dictLabel
  1729. }
  1730. })
  1731. }
  1732. });
  1733. },
  1734. // 查询农户列表
  1735. getNh(){
  1736. let params = {
  1737. "deptId" : this.item.deptId
  1738. }
  1739. listNh(params).then((response) => {
  1740. this.nhlist = response.rows
  1741. this.totalN = response.total
  1742. });
  1743. },
  1744. // 农户信息搜索框
  1745. onSearchnh(){
  1746. let params = {
  1747. "deptId" : this.item.deptId,
  1748. "nhValue" : this.nhvalue
  1749. }
  1750. console.log(params)
  1751. listNh(params).then((response) => {
  1752. this.nhlist = response.rows
  1753. });
  1754. },
  1755. // 宅基地搜索框
  1756. onSearchzjd(){
  1757. if(this.active==1){
  1758. let params = {
  1759. "deptId" : this.item.deptId,
  1760. "houseDataConfirmStatus" : "CONFIRMED",
  1761. "syqr" : this.zjdvalue
  1762. }
  1763. listZjdzd(params).then((response) => {
  1764. if (response.code == 200) {
  1765. this.list1 = response.rows
  1766. }
  1767. });
  1768. }else if(this.active==2){
  1769. let params = {
  1770. "deptId" : this.item.deptId,
  1771. "houseDataConfirmStatus" : "UNCONFIRMED",
  1772. "syqr" : this.zjdvalue
  1773. }
  1774. listZjdzd(params).then((response) => {
  1775. console.log(response)
  1776. if (response.code == 200) {
  1777. this.list2 = response.rows
  1778. }
  1779. });
  1780. }else{
  1781. let params = {
  1782. "deptId" : this.item.deptId,
  1783. "syqr" : this.zjdvalue
  1784. }
  1785. listZjdzd(params).then((response) => {
  1786. if (response.code == 200) {
  1787. this.list = response.rows
  1788. }
  1789. });
  1790. }
  1791. },
  1792. // 户内成员弹窗
  1793. showPopuphncy(item){
  1794. this.showhncy = true
  1795. if(item.id==null||item.id==""){
  1796. this.form5 = {
  1797. "nhdm":this.nhform.nhdm,
  1798. "deptId":this.nhform.deptId,
  1799. "zjlx":'01',
  1800. "zjlxName":"身份证",
  1801. "yhzgx":"14",
  1802. "yhzgxName":"妻",
  1803. "hyzk":'02',
  1804. "hklx":'1',
  1805. "occupation":'1',
  1806. "occupationName":'务农',
  1807. "jzqk":'3',
  1808. "jzqkName":'常年居住',
  1809. "sfbjtjjzzcy":'Y',
  1810. "xb":'0',
  1811. "sfbccm":'Y',
  1812. "sfpkh":'N',
  1813. "sfwbh":'N',
  1814. "sjly":'07',
  1815. "sjlyName":'农村集体产权制度改革',
  1816. }
  1817. }else{
  1818. let _this = this
  1819. this.form5 = item
  1820. if(this.form5.nhdm==null||this.form5.nhdm==""){
  1821. this.form5.nhdm = this.nhform.nhdm
  1822. }
  1823. if(this.form5.deptId==null||this.form5.deptId==""){
  1824. this.form5.deptId = this.nhform.deptId
  1825. }
  1826. if(this.form5.zjlx==null||this.form5.zjlx==""){
  1827. this.form5.zjlx = "01"
  1828. this.form5.zjlxName = "身份证"
  1829. }
  1830. if(this.form5.yhzgx==null||this.form5.yhzgx==""){
  1831. this.form5.yhzgx = "14"
  1832. this.form5.yhzgxName = "妻"
  1833. }
  1834. if(this.form5.hyzk==null||this.form5.hyzk==""){
  1835. this.form5.hyzk = "02"
  1836. }
  1837. if(this.form5.hklx==null||this.form5.hklx==""){
  1838. this.form5.hklx = "1"
  1839. }
  1840. if(this.form5.occupation==null||this.form5.occupation==""){
  1841. this.form5.occupation = "1"
  1842. this.form5.occupationName = "务农"
  1843. }
  1844. if(this.form5.jzqk==null||this.form5.jzqk==""){
  1845. this.form5.jzqk = "3"
  1846. this.form5.jzqkName = "常年居住"
  1847. }
  1848. if(this.form5.sfbjtjjzzcy==null||this.form5.sfbjtjjzzcy==""){
  1849. this.form5.sfbjtjjzzcy = "Y"
  1850. }
  1851. if(this.form5.xb==null||this.form5.xb==""){
  1852. this.form5.xb = "0"
  1853. }
  1854. if(this.form5.sfbccm==null||this.form5.sfbccm==""){
  1855. this.form5.sfbccm = "Y"
  1856. }
  1857. if(this.form5.sfpkh==null||this.form5.sfpkh==""){
  1858. this.form5.sfpkh = "N"
  1859. }
  1860. if(this.form5.sfwbh==null||this.form5.sfwbh==""){
  1861. this.form5.sfwbh = "N"
  1862. }
  1863. if(this.form5.sjly==null||this.form5.sjly==""){
  1864. this.form5.sjly = "07"
  1865. this.form5.sjlyName = "农村集体产权制度改革"
  1866. }
  1867. this.jzhcssfyzfOptions.map(res => {
  1868. if(res.dictValue == item.jzhcssfyzf){
  1869. this.form5.jzhcssfyzfName = res.dictLabel
  1870. }
  1871. })
  1872. this.zjlxOptions.map(res => {
  1873. if(res.dictValue == item.zjlx){
  1874. this.form5.zjlxName = res.dictLabel
  1875. }
  1876. })
  1877. this.occupationOptions.map(res => {
  1878. if(res.dictValue == item.occupation){
  1879. this.form5.occupationName = res.dictLabel
  1880. }
  1881. })
  1882. this.jzqkOptions.map(res => {
  1883. if(res.dictValue == item.jzqk){
  1884. this.form5.jzqkName = res.dictLabel
  1885. }
  1886. })
  1887. this.yhzgxOptions.map(res => {
  1888. if(res.dictValue == item.yhzgx){
  1889. this.form5.yhzgxName = res.dictLabel
  1890. }
  1891. })
  1892. this.cybzOptions.map(res => {
  1893. if(res.dictValue == item.cybz){
  1894. this.form5.cybzName = res.dictLabel
  1895. }
  1896. })
  1897. this.sjlyOptions.map(res => {
  1898. if(res.dictValue == item.sjly){
  1899. this.form5.sjlyName = res.dictLabel
  1900. }
  1901. })
  1902. }
  1903. },
  1904. // 户内成员列表
  1905. showPopuphncylist(item){
  1906. if(item.nhdm==null||item.nhdm==""){
  1907. this.$toast({
  1908. icon: 'error', // 找到自己需要的图标
  1909. message: '请先保存户主信息',
  1910. duration:"1000"
  1911. })
  1912. }else{
  1913. this.showhncylist = true
  1914. let params = {
  1915. "nhdm":item.nhdm,
  1916. "deptId":this.item.deptId
  1917. }
  1918. listNhhncy(params).then((response) => {
  1919. if (response.code == 200) {
  1920. this.hncylist = response.rows
  1921. }
  1922. });
  1923. }
  1924. },
  1925. showPopupnh(item){
  1926. this.shownh = true
  1927. this.nhform = item
  1928. this.jzhcssfyzfOptions.map(res => {
  1929. if(res.dictValue == item.jzhcssfyzf){
  1930. this.nhform.jzhcssfyzfName = res.dictLabel
  1931. }
  1932. })
  1933. this.zjlxOptions.map(res => {
  1934. if(res.dictValue == item.hzzjlx){
  1935. this.nhform.hzzjlxName = res.dictLabel
  1936. }
  1937. })
  1938. this.occupationOptions.map(res => {
  1939. if(res.dictValue == item.occupation){
  1940. this.nhform.occupationName = res.dictLabel
  1941. }
  1942. })
  1943. this.jzqkOptions.map(res => {
  1944. if(res.dictValue == item.jzqk){
  1945. this.nhform.jzqkName = res.dictLabel
  1946. }
  1947. })
  1948. this.sjlyOptions.map(res => {
  1949. if(res.dictValue == item.sjly){
  1950. this.nhform.sjlyName = res.dictLabel
  1951. }
  1952. })
  1953. },
  1954. getZjdList(){
  1955. /*if(this.active==1){
  1956. let params = {
  1957. "deptId" : this.item.deptId,
  1958. "houseDataConfirmStatus" : "CONFIRMED",
  1959. "pageNum": 1,
  1960. "pageSize":10,
  1961. }
  1962. listZjdzd(params).then((response) => {
  1963. if (response.code == 200) {
  1964. this.yhcNums = response.total
  1965. this.list1 = response.rows
  1966. }
  1967. });
  1968. }else if(this.active==2){
  1969. let params = {
  1970. "deptId" : this.item.deptId,
  1971. "houseDataConfirmStatus" : "UNCONFIRMED",
  1972. "pageNum": 1,
  1973. "pageSize":10,
  1974. }
  1975. listZjdzd(params).then((response) => {
  1976. if (response.code == 200) {
  1977. this.whcNums = response.total
  1978. this.list2 = response.rows
  1979. }
  1980. });
  1981. }else{*/
  1982. let params = {
  1983. "deptId" : this.item.deptId,
  1984. "pageNum": 1,
  1985. "pageSize":10,
  1986. }
  1987. listZjdzd(params).then((response) => {
  1988. console.log(response)
  1989. if (response.code == 200) {
  1990. this.qbNums = response.total
  1991. this.list = response.rows
  1992. }
  1993. });
  1994. let params1 = {
  1995. "deptId" : this.item.deptId,
  1996. "houseDataConfirmStatus" : "CONFIRMED",
  1997. "pageNum": 1,
  1998. "pageSize":10,
  1999. }
  2000. listZjdzd(params1).then((response) => {
  2001. if (response.code == 200) {
  2002. this.yhcNums = response.total
  2003. this.list1 = response.rows
  2004. }
  2005. });
  2006. let params2 = {
  2007. "deptId" : this.item.deptId,
  2008. "houseDataConfirmStatus" : "UNCONFIRMED",
  2009. "pageNum": 1,
  2010. "pageSize":10,
  2011. }
  2012. listZjdzd(params2).then((response) => {
  2013. if (response.code == 200) {
  2014. this.whcNums = response.total
  2015. this.list2 = response.rows
  2016. }
  2017. });
  2018. /* }*/
  2019. },
  2020. onConfirm(){},
  2021. onSubmithncy(){
  2022. if (this.form5.id != null) {
  2023. updateNhhncy(this.form5).then(response => {
  2024. let _this =this
  2025. this.$toast({
  2026. icon: 'success', // 找到自己需要的图标
  2027. message: '修改成功',
  2028. duration:"1000",
  2029. onClose:function(){
  2030. _this.showhncy = false
  2031. let params = {
  2032. "nhdm":_this.form5.nhdm,
  2033. deptId:_this.form5.deptId
  2034. }
  2035. listNhhncy(params).then((response) => {
  2036. _this.hncylist = response.rows
  2037. })
  2038. }
  2039. })
  2040. });
  2041. } else {
  2042. addNhhncy(this.form5).then(response => {
  2043. let _this = this
  2044. this.$toast({
  2045. icon: 'success', // 找到自己需要的图标
  2046. message: '保存成功',
  2047. duration:"1000",
  2048. onClose:function(){
  2049. _this.totalR+=1
  2050. _this.totalH+=1
  2051. _this.showhncy = false
  2052. let params = {
  2053. "nhdm":_this.form5.nhdm,
  2054. deptId:_this.form5.deptId
  2055. }
  2056. listNhhncy(params).then((response) => {
  2057. _this.hncylist = response.rows
  2058. })
  2059. }
  2060. })
  2061. });
  2062. }
  2063. },
  2064. mapShow() {
  2065. //通过数据直接查询方式--------加载较慢 start
  2066. //镇边界获取
  2067. // listTown().then(response => {
  2068. // if (response.code == 200) {
  2069. // this.mapTownList = response.rows;
  2070. // //村边界获取
  2071. // listVillage(this.queryParams).then(response => {
  2072. // this.mapVillageList = response.rows;
  2073. // listZjdzd().then((response) => {
  2074. // if (response.code == 200) {
  2075. // this.mapTheGeomZjdId= response.rows;
  2076. // listZrz().then((response) => {
  2077. // if (response.code == 200) {
  2078. // this.mapTheGeomZrzId = response.rows;
  2079. // listFsss().then((response) => {
  2080. // if (response.code == 200) {
  2081. // this.mapTheGeomFsssId = response.rows;
  2082. // }
  2083. // setTimeout(() => {
  2084. // this.GetMapsInit();
  2085. // }, 300);
  2086. // });
  2087. // }
  2088. // });
  2089. // }
  2090. // });
  2091. // });
  2092. // }
  2093. // });
  2094. //通过数据直接查询方式--------加载较慢 end
  2095. setTimeout(() => {
  2096. this.GetMapsInit();
  2097. }, 300);
  2098. var that = this;
  2099. setTimeout(function () {
  2100. var height = $(".searchBar_wrap").outerHeight(true) - $(".searchBar_wrap .van-search").outerHeight(true)
  2101. console.log($('.searchBox').outerHeight(true)+'px')
  2102. that.bottomHeight = -height+'px'
  2103. },500)
  2104. },
  2105. //地图加载 -----start
  2106. GetMapsInit() {
  2107. //加载地图编辑
  2108. var that = this;
  2109. var map;
  2110. //点击事件添加样式
  2111. var hc_land_on;
  2112. // document.getElementById("mapAll").innerHTML = '';
  2113. var hc_land;
  2114. var projection = new ol.proj.Projection({
  2115. //地图投影类型
  2116. code: "EPSG:3857",
  2117. units: "degrees",
  2118. //extent:extent
  2119. });
  2120. var aerial = new ol.layer.Tile({
  2121. source: new ol.source.XYZ({
  2122. url: "http://t0.tianditu.gov.cn/img_w/wmts?" +
  2123. "SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles" +
  2124. "&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=cc4aba6e967096098249efa069733067",
  2125. }),
  2126. isGroup: true,
  2127. name: "卫星影像图",
  2128. });
  2129. var yingxzi = new ol.layer.Tile({
  2130. source: new ol.source.XYZ({
  2131. url: "https://t0.tianditu.gov.cn/DataServer?T=cia_w&x={x}&y={y}&l={z}&tk=cc4aba6e967096098249efa069733067",
  2132. }),
  2133. isGroup: true,
  2134. name: "天地图文字标注--卫星影像图",
  2135. });
  2136. //加载地图
  2137. map = new ol.Map({
  2138. controls: ol.control.defaults({attribution: false, zoom: false, rotate: false}).extend([]), //隐藏放大缩小按钮
  2139. layers: [aerial, yingxzi],
  2140. projection: projection,
  2141. target: "mapWrapAll",
  2142. view: new ol.View({
  2143. //center: ol.proj.fromLonLat([115.452752, 31.789033]),
  2144. //center: ol.proj.fromLonLat([115.452752, 31.789033]),
  2145. zoom: 10,
  2146. minZoom: 5, //地图缩小限制
  2147. maxZoom: 18.3, //地图放大限制
  2148. }),
  2149. interactions: ol.interaction.defaults({
  2150. pinchRotate: false // 移动端禁止地图旋转
  2151. }),
  2152. });
  2153. //使用geoserver服务查询开始 -------------------start
  2154. //镇边界查询开始 ------------------------------start
  2155. // var zhenTc= new ol.layer.Tile({
  2156. // source: new ol.source.TileWMS({
  2157. // url: "http://116.255.223.226:8080/geoserver/zjd_dc/wms",
  2158. // params: {
  2159. // LAYERS: 'zjd_dc:t_house_survey_border_town',
  2160. // TILED: true,
  2161. // //cql_filter: cql_filter,
  2162. // SRID: 3857,
  2163. // },
  2164. // }),
  2165. // });
  2166. // map.addLayer(zhenTc);
  2167. //镇边界查询开始 ------------------------------end
  2168. //村边界查询开始 ------------------------------start
  2169. var cql_filter = "dept_id='" + that.$cookies.get("item").deptId + "'";
  2170. var cunTc= new ol.layer.Tile({
  2171. source: new ol.source.TileWMS({
  2172. url: "http://116.255.223.226:8080/geoserver/zjd_dc/wms",
  2173. params: {
  2174. LAYERS: 'zjd_dc:t_house_survey_border_village',
  2175. TILED: true,
  2176. cql_filter: cql_filter,
  2177. SRID: 3857,
  2178. },
  2179. }),
  2180. });
  2181. //定位查询位置
  2182. let param_dw = {
  2183. srsName: "EPSG:3857",
  2184. service: "WFS",
  2185. version: "1.0.0",
  2186. request: "GetFeature",
  2187. typename: "zjd_dc:t_house_survey_border_village",
  2188. //featureNS: 'nsgk_hc',//命名空间 URI
  2189. cql_filter: cql_filter,
  2190. //featurePrefix: 'nationalwater',//工作区名称
  2191. //featureTypes: ['nationalwater:01fir'],//查询图层,可以是同一个工作区下多个图层,逗号隔开
  2192. outputFormat: "application/json",
  2193. //filter: ol.format.filter.equalTo(t,e,r)//前者是属性名,后者是对应值
  2194. };
  2195. let url_dw = "http://116.255.223.226:8080/geoserver/zjd_dc/wfs"; //wfsurl;
  2196. url_dw = url_dw + "?";
  2197. for (let key in param_dw) {
  2198. url_dw = url_dw + key + "=" + param_dw[key] + "&";
  2199. }
  2200. url_dw = url_dw.substr(0, url_dw.length - 1);
  2201. fetch(url_dw, {
  2202. method: "POST", // *GET, POST, PUT, DELETE, etc.
  2203. })
  2204. .then((res) => {
  2205. var geojsonmap = res.json();
  2206. return geojsonmap;
  2207. })
  2208. .then((data) => {
  2209. console.log(data);
  2210. let resolution = map.getView().getResolutionForExtent(data.bbox,map.getSize());
  2211. map.getView().fit(data.bbox);
  2212. map.getView().setResolution(resolution);
  2213. // var datamap = data.bbox;
  2214. // var center = ol.extent.getCenter(datamap);
  2215. // map.getView().animate({
  2216. // // 只设置需要的属性即可
  2217. // center: center, // 中心点
  2218. // rotation: undefined, // 缩放完成view视图旋转弧度
  2219. // });
  2220. })
  2221. .catch((error) => {
  2222. console.log("【异常】", error);
  2223. });
  2224. map.addLayer(cunTc);
  2225. //村边界查询开始 ------------------------------end
  2226. //宅基地图层查询开始 ------------------start
  2227. var cql_filter_all = "dept_id='" + that.$cookies.get("item").deptId + "'";
  2228. var zjdTc= new ol.layer.Tile({
  2229. source: new ol.source.TileWMS({
  2230. url: "http://116.255.223.226:8080/geoserver/zjd_dc/wms",
  2231. params: {
  2232. LAYERS: 'zjd_dc:t_house_survey_zjdzd',
  2233. TILED: true,
  2234. cql_filter: cql_filter_all,
  2235. SRID: 3857,
  2236. },
  2237. }),
  2238. });
  2239. map.addLayer(zjdTc);
  2240. //宅基地图层查询开始 ------------------start
  2241. //自然幢图层查询开始 ------------------start
  2242. var zrzTc= new ol.layer.Tile({
  2243. source: new ol.source.TileWMS({
  2244. url: "http://116.255.223.226:8080/geoserver/zjd_dc/wms",
  2245. params: {
  2246. LAYERS: 'zjd_dc:t_house_survey_zrz',
  2247. TILED: true,
  2248. cql_filter: cql_filter_all,
  2249. SRID: 3857,
  2250. },
  2251. }),
  2252. });
  2253. map.addLayer(zrzTc);
  2254. //自然幢图层查询开始 ------------------start
  2255. //附属设施图层查询开始 ------------------start
  2256. var fsssTc= new ol.layer.Tile({
  2257. source: new ol.source.TileWMS({
  2258. url: "http://116.255.223.226:8080/geoserver/zjd_dc/wms",
  2259. params: {
  2260. LAYERS: 'zjd_dc:t_house_survey_fsss',
  2261. TILED: true,
  2262. cql_filter: cql_filter_all,
  2263. SRID: 3857,
  2264. },
  2265. }),
  2266. });
  2267. map.addLayer(fsssTc);
  2268. //附属设施图层查询开始 ------------------start
  2269. //使用geoserver服务查询开始 -------------------end
  2270. //数据库直接加载数据渲染方式---------------------------------------------------start
  2271. //判断当前账套是否有数据
  2272. // var mapTalkAbout = true;
  2273. // //获取镇界线----start
  2274. // if(this.mapTownList.length >0){
  2275. // for (var i = 0; this.mapTownList.length > i; i++) {
  2276. // if (this.mapTownList[i] != null && this.mapTownList[i].theGeom != null && this.mapTownList[i].theGeom != "") {
  2277. // mapTalkAbout =false;
  2278. // this.mapTownList[i].createBy = 'mapTownList';
  2279. // var theGeomLine= this.mapTownList[i].theGeom.replaceAll("MultiPolygon","LineString");
  2280. // theGeomLine = theGeomLine.replaceAll("[[[[","[[");
  2281. // theGeomLine = theGeomLine.replaceAll("]]]]","]]");
  2282. // hc_land = new ol.layer.Vector({
  2283. // title: "add Layer",
  2284. // source: new ol.source.Vector({
  2285. // projection: projection,
  2286. // features: new ol.format.GeoJSON().readFeatures("{\n" +
  2287. // " \"type\": \"Feature\",\n" +
  2288. // " \"geometry\":" + theGeomLine + ", \"properties\":" + JSON.stringify(this.mapTownList[i]) + "}"),
  2289. // }),
  2290. // style: new ol.style.Style({
  2291. // fill: new ol.style.Fill({
  2292. // //矢量图层填充颜色,以及透明度
  2293. // color: "#AE57A4",
  2294. // }),
  2295. // stroke: new ol.style.Stroke({
  2296. // //边界样式
  2297. // color: "#FF0000",
  2298. // width: 3,
  2299. // }),
  2300. // // text: new ol.style.Text({
  2301. // // text: this.mapTownList[i].xzqmc,
  2302. // // font: '30px sans-serif',
  2303. // // textAlign: "center",
  2304. // // textBaseline: "middle",
  2305. // // //font: 'verdana',
  2306. // // fill: new ol.style.Fill({
  2307. // // color: "#ff0000"
  2308. // // }),
  2309. // // // backgroundFill: new ol.style.Fill({
  2310. // // // color: "#ff0000"
  2311. // // // }),
  2312. // // font: "30px sans-serif",
  2313. // // stroke: new ol.style.Stroke({
  2314. // // color: "#ffffff"
  2315. // // // width: 3
  2316. // // }),
  2317. // // offsetX: parseInt(0, 10),
  2318. // // offsetY: parseInt(0, 10),
  2319. // // placement: "line", //point 则自动计算面的中心k点然后标注 line 则根据面要素的边进行标注
  2320. // // overflow: false //超出面的部分不显示
  2321. // //}),
  2322. // }),
  2323. // });
  2324. // map.addLayer(hc_land);
  2325. // //console.log(hc_land.values_.source.featuresRtree_.rbush_.data);
  2326. // var maxXMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxX;
  2327. // var maxYMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxY;
  2328. // var minXMap = hc_land.values_.source.featuresRtree_.rbush_.data.minX;
  2329. // var minYMap = hc_land.values_.source.featuresRtree_.rbush_.data.minY;
  2330. // // //定位查询位置
  2331. // var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  2332. // // console.log(center);
  2333. // map.getView().animate({
  2334. // // 只设置需要的属性即可
  2335. // center: center, // 中心点
  2336. // zoom: 9.8, // 缩放级别
  2337. // rotation: undefined, // 缩放完成view视图旋转弧度
  2338. // duration: 1000, // 缩放持续时间,默认不需要设置
  2339. // });
  2340. // }
  2341. // }
  2342. // }
  2343. // //获取镇界线----end
  2344. // //获取村界线----start
  2345. // if(this.mapVillageList.length >0){
  2346. // for (var i = 0; this.mapVillageList.length > i; i++) {
  2347. // if (this.mapVillageList[i] != null && this.mapVillageList[i].theGeom != null && this.mapVillageList[i].theGeom != "") {
  2348. // mapTalkAbout =false;
  2349. // this.mapVillageList[i].createBy = 'mapVillageList';
  2350. // var theGeomLine= this.mapVillageList[i].theGeom.replaceAll("MultiPolygon","LineString");
  2351. // theGeomLine = theGeomLine.replaceAll("[[[[","[[");
  2352. // theGeomLine = theGeomLine.replaceAll("]]]]","]]");
  2353. // hc_land = new ol.layer.Vector({
  2354. // title: "add Layer",
  2355. // source: new ol.source.Vector({
  2356. // projection: projection,
  2357. // features: new ol.format.GeoJSON().readFeatures("{\n" +
  2358. // " \"type\": \"Feature\",\n" +
  2359. // " \"geometry\":" + theGeomLine + ", \"properties\":" + JSON.stringify(this.mapVillageList[i]) + "}"),
  2360. // }),
  2361. // style: new ol.style.Style({
  2362. // fill: new ol.style.Fill({
  2363. // //矢量图层填充颜色,以及透明度
  2364. // color: "#AE57A4",
  2365. // }),
  2366. // stroke: new ol.style.Stroke({
  2367. // //边界样式
  2368. // color: "#ff00ff",
  2369. // width: 3,
  2370. // }),
  2371. // // text: new ol.style.Text({
  2372. // // text: this.mapVillageList[i].dcmj,
  2373. // // font: '30px sans-serif',
  2374. // // textAlign: "center",
  2375. // // textBaseline: "middle",
  2376. // // //font: 'verdana',
  2377. // // fill: new ol.style.Fill({
  2378. // // color: "#ff00ff"
  2379. // // }),
  2380. // // // backgroundFill: new ol.style.Fill({
  2381. // // // color: "#ff0000"
  2382. // // // }),
  2383. // // font: "30px sans-serif",
  2384. // // stroke: new ol.style.Stroke({
  2385. // // color: "#ffffff"
  2386. // // // width: 3
  2387. // // }),
  2388. // // offsetX: parseInt(0, 10),
  2389. // // offsetY: parseInt(0, 10),
  2390. // // placement: "line", //point 则自动计算面的中心k点然后标注 line 则根据面要素的边进行标注
  2391. // // overflow: false //超出面的部分不显示
  2392. // // }),
  2393. // }),
  2394. // });
  2395. // map.addLayer(hc_land);
  2396. // }
  2397. // }
  2398. // }
  2399. // // //获取村界线----end
  2400. // //宅基地定位开始 ---------start
  2401. // if(this.mapTheGeomZjdId.length >0) {
  2402. // for (var i = 0; this.mapTheGeomZjdId.length > i; i++) {
  2403. // if (this.mapTheGeomZjdId[i] !=null && this.mapTheGeomZjdId[i].theGeom != null && this.mapTheGeomZjdId[i].theGeom != "") {
  2404. // mapTalkAbout =false;
  2405. // this.mapTheGeomZjdId[i].createBy = 'mapTheGeomZjdId';
  2406. // var styleYqr = "";
  2407. // if(this.mapTheGeomZjdId[i].houseDataConfirmStatus == "CONFIRMED"){
  2408. // styleYqr = new ol.style.Style({
  2409. // fill: new ol.style.Fill({
  2410. // //矢量图层填充颜色,以及透明度
  2411. // color: "#AE57A4",
  2412. // }),
  2413. // stroke: new ol.style.Stroke({
  2414. // //边界样式
  2415. // color: "#28FF28",
  2416. // width: 3,
  2417. // }),
  2418. // });
  2419. // } else {
  2420. // styleYqr = new ol.style.Style({
  2421. // fill: new ol.style.Fill({
  2422. // //矢量图层填充颜色,以及透明度
  2423. // color: "#AE57A4",
  2424. // }),
  2425. // stroke: new ol.style.Stroke({
  2426. // //边界样式
  2427. // color: "rgba(255, 45, 45,1)",
  2428. // width: 3,
  2429. // }),
  2430. // });
  2431. // }
  2432. // hc_land = new ol.layer.Vector({
  2433. // title: "add Layer",
  2434. // source: new ol.source.Vector({
  2435. // projection: projection,
  2436. // features: new ol.format.GeoJSON().readFeatures("{\n" +
  2437. // " \"type\": \"Feature\",\n" +
  2438. // " \"geometry\":" + this.mapTheGeomZjdId[i].theGeom + ", \"properties\":" + JSON.stringify(this.mapTheGeomZjdId[i]) + "}"),
  2439. // }),
  2440. // style: styleYqr
  2441. // });
  2442. // map.addLayer(hc_land);
  2443. // // var maxXMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxX;
  2444. // // var maxYMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxY;
  2445. // // var minXMap = hc_land.values_.source.featuresRtree_.rbush_.data.minX;
  2446. // // var minYMap = hc_land.values_.source.featuresRtree_.rbush_.data.minY;
  2447. // // //定位查询位置
  2448. // // var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  2449. // // map.getView().animate({
  2450. // // // 只设置需要的属性即可
  2451. // // center: center, // 中心点
  2452. // // zoom: 15.8, // 缩放级别
  2453. // // rotation: undefined, // 缩放完成view视图旋转弧度
  2454. // // duration: 1000, // 缩放持续时间,默认不需要设置
  2455. // // });
  2456. // //自然幢定位开始 ---------start
  2457. // getZrzZjdDmList(this.mapTheGeomZjdId[i].zjddm).then((response) => {
  2458. // if (response.code == 200) {
  2459. // this.mapTheGeomZrzId = response.data;
  2460. // if(this.mapTheGeomZrzId.length >0) {
  2461. // for (var i = 0; this.mapTheGeomZrzId.length > i; i++) {
  2462. // if (this.mapTheGeomZrzId[i] !=null && this.mapTheGeomZrzId[i].theGeom != null && this.mapTheGeomZrzId[i].theGeom != "") {
  2463. // this.mapTheGeomZrzId[i].createBy = 'mapTheGeomZrzId';
  2464. // var styleZrz = "";
  2465. // if(this.mapTheGeomZjdId[i].houseDataConfirmStatus == "CONFIRMED"){
  2466. // styleZrz = new ol.style.Style({
  2467. // fill: new ol.style.Fill({
  2468. // //矢量图层填充颜色,以及透明度
  2469. // color: "#FFD306",
  2470. // }),
  2471. // stroke: new ol.style.Stroke({
  2472. // //边界样式
  2473. // color: "#28FF28",
  2474. // width: 3,
  2475. // }),
  2476. // });
  2477. // } else {
  2478. // styleZrz = new ol.style.Style({
  2479. // fill: new ol.style.Fill({
  2480. // //矢量图层填充颜色,以及透明度
  2481. // color: "#FFD306",
  2482. // }),
  2483. // stroke: new ol.style.Stroke({
  2484. // //边界样式
  2485. // color: "rgba(255, 45, 45,1)",
  2486. // width: 3,
  2487. // }),
  2488. // });
  2489. // }
  2490. // hc_land = new ol.layer.Vector({
  2491. // title: "add Layer",
  2492. // source: new ol.source.Vector({
  2493. // projection: projection,
  2494. // features: new ol.format.GeoJSON().readFeatures("{\n" +
  2495. // " \"type\": \"Feature\",\n" +
  2496. // " \"geometry\":" + this.mapTheGeomZrzId[i].theGeom + ", \"properties\":" + JSON.stringify(this.mapTheGeomZrzId[i]) + "}"),
  2497. // }),
  2498. // style: styleZrz
  2499. // });
  2500. // map.addLayer(hc_land);
  2501. // }
  2502. // }
  2503. // }
  2504. // }
  2505. // });
  2506. // //自然幢定位结束 ---------end
  2507. //
  2508. // //附属设施定位开始 ---------start
  2509. // getFsssZjdDmList(this.mapTheGeomZjdId[i].zjddm).then((response) => {
  2510. // if (response.code == 200) {
  2511. // this.mapTheGeomFsssId = response.data;
  2512. // if(this.mapTheGeomFsssId.length >0) {
  2513. // for (var i = 0; this.mapTheGeomFsssId.length > i; i++) {
  2514. // if (this.mapTheGeomFsssId[i] !=null && this.mapTheGeomFsssId[i].theGeom != null && this.mapTheGeomFsssId[i].theGeom != "") {
  2515. // this.mapTheGeomFsssId[i].createBy = 'mapTheGeomFsssId';
  2516. // var styleFsss = "";
  2517. // if(this.mapTheGeomZjdId[i].houseDataConfirmStatus == "CONFIRMED"){
  2518. // styleFsss = new ol.style.Style({
  2519. // fill: new ol.style.Fill({
  2520. // //矢量图层填充颜色,以及透明度
  2521. // color: "#00FFFF",
  2522. // }),
  2523. // stroke: new ol.style.Stroke({
  2524. // //边界样式
  2525. // color: "#28FF28",
  2526. // width: 3,
  2527. // }),
  2528. // });
  2529. // } else {
  2530. // styleFsss = new ol.style.Style({
  2531. // fill: new ol.style.Fill({
  2532. // //矢量图层填充颜色,以及透明度
  2533. // color: "#00FFFF",
  2534. // }),
  2535. // stroke: new ol.style.Stroke({
  2536. // //边界样式
  2537. // color: "rgba(255, 45, 45,1)",
  2538. // width: 3,
  2539. // }),
  2540. // });
  2541. // }
  2542. // hc_land = new ol.layer.Vector({
  2543. // title: "add Layer",
  2544. // source: new ol.source.Vector({
  2545. // projection: projection,
  2546. // features: new ol.format.GeoJSON().readFeatures("{\n" +
  2547. // " \"type\": \"Feature\",\n" +
  2548. // " \"geometry\":" + this.mapTheGeomFsssId[i].theGeom + ", \"properties\":" + JSON.stringify(this.mapTheGeomFsssId[i]) + "}"),
  2549. // }),
  2550. // style: styleFsss
  2551. // });
  2552. // map.addLayer(hc_land);
  2553. // }
  2554. // }
  2555. // }
  2556. // }
  2557. // });
  2558. // //附属设施定位结束 ---------end
  2559. // }
  2560. // }
  2561. // }
  2562. // //宅基地定位结束 ---------end
  2563. //数据库直接加载数据渲染方式---------------------------------------------------end
  2564. //地图操作定义------------start
  2565. //定位定义------------start
  2566. var Zb;
  2567. var latitude;
  2568. var longitude;
  2569. var vector_drawing;
  2570. //定位定义------------end
  2571. //绘图定义---------------start
  2572. var drawing;
  2573. var draw_map;
  2574. //绘图定义---------------end
  2575. //测面绘图定义------------start
  2576. var draw_cm;
  2577. //定义矢量图层
  2578. var vector;
  2579. //创建一个帮助提示信息对象
  2580. var helpTooltip;
  2581. //创建一个测量提示信息对象
  2582. var measureTooltip;
  2583. //创建一个帮助提示框对象
  2584. var helpTooltipElement;
  2585. //测出距离
  2586. var measureTooltipElement;
  2587. //测面绘图定义-----------end
  2588. //地图操作定义------------end
  2589. //定位当前位置 ------start
  2590. $("#dwMapAll").on("click", function () {
  2591. console.log("进入定位图层")
  2592. //删除测量记录操作--------start
  2593. //将矢量图层从图中删除
  2594. //map.removeLayer(helpTooltip);
  2595. map.removeLayer(vector);
  2596. map.removeInteraction(draw_cm);
  2597. //map.removeOverlay(helpTooltipElement);
  2598. //map.removeLayer(measureTooltip);
  2599. //删除测量记录操作--------end
  2600. //删除绘制图层画图操作-------start
  2601. map.removeInteraction(draw_map);
  2602. map.removeLayer(drawing);
  2603. //删除绘制图层画图操作-------end
  2604. //开始定位当前位置
  2605. navigator.geolocation.getCurrentPosition(function(position) {
  2606. latitude = position.coords.latitude;// 获取纬度
  2607. longitude = position.coords.longitude;// 获取经度
  2608. });
  2609. console.log(longitude,latitude);
  2610. if(latitude !=null && longitude !=null && latitude !="" && longitude !="" && latitude !=undefined && longitude !=undefined ){
  2611. Zb = [longitude,latitude];
  2612. }else {
  2613. Zb =[115.452752, 31.789033];
  2614. }
  2615. //获取坐标点LocationManager
  2616. // geoGps().then(response => {
  2617. //
  2618. // });
  2619. //矢量标注样式设置函数,设置image为图标ol.style.Icon
  2620. function createLabelStyle() {
  2621. return new ol.style.Style({
  2622. image: new ol.style.Icon({
  2623. //设置图标偏移
  2624. anchor: [0.5, 1],
  2625. //标注样式的起点位置
  2626. anchorOrigin: "top-right",
  2627. //X方向单位:分数
  2628. anchorXUnits: "fraction",
  2629. //Y方向单位:像素
  2630. anchorYUnits: "pixels",
  2631. //偏移起点位置的方向
  2632. offsetOrigin: "top-right",
  2633. //透明度
  2634. opacity: 0.9,
  2635. //图片路径
  2636. src: require("../../assets/images/housesteadSurvey/mark.png"),
  2637. }),
  2638. text: new ol.style.Text({
  2639. textAlign: "center", //位置
  2640. textBaseline: "middle", //基准线
  2641. font: "normal 12px 微软雅黑", //文字样式
  2642. //text: "标注点", //文本内容
  2643. fill: new ol.style.Fill({
  2644. //文本填充样式(即文字颜色)
  2645. color: "#ff0000",
  2646. }),
  2647. }),
  2648. zIndex: 9999,
  2649. });
  2650. }
  2651. var newcenterFeature = new ol.Feature({
  2652. geometry: new ol.geom.Point(ol.proj.fromLonLat(Zb)), //几何信息
  2653. name: "标注点",
  2654. });
  2655. var sourceMapLook = new ol.source.Vector({wrapX: false});
  2656. vector_drawing = new ol.layer.Vector({
  2657. source: sourceMapLook,
  2658. });
  2659. map.addLayer(vector_drawing);
  2660. newcenterFeature.setStyle(createLabelStyle()); //设置要素样式
  2661. sourceMapLook.addFeature(newcenterFeature);
  2662. map.getView().animate({
  2663. // 只设置需要的属性即可
  2664. center: ol.proj.fromLonLat(Zb), // 中心点
  2665. zoom: 17.8, // 缩放级别
  2666. rotation: undefined, // 缩放完成view视图旋转弧度
  2667. duration: 1000, // 缩放持续时间,默认不需要设置
  2668. });
  2669. });
  2670. //定位当前位置 ------end
  2671. //开始绘制图层- -----start
  2672. $("#htMapAll").on("click", function () {
  2673. console.log("进入绘制图层")
  2674. //删除之前 测距操作添加map中的绘图 --------start
  2675. //map.removeLayer(helpTooltip);
  2676. map.removeLayer(vector);
  2677. map.removeInteraction(draw_cm);
  2678. //map.removeOverlay(helpTooltipElement);
  2679. map.removeLayer(measureTooltipElement);
  2680. //删除之前 测距操作添加map中的绘图 --------end
  2681. //删除之前画图图层,重新绘制图层
  2682. map.removeInteraction(draw_map);
  2683. map.removeLayer(drawing);
  2684. //var source = new ol.source.Vector({wrapX: false});
  2685. drawing = new ol.layer.Vector({
  2686. source: new ol.source.Vector(),
  2687. });
  2688. map.addLayer(drawing);
  2689. function addInteraction() {
  2690. draw_map = new ol.interaction.Draw({
  2691. source: drawing.getSource(),
  2692. type: "Polygon",
  2693. });
  2694. draw_map.on("drawend", function (evt) {
  2695. var feature = evt.feature;
  2696. var geometry = feature.getGeometry();
  2697. that.coordinate = geometry.getCoordinates();
  2698. //_this.coordinateList = coordinate.toString();
  2699. //提示当前坐标是否绘制完成
  2700. if(that.coordinate != "" && that.coordinate !=null) {
  2701. that.showhzht = true;
  2702. that.htZjdZrzFsss =that.coordinate;
  2703. // htMapAllFu();
  2704. }else {
  2705. console.log("6");
  2706. $("#htMapAll").trigger("click");
  2707. }
  2708. });
  2709. map.addInteraction(draw_map);
  2710. }
  2711. function htMapAllFu() {
  2712. //that.drawMapPolygonFun();
  2713. //绘制多边形地图
  2714. that.$dialog
  2715. .confirm({
  2716. title: "提示",
  2717. message: "是否重新绘制画图",
  2718. })
  2719. .then(() => {
  2720. //$("#drawRemove").trigger("click");
  2721. map.removeInteraction(draw_map);
  2722. that.coordinate = "";
  2723. })
  2724. .catch(() => {
  2725. //删除画图点
  2726. map.removeInteraction(draw_map);
  2727. });
  2728. }
  2729. addInteraction();
  2730. });
  2731. //删除之前绘制图层
  2732. $("#deleteHistory").on("click", function () {
  2733. console.log("否进入");
  2734. map.removeLayer(drawing);
  2735. that.showhzht = false;
  2736. });
  2737. //开始绘制图层- -----end
  2738. //清除画图鼠标点击事件
  2739. // $("#drawRemove").click(function () {
  2740. // map.removeLayer(drawing);
  2741. // });
  2742. //
  2743. //地图定义
  2744. var delete_map = ["mapZjd", "mapZrz","mapFsss"];
  2745. var texiao_layer_zjd;
  2746. var texiao_layer_zrz;
  2747. var texiao_layer_fsss;
  2748. //按照查询条件人名 定位地图-----------------start
  2749. $("#query").on("click", function () {
  2750. //数据库查询数据------------------------------------------------------start
  2751. var val = that.seachText;
  2752. that.mapDataAll =[];
  2753. if (val == "") {
  2754. that.$toast('请填写查询条件再查询');
  2755. } else {
  2756. var styleZjd = new ol.style.Style({
  2757. stroke: new ol.style.Stroke({
  2758. //边界样式
  2759. color: "#CCFF66",
  2760. width: 6,
  2761. }),
  2762. });
  2763. let params = {
  2764. "deptId" : that.$cookies.get("item").deptId,
  2765. "zjddm" : val,
  2766. "syqr" : val,
  2767. "pageSize":20,
  2768. }
  2769. console.log(params);
  2770. listZjdzd(params).then((response) => {
  2771. if(response.rows.length>=0){
  2772. that.mapDataAll = response.rows;
  2773. console.log(that.mapDataAll);
  2774. for(var hg=0; hg < that.mapDataAll.length; hg++){
  2775. var mapNum = that.mapDataAll[hg].houseDataConfirmStatus;
  2776. if(mapNum == "UNCONFIRMED"){
  2777. that.mapDataAll[hg].paceType = "未核查";
  2778. } else if (mapNum == "CONFIRMED"){
  2779. that.mapDataAll[hg].paceType = "已核查";
  2780. }else{
  2781. }
  2782. that.mapDataAll[hg].typeTc="宅基地";
  2783. if (that.mapDataAll[hg] !=null && that.mapDataAll[hg].theGeom != null && that.mapDataAll[hg].theGeom != "") {
  2784. //that.mapDataAll[hg].createBy = 'mapTheGeomZjdId';
  2785. var hc_land = new ol.layer.Vector({
  2786. title: "add Layer",
  2787. source: new ol.source.Vector({
  2788. projection: projection,
  2789. features: new ol.format.GeoJSON().readFeatures("{\n" +
  2790. " \"type\": \"Feature\",\n" +
  2791. " \"geometry\":" + that.mapDataAll[hg].theGeom + ", \"properties\":" + JSON.stringify(that.mapDataAll[hg]) + "}"),
  2792. }),
  2793. style: styleZjd
  2794. });
  2795. map.addLayer(hc_land);
  2796. var maxXMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxX;
  2797. var maxYMap = hc_land.values_.source.featuresRtree_.rbush_.data.maxY;
  2798. var minXMap = hc_land.values_.source.featuresRtree_.rbush_.data.minX;
  2799. var minYMap = hc_land.values_.source.featuresRtree_.rbush_.data.minY;
  2800. //定位查询位置
  2801. var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  2802. map.getView().animate({
  2803. // 只设置需要的属性即可
  2804. center: center, // 中心点
  2805. zoom: 15.8, // 缩放级别
  2806. rotation: undefined, // 缩放完成view视图旋转弧度
  2807. duration: 1000, // 缩放持续时间,默认不需要设置
  2808. });
  2809. }
  2810. console.log(that.mapDataAll[hg].zjddm);
  2811. // listFsss(paramsZrz).then((response) => {
  2812. // console.log(response);
  2813. // that.mapDataAll.push(response.rows);
  2814. // });
  2815. }
  2816. // var mapZrzFor = that.mapDataAll[0].length+1;
  2817. // console.log(mapZrzFor);
  2818. // for(var mapFor=0;mapZrzFor>mapFor;mapFor++){
  2819. // //查询自然幢
  2820. // let paramsZrz = {
  2821. // "deptId" : that.$cookies.get("item").deptId,
  2822. // "zjddm" : that.mapDataAll[0][mapFor].zjddm,
  2823. // "pageSize":20,
  2824. // }
  2825. // listZrz(paramsZrz).then((response) => {
  2826. // console.log(response);
  2827. // that.mapDataAll[0].
  2828. // that.mapDataAll[0].push(response.rows);
  2829. // });
  2830. // }
  2831. setTimeout(function () {
  2832. that.showSearch = true ;
  2833. $('.searchBox').css('display','block')
  2834. var height = $(".searchBar_wrap").outerHeight(true) - $(".searchBar_wrap .van-search").outerHeight(true)
  2835. document.styleSheets[0].insertRule(
  2836. "@keyframes test" +
  2837. "{" +
  2838. "0%{bottom: -" + height + "px;}" +
  2839. "100%{bottom: 0px;}" +
  2840. "}"
  2841. )
  2842. $('.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'});
  2843. //}
  2844. },500);
  2845. } else {
  2846. that.$toast("暂无数据")
  2847. }
  2848. });
  2849. }
  2850. //数据库查询数据------------------------------------------------------end
  2851. //地图查询------------------------------------------------------------start
  2852. /**
  2853. * @api wfs服务空间查询
  2854. * @param {*} wfsurl
  2855. * @param {*} srsName
  2856. * @param {*} typeName
  2857. * @param {*} drawType
  2858. * @param {option 可选} geometryField
  2859. */
  2860. // var val = that.seachText;
  2861. // if (val == "") {
  2862. // that.$toast('请填写查询条件再查询');
  2863. // } else {
  2864. // //清除之前查询数据
  2865. // that.mapDataAll =[];
  2866. // //分类查询查询农地、农房
  2867. // var difang;
  2868. // //查询条件
  2869. // var cql_filter_cun;
  2870. // var cun = that.$cookies.get("item").deptId;
  2871. // difang = ["zjd_dc:t_house_survey_zjdzd", "zjd_dc:t_house_survey_zrz","zjd_dc:t_house_survey_fsss"];
  2872. // var tach = 0;
  2873. // var once = 0;
  2874. // for (var i = 0; i < difang.length; i++) {
  2875. // map.removeLayer(delete_map[i]);
  2876. // // 数字验证!
  2877. // var reg = /\d/;
  2878. // //验证汉子
  2879. // //var han = /^[\u4e00-\u9fa5]+$/;
  2880. // if (reg.test(val)) {
  2881. // //循环判断查询条件
  2882. // cql_filter_cun = "zjddm='" + val + "'" + "and dept_id='" + cun + "'";
  2883. // } else {
  2884. // //循环判断查询条件
  2885. // if (difang[i] == "zjd_dc:t_house_survey_zjdzd") {
  2886. // cql_filter_cun = "zjddm='" + val + "'" + "and dept_id='" + cun + "'";
  2887. // } else if(difang[i] == "zjd_dc:t_house_survey_zrz") {
  2888. // cql_filter_cun = "zjddm='" + val + "'" + "and dept_id='" + cun + "'";
  2889. // } else if(difang[i] == "zjd_dc:t_house_survey_fsss") {
  2890. // cql_filter_cun = "zjddm='" + val + "'" + "and dept_id='" + cun + "'";
  2891. // }
  2892. // }
  2893. // //for(var i=0; i< difang.length; i++){
  2894. // //cql_filter = "CM='"+cun +"'"+ "and XZQK='待流转待盘活'";
  2895. //
  2896. // //图层加载
  2897. //
  2898. // //业务图层 wms服务
  2899. // delete_map[i] = new ol.layer.Tile({
  2900. // source: new ol.source.TileWMS({
  2901. // url: "http://116.255.223.226:8080/geoserver/zjd_dc/wms",
  2902. // params: {
  2903. // LAYERS: difang[i],
  2904. // //'LAYERS': 'new_shp:new_shp_all',
  2905. // TILED: true,
  2906. // cql_filter: cql_filter_cun,
  2907. // SRID: 3857,
  2908. // },
  2909. // }),
  2910. // });
  2911. //
  2912. // //}
  2913. // //定位查询位置
  2914. // let param_dw = {
  2915. // srsName: "EPSG:3857",
  2916. // service: "WFS",
  2917. // version: "1.0.0",
  2918. // request: "GetFeature",
  2919. // typename: difang[i],
  2920. // //featureNS: 'nsgk_hc',//命名空间 URI
  2921. // cql_filter: cql_filter_cun,
  2922. // //featurePrefix: 'nationalwater',//工作区名称
  2923. // //featureTypes: ['nationalwater:01fir'],//查询图层,可以是同一个工作区下多个图层,逗号隔开
  2924. // outputFormat: "application/json",
  2925. // //filter: ol.format.filter.equalTo(t,e,r)//前者是属性名,后者是对应值
  2926. // };
  2927. // let url_dw = "http://116.255.223.226:8080/geoserver/zjd_dc/wfs"; //wfsurl;
  2928. // url_dw = url_dw + "?";
  2929. // for (let key in param_dw) {
  2930. // url_dw = url_dw + key + "=" + param_dw[key] + "&";
  2931. // }
  2932. // url_dw = url_dw.substr(0, url_dw.length - 1);
  2933. // fetch(url_dw, {
  2934. // method: "POST", // *GET, POST, PUT, DELETE, etc.
  2935. // })
  2936. // .then((res) => {
  2937. // var geojsonmap = res.json();
  2938. // return geojsonmap;
  2939. // })
  2940. // .then((data) => {
  2941. // tach = tach + 1;
  2942. // if (data.features != null && data.features != "") {
  2943. // for(var i=0; data.features.length >i; i++) {
  2944. // //特效动画实现 -----------------------------start
  2945. // console.log(tach,"++++++++++++++++++",once)
  2946. // var datamap = data.features[0].bbox;
  2947. // if (tach == 1 && once == 0) {
  2948. // console.log("zrz")
  2949. // texiao_layer_zjd = new ol.layer.Vector({
  2950. // source: new ol.source.Vector(),
  2951. // });
  2952. // map.addLayer(texiao_layer_zjd);
  2953. // var center = ol.extent.getCenter(datamap); //获取边界区域的中心位置
  2954. // var circle = new ol.Feature({
  2955. // geometry: new ol.geom.Point(center), //ol.proj.transform([104, 30], 'EPSG:4326', 'EPSG:3857') //投影坐标转为地理坐标
  2956. // });
  2957. //
  2958. // circle.setStyle(
  2959. // new ol.style.Style({
  2960. // image: new ol.style.Circle({
  2961. // radius: 0,
  2962. // stroke: new ol.style.Stroke({
  2963. // color: "yellow",
  2964. // size: 1,
  2965. // }),
  2966. // }),
  2967. // })
  2968. // );
  2969. // texiao_layer_zjd.getSource().addFeature(circle);
  2970. //
  2971. // // 关键的地方在此:监听postcompose事件,在里面重新设置circle的样式
  2972. // var radius = 0;
  2973. // map.on("postcompose", function () {
  2974. // // 增大半径,最大20
  2975. // radius++;
  2976. // radius = radius % 10;
  2977. // // 设置样式
  2978. // circle.setStyle(
  2979. // new ol.style.Style({
  2980. // image: new ol.style.Circle({
  2981. // radius: radius,
  2982. // stroke: new ol.style.Stroke({
  2983. // color: "yellow",
  2984. // size: 1,
  2985. // }),
  2986. // }),
  2987. // })
  2988. // );
  2989. // });
  2990. // } else if(tach == 2) {
  2991. // console.log("zrz")
  2992. // texiao_layer_zrz = new ol.layer.Vector({
  2993. // source: new ol.source.Vector(),
  2994. // });
  2995. // map.addLayer(texiao_layer_zrz);
  2996. // var center = ol.extent.getCenter(datamap); //获取边界区域的中心位置
  2997. // var circle = new ol.Feature({
  2998. // geometry: new ol.geom.Point(center), //ol.proj.transform([104, 30], 'EPSG:4326', 'EPSG:3857') //投影坐标转为地理坐标
  2999. // });
  3000. //
  3001. // circle.setStyle(
  3002. // new ol.style.Style({
  3003. // image: new ol.style.Circle({
  3004. // radius: 0,
  3005. // stroke: new ol.style.Stroke({
  3006. // color: "yellow",
  3007. // size: 1,
  3008. // }),
  3009. // }),
  3010. // })
  3011. // );
  3012. // texiao_layer_zrz.getSource().addFeature(circle);
  3013. //
  3014. // // 关键的地方在此:监听postcompose事件,在里面重新设置circle的样式
  3015. // var radius = 0;
  3016. // map.on("postcompose", function () {
  3017. // // 增大半径,最大20
  3018. // radius++;
  3019. // radius = radius % 10;
  3020. // // 设置样式
  3021. // circle.setStyle(
  3022. // new ol.style.Style({
  3023. // image: new ol.style.Circle({
  3024. // radius: radius,
  3025. // stroke: new ol.style.Stroke({
  3026. // color: "yellow",
  3027. // size: 1,
  3028. // }),
  3029. // }),
  3030. // })
  3031. // );
  3032. // });
  3033. // } else {
  3034. // console.log("fsss")
  3035. // texiao_layer_fsss = new ol.layer.Vector({
  3036. // source: new ol.source.Vector(),
  3037. // });
  3038. // map.addLayer(texiao_layer_fsss);
  3039. // var center = ol.extent.getCenter(datamap); //获取边界区域的中心位置
  3040. // var circle = new ol.Feature({
  3041. // geometry: new ol.geom.Point(center), //ol.proj.transform([104, 30], 'EPSG:4326', 'EPSG:3857') //投影坐标转为地理坐标
  3042. // });
  3043. //
  3044. // circle.setStyle(
  3045. // new ol.style.Style({
  3046. // image: new ol.style.Circle({
  3047. // radius: 0,
  3048. // stroke: new ol.style.Stroke({
  3049. // color: "yellow",
  3050. // size: 1,
  3051. // }),
  3052. // }),
  3053. // })
  3054. // );
  3055. // texiao_layer_fsss.getSource().addFeature(circle);
  3056. //
  3057. // // 关键的地方在此:监听postcompose事件,在里面重新设置circle的样式
  3058. // var radius = 0;
  3059. // map.on("postcompose", function () {
  3060. // // 增大半径,最大20
  3061. // radius++;
  3062. // radius = radius % 10;
  3063. // // 设置样式
  3064. // circle.setStyle(
  3065. // new ol.style.Style({
  3066. // image: new ol.style.Circle({
  3067. // radius: radius,
  3068. // stroke: new ol.style.Stroke({
  3069. // color: "yellow",
  3070. // size: 1,
  3071. // }),
  3072. // }),
  3073. // })
  3074. // );
  3075. // });
  3076. // }
  3077. // //特效动画实现 -----------------------------end
  3078. // that.mapDataAll.push(JSON.parse(JSON.stringify(data.features[i].properties)));
  3079. // }
  3080. // //定位实现
  3081. // let resolution = map.getView().getResolutionForExtent(data.bbox, map.getSize());
  3082. // map.getView().fit(data.bbox);
  3083. // map.getView().setResolution(resolution);
  3084. // console.log(that.mapDataAll);
  3085. // } else if (tach == 1) {
  3086. // once = once + 1;
  3087. // } else {
  3088. // if (once == 1 && tach == 3) {
  3089. // that.$toast("没有找到相关人员信息");
  3090. // //that.showSearch = false ;
  3091. // }else {
  3092. //
  3093. // }
  3094. // }
  3095. // })
  3096. // .catch((error) => {
  3097. // console.log("【异常】", error);
  3098. // });
  3099. // map.addLayer(delete_map[i]);
  3100. // }
  3101. //地图查询------------------------------------------------------------end
  3102. });
  3103. //按照查询 定位地图-----------------end
  3104. //筛选附属设施-----------------------------------start
  3105. $("#fsssSx").click(function () {
  3106. if(!that.fsssSx){
  3107. map.addLayer(fsssTc);
  3108. }else {
  3109. map.removeLayer(fsssTc);
  3110. }
  3111. });
  3112. $("#zrzSx").click(function () {
  3113. if(!that.zrzSx){
  3114. map.addLayer(zrzTc);
  3115. }else {
  3116. map.removeLayer(zrzTc);
  3117. }
  3118. });
  3119. $("#zjdSx").click(function () {
  3120. if(!that.zjdSx){
  3121. map.addLayer(zjdTc);
  3122. }else {
  3123. map.removeLayer(zjdTc);
  3124. }
  3125. });
  3126. $("#checkAll").click(function () {
  3127. if(!that.fsssSx && !that.zjdSx && !that.zrzSx){
  3128. map.addLayer(zjdTc);
  3129. map.addLayer(zrzTc);
  3130. map.addLayer(fsssTc);
  3131. }else {
  3132. map.removeLayer(zrzTc);
  3133. map.removeLayer(zjdTc);
  3134. map.removeLayer(fsssTc);
  3135. }
  3136. });
  3137. //筛选附属设施-----------------------------------end
  3138. // //获取类型开始 侧面-----------------------------------------------------------------start
  3139. //样式加载定义
  3140. var vector_drawing_delete;
  3141. $("#area").click(function () {
  3142. console.log("进入测面");
  3143. if(that.textMjAll != "" && that.clickBbox !=""){
  3144. // var styleFsss = new ol.style.Style({
  3145. // text: new ol.style.Text({
  3146. // text: that.textMjAll+"㎡",
  3147. // font: '30px sans-serif',
  3148. // textAlign: "center",
  3149. // textBaseline: "middle",
  3150. // //font: 'verdana',
  3151. // fill: new ol.style.Fill({
  3152. // color: "#ff00ff"
  3153. // }),
  3154. // // backgroundFill: new ol.style.Fill({
  3155. // // color: "#ff0000"
  3156. // // }),
  3157. // font: "30px sans-serif",
  3158. // stroke: new ol.style.Stroke({
  3159. // color: "#ffffff"
  3160. // // width: 3
  3161. // }),
  3162. // offsetX: parseInt(0, 10),
  3163. // offsetY: parseInt(0, 10),
  3164. // placement: "point", //point 则自动计算面的中心k点然后标注 line 则根据面要素的边进行标注
  3165. // overflow: false //超出面的部分不显示
  3166. // }),
  3167. // });
  3168. map.removeLayer(vector_drawing_delete);
  3169. function createLabelStyle() {
  3170. return new ol.style.Style({
  3171. text: new ol.style.Text({
  3172. text: that.textMjAll+"㎡",
  3173. textAlign: "center", //位置
  3174. textBaseline: "middle", //基准线
  3175. font: "normal 12px 微软雅黑", //文字样式
  3176. //text: "标注点", //文本内容
  3177. fill: new ol.style.Fill({
  3178. //文本填充样式(即文字颜色)
  3179. color: "#FFFFFF",
  3180. width: 10,
  3181. }),
  3182. overflow: false //超出面的部分不显示
  3183. }),
  3184. zIndex: 9999,
  3185. });
  3186. }
  3187. var newcenterFeature = new ol.Feature({
  3188. geometry: new ol.geom.Point(that.clickBbox), //几何信息
  3189. //name: "标注点",
  3190. });
  3191. var sourceMapLook = new ol.source.Vector({wrapX: false});
  3192. vector_drawing_delete = new ol.layer.Vector({
  3193. source: sourceMapLook,
  3194. });
  3195. map.addLayer(vector_drawing_delete);
  3196. newcenterFeature.setStyle(createLabelStyle()); //设置要素样式
  3197. sourceMapLook.addFeature(newcenterFeature);
  3198. that.clickBbox ="";
  3199. that.textMjAll = "";
  3200. //map.addLayer(styleFsss);
  3201. } else if(that.textMjAllNum == "1"){
  3202. that.$toast("该图层面积暂无信息");
  3203. } else {
  3204. that.$toast("选择图层进行面积显示");
  3205. }
  3206. });
  3207. // $("#area").click(function () {
  3208. // console.log("进入测面")
  3209. // //删除绘制图层画图操作-------start
  3210. // map.removeInteraction(draw_map);
  3211. // map.removeLayer(drawing);
  3212. // //删除绘制图层画图操作-------end
  3213. // //开始绘制 测面--------------------------------------------------------------start
  3214. // //定义矢量数据源
  3215. // var source = new ol.source.Vector();
  3216. //
  3217. // vector = new ol.layer.Vector({
  3218. // source: source,
  3219. // style: new ol.style.Style({
  3220. // fill: new ol.style.Fill({
  3221. // color: "rgba(255,255,255,0.2)",
  3222. // }),
  3223. // stroke: new ol.style.Stroke({
  3224. // color: "#e21e0a",
  3225. // width: 2,
  3226. // }),
  3227. // //image: new ol.style.Circle({
  3228. // // radius: 7,
  3229. // // fill: new ol.style.Fill({
  3230. // // color:'#ffcc33'
  3231. // // })
  3232. // //})
  3233. // }),
  3234. // });
  3235. //
  3236. // //将矢量图层添加到地图中 线的颜色加入map中
  3237. // map.addLayer(vector);
  3238. //
  3239. // var sketch;
  3240. //
  3241. // var continuePolygonMsg = "单击以继续绘制多边形";
  3242. //
  3243. // /**
  3244. // * Message to show when the user is drawing a line.
  3245. // * @type {string}
  3246. // */
  3247. // //var continueLineMsg = '单击继续绘制直线';
  3248. //
  3249. // //鼠标移动触发的函数
  3250. // var pointerMoveHandler = function (evt) {
  3251. // //Indicates if the map is currently being dragged.
  3252. // //Only set for POINTERDRAG and POINTERMOVE events. Default is false.
  3253. // //如果是平移地图则直接结束
  3254. // if (evt.dragging) {
  3255. // return;
  3256. // }
  3257. // //帮助提示信息
  3258. // var helpMsg = "单击开始绘图";
  3259. //
  3260. // if (sketch) {
  3261. // //Get the feature's default geometry.
  3262. // //A feature may have any number of named geometries.
  3263. // //获取绘图对象的几何要素
  3264. // var geom = sketch.getGeometry();
  3265. // //如果当前绘制的几何要素是多边形,则将绘制提示信息设置为多边形绘制提示信息
  3266. // //如果当前绘制的几何要素是多线段,则将绘制提示信息设置为多线段绘制提示信息
  3267. // helpMsg = continuePolygonMsg;
  3268. // }
  3269. // //设置帮助提示要素的内标签为帮助提示信息
  3270. // helpTooltipElement.innerHTML = helpMsg;
  3271. // //设置帮助提示信息的位置
  3272. // //The coordinate in view projection corresponding to the original browser event.
  3273. // helpTooltip.setPosition(evt.coordinate);
  3274. // //移除帮助提示要素的隐藏样式
  3275. // $(helpTooltipElement).removeClass("hidden");
  3276. // };
  3277. //
  3278. // map.on("pointermove", pointerMoveHandler);
  3279. //
  3280. // map.getViewport().addEventListener("mouseout", function () {
  3281. // helpTooltipElement.classList.add("hidden");
  3282. // });
  3283. //
  3284. // //添加交互式绘图对象的函数
  3285. // function addInteraction() {
  3286. // // 获取当前选择的绘制类型
  3287. // //var type = typeSelect.value == 'length' ? 'Polygon' : 'LineString';
  3288. // //创建一个交互式绘图对象
  3289. // var type = "Polygon";
  3290. // draw_cm = new ol.interaction.Draw({
  3291. // //绘制的数据源
  3292. // source: source,
  3293. // //绘制类型
  3294. // type: type,
  3295. // //样式
  3296. // style: new ol.style.Style({
  3297. // fill: new ol.style.Fill({
  3298. // color: "rgba(255,255,255,0.2)",
  3299. // }),
  3300. // stroke: new ol.style.Stroke({
  3301. // color: "rgba(0,0,0,0.5)",
  3302. // lineDash: [10, 10],
  3303. // width: 2,
  3304. // }),
  3305. // // image: new ol.style.Circle({
  3306. // // radius: 5,
  3307. // // stroke: new ol.style.Stroke({
  3308. // // color:'rgba(0,0,0,0.7)'
  3309. // // }),
  3310. // // fill: new ol.style.Fill({
  3311. // //color: 'rgba(255,255,255,0.2)'
  3312. // // })
  3313. // //})
  3314. // }),
  3315. // });
  3316. // //将交互绘图对象添加到地图中
  3317. // map.addInteraction(draw_cm);
  3318. //
  3319. // //创建测量提示框
  3320. // createMeasureTooltip();
  3321. // //创建帮助提示框
  3322. // createHelpTooltip();
  3323. //
  3324. // //定义一个事件监听
  3325. // var listener;
  3326. // //定义一个控制鼠标点击次数的变量
  3327. // var count = 0;
  3328. // //绘制开始事件
  3329. // draw_cm.on(
  3330. // "drawstart",
  3331. // function (evt) {
  3332. // //The feature being drawn.
  3333. // sketch = evt.feature;
  3334. // //提示框的坐标
  3335. // var tooltipCoord = evt.coordinate;
  3336. // //监听几何要素的change事件
  3337. // //Increases the revision counter and dispatches a 'change' event.
  3338. //
  3339. // listener = sketch.getGeometry().on("change", function (evt) {
  3340. // //The event target.
  3341. // //获取绘制的几何对象
  3342. // var geom = evt.target;
  3343. // //定义一个输出对象,用于记录面积和长度
  3344. // var output;
  3345. // map.removeEventListener("singleclick");
  3346. // map.removeEventListener("dblclick");
  3347. // //输出多边形的面积
  3348. // output = formatArea(geom);
  3349. // //Return an interior point of the polygon.
  3350. // //获取多变形内部点的坐标
  3351. // tooltipCoord = geom.getInteriorPoint().getCoordinates();
  3352. //
  3353. // //设置测量提示框的内标签为最终输出结果
  3354. // measureTooltipElement.innerHTML = output;
  3355. // //设置测量提示信息的位置坐标
  3356. // measureTooltip.setPosition(tooltipCoord);
  3357. // });
  3358. //
  3359. // //地图单击事件
  3360. // map.on("singleclick", function (evt) {
  3361. // //设置测量提示信息的位置坐标,用来确定鼠标点击后测量提示框的位置
  3362. // measureTooltip.setPosition(evt.coordinate);
  3363. // //如果是第一次点击,则设置测量提示框的文本内容为起点
  3364. // if (count == 0) {
  3365. // measureTooltipElement.innerHTML = "起点";
  3366. // }
  3367. // //根据鼠标点击位置生成一个点
  3368. // var point = new ol.geom.Point(evt.coordinate);
  3369. // //将该点要素添加到矢量数据源中
  3370. // source.addFeature(new ol.Feature(point));
  3371. // //更改测量提示框的样式,使测量提示框可见
  3372. // measureTooltipElement.className = "tooltip tooltip-static";
  3373. // //创建测量提示框
  3374. // createMeasureTooltip();
  3375. // //点击次数增加
  3376. // count++;
  3377. // });
  3378. //
  3379. // //地图双击事件
  3380. // map.on("dblclick", function (evt) {
  3381. // //根据
  3382. // var point = new ol.geom.Point(evt.coordinate);
  3383. // source.addFeature(new ol.Feature(point));
  3384. // });
  3385. // },
  3386. // this
  3387. // );
  3388. // //绘制结束事件
  3389. // draw_cm.on(
  3390. // "drawend",
  3391. // function (evt) {
  3392. // count = 0;
  3393. // //设置测量提示框的样式
  3394. // measureTooltipElement.className = "tooltip tooltip-static";
  3395. // //Set the offset for this overlay.
  3396. // //设置偏移量
  3397. // measureTooltip.setOffset([0, -7]);
  3398. // //清空绘制要素
  3399. // sketch = null;
  3400. // //清空测量提示要素
  3401. // measureTooltipElement = null;
  3402. // //创建测量提示框
  3403. // createMeasureTooltip();
  3404. // //Removes an event listener using the key returned by on() or once().
  3405. // //移除事件监听
  3406. // ol.Observable.unByKey(listener);
  3407. // //移除地图单击事件
  3408. // map.removeEventListener("singleclick");
  3409. // },
  3410. // this
  3411. // );
  3412. // }
  3413. // /**
  3414. // * Creates a new help tooltip
  3415. // */
  3416. // function createHelpTooltip() {
  3417. // if (helpTooltipElement) {
  3418. // helpTooltipElement.parentNode.removeChild(helpTooltipElement);
  3419. // }
  3420. // helpTooltipElement = document.createElement("div");
  3421. // helpTooltipElement.className = "ol-tooltip hidden";
  3422. // helpTooltip = new ol.Overlay({
  3423. // element: helpTooltipElement,
  3424. // offset: [15, 0],
  3425. // positioning: "center-left",
  3426. // });
  3427. // map.addOverlay(helpTooltip);
  3428. // }
  3429. //
  3430. // /**
  3431. // * Creates a new measure tooltip
  3432. // */
  3433. // function createMeasureTooltip() {
  3434. // if (measureTooltipElement) {
  3435. // measureTooltipElement.parentNode.removeChild(measureTooltipElement);
  3436. // }
  3437. // measureTooltipElement = document.createElement("div");
  3438. // measureTooltipElement.className = "ol-tooltip ol-tooltip-measure";
  3439. // measureTooltip = new ol.Overlay({
  3440. // element: measureTooltipElement,
  3441. // offset: [0, -15],
  3442. // positioning: "bottom-center",
  3443. // });
  3444. // map.addOverlay(measureTooltip);
  3445. // }
  3446. //
  3447. // //格式化测量面积
  3448. // var formatArea = function (polygon) {
  3449. // //定义面积变量
  3450. // var area;
  3451. // //获取平面面积
  3452. // area = polygon.getArea();
  3453. // //定义输出变量
  3454. // var output;
  3455. // //当面积大于10000时,转换为平方千米,否则为平方米
  3456. // if (area > 10000) {
  3457. // output =
  3458. // Math.round((area / 1000000) * 100) / 100 + " " + "km<sup>2</sup>";
  3459. // } else {
  3460. // output = Math.round(area * 100) / 100 + " " + "m<sup>2</sup>";
  3461. // }
  3462. // return output;
  3463. // };
  3464. //
  3465. // addInteraction();
  3466. // });
  3467. // //侧面结束-----------------------------------------------------------------end
  3468. //全图展示-----------------start
  3469. $("#mapAllQt").click(function (){
  3470. //定位查询位置
  3471. let param_dw = {
  3472. srsName: "EPSG:3857",
  3473. service: "WFS",
  3474. version: "1.0.0",
  3475. request: "GetFeature",
  3476. typename: "zjd_dc:t_house_survey_border_village",
  3477. //featureNS: 'nsgk_hc',//命名空间 URI
  3478. cql_filter: cql_filter,
  3479. //featurePrefix: 'nationalwater',//工作区名称
  3480. //featureTypes: ['nationalwater:01fir'],//查询图层,可以是同一个工作区下多个图层,逗号隔开
  3481. outputFormat: "application/json",
  3482. //filter: ol.format.filter.equalTo(t,e,r)//前者是属性名,后者是对应值
  3483. };
  3484. let url_dw = "http://116.255.223.226:8080/geoserver/zjd_dc/wfs"; //wfsurl;
  3485. url_dw = url_dw + "?";
  3486. for (let key in param_dw) {
  3487. url_dw = url_dw + key + "=" + param_dw[key] + "&";
  3488. }
  3489. url_dw = url_dw.substr(0, url_dw.length - 1);
  3490. fetch(url_dw, {
  3491. method: "POST", // *GET, POST, PUT, DELETE, etc.
  3492. })
  3493. .then((res) => {
  3494. var geojsonmap = res.json();
  3495. return geojsonmap;
  3496. })
  3497. .then((data) => {
  3498. let resolution = map.getView().getResolutionForExtent(data.bbox,map.getSize());
  3499. map.getView().fit(data.bbox);
  3500. map.getView().setResolution(resolution);
  3501. // var datamap = data.bbox;
  3502. // var center = ol.extent.getCenter(datamap);
  3503. // map.getView().animate({
  3504. // // 只设置需要的属性即可
  3505. // center: center, // 中心点
  3506. // rotation: undefined, // 缩放完成view视图旋转弧度
  3507. // });
  3508. })
  3509. .catch((error) => {
  3510. console.log("【异常】", error);
  3511. });
  3512. });
  3513. //业务图层 wfs服务 属性查询开始 ------------------start
  3514. /**
  3515. * @api wfs服务空间查询
  3516. * @param {*} wfsurl
  3517. * @param {*} srsName
  3518. * @param {*} typeName
  3519. * @param {*} drawType
  3520. * @param {option 可选} geometryField
  3521. */
  3522. var wmsSource = new ol.source.TileWMS({
  3523. url: "http://116.255.223.226:8080/geoserver/zjd_dc/wms",
  3524. params: {
  3525. LAYERS: "zjd_dc:t_house_survey_all",
  3526. TILED: true,
  3527. SRID: 3857,
  3528. serverType: "geoserver",
  3529. crossOrigin: "anonymous",
  3530. },
  3531. });
  3532. map.on("pointermove", function (evt) {
  3533. if (evt.dragging) {
  3534. return;
  3535. }
  3536. var pixel = map.getEventPixel(evt.originalEvent);
  3537. var hit = map.forEachLayerAtPixel(pixel, function () {
  3538. return true;
  3539. });
  3540. map.getTargetElement().style.cursor = hit ? "pointer" : "";
  3541. });
  3542. //属性查询结束 ------------------end
  3543. //点击查询详细信息
  3544. map.on("singleclick", function (evt) {
  3545. let feature = map.forEachFeatureAtPixel(
  3546. evt.pixel,
  3547. (feature) => feature
  3548. );
  3549. var viewResolution = map.getView().getResolution(); ///** @type {number} */ (view.getResolution());
  3550. var zb = evt.coordinate;
  3551. var url = wmsSource.getFeatureInfoUrl(
  3552. evt.coordinate,
  3553. viewResolution,
  3554. "EPSG:3857",
  3555. { INFO_FORMAT: "text/html" }
  3556. );
  3557. var url_bbox = wmsSource.getFeatureInfoUrl(
  3558. evt.coordinate,
  3559. viewResolution,
  3560. "EPSG:3857",
  3561. { INFO_FORMAT: "application/json" }
  3562. );
  3563. if (url_bbox) {
  3564. fetch(url_bbox).then((res) => {
  3565. var geojsonmap = res.json();
  3566. return geojsonmap;
  3567. })
  3568. .then((data) => {
  3569. var center = ol.extent.getCenter(data.bbox); //获取边界区域的中心位置
  3570. that.clickBbox = center;
  3571. })
  3572. .catch((error) => {
  3573. console.log("【异常】", error);
  3574. });
  3575. }
  3576. if (url) {
  3577. fetch(url)
  3578. .then(function (response) {
  3579. return response.text();
  3580. })
  3581. .then(function (html) {
  3582. document.getElementById("info").innerHTML = html;
  3583. if (html.indexOf("<table") != -1) {
  3584. that.mapZjdData ="";
  3585. that.mapZrzData ="";
  3586. that.mapFsssData ="";
  3587. //that.mapZjdTeAll.active ="1";
  3588. that.mapZjdTeAll.mapZjdAData ={};
  3589. that.mapZjdTeAll.mapZrzAData ={};
  3590. that.mapZjdTeAll.mapFsssAData ={};
  3591. that.mapZjdDataTure ="";
  3592. setTimeout(() => {
  3593. if ($("#info .featureInfo .featureInfo").text() == "t_house_survey_zjdzd") {
  3594. // that.mapZjdDataTure ="";
  3595. // that.mapZjdTeAll.mapZrzAData ={};
  3596. // that.mapZjdTeAll.mapFsssAData ={};
  3597. map.removeLayer(hc_land_on);
  3598. that.mapHasDateStatus = 2;
  3599. let obj = {};
  3600. let trs = $("#info .featureInfo").find("tr:eq(1)");
  3601. let zjdXq = trs.find("td").eq(0).text();
  3602. let zjdIdNum = zjdXq.replace("t_house_survey_zjdzd.", "");
  3603. obj.id = zjdIdNum; // 主键id
  3604. obj.deptName = trs.find("td").eq(3).text();//行政区划名称
  3605. // obj.suyqrdm = trs.find("td").eq(4).text();//所有权人代码
  3606. // obj.nhdm = trs.find("td").eq(5).text();//农户代码
  3607. obj.zjddm = trs.find("td").eq(6).text();//宅基地代码
  3608. // obj.zdbh = trs.find("td").eq(7).text();//宗地编号
  3609. // obj.zddm = trs.find("td").eq(8).text();//宗地代码
  3610. // obj.zl = trs.find("td").eq(9).text();//坐落
  3611. // obj.zldwdm = trs.find("td").eq(10).text();//坐落单位代码
  3612. obj.zdmj = trs.find("td").eq(11).text();//宗地面积
  3613. // obj.yt = trs.find("td").eq(12).text();//用途
  3614. // obj.ytmc = trs.find("td").eq(13).text();//用途名称
  3615. // obj.dj = trs.find("td").eq(14).text();//宗地编号
  3616. // obj.jg = trs.find("td").eq(15).text();//价格万元
  3617. // obj.qllx = trs.find("td").eq(16).text();//权利类型
  3618. // obj.qlxz = trs.find("td").eq(17).text();//权利性质
  3619. // obj.qlsdfs = trs.find("td").eq(18).text();//权利设定方式
  3620. // obj.rjl = trs.find("td").eq(19).text();//容积率
  3621. // obj.jzmd = trs.find("td").eq(20).text();//建筑密度
  3622. // obj.jzxg = trs.find("td").eq(21).text();//建筑限高
  3623. // obj.zdszd = trs.find("td").eq(22).text();//宗地四至-东
  3624. // obj.zdszn = trs.find("td").eq(23).text();//宗地四至-南
  3625. // obj.zdszx = trs.find("td").eq(24).text();//宗地四至-西
  3626. // obj.zdszb = trs.find("td").eq(25).text();//宗地四至-北
  3627. // obj.zdt = trs.find("td").eq(26).text();//宗地图
  3628. // obj.tfh = trs.find("td").eq(27).text();//图幅号
  3629. // obj.djh = trs.find("td").eq(28).text();//地籍号
  3630. // obj.sjly = trs.find("td").eq(29).text();//数据来源
  3631. // obj.lyzk = trs.find("td").eq(30).text();//当前利用状况
  3632. // obj.xzkssj = trs.find("td").eq(31).text();//闲置开始时间
  3633. // obj.sffz = trs.find("td").eq(32).text();//是否发证
  3634. // obj.zjdzsh = trs.find("td").eq(33).text();//宅基地证书号
  3635. // obj.bz = trs.find("td").eq(34).text();//备注
  3636. // obj.houseDataConfirmStatus = trs.find("td").eq(40).text();//调查情况
  3637. // obj.zjdxctp =trs.find("td").eq(41).text();//宅基地现场图片
  3638. // obj.zjdqdfs = trs.find("td").eq(42).text();//宅基地取得方式
  3639. // obj.bccjl = trs.find("td").eq(43).text();//被惩处经历
  3640. // obj.bccbz = trs.find("td").eq(44).text();//被惩处备注
  3641. // obj.yctcyx = trs.find("td").eq(45).text();//有偿退出意向
  3642. // obj.zjdpzmj = trs.find("td").eq(46).text();//宅基地批准面积
  3643. // obj.zjdxzyy = trs.find("td").eq(47).text();//宅基地闲置原因
  3644. // obj.lzyx = trs.find("td").eq(48).text();//流转意向
  3645. // obj.sysNormalDisable = trs.find("td").eq(49).text();//是否停用
  3646. obj.active = 1;
  3647. // //字典项转化
  3648. // //是否发证字典项
  3649. // that.getDicts("sys_yes_no").then((response) => {
  3650. // var assetTypeOptions = response.data;
  3651. // if(obj.sffz !=null && obj.sffz !=""){
  3652. // for(var i=0;assetTypeOptions.length >i; i++){
  3653. // if(obj.sffz == assetTypeOptions[i].dictValue) {
  3654. // obj.sffz = assetTypeOptions[i].dictLabel;
  3655. // break;
  3656. // }
  3657. // }
  3658. // }
  3659. // });
  3660. // //利用状态字典项
  3661. // that.getDicts("zjdlyzk").then((response) => {
  3662. // var assetTypeOptions = response.data;
  3663. // if(obj.lyzk !=null && obj.lyzk !=""){
  3664. // for(var i=0;assetTypeOptions.length >i; i++){
  3665. // if(obj.lyzk == assetTypeOptions[i].dictValue) {
  3666. // obj.lyzk = assetTypeOptions[i].dictLabel;
  3667. // break;
  3668. // }
  3669. // }
  3670. // }
  3671. // });
  3672. // //流转意向字典项
  3673. // that.getDicts("is_have").then((response) => {
  3674. // var assetTypeOptions = response.data;
  3675. // if(obj.lzyx !=null && obj.lzyx !=""){
  3676. // for(var i=0;assetTypeOptions.length >i; i++){
  3677. // if(obj.lzyx == assetTypeOptions[i].dictValue) {
  3678. // obj.lzyx = assetTypeOptions[i].dictLabel;
  3679. // break;
  3680. // }
  3681. // }
  3682. // }
  3683. // });
  3684. // //有偿退出意向字典项
  3685. // that.getDicts("is_have").then((response) => {
  3686. // var assetTypeOptions = response.data;
  3687. // if(obj.yctcyx !=null && obj.yctcyx !=""){
  3688. // for(var i=0;assetTypeOptions.length >i; i++){
  3689. // if(obj.yctcyx == assetTypeOptions[i].dictValue) {
  3690. // obj.yctcyx = assetTypeOptions[i].dictLabel;
  3691. // break;
  3692. // }
  3693. // }
  3694. // }
  3695. // });
  3696. // //被惩处经历字典项
  3697. // that.getDicts("is_have").then((response) => {
  3698. // var assetTypeOptions = response.data;
  3699. // if(obj.bccjl !=null && obj.bccjl !=""){
  3700. // for(var i=0;assetTypeOptions.length >i; i++){
  3701. // if(obj.bccjl == assetTypeOptions[i].dictValue) {
  3702. // obj.bccjl = assetTypeOptions[i].dictLabel;
  3703. // break;
  3704. // }
  3705. // }
  3706. // }
  3707. // });
  3708. // //宅基地取得方式字典项
  3709. // that.getDicts("acquisition_method").then((response) => {
  3710. // var assetTypeOptions = response.data;
  3711. // if(obj.zjdqdfs !=null && obj.zjdqdfs !=""){
  3712. // for(var i=0;assetTypeOptions.length >i; i++){
  3713. // if(obj.zjdqdfs == assetTypeOptions[i].dictValue) {
  3714. // obj.zjdqdfs = assetTypeOptions[i].dictLabel;
  3715. // break;
  3716. // }
  3717. // }
  3718. // }
  3719. // });
  3720. // //权利设定方式字典项
  3721. // that.getDicts("right_setting_mode").then((response) => {
  3722. // var assetTypeOptions = response.data;
  3723. // if(obj.qlsdfs !=null && obj.qlsdfs !=""){
  3724. // for(var i=0;assetTypeOptions.length >i; i++){
  3725. // if(obj.qlsdfs == assetTypeOptions[i].dictValue) {
  3726. // obj.qlsdfs = assetTypeOptions[i].dictLabel;
  3727. // break;
  3728. // }
  3729. // }
  3730. // }
  3731. // });
  3732. // //数据来源字典项
  3733. // that.getDicts("sjly").then((response) => {
  3734. // var assetTypeOptions = response.data;
  3735. // if(obj.sjly !=null && obj.sjly !=""){
  3736. // for(var i=0;assetTypeOptions.length >i; i++){
  3737. // if(obj.sjly == assetTypeOptions[i].dictValue) {
  3738. // obj.sjly = assetTypeOptions[i].dictLabel;
  3739. // break;
  3740. // }
  3741. // }
  3742. // }
  3743. // });
  3744. console.log(obj.id);
  3745. getZjdzd(obj.id).then((response) => {
  3746. console.log(response);
  3747. that.mapZjdData = response.data;
  3748. that.mapZjdData.active = 1;
  3749. that.mapZjdTeAll.mapZjdAData =that.mapZjdData;
  3750. that.mapZjdDataTure = 1;
  3751. that.zjdHcDy = obj.zjddm;
  3752. var styleZjd = new ol.style.Style({
  3753. stroke: new ol.style.Stroke({
  3754. //边界样式
  3755. color: "#CCFF66",
  3756. width: 6,
  3757. }),
  3758. });
  3759. hc_land_on = new ol.layer.Vector({
  3760. title: "add Layer",
  3761. source: new ol.source.Vector({
  3762. projection: projection,
  3763. features: new ol.format.GeoJSON().readFeatures("{\n" +
  3764. " \"type\": \"Feature\",\n" +
  3765. " \"geometry\":" + that.mapZjdData.theGeom + ", \"properties\":" + JSON.stringify(that.mapZjdData) + "}"),
  3766. }),
  3767. style: styleZjd
  3768. });
  3769. map.addLayer(hc_land_on);
  3770. var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
  3771. var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
  3772. var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
  3773. var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
  3774. //定位查询位置
  3775. var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  3776. map.getView().animate({
  3777. // 只设置需要的属性即可
  3778. center: center, // 中心点
  3779. zoom: 17.8, // 缩放级别
  3780. rotation: undefined, // 缩放完成view视图旋转弧度
  3781. duration: 1000, // 缩放持续时间,默认不需要设置
  3782. });
  3783. });
  3784. //let cloneObj = JSON.parse(JSON.stringify(obj));
  3785. if(obj.zdmj != ""){
  3786. that.textMjAll = obj.zdmj;
  3787. } else {
  3788. that.textMjAllNum = "1";
  3789. }
  3790. //that.mapZjdData = cloneObj;
  3791. } else if($("#info .featureInfo .featureInfo").text() == "t_house_survey_zrz"){
  3792. //that.mapZjdTeAll.mapZjdAData ={};
  3793. that.mapZjdTeAll.mapFsssAData ={};
  3794. map.removeLayer(hc_land_on);
  3795. let obj = {};
  3796. that.mapHasDateStatus = 1;
  3797. let trs = $("#info .featureInfo").find("tr:eq(1)");
  3798. let zrzXq = trs.find("td").eq(0).text();
  3799. let zrzIdNum = zrzXq.replace("t_house_survey_zrz.", "");
  3800. obj.id = zrzIdNum; // 主键id
  3801. obj.deptName = trs.find("td").eq(3).text();//行政区划名称
  3802. obj.zjddm = trs.find("td").eq(4).text();//宅基地代码
  3803. // obj.nmfwzh = trs.find("td").eq(6).text();//农民房屋幢号
  3804. // obj.zrzh = trs.find("td").eq(7).text();//自然幢号
  3805. // obj.jgrq = trs.find("td").eq(8).text();//竣工日期
  3806. // obj.jzwgd = trs.find("td").eq(9).text();//建筑物高度
  3807. // obj.zzdmj = trs.find("td").eq(10).text();//幢占地面积
  3808. // obj.zydmj = trs.find("td").eq(11).text();//幢用地面积
  3809. obj.scjzmj = trs.find("td").eq(12).text();//实测建筑面积
  3810. // obj.zcs = trs.find("td").eq(13).text();//总层数
  3811. // obj.dscs = trs.find("td").eq(14).text();//地上层数
  3812. // obj.dxcs = trs.find("td").eq(15).text();//地下层数
  3813. // obj.fwjg = trs.find("td").eq(16).text();//房屋结构
  3814. // obj.sjly = trs.find("td").eq(17).text();//数据来源
  3815. // obj.bz = trs.find("td").eq(18).text();//备注
  3816. // obj.status = trs.find("td").eq(19).text();//状态
  3817. // obj.houseDataConfirmStatus = trs.find("td").eq(24).text();//数据调查确认状态
  3818. //字典项转化
  3819. // //房屋结构字典项
  3820. // that.getDicts("housing_structure").then((response) => {
  3821. // var assetTypeOptions = response.data;
  3822. // if(obj.fwjg !=null && obj.fwjg !=""){
  3823. // for(var i=0;assetTypeOptions.length >i; i++){
  3824. // if(obj.fwjg == assetTypeOptions[i].dictValue) {
  3825. // obj.fwjg = assetTypeOptions[i].dictLabel;
  3826. // break;
  3827. // }
  3828. // }
  3829. // }
  3830. // });
  3831. // //房屋结构字典项
  3832. // that.getDicts("sjly").then((response) => {
  3833. // var assetTypeOptions = response.data;
  3834. // if(obj.sjly !=null && obj.sjly !=""){
  3835. // for(var i=0;assetTypeOptions.length >i; i++){
  3836. // if(obj.sjly == assetTypeOptions[i].dictValue) {
  3837. // obj.sjly = assetTypeOptions[i].dictLabel;
  3838. // break;
  3839. // }
  3840. // }
  3841. // }
  3842. // });
  3843. //let cloneObj = JSON.parse(JSON.stringify(obj));
  3844. //that.mapZrzData = cloneObj;
  3845. let params = {
  3846. "deptId" : that.$cookies.get("item").deptId,
  3847. "zjddm" : obj.zjddm,
  3848. }
  3849. console.log(obj.zjddm);
  3850. console.log(params);
  3851. listZjdzd(params).then((response) => {
  3852. console.log(response);
  3853. that.mapZjdData = response.rows[0];
  3854. //that.mapZjdAData.active = 1;
  3855. that.mapZjdTeAll.mapZjdAData = that.mapZjdData;
  3856. console.log(that.mapZjdData);
  3857. getZrz(obj.id).then((response) => {
  3858. console.log(response);
  3859. that.mapZrzData = response.data;
  3860. that.mapZrzData.active = 3;
  3861. that.mapZjdTeAll.mapZrzAData =that.mapZrzData;
  3862. that.zjdHcDy = obj.zjddm;
  3863. var styleZjd = new ol.style.Style({
  3864. stroke: new ol.style.Stroke({
  3865. //边界样式
  3866. color: "#CCFF66",
  3867. width: 6,
  3868. }),
  3869. });
  3870. hc_land_on = new ol.layer.Vector({
  3871. title: "add Layer",
  3872. source: new ol.source.Vector({
  3873. projection: projection,
  3874. features: new ol.format.GeoJSON().readFeatures("{\n" +
  3875. " \"type\": \"Feature\",\n" +
  3876. " \"geometry\":" + that.mapZrzData.theGeom + ", \"properties\":" + JSON.stringify(that.mapZrzData) + "}"),
  3877. }),
  3878. style: styleZjd
  3879. });
  3880. map.addLayer(hc_land_on);
  3881. var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
  3882. var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
  3883. var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
  3884. var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
  3885. //定位查询位置
  3886. var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  3887. map.getView().animate({
  3888. // 只设置需要的属性即可
  3889. center: center, // 中心点
  3890. zoom: 17.8, // 缩放级别
  3891. rotation: undefined, // 缩放完成view视图旋转弧度
  3892. duration: 1000, // 缩放持续时间,默认不需要设置
  3893. });
  3894. });
  3895. });
  3896. if(obj.scjzmj != ""){
  3897. that.textMjAll = obj.scjzmj;
  3898. } else {
  3899. that.textMjAllNum = "1";
  3900. }
  3901. } else if($("#info .featureInfo .featureInfo").text() == "t_house_survey_fsss"){
  3902. that.mapZjdTeAll.mapZrzAData ={};
  3903. //that.mapZjdTeAll.mapZjdAData ={};
  3904. map.removeLayer(hc_land_on);
  3905. let obj = {};
  3906. that.mapHasDateStatus = 0;
  3907. let trs = $("#info .featureInfo").find("tr:eq(1)");
  3908. let fsssXq = trs.find("td").eq(0).text();
  3909. let fsssIdNum = fsssXq.replace("t_house_survey_fsss.", "");
  3910. obj.id = fsssIdNum; // 主键id
  3911. obj.deptName = trs.find("td").eq(4).text();//行政区划名称
  3912. obj.zjddm = trs.find("td").eq(1).text();//宅基地代码
  3913. // obj.houseDataConfirmStatus = trs.find("td").eq(6).text(); //状态
  3914. // obj.fssslx = trs.find("td").eq(7).text(); //附属设施类型
  3915. obj.jzmj = trs.find("td").eq(8).text(); //建筑面积
  3916. // obj.qsly = trs.find("td").eq(9).text();//权属来源
  3917. // obj.fwzt = trs.find("td").eq(10).text(); //房屋状态
  3918. // obj.sfsp = trs.find("td").eq(11).text(); //是否审批
  3919. // obj.sffz = trs.find("td").eq(12).text(); //是否发证
  3920. // obj.jglx = trs.find("td").eq(13).text(); //结构类型
  3921. // obj.sfzzsy = trs.find("td").eq(14).text(); //是否正在使用
  3922. // obj.jzwqk = trs.find("td").eq(15).text(); //建筑物情况
  3923. // obj.tdzk = trs.find("td").eq(16).text(); //审批或建设前土地状况
  3924. // obj.sfsgcf = trs.find("td").eq(17).text(); //是否受过处罚
  3925. // obj.remark = trs.find("td").eq(18).text(); //备注
  3926. // obj.sysNormalDisable = trs.find("td").eq(19).text(); //是否停用
  3927. //附属设施类型字典项
  3928. // that.getDicts("fsss_type").then((response) => {
  3929. // var assetTypeOptions = response.data;
  3930. // if(obj.fssslx !=null && obj.fssslx !=""){
  3931. // for(var i=0;assetTypeOptions.length >i; i++){
  3932. // if(obj.fssslx == assetTypeOptions[i].dictValue) {
  3933. // obj.fssslx = assetTypeOptions[i].dictLabel;
  3934. // break;
  3935. // }
  3936. // }
  3937. // }
  3938. // });
  3939. // //权属类型字典项
  3940. // that.getDicts("acquisition_method").then((response) => {
  3941. // var assetTypeOptions = response.data;
  3942. // if(obj.qsly !=null && obj.qsly !=""){
  3943. // for(var i=0;assetTypeOptions.length >i; i++){
  3944. // if(obj.qsly == assetTypeOptions[i].dictValue) {
  3945. // obj.qsly = assetTypeOptions[i].dictLabel;
  3946. // break;
  3947. // }
  3948. // }
  3949. // }
  3950. // });
  3951. // //房屋状态字典项
  3952. // that.getDicts("fwzt").then((response) => {
  3953. // var assetTypeOptions = response.data;
  3954. // if(obj.fwzt !=null && obj.fwzt !=""){
  3955. // for(var i=0;assetTypeOptions.length >i; i++){
  3956. // if(obj.fwzt == assetTypeOptions[i].dictValue) {
  3957. // obj.fwzt = assetTypeOptions[i].dictLabel;
  3958. // break;
  3959. // }
  3960. // }
  3961. // }
  3962. // });
  3963. // //是否审批字典项
  3964. // that.getDicts("sys_yes_no").then((response) => {
  3965. // var assetTypeOptions = response.data;
  3966. // if(obj.sfsp !=null && obj.sfsp !=""){
  3967. // for(var i=0;assetTypeOptions.length >i; i++){
  3968. // if(obj.sfsp == assetTypeOptions[i].dictValue) {
  3969. // obj.sfsp = assetTypeOptions[i].dictLabel;
  3970. // break;
  3971. // }
  3972. // }
  3973. // }
  3974. // });
  3975. // //是否发证字典项
  3976. // that.getDicts("sys_yes_no").then((response) => {
  3977. // var assetTypeOptions = response.data;
  3978. // if(obj.sffz !=null && obj.sffz !=""){
  3979. // for(var i=0;assetTypeOptions.length >i; i++){
  3980. // if(obj.sffz == assetTypeOptions[i].dictValue) {
  3981. // obj.sffz = assetTypeOptions[i].dictLabel;
  3982. // break;
  3983. // }
  3984. // }
  3985. // }
  3986. // });
  3987. // //结构类型字典项
  3988. // that.getDicts("house_jglx").then((response) => {
  3989. // var assetTypeOptions = response.data;
  3990. // if(obj.jglx !=null && obj.jglx !=""){
  3991. // for(var i=0;assetTypeOptions.length >i; i++){
  3992. // if(obj.jglx == assetTypeOptions[i].dictValue) {
  3993. // obj.jglx = assetTypeOptions[i].dictLabel;
  3994. // break;
  3995. // }
  3996. // }
  3997. // }
  3998. // });
  3999. // //是否正在使用字典项
  4000. // that.getDicts("sys_yes_no").then((response) => {
  4001. // var assetTypeOptions = response.data;
  4002. // if(obj.sfzzsy !=null && obj.sfzzsy !=""){
  4003. // for(var i=0;assetTypeOptions.length >i; i++){
  4004. // if(obj.sfzzsy == assetTypeOptions[i].dictValue) {
  4005. // obj.sfzzsy = assetTypeOptions[i].dictLabel;
  4006. // break;
  4007. // }
  4008. // }
  4009. // }
  4010. // });
  4011. // //房屋状态字典项
  4012. // that.getDicts("fwzt").then((response) => {
  4013. // var assetTypeOptions = response.data;
  4014. // if(obj.fwzt !=null && obj.fwzt !=""){
  4015. // for(var i=0;assetTypeOptions.length >i; i++){
  4016. // if(obj.fwzt == assetTypeOptions[i].dictValue) {
  4017. // obj.fwzt = assetTypeOptions[i].dictLabel;
  4018. // break;
  4019. // }
  4020. // }
  4021. // }
  4022. // });
  4023. // //土地状况字典项
  4024. // that.getDicts("land_state").then((response) => {
  4025. // var assetTypeOptions = response.data;
  4026. // if(obj.tdzk !=null && obj.tdzk !=""){
  4027. // for(var i=0;assetTypeOptions.length >i; i++){
  4028. // if(obj.tdzk == assetTypeOptions[i].dictValue) {
  4029. // obj.tdzk = assetTypeOptions[i].dictLabel;
  4030. // break;
  4031. // }
  4032. // }
  4033. // }
  4034. // });
  4035. // //是否受过处罚字典项
  4036. // that.getDicts("land_state").then((response) => {
  4037. // var assetTypeOptions = response.data;
  4038. // if(obj.sfsgcf !=null && obj.sfsgcf !=""){
  4039. // for(var i=0;assetTypeOptions.length >i; i++){
  4040. // if(obj.sfsgcf == assetTypeOptions[i].dictValue) {
  4041. // obj.sfsgcf = assetTypeOptions[i].dictLabel;
  4042. // break;
  4043. // }
  4044. // }
  4045. // }
  4046. // });
  4047. //let cloneObj = JSON.parse(JSON.stringify(obj));
  4048. //that.mapFsssData = cloneObj;
  4049. let params = {
  4050. "deptId" : that.$cookies.get("item").deptId,
  4051. "zjddm" : obj.zjddm,
  4052. "pageSize":20,
  4053. }
  4054. listZjdzd(params).then((response) => {
  4055. that.mapZjdData = response.rows[0];
  4056. that.mapZjdData.active = 1;
  4057. that.mapZjdTeAll.mapZjdAData = that.mapZjdData;
  4058. getfsss(obj.id).then((response) => {
  4059. //that.mapfsssData.active = 4;
  4060. that.mapfsssData = response.data;
  4061. that.mapZjdTeAll.mapFsssAData = that.mapfsssData;
  4062. that.zjdHcDy = obj.zjddm;
  4063. var styleZjd = new ol.style.Style({
  4064. stroke: new ol.style.Stroke({
  4065. //边界样式
  4066. color: "#CCFF66",
  4067. width: 6,
  4068. }),
  4069. });
  4070. hc_land_on = new ol.layer.Vector({
  4071. title: "add Layer",
  4072. source: new ol.source.Vector({
  4073. projection: projection,
  4074. features: new ol.format.GeoJSON().readFeatures("{\n" +
  4075. " \"type\": \"Feature\",\n" +
  4076. " \"geometry\":" + that.mapfsssData.theGeom + ", \"properties\":" + JSON.stringify(that.mapfsssData) + "}"),
  4077. }),
  4078. style: styleZjd
  4079. });
  4080. map.addLayer(hc_land_on);
  4081. var maxXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxX;
  4082. var maxYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.maxY;
  4083. var minXMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minX;
  4084. var minYMap = hc_land_on.values_.source.featuresRtree_.rbush_.data.minY;
  4085. //定位查询位置
  4086. var center = ol.extent.getCenter([maxXMap, maxYMap, minXMap, minYMap]); //获取边界区域的中心位置
  4087. map.getView().animate({
  4088. // 只设置需要的属性即可
  4089. center: center, // 中心点
  4090. zoom: 17.8, // 缩放级别
  4091. rotation: undefined, // 缩放完成view视图旋转弧度
  4092. duration: 1000, // 缩放持续时间,默认不需要设置
  4093. });
  4094. });
  4095. });
  4096. if(obj.jzmj != ""){
  4097. that.textMjAll = obj.jzmj;
  4098. } else {
  4099. that.textMjAllNum = "1";
  4100. }
  4101. } else {
  4102. }
  4103. }, 300);
  4104. } else {
  4105. }
  4106. });
  4107. }
  4108. //数据库查询详情时使用----------------------------------------start
  4109. // if(feature) {
  4110. // console.log(feature);
  4111. // //document.getElementById("info").innerHTML = "";
  4112. // that.mapHaDataValue = true;
  4113. // var ifConsole = feature.values_.createBy;
  4114. // if (ifConsole =="mapTheGeomFsssId") {
  4115. // let obj = {};
  4116. // that.mapHasDateStatus = 0;
  4117. // obj.deptName = feature.values_.deptName;//行政区划名称
  4118. // obj.zjddm = feature.values_.zjddm;//宅基地代码
  4119. // obj.houseDataConfirmStatus = feature.values_.houseDataConfirmStatus; //状态
  4120. // obj.fssslx = feature.values_.fssslx; //附属设施类型
  4121. // obj.jzmj = feature.values_.jzmj; //建筑面积
  4122. // obj.qsly = feature.values_.qsly;//权属来源
  4123. // obj.fwzt = feature.values_.fwzt; //房屋状态
  4124. // obj.sfsp = feature.values_.sfsp; //是否审批
  4125. // obj.sffz = feature.values_.sffz; //是否发证
  4126. // obj.jglx = feature.values_.jglx; //结构类型
  4127. // obj.sfzzsy = feature.values_.sfzzsy; //是否正在使用
  4128. // obj.jzwqk = feature.values_.jzwqk; //建筑物情况
  4129. // obj.tdzk = feature.values_.tdzk; //审批或建设前土地状况
  4130. // obj.sfsgcf = feature.values_.sfsgcf; //是否受过处罚
  4131. // obj.sysNormalDisable = feature.values_.sysNormalDisable; //是否停用
  4132. // //附属设施类型字典项
  4133. // that.getDicts("fsss_type").then((response) => {
  4134. // var assetTypeOptions = response.data;
  4135. // if(obj.fssslx !=null && obj.fssslx !=""){
  4136. // for(var i=0;assetTypeOptions.length >i; i++){
  4137. // if(obj.fssslx == assetTypeOptions[i].dictValue) {
  4138. // obj.fssslx = assetTypeOptions[i].dictLabel;
  4139. // break;
  4140. // }
  4141. // }
  4142. // }
  4143. // });
  4144. // //权属类型字典项
  4145. // that.getDicts("acquisition_method").then((response) => {
  4146. // var assetTypeOptions = response.data;
  4147. // if(obj.qsly !=null && obj.qsly !=""){
  4148. // for(var i=0;assetTypeOptions.length >i; i++){
  4149. // if(obj.qsly == assetTypeOptions[i].dictValue) {
  4150. // obj.qsly = assetTypeOptions[i].dictLabel;
  4151. // break;
  4152. // }
  4153. // }
  4154. // }
  4155. // });
  4156. // //房屋状态字典项
  4157. // that.getDicts("fwzt").then((response) => {
  4158. // var assetTypeOptions = response.data;
  4159. // if(obj.fwzt !=null && obj.fwzt !=""){
  4160. // for(var i=0;assetTypeOptions.length >i; i++){
  4161. // if(obj.fwzt == assetTypeOptions[i].dictValue) {
  4162. // obj.fwzt = assetTypeOptions[i].dictLabel;
  4163. // break;
  4164. // }
  4165. // }
  4166. // }
  4167. // });
  4168. // //是否审批字典项
  4169. // that.getDicts("sys_yes_no").then((response) => {
  4170. // var assetTypeOptions = response.data;
  4171. // if(obj.sfsp !=null && obj.sfsp !=""){
  4172. // for(var i=0;assetTypeOptions.length >i; i++){
  4173. // if(obj.sfsp == assetTypeOptions[i].dictValue) {
  4174. // obj.sfsp = assetTypeOptions[i].dictLabel;
  4175. // break;
  4176. // }
  4177. // }
  4178. // }
  4179. // });
  4180. // //是否发证字典项
  4181. // that.getDicts("sys_yes_no").then((response) => {
  4182. // var assetTypeOptions = response.data;
  4183. // if(obj.sffz !=null && obj.sffz !=""){
  4184. // for(var i=0;assetTypeOptions.length >i; i++){
  4185. // if(obj.sffz == assetTypeOptions[i].dictValue) {
  4186. // obj.sffz = assetTypeOptions[i].dictLabel;
  4187. // break;
  4188. // }
  4189. // }
  4190. // }
  4191. // });
  4192. // //结构类型字典项
  4193. // that.getDicts("house_jglx").then((response) => {
  4194. // var assetTypeOptions = response.data;
  4195. // if(obj.jglx !=null && obj.jglx !=""){
  4196. // for(var i=0;assetTypeOptions.length >i; i++){
  4197. // if(obj.jglx == assetTypeOptions[i].dictValue) {
  4198. // obj.jglx = assetTypeOptions[i].dictLabel;
  4199. // break;
  4200. // }
  4201. // }
  4202. // }
  4203. // });
  4204. // //是否正在使用字典项
  4205. // that.getDicts("sys_yes_no").then((response) => {
  4206. // var assetTypeOptions = response.data;
  4207. // if(obj.sfzzsy !=null && obj.sfzzsy !=""){
  4208. // for(var i=0;assetTypeOptions.length >i; i++){
  4209. // if(obj.sfzzsy == assetTypeOptions[i].dictValue) {
  4210. // obj.sfzzsy = assetTypeOptions[i].dictLabel;
  4211. // break;
  4212. // }
  4213. // }
  4214. // }
  4215. // });
  4216. // //房屋状态字典项
  4217. // that.getDicts("fwzt").then((response) => {
  4218. // var assetTypeOptions = response.data;
  4219. // if(obj.fwzt !=null && obj.fwzt !=""){
  4220. // for(var i=0;assetTypeOptions.length >i; i++){
  4221. // if(obj.fwzt == assetTypeOptions[i].dictValue) {
  4222. // obj.fwzt = assetTypeOptions[i].dictLabel;
  4223. // break;
  4224. // }
  4225. // }
  4226. // }
  4227. // });
  4228. // //土地状况字典项
  4229. // that.getDicts("land_state").then((response) => {
  4230. // var assetTypeOptions = response.data;
  4231. // if(obj.tdzk !=null && obj.tdzk !=""){
  4232. // for(var i=0;assetTypeOptions.length >i; i++){
  4233. // if(obj.tdzk == assetTypeOptions[i].dictValue) {
  4234. // obj.tdzk = assetTypeOptions[i].dictLabel;
  4235. // break;
  4236. // }
  4237. // }
  4238. // }
  4239. // });
  4240. // //是否受过处罚字典项
  4241. // that.getDicts("land_state").then((response) => {
  4242. // var assetTypeOptions = response.data;
  4243. // if(obj.sfsgcf !=null && obj.sfsgcf !=""){
  4244. // for(var i=0;assetTypeOptions.length >i; i++){
  4245. // if(obj.sfsgcf == assetTypeOptions[i].dictValue) {
  4246. // obj.sfsgcf = assetTypeOptions[i].dictLabel;
  4247. // break;
  4248. // }
  4249. // }
  4250. // }
  4251. // });
  4252. // that.mapFsssData = obj;
  4253. // } else if(ifConsole =="mapTheGeomZrzId"){
  4254. // let obj = {};
  4255. // that.mapHasDateStatus = 1;
  4256. // obj.deptName = feature.values_.deptName;//部门名称
  4257. // obj.zjddm = feature.values_.zjddm;//宅基地代码
  4258. // obj.nmfwzh = feature.values_.nmfwzh;//农民房屋幢号
  4259. // obj.zrzh = feature.values_.zrzh;//自然幢号
  4260. // obj.jgrq = feature.values_.jgrq;//竣工日期
  4261. // obj.jzwgd = feature.values_.jzwgd;//建筑物高度
  4262. // obj.zzdmj = feature.values_.zzdmj;//幢占地面积
  4263. // obj.zydmj = feature.values_.zydmj;//幢用地面积
  4264. // obj.scjzmj = feature.values_.scjzmj;//实测建筑面积
  4265. // obj.zcs = feature.values_.zcs;//总层数
  4266. // obj.dscs = feature.values_.dscs;//地上层数
  4267. // obj.dxcs = feature.values_.dxcs;//地下层数
  4268. // obj.fwjg = feature.values_.fwjg;//房屋结构
  4269. // obj.sjly = feature.values_.sjly;//数据来源
  4270. // obj.status = feature.values_.status;//状态
  4271. // obj.houseDataConfirmStatus = feature.values_.houseDataConfirmStatus;//数据调查确认状态
  4272. // //字典项转化
  4273. // //房屋结构字典项
  4274. // that.getDicts("housing_structure").then((response) => {
  4275. // var assetTypeOptions = response.data;
  4276. // if(obj.fwjg !=null && obj.fwjg !=""){
  4277. // for(var i=0;assetTypeOptions.length >i; i++){
  4278. // if(obj.fwjg == assetTypeOptions[i].dictValue) {
  4279. // obj.fwjg = assetTypeOptions[i].dictLabel;
  4280. // break;
  4281. // }
  4282. // }
  4283. // }
  4284. // });
  4285. // //房屋结构字典项
  4286. // that.getDicts("sjly").then((response) => {
  4287. // var assetTypeOptions = response.data;
  4288. // if(obj.sjly !=null && obj.sjly !=""){
  4289. // for(var i=0;assetTypeOptions.length >i; i++){
  4290. // if(obj.sjly == assetTypeOptions[i].dictValue) {
  4291. // obj.sjly = assetTypeOptions[i].dictLabel;
  4292. // break;
  4293. // }
  4294. // }
  4295. // }
  4296. // });
  4297. // that.mapZrzData = obj;
  4298. // } else if(ifConsole =="mapTheGeomZjdId"){
  4299. // let obj = {};
  4300. // that.mapHasDateStatus = 2;
  4301. // obj.deptName = feature.values_.deptName;//行政区划名称
  4302. // obj.suyqrdm = feature.values_.suyqrdm;//所有权人代码
  4303. // obj.nhdm = feature.values_.nhdm;//农户代码
  4304. // obj.zjddm = feature.values_.zjddm;//宅基地代码
  4305. // obj.zdbh = feature.values_.zdbh;//宗地编号
  4306. // obj.zddm = feature.values_.zddm;//宗地代码
  4307. // obj.zl = feature.values_.zl;//坐落
  4308. // obj.zldwdm = feature.values_.zldwdm;//坐落单位代码
  4309. // obj.zdmj = feature.values_.zdmj;//宗地面积
  4310. // obj.yt = feature.values_.yt;//用途
  4311. // obj.ytmc = feature.values_.ytmc;//用途名称
  4312. // obj.dj = feature.values_.dj;//宗地编号
  4313. // obj.jg = feature.values_.jg;//价格万元
  4314. // obj.qllx = feature.values_.qllx;//权利类型
  4315. // obj.qlxz = feature.values_.qlxz;//权利性质
  4316. // obj.qlsdfs = feature.values_.qlsdfs;//权利设定方式
  4317. // obj.rjl = feature.values_.rjl;//容积率
  4318. // obj.jzmd = feature.values_.jzmd;//建筑密度
  4319. // obj.jzxg = feature.values_.jzxg;//建筑限高
  4320. // obj.zdszd = feature.values_.zdszd;//宗地四至-东
  4321. // obj.zdszn = feature.values_.zdszn;//宗地四至-南
  4322. // obj.zdszx = feature.values_.zdszx;//宗地四至-西
  4323. // obj.zdszb = feature.values_.zdszb;//宗地四至-北
  4324. // obj.zdt = feature.values_.zdt;//宗地图
  4325. // obj.tfh = feature.values_.tfh;//图幅号
  4326. // obj.djh = feature.values_.djh;//地籍号
  4327. // obj.sjly = feature.values_.sjly;//数据来源
  4328. // obj.lyzk = feature.values_.lyzk;//当前利用状况
  4329. // obj.xzkssj = feature.values_.xzkssj;//闲置开始时间
  4330. // obj.sffz = feature.values_.sffz;//是否发证
  4331. // obj.zjdzsh = feature.values_.zjdzsh;//宅基地证书号
  4332. // obj.zjdxctp = feature.values_.zjdxctp;//宅基地现场图片
  4333. // obj.zjdqdfs = feature.values_.zjdqdfs;//宅基地取得方式
  4334. // obj.bccjl = feature.values_.bccjl;//被惩处经历
  4335. // obj.bccbz = feature.values_.bccbz;//被惩处备注
  4336. // obj.yctcyx = feature.values_.yctcyx;//有偿退出意向
  4337. // obj.zjdpzmj = feature.values_.zjdpzmj;//宅基地批准面积
  4338. // obj.zjdxzyy = feature.values_.zjdxzyy;//宅基地闲置原因
  4339. // obj.lzyx = feature.values_.lzyx;//流转意向
  4340. // obj.sysNormalDisable = feature.values_.sysNormalDisable;//是否停用
  4341. // obj.active = 1;
  4342. // //字典项转化
  4343. // //是否发证字典项
  4344. // that.getDicts("sys_yes_no").then((response) => {
  4345. // var assetTypeOptions = response.data;
  4346. // if(obj.sffz !=null && obj.sffz !=""){
  4347. // for(var i=0;assetTypeOptions.length >i; i++){
  4348. // if(obj.sffz == assetTypeOptions[i].dictValue) {
  4349. // obj.sffz = assetTypeOptions[i].dictLabel;
  4350. // break;
  4351. // }
  4352. // }
  4353. // }
  4354. // });
  4355. // //利用状态字典项
  4356. // that.getDicts("zjdlyzk").then((response) => {
  4357. // var assetTypeOptions = response.data;
  4358. // if(obj.lyzk !=null && obj.lyzk !=""){
  4359. // for(var i=0;assetTypeOptions.length >i; i++){
  4360. // if(obj.lyzk == assetTypeOptions[i].dictValue) {
  4361. // obj.lyzk = assetTypeOptions[i].dictLabel;
  4362. // break;
  4363. // }
  4364. // }
  4365. // }
  4366. // });
  4367. // //流转意向字典项
  4368. // that.getDicts("is_have").then((response) => {
  4369. // var assetTypeOptions = response.data;
  4370. // if(obj.lzyx !=null && obj.lzyx !=""){
  4371. // for(var i=0;assetTypeOptions.length >i; i++){
  4372. // if(obj.lzyx == assetTypeOptions[i].dictValue) {
  4373. // obj.lzyx = assetTypeOptions[i].dictLabel;
  4374. // break;
  4375. // }
  4376. // }
  4377. // }
  4378. // });
  4379. // //有偿退出意向字典项
  4380. // that.getDicts("is_have").then((response) => {
  4381. // var assetTypeOptions = response.data;
  4382. // if(obj.yctcyx !=null && obj.yctcyx !=""){
  4383. // for(var i=0;assetTypeOptions.length >i; i++){
  4384. // if(obj.yctcyx == assetTypeOptions[i].dictValue) {
  4385. // obj.yctcyx = assetTypeOptions[i].dictLabel;
  4386. // break;
  4387. // }
  4388. // }
  4389. // }
  4390. // });
  4391. // //被惩处经历字典项
  4392. // that.getDicts("is_have").then((response) => {
  4393. // var assetTypeOptions = response.data;
  4394. // if(obj.bccjl !=null && obj.bccjl !=""){
  4395. // for(var i=0;assetTypeOptions.length >i; i++){
  4396. // if(obj.bccjl == assetTypeOptions[i].dictValue) {
  4397. // obj.bccjl = assetTypeOptions[i].dictLabel;
  4398. // break;
  4399. // }
  4400. // }
  4401. // }
  4402. // });
  4403. // //宅基地取得方式字典项
  4404. // that.getDicts("acquisition_method").then((response) => {
  4405. // var assetTypeOptions = response.data;
  4406. // if(obj.zjdqdfs !=null && obj.zjdqdfs !=""){
  4407. // for(var i=0;assetTypeOptions.length >i; i++){
  4408. // if(obj.zjdqdfs == assetTypeOptions[i].dictValue) {
  4409. // obj.zjdqdfs = assetTypeOptions[i].dictLabel;
  4410. // break;
  4411. // }
  4412. // }
  4413. // }
  4414. // });
  4415. // //权利设定方式字典项
  4416. // that.getDicts("right_setting_mode").then((response) => {
  4417. // var assetTypeOptions = response.data;
  4418. // if(obj.qlsdfs !=null && obj.qlsdfs !=""){
  4419. // for(var i=0;assetTypeOptions.length >i; i++){
  4420. // if(obj.qlsdfs == assetTypeOptions[i].dictValue) {
  4421. // obj.qlsdfs = assetTypeOptions[i].dictLabel;
  4422. // break;
  4423. // }
  4424. // }
  4425. // }
  4426. // });
  4427. // //数据来源字典项
  4428. // that.getDicts("sjly").then((response) => {
  4429. // var assetTypeOptions = response.data;
  4430. // if(obj.sjly !=null && obj.sjly !=""){
  4431. // for(var i=0;assetTypeOptions.length >i; i++){
  4432. // if(obj.sjly == assetTypeOptions[i].dictValue) {
  4433. // obj.sjly = assetTypeOptions[i].dictLabel;
  4434. // break;
  4435. // }
  4436. // }
  4437. // }
  4438. // });
  4439. // that.mapZjdData = obj;
  4440. // console.log(obj.zjddm);
  4441. // that.zjdHcDy = obj.zjddm;
  4442. // } else {
  4443. // that.mapHaDataValue = false;
  4444. // }
  4445. // }else {
  4446. // that.mapHaDataValue = false;
  4447. // }
  4448. //数据库查询详情时使用----------------------------------------end
  4449. });
  4450. //数据库循环加载时使用 --------------------加载较慢 ------start
  4451. //当前账套没有任何空间数据
  4452. // if(mapTalkAbout){
  4453. // let deptName = this.$store.state.user.loginDeptId + "";
  4454. // getQueryLand(deptName).then((response) => {
  4455. // if (response.code == 200) {
  4456. // let InsertCode = response.data;
  4457. // if (InsertCode != null) {
  4458. // var lat = InsertCode.lat;
  4459. // var lng = InsertCode.lng;
  4460. // var center;
  4461. // if(lat !=null && lng !=null && lat !="" && lng !=""){
  4462. // center = [lng,lat];
  4463. // }else {
  4464. // center =[115.452752, 31.789033];
  4465. // }
  4466. // map.getView().animate({
  4467. // // 只设置需要的属性即可
  4468. // center: ol.proj.fromLonLat(center), // 中心点
  4469. // zoom: 17.9, // 缩放级别
  4470. // rotation: undefined, // 缩放完成view视图旋转弧度
  4471. // duration: 1000, // 缩放持续时间,默认不需要设置
  4472. // });
  4473. // }
  4474. // }
  4475. // });
  4476. // }
  4477. //数据库循环加载时使用 --------------------加载较慢 ------start
  4478. },
  4479. /*右侧列表 --展开收缩*/
  4480. selectionPushMap() {
  4481. this.selectionIconShow = true;
  4482. this.homesteadListStatus = true;
  4483. $(".homesteadList_wrap").animate(
  4484. {
  4485. right: "0",
  4486. },
  4487. 300
  4488. );
  4489. },
  4490. homesteadListShrink() {
  4491. this.selectionIconShow = false;
  4492. // this.checked =["zjdSx","zrzSx","fsssSx"];
  4493. $(".homesteadList_wrap").animate(
  4494. {
  4495. right: "-300px",
  4496. },
  4497. 300
  4498. );
  4499. setTimeout(() => {
  4500. this.homesteadListStatus = false;
  4501. }, 300);
  4502. },
  4503. checkClick(res){
  4504. // 1、全选与不全选模块
  4505. $(".checkall").change(function() {
  4506. // console.log($(this).prop("checked"));输出全选按钮的选中状态
  4507. $(".item-list-checkbox .checkitem").prop("checked", $(this).prop("checked"));
  4508. if($(this).prop("checked")){
  4509. }else {
  4510. }
  4511. });
  4512. // 2、小复选框模块
  4513. $(".checkitem").change(function() {
  4514. if ($(".checkitem:checked").length === $(".checkitem").length) {
  4515. $(".checkall").prop("checked", true);
  4516. } else {
  4517. $(".checkall").prop("checked", false);
  4518. }
  4519. })
  4520. },
  4521. //绘制多边形地图
  4522. drawMapPolygonFun() {
  4523. },
  4524. guidProduct(){
  4525. return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
  4526. var r = Math.random() * 16 | 0,
  4527. v = c == 'x' ? r : (r & 0x3 | 0x8);
  4528. return v.toString(16);
  4529. });
  4530. },
  4531. //宅基地点击地图核查
  4532. zjdHc(){
  4533. console.log(this.zjdHcDy);
  4534. console.log(this.mapZjdDataTure);
  4535. console.log(this.mapZjdData);
  4536. if(this.zjdHcDy != "" && this.zjdHcDy != "undefined"){
  4537. if(this.mapZjdData !=undefined && this.mapZjdData !="" && this.mapZjdDataTure !=""){
  4538. this.mapZjdTeAll.active =1;
  4539. this.$cookies.set("search",this.mapZjdTeAll);
  4540. this.$router.push({path:'/homesteadSurvey/add'});
  4541. }
  4542. if(this.mapZrzData !=undefined && this.mapZrzData !=""){
  4543. if(this.mapZjdTeAll.mapZjdAData !=""){
  4544. this.mapZjdTeAll.active =3;
  4545. this.$cookies.set("search",this.mapZjdTeAll);
  4546. this.$router.push({path:'/homesteadSurvey/add'});
  4547. } else {
  4548. this.$toast("必须有宅基地数据才能进入自然幢核查");
  4549. }
  4550. }
  4551. if(this.mapFsssData !=undefined && this.mapFsssData !=""){
  4552. if(this.mapZjdTeAll.mapZjdAData !="") {
  4553. this.mapZjdTeAll.active = 4;
  4554. this.$cookies.set("search", this.mapZjdTeAll);
  4555. this.$router.push({path: '/homesteadSurvey/add'});
  4556. } else {
  4557. this.$toast("必须有宅基地数据才能进入附属设施核查");
  4558. }
  4559. }
  4560. } else {
  4561. this.$dialog.alert({
  4562. title: '宅基地核查',
  4563. message: "请从地图中选择图层并点击核查",
  4564. theme: 'round-button',
  4565. }).then(() => {
  4566. // on close
  4567. });
  4568. }
  4569. },
  4570. //搜索详情跳转
  4571. zjdSs(item){
  4572. console.log(item);
  4573. this.mapZjdTeAll.mapZjdAData ={};
  4574. this.mapZjdTeAll.mapZrzAData ={};
  4575. this.mapZjdTeAll.mapFsssAData ={};
  4576. //this.mapZjdTeAll.active =1;
  4577. if(item.typeTc =="宅基地"){
  4578. getZjdzd(item.id).then((response) => {
  4579. this.mapZjdData = response.data;
  4580. console.log(this.mapZjdData);
  4581. this.mapZjdTeAll.active = 1;
  4582. this.mapZjdTeAll.mapZjdAData = this.mapZjdData;
  4583. this.$cookies.set("search",this.mapZjdTeAll);
  4584. setTimeout(() => {
  4585. this.$router.push({path:'/homesteadSurvey/add'});
  4586. }, 500);
  4587. });
  4588. }else if(item.typeTc =="自然幢"){
  4589. //let =
  4590. getZjdzd(item.id).then((response) => {
  4591. this.mapZrzData = response.data;
  4592. console.log(this.mapZrzData);
  4593. this.mapZjdTeAll.active = 3;
  4594. this.mapZjdTeAll.mapZrzAData = this.mapZrzData;
  4595. this.$cookies.set("search",this.mapZjdTeAll);
  4596. setTimeout(() => {
  4597. this.$router.push({path:'/homesteadSurvey/add'});
  4598. }, 500);
  4599. });
  4600. }else if(item.typeTc =="附属设施"){
  4601. getfsss(item.id).then((response) => {
  4602. this.mapFsssData = response.data;
  4603. console.log(this.mapZjdData);
  4604. this.mapZjdTeAll.active = 4;
  4605. this.mapZjdTeAll.mapFsssAData = this.mapFsssData;
  4606. this.$cookies.set("search",this.mapZjdTeAll);
  4607. setTimeout(() => {
  4608. this.$router.push({path:'/homesteadSurvey/add'});
  4609. }, 500);
  4610. });
  4611. }else{
  4612. this.$toast("无数据请检查后进入核查页面");
  4613. }
  4614. },
  4615. //地图查询
  4616. toggleSearch() {
  4617. $("#query").trigger("click");
  4618. },
  4619. //
  4620. checkAllArray(value){
  4621. if(this.checked.length<3){
  4622. this.$refs.checkboxGroup.toggleAll(true);
  4623. }else{
  4624. this.$refs.checkboxGroup.toggleAll(false);
  4625. }
  4626. },
  4627. //筛选//全选
  4628. checkAll(val) {
  4629. this.$refs.checkboxGroup.value.toggleAll(true);
  4630. console.log(this.checkAllFlag)
  4631. return;
  4632. let checkedCount = this.CheckedAllArr.length
  4633. if (val) {
  4634. //全选
  4635. this.CheckedAllArr = this.dataList.map(item => item.id)
  4636. } else{
  4637. //取消全选
  4638. if (checkedCount === this.dataList.length) {
  4639. //如果不增加这个条件判断点击某一项时会全部取消
  4640. this.CheckedAllArr = []
  4641. }
  4642. }
  4643. },
  4644. //单选
  4645. handleChecked(value) {
  4646. console.log(value);
  4647. // this.checkAllFlag = this.CheckedAllArr.length == this.dataList.length;
  4648. if (value.length<3){
  4649. this.checkAllFlag = false;
  4650. }else{
  4651. this.checkAllFlag = true;
  4652. }
  4653. value.indexOf('zjdSx') == -1 ? this.zjdSx = false : this.zjdSx = true;
  4654. value.indexOf('zrzSx') == -1 ? this.zrzSx = false : this.zrzSx = true;
  4655. value.indexOf('fsssSx') == -1 ? this.fsssSx = false : this.fsssSx = true;
  4656. console.log(this.zjdSx)
  4657. console.log(this.zrzSx)
  4658. console.log(this.fsssSx)
  4659. },
  4660. closeSearchBox(){
  4661. this.showSearch = false ;
  4662. var height = $(".searchBar_wrap").outerHeight(true) - $(".searchBar_wrap .van-search").outerHeight(true)
  4663. document.styleSheets[0].insertRule(
  4664. "@keyframes test2" +
  4665. "{" +
  4666. "0%{bottom: 0px}" +
  4667. "100%{bottom: -" + height + "px;}" +
  4668. "}"
  4669. )
  4670. $('.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'});
  4671. },
  4672. zjdTz(){
  4673. console.log(this.htZjdZrzFsss);
  4674. this.mapZjdTeAll.active =1;
  4675. this.mapZjdTeAll.mapZjdAData.theGeom =JSON.stringify(this.htZjdZrzFsss);
  4676. this.mapZjdTeAll.mapZjdAData.deptId = this.$cookies.get("item").deptId;
  4677. this.$cookies.set("search",this.mapZjdTeAll);
  4678. this.$router.push({path:'/homesteadSurvey/add'});
  4679. console.log(this.mapZjdTeAll);
  4680. },
  4681. zrzTz(){
  4682. if(this.mapZjdTeAll.mapZjdAData !=undefined && this.mapZjdTeAll.mapZjdAData !="" && this.mapZjdDataTure !=""){
  4683. this.mapZjdTeAll.active =3;
  4684. this.mapZjdTeAll.mapZrzAData.theGeom =JSON.stringify(this.htZjdZrzFsss);
  4685. this.mapZjdTeAll.mapZrzAData.deptId = this.$cookies.get("item").deptId;
  4686. this.$cookies.set("search",this.mapZjdTeAll);
  4687. this.$router.push({path:'/homesteadSurvey/add'});
  4688. }else {
  4689. this.$toast("请先在地图上选择宅基地后,再选择自然幢按钮");
  4690. }
  4691. },
  4692. fsssTz(){
  4693. if(this.mapZjdTeAll.mapZjdAData !=undefined && this.mapZjdTeAll.mapZjdAData !="" && this.mapZjdDataTure !=""){
  4694. this.mapZjdTeAll.active =4;
  4695. this.mapZjdTeAll.mapFsssAData.theGeom =JSON.stringify(this.htZjdZrzFsss);
  4696. this.mapZjdTeAll.mapFsssAData.deptId = this.$cookies.get("item").deptId;
  4697. this.$cookies.set("search",this.mapZjdTeAll);
  4698. this.$router.push({path:'/homesteadSurvey/add'});
  4699. }else {
  4700. this.$toast("请先在地图上选择宅基地后,再选择附属设施按钮");
  4701. }
  4702. },
  4703. //绘图重置清除之前图层
  4704. deleteHistory(){
  4705. console.log("进入重置");
  4706. $("#deleteHistory").trigger("click");
  4707. }
  4708. },
  4709. }
  4710. </script>
  4711. <style scoped lang="scss">
  4712. .hzlxBtn{
  4713. font-size: 0.3rem;
  4714. display: inline-block;
  4715. padding: 15PX 10%;
  4716. border-radius: 30PX;
  4717. color: #FFF;
  4718. margin-right: 2%;
  4719. &:last-child{
  4720. margin: 0;
  4721. }
  4722. }
  4723. .van-cell__title{
  4724. flex:2
  4725. }
  4726. .bannerBg{
  4727. width: 100%;
  4728. color:#fff;
  4729. /*padding:10px;*/
  4730. background: linear-gradient(134deg,#7ac943 1%, #22b7f2);
  4731. }
  4732. .van-hairline--bottom::after {
  4733. border-bottom-width: 0;
  4734. }
  4735. .activeBtn{
  4736. background:#fff;
  4737. height:50px;
  4738. border-radius:25px;
  4739. color:#7AC943;
  4740. line-height:50px;
  4741. text-align:center;
  4742. font-size:20px;
  4743. width: 26%;
  4744. margin:0 10px;
  4745. box-shadow: 0px 5px 6px 0px rgba(0,0,0,0.16);
  4746. }
  4747. .disactiveBtn{
  4748. background:rgba(255,255,255,.4);
  4749. height:50px;
  4750. border-radius:25px;
  4751. color:#fff;
  4752. line-height:50px;
  4753. text-align:center;
  4754. font-size:20px;
  4755. width: 26%;
  4756. margin:0 10px;
  4757. box-shadow: 0px 5px 6px 0px rgba(0,0,0,0.16);
  4758. }
  4759. /*.van-cell__label{*/
  4760. /* color: #969799;*/
  4761. /* font-size: 12px;*/
  4762. /* line-height: 20px;*/
  4763. /* margin:0*/
  4764. /*}*/
  4765. .map_area {
  4766. width: 50vw;
  4767. height: 50vh;
  4768. z-index:1;
  4769. background:#000;
  4770. position: fixed;
  4771. left: 0;
  4772. top: 0;
  4773. }
  4774. .van-field__label{
  4775. width:50%;
  4776. }
  4777. .rightZoom_wrap {
  4778. position: absolute;
  4779. right: 3%;
  4780. top: 35%;
  4781. margin-top: -200px;
  4782. background: #fff;
  4783. margin-bottom: 16px;
  4784. border-radius: 10px;
  4785. text-align: center;
  4786. padding: 15px 20px;
  4787. img{
  4788. margin: 0 auto;
  4789. }
  4790. .amplification {
  4791. line-height: 1;
  4792. font-size: 18px;
  4793. text-align: center;
  4794. margin-top: 5px;
  4795. }
  4796. }
  4797. .mapZoom_wrap {
  4798. position: absolute;
  4799. right: 3%;
  4800. top: 50%;
  4801. margin-top: -200px;
  4802. background: #fff;
  4803. margin-bottom: 16px;
  4804. border-radius: 10px;
  4805. padding: 0px 20px;
  4806. div{
  4807. padding: 15px 0;
  4808. border-bottom: 1px solid #C9C9C9;
  4809. &:last-child{
  4810. border: none;
  4811. }
  4812. p{
  4813. margin-top: 5px;
  4814. }
  4815. }
  4816. .qtMap {
  4817. font-size: 18px;
  4818. text-align: center;
  4819. line-height: 1;
  4820. }
  4821. .clMap {
  4822. font-size: 18px;
  4823. text-align: center;
  4824. line-height: 1;
  4825. }
  4826. .hcMap {
  4827. font-size: 18px;
  4828. text-align: center;
  4829. line-height: 1;
  4830. }
  4831. .htMap {
  4832. font-size: 18px;
  4833. text-align: center;
  4834. line-height: 1;
  4835. }
  4836. .dwMap {
  4837. font-size: 18px;
  4838. text-align: center;
  4839. line-height: 1;
  4840. }
  4841. }
  4842. .rightIcon_wrap {
  4843. position: absolute;
  4844. right: 16px;
  4845. bottom: 160px;
  4846. .selectionIcon_wrap {
  4847. width: 74px;
  4848. background: #fff;
  4849. border-radius: 10px;
  4850. padding: 14px 0;
  4851. .icon {
  4852. width: 38px;
  4853. height: 38px;
  4854. background: url("../../assets/images/homestead/selection_icon.png")
  4855. no-repeat;
  4856. background-size: 100% 100%;
  4857. margin: 0 auto 4px;
  4858. }
  4859. .text {
  4860. font-size: 24px;
  4861. text-align: center;
  4862. }
  4863. }
  4864. .positioning_wrap {
  4865. width: 74px;
  4866. background: #fff;
  4867. margin-bottom: 16px;
  4868. border-radius: 10px;
  4869. height: 74px;
  4870. display: flex;
  4871. justify-content: center; /* 相对父元素水平居中 */
  4872. align-items: center; /* 子元素相对父元素垂直居中*/
  4873. .icon {
  4874. width: 38px;
  4875. height: 38px;
  4876. background: url("../../assets/images/homestead/positioning_icon.png")
  4877. no-repeat;
  4878. background-size: 100% 100%;
  4879. margin: 0 auto;
  4880. }
  4881. }
  4882. }
  4883. .homesteadList_wrap {
  4884. // display: none;
  4885. display: flex;
  4886. position: absolute;
  4887. right: -200px;
  4888. top: 0px;
  4889. bottom: 0px;
  4890. width: 300px;
  4891. background: #fff;
  4892. z-index: 999;
  4893. border-top-left-radius: 15px;
  4894. border-bottom-left-radius: 15px;
  4895. flex-direction: column;
  4896. .noInfo_data {
  4897. font-size: 28px;
  4898. text-align: center;
  4899. height: 300px;
  4900. line-height: 300px;
  4901. color: #666;
  4902. }
  4903. .title_m {
  4904. color: #333;
  4905. line-height: 36px;
  4906. padding: 20px 40px 22px;
  4907. .name {
  4908. font-size: 36px;
  4909. line-height: 42px;
  4910. height: 42px;
  4911. }
  4912. .more_icon {
  4913. width: 38px;
  4914. height: 38px;
  4915. background: url("../../assets/images/homestead/selectionNext_icon.png")
  4916. no-repeat;
  4917. float: right;
  4918. margin-top: 2px;
  4919. }
  4920. }
  4921. .main_m {
  4922. overflow-y: auto;
  4923. padding: 10px 0;
  4924. // height: 300px;
  4925. flex: 1;
  4926. .flex_block {
  4927. height: 70px;
  4928. display: flex;
  4929. // justify-content: center; /* 相对父元素水平居中 */
  4930. align-items: center; /* 子元素相对父元素垂直居中 */
  4931. padding: 0 40px;
  4932. &.active {
  4933. box-shadow: 0px 0px 10px rgba(24, 45, 51, 0.5);
  4934. }
  4935. .name_text {
  4936. font-size: 28px;
  4937. flex: 0.5;
  4938. overflow: hidden; /*超出部分隐藏*/
  4939. white-space: nowrap; /*不换行*/
  4940. text-overflow: ellipsis; /*超出部分文字以...显示*/
  4941. }
  4942. .square_text {
  4943. font-size: 28px;
  4944. flex: 0.4;
  4945. }
  4946. .operation_mian {
  4947. flex: 0 0 150px;
  4948. .describe {
  4949. font-size: 20px;
  4950. padding: 6px 5px;
  4951. float: right;
  4952. color: #fff;
  4953. border-radius: 30px;
  4954. overflow: hidden;
  4955. text-overflow: ellipsis;
  4956. white-space: nowrap;
  4957. max-width: 150px;
  4958. &.yph {
  4959. background: #b026ff;
  4960. }
  4961. &.dlzdph {
  4962. background: #ff6f36;
  4963. }
  4964. &.ylz {
  4965. background: #7fff4c;
  4966. }
  4967. &.dlz {
  4968. background: rgb(255, 232, 76);
  4969. }
  4970. &.ylzdph {
  4971. background: #ff7dd0;
  4972. }
  4973. &.zy {
  4974. background: rgb(100, 30, 100);
  4975. }
  4976. &.xz {
  4977. background: rgb(60, 100, 180);
  4978. }
  4979. &.chdb {
  4980. background: #fe0303;
  4981. }
  4982. }
  4983. }
  4984. }
  4985. }
  4986. .footerBtn_wrap {
  4987. flex: 0 0 90px;
  4988. display: flex;
  4989. justify-content: center; /* 相对父元素水平居中 */
  4990. align-items: center; /* 子元素相对父元素垂直居中 */
  4991. .options {
  4992. flex: 1;
  4993. font-size: 38px;
  4994. display: flex;
  4995. justify-content: center; /* 相对父元素水平居中 */
  4996. align-items: center; /* 子元素相对父元素垂直居中 */
  4997. height: 90px;
  4998. &:first-child {
  4999. border-bottom-left-radius: 15px;
  5000. }
  5001. &.active {
  5002. background: #3cbf5b;
  5003. color: #fff;
  5004. }
  5005. }
  5006. }
  5007. }
  5008. .checkbox {
  5009. width: 200px;
  5010. margin: 30px auto;
  5011. }
  5012. .thead-checkbox {
  5013. background-color: lightgray;
  5014. }
  5015. .item-checkbox {
  5016. border: 1px solid darkgray;
  5017. }
  5018. .van-sticky{position: fixed;top: 0;right: 0; left: 0;z-index: 9999;}
  5019. .searchBar_wrap {
  5020. // display: none;
  5021. position: fixed;
  5022. left: 0;
  5023. bottom: 0;
  5024. width: 100%;
  5025. padding: 0px 16px 0px 13px;
  5026. background: #fff;
  5027. border-top-left-radius: 15px;
  5028. border-top-right-radius: 15px;
  5029. z-index: 9;
  5030. .searchBox{
  5031. .van-cell{
  5032. /*&:first-child{*/
  5033. /* box-shadow: none;*/
  5034. /* margin:0;*/
  5035. /*}*/
  5036. box-shadow: 0px 0px 5px #cccccc;
  5037. border-radius: 15PX;
  5038. margin-bottom: 0.35rem;
  5039. }
  5040. .van-cell__title{
  5041. flex: 0.8;
  5042. p{
  5043. color: rgb(34, 183, 242);
  5044. .van-icon{
  5045. vertical-align: middle;
  5046. }
  5047. span{
  5048. vertical-align: middle;
  5049. &:nth-child(3){
  5050. font-size: 0.25rem;
  5051. border-radius: 5PX;
  5052. padding: 5PX 15PX;
  5053. margin-left: 50%;
  5054. }
  5055. }
  5056. }
  5057. }
  5058. .van-cell__value{
  5059. flex: 0.2;
  5060. p{
  5061. font-size: 0.25rem;
  5062. display: inline-block;
  5063. border-radius: 1rem;
  5064. line-height: 1;
  5065. padding: 15PX 20PX;
  5066. }
  5067. }
  5068. }
  5069. .actionBar_wrap {
  5070. display: flex;
  5071. position: absolute;
  5072. top: 0;
  5073. left: 0;
  5074. width: 100%;
  5075. height: 100%;
  5076. background: #fff;
  5077. border-top-left-radius: 15px;
  5078. border-top-right-radius: 15px;
  5079. .m_list {
  5080. flex: 1;
  5081. display: flex;
  5082. justify-content: center; /* 相对父元素水平居中 */
  5083. align-items: center; /* 子元素相对父元素垂直居中 */
  5084. .tensile,
  5085. .positioning,
  5086. .spacing,
  5087. .scale {
  5088. width: 76px;
  5089. height: 72px;
  5090. background: #ffffff;
  5091. border-radius: 8px;
  5092. box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.16);
  5093. .icon {
  5094. width: 76px;
  5095. height: 72px;
  5096. }
  5097. &.active {
  5098. background: #333;
  5099. &.tensile {
  5100. .icon {
  5101. background: url("../../assets/images/homestead/operation/tensile_active.png")
  5102. center center no-repeat;
  5103. background-size: 38px 50px;
  5104. }
  5105. }
  5106. &.positioning {
  5107. .icon {
  5108. background: url("../../assets/images/homestead/operation/positioning_active.png")
  5109. center center no-repeat;
  5110. background-size: 38px 48px;
  5111. }
  5112. }
  5113. &.spacing {
  5114. .icon {
  5115. background: url("../../assets/images/homestead/operation/spacing_active.png")
  5116. center center no-repeat;
  5117. background-size: 46px 46px;
  5118. }
  5119. }
  5120. &.scale {
  5121. .icon {
  5122. background: url("../../assets/images/homestead/operation/scale_active.png")
  5123. center center no-repeat;
  5124. background-size: 48px 48px;
  5125. }
  5126. }
  5127. }
  5128. }
  5129. .tensile {
  5130. .icon {
  5131. background: url("../../assets/images/homestead/operation/tensile.png")
  5132. center center no-repeat;
  5133. background-size: 38px 50px;
  5134. }
  5135. }
  5136. .positioning {
  5137. .icon {
  5138. background: url("../../assets/images/homestead/operation/positioning.png")
  5139. center center no-repeat;
  5140. background-size: 38px 48px;
  5141. }
  5142. }
  5143. .spacing {
  5144. .icon {
  5145. background: url("../../assets/images/homestead/operation/spacing.png")
  5146. center center no-repeat;
  5147. background-size: 46px 46px;
  5148. }
  5149. }
  5150. .scale {
  5151. .icon {
  5152. background: url("../../assets/images/homestead/operation/scale.png")
  5153. center center no-repeat;
  5154. background-size: 48px 48px;
  5155. }
  5156. }
  5157. .closes {
  5158. background: url("../../assets/images/homestead/searchBar_close.png")
  5159. no-repeat;
  5160. background-size: 100% 100%;
  5161. width: 72px;
  5162. height: 72px;
  5163. &.gray {
  5164. background: url("../../assets/images/homestead/searchBar_close_gray.png")
  5165. no-repeat;
  5166. background-size: 100% 100%;
  5167. }
  5168. }
  5169. .correct {
  5170. background: url("../../assets/images/homestead/searchBar_save.png")
  5171. no-repeat;
  5172. background-size: 100% 100%;
  5173. width: 72px;
  5174. height: 72px;
  5175. }
  5176. }
  5177. }
  5178. .searchBar_area {
  5179. flex: 1;
  5180. height: 80px;
  5181. background: #f1f1f1;
  5182. border: 1px solid #dfdfdf;
  5183. border-radius: 10px;
  5184. padding: 0 28px;
  5185. display: flex;
  5186. .bar_icon {
  5187. width: 50px;
  5188. height: 50px;
  5189. background: url("../../assets/images/homestead/searchBar_bar.png")
  5190. center center no-repeat;
  5191. background-size: 100% 100%;
  5192. margin-top: 14px;
  5193. margin-right: 15px;
  5194. }
  5195. .bar_ipt {
  5196. flex: 1;
  5197. input {
  5198. width: 100%;
  5199. height: 100%;
  5200. background: none;
  5201. border: 0 none;
  5202. font-size: 32px;
  5203. }
  5204. }
  5205. .bar_text {
  5206. flex: 0 0 80px;
  5207. font-size: 32px;
  5208. color: #333333;
  5209. font-family: PingFang SC, PingFang SC-Regular;
  5210. font-weight: 400;
  5211. display: flex;
  5212. justify-content: center; /* 相对父元素水平居中 */
  5213. align-items: center; /* 子元素相对父元素垂直居中 */
  5214. }
  5215. }
  5216. .searchBar_more {
  5217. flex: 0 0 80px;
  5218. background: url("../../assets/images/homestead/searchBar_add.png") center
  5219. center no-repeat;
  5220. background-size: 80% 80%;
  5221. margin-left: 15px;
  5222. }
  5223. }
  5224. </style>