移动端
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.

5614 lines
237 KiB

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