修改测试中的问题
Showing
9 changed files
with
43 additions
and
17 deletions
... | @@ -105,6 +105,17 @@ | ... | @@ -105,6 +105,17 @@ |
105 | "XZQMC": "行政区名称", | 105 | "XZQMC": "行政区名称", |
106 | "XZQMJ": "行政区面积" | 106 | "XZQMJ": "行政区面积" |
107 | } | 107 | } |
108 | 108 | }, | |
109 | { | ||
110 | "layerName":"JZD", | ||
111 | "layerLabel":"界址点", | ||
112 | "layerUrl":"http://192.168.2.201:6080/arcgis/rest/services/%E4%BA%92%E8%81%94%E7%BD%91%E5%8A%A0%E4%B8%8D%E5%8A%A8%E4%BA%A7/XA_%E4%B8%8D%E5%8A%A8%E4%BA%A7/MapServer", | ||
113 | "id":3 | ||
114 | }, | ||
115 | { | ||
116 | "layerName":"JZX", | ||
117 | "layerLabel":"界址线", | ||
118 | "layerUrl":"http://192.168.2.201:6080/arcgis/rest/services/%E4%BA%92%E8%81%94%E7%BD%91%E5%8A%A0%E4%B8%8D%E5%8A%A8%E4%BA%A7/XA_%E4%B8%8D%E5%8A%A8%E4%BA%A7/MapServer", | ||
119 | "id":4 | ||
109 | } | 120 | } |
110 | ] | 121 | ] |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -513,7 +513,6 @@ export default { | ... | @@ -513,7 +513,6 @@ export default { |
513 | this.$message.warning("不是临时数据,不能导入图形!!!"); | 513 | this.$message.warning("不是临时数据,不能导入图形!!!"); |
514 | return; | 514 | return; |
515 | } | 515 | } |
516 | //先这么写着 后面返回类型 根据类型判断 | ||
517 | var type = this.zdData.type; | 516 | var type = this.zdData.type; |
518 | if(type == "zd"){ | 517 | if(type == "zd"){ |
519 | BSM = this.zdData.zdbsm; | 518 | BSM = this.zdData.zdbsm; | ... | ... |
... | @@ -544,12 +544,15 @@ export default { | ... | @@ -544,12 +544,15 @@ export default { |
544 | } | 544 | } |
545 | savePoints.push(obj); | 545 | savePoints.push(obj); |
546 | } | 546 | } |
547 | //保存矢量数据表 | ||
547 | addjzd(savePoints).then(res=>{ | 548 | addjzd(savePoints).then(res=>{ |
548 | if(res.succcess){ | 549 | if(res.succcess){ |
549 | //触发查询接口 | 550 | //触发查询接口 |
550 | console.log("界址点保存成成功!!!"); | 551 | console.log("界址点保存成成功!!!"); |
551 | } | 552 | } |
552 | }); | 553 | }); |
554 | //保存空间数据 | ||
555 | |||
553 | }, | 556 | }, |
554 | saveJzx(lines){ | 557 | saveJzx(lines){ |
555 | var jzxLines = []; | 558 | var jzxLines = []; |
... | @@ -568,12 +571,15 @@ export default { | ... | @@ -568,12 +571,15 @@ export default { |
568 | } | 571 | } |
569 | jzxLines.push(obj); | 572 | jzxLines.push(obj); |
570 | } | 573 | } |
574 | //保存矢量数据表 | ||
571 | addjzx(jzxLines).then(res=>{ | 575 | addjzx(jzxLines).then(res=>{ |
572 | if(res.success){ | 576 | if(res.success){ |
573 | //触发查询界址线 | 577 | //触发查询界址线 |
574 | console.log("界址线保存成功!!!!!"); | 578 | console.log("界址线保存成功!!!!!"); |
575 | } | 579 | } |
576 | }); | 580 | }); |
581 | //保存空间数据表 | ||
582 | |||
577 | }, | 583 | }, |
578 | saveZRZ(graphic){ | 584 | saveZRZ(graphic){ |
579 | var self = this; | 585 | var self = this; | ... | ... |
1 | import {loadModules} from 'esri-loader' | 1 | import {loadModules} from 'esri-loader' |
2 | 2 | ||
3 | export default { | 3 | export default { |
4 | 4 | ||
... | @@ -19,6 +19,7 @@ export default { | ... | @@ -19,6 +19,7 @@ export default { |
19 | findParameters.layerIds = layerIds; | 19 | findParameters.layerIds = layerIds; |
20 | findParameters.searchFields = searchFields; | 20 | findParameters.searchFields = searchFields; |
21 | findParameters.searchText = searchText; | 21 | findParameters.searchText = searchText; |
22 | findParameters.outSpatialReference = {wkid:3857}; | ||
22 | findTask.execute(findParameters).then(function (result) { | 23 | findTask.execute(findParameters).then(function (result) { |
23 | if(callBackFunction){ | 24 | if(callBackFunction){ |
24 | callBackFunction(result); | 25 | callBackFunction(result); | ... | ... |
... | @@ -152,7 +152,9 @@ export default { | ... | @@ -152,7 +152,9 @@ export default { |
152 | if(this.isMap){ | 152 | if(this.isMap){ |
153 | this.isMap = false; | 153 | this.isMap = false; |
154 | } | 154 | } |
155 | } else { | 155 | } else if(newPath == '/viewMap'){ |
156 | this.isMap = true; | ||
157 | }else{ | ||
156 | 158 | ||
157 | } | 159 | } |
158 | }, | 160 | }, | ... | ... |
... | @@ -164,6 +164,8 @@ import ChangeMap from "@/components/map/ChangeMap"; | ... | @@ -164,6 +164,8 @@ import ChangeMap from "@/components/map/ChangeMap"; |
164 | 164 | ||
165 | import sideTools from "./mapWeight/sideTools.vue" | 165 | import sideTools from "./mapWeight/sideTools.vue" |
166 | 166 | ||
167 | import mapTools from './mapWeight/js/mapTools.js' | ||
168 | |||
167 | export default { | 169 | export default { |
168 | inject:['getRightTree','getTreeByBsm'], | 170 | inject:['getRightTree','getTreeByBsm'], |
169 | components:{ | 171 | components:{ |
... | @@ -190,7 +192,7 @@ export default { | ... | @@ -190,7 +192,7 @@ export default { |
190 | bottomResultDialog:false | 192 | bottomResultDialog:false |
191 | } | 193 | } |
192 | }, | 194 | }, |
193 | mixins:[mapLayerManager,findTask], | 195 | mixins:[mapLayerManager,findTask,mapTools], |
194 | mounted(){ | 196 | mounted(){ |
195 | 197 | ||
196 | var query = this.$route.query | 198 | var query = this.$route.query |
... | @@ -331,7 +333,7 @@ export default { | ... | @@ -331,7 +333,7 @@ export default { |
331 | this.clearSearchLayer(this.viewId); | 333 | this.clearSearchLayer(this.viewId); |
332 | this.dialogVisible = false; | 334 | this.dialogVisible = false; |
333 | }, | 335 | }, |
334 | closeBufferDialog(){ | 336 | closeBufferDialog(flag){ |
335 | //关闭时清除查询结果 清除数据 | 337 | //关闭时清除查询结果 清除数据 |
336 | this.results = []; | 338 | this.results = []; |
337 | this.selectResLayerId =null; | 339 | this.selectResLayerId =null; |
... | @@ -340,8 +342,10 @@ export default { | ... | @@ -340,8 +342,10 @@ export default { |
340 | this.heighGraphic = null; | 342 | this.heighGraphic = null; |
341 | //清除查询图层 | 343 | //清除查询图层 |
342 | this.clearSearchLayer(this.viewId); | 344 | this.clearSearchLayer(this.viewId); |
343 | this.clearBufferLayer(this.viewId); | ||
344 | this.bottomResultDialog = false; | 345 | this.bottomResultDialog = false; |
346 | if(!flag){ | ||
347 | this.clearBufferLayer(this.viewId); | ||
348 | } | ||
345 | }, | 349 | }, |
346 | //处理数据 | 350 | //处理数据 |
347 | delIdentifyData(data){ | 351 | delIdentifyData(data){ | ... | ... |
... | @@ -249,10 +249,6 @@ export default { | ... | @@ -249,10 +249,6 @@ export default { |
249 | geometry.spatialReference = { | 249 | geometry.spatialReference = { |
250 | wkt:wkt | 250 | wkt:wkt |
251 | } | 251 | } |
252 | var graphic = { | ||
253 | attributes:self.currentClickZd, | ||
254 | geometry:geometry | ||
255 | } | ||
256 | // self.checkGeo(graphic); | 252 | // self.checkGeo(graphic); |
257 | self.resultDialog = false; | 253 | self.resultDialog = false; |
258 | self.$emit("setGeometry",geometry); | 254 | self.$emit("setGeometry",geometry); | ... | ... |
... | @@ -50,6 +50,7 @@ export default { | ... | @@ -50,6 +50,7 @@ export default { |
50 | symbol:graphicSymbol.fillSymbol.bufferGeoSymbol | 50 | symbol:graphicSymbol.fillSymbol.bufferGeoSymbol |
51 | }) | 51 | }) |
52 | layer.add(graphic); | 52 | layer.add(graphic); |
53 | view.center = graphic.geometry.extent.center; | ||
53 | if(callBackFunction && typeof callBackFunction == 'function'){ | 54 | if(callBackFunction && typeof callBackFunction == 'function'){ |
54 | callBackFunction(bufferGeometry); | 55 | callBackFunction(bufferGeometry); |
55 | } | 56 | } |
... | @@ -119,7 +120,7 @@ export default { | ... | @@ -119,7 +120,7 @@ export default { |
119 | layer.removeAll(); | 120 | layer.removeAll(); |
120 | }else { | 121 | }else { |
121 | layer = new GraphicsLayer({ | 122 | layer = new GraphicsLayer({ |
122 | id:"overLayer" | 123 | id:"identifyLayer" |
123 | }) | 124 | }) |
124 | view.map.add(layer); | 125 | view.map.add(layer); |
125 | } | 126 | } | ... | ... |
... | @@ -150,7 +150,7 @@ | ... | @@ -150,7 +150,7 @@ |
150 | </div> | 150 | </div> |
151 | <el-dialog title="图形导入" :visible.sync="importDialog" | 151 | <el-dialog title="图形导入" :visible.sync="importDialog" |
152 | width="30%"> | 152 | width="30%"> |
153 | <import-geometry @setGeometry="setGeometry"></import-geometry> | 153 | <import-geometry @setGeometry = "setBufferGeometry"></import-geometry> |
154 | </el-dialog> | 154 | </el-dialog> |
155 | </div> | 155 | </div> |
156 | </template> | 156 | </template> |
... | @@ -281,7 +281,6 @@ | ... | @@ -281,7 +281,6 @@ |
281 | //缓冲区分析 | 281 | //缓冲区分析 |
282 | bufferAnalysis(){ | 282 | bufferAnalysis(){ |
283 | this.bufferDialog = true; | 283 | this.bufferDialog = true; |
284 | |||
285 | }, | 284 | }, |
286 | //缓冲区分析执行语句 | 285 | //缓冲区分析执行语句 |
287 | toIdentity(){ | 286 | toIdentity(){ |
... | @@ -309,7 +308,7 @@ | ... | @@ -309,7 +308,7 @@ |
309 | }else{ | 308 | }else{ |
310 | self.$message.success("暂无数据!!!"); | 309 | self.$message.success("暂无数据!!!"); |
311 | //清除上次的结果 关闭上次的结果 清除地图数据 | 310 | //清除上次的结果 关闭上次的结果 清除地图数据 |
312 | self.$parent.closeBufferDialog(); | 311 | self.$parent.closeBufferDialog(true); |
313 | } | 312 | } |
314 | },true,'all',3,view.extent); | 313 | },true,'all',3,view.extent); |
315 | }) | 314 | }) |
... | @@ -351,6 +350,8 @@ | ... | @@ -351,6 +350,8 @@ |
351 | self.$parent.bottomResultDialog = true; | 350 | self.$parent.bottomResultDialog = true; |
352 | }else{ | 351 | }else{ |
353 | self.$message.success("暂无数据!!!"); | 352 | self.$message.success("暂无数据!!!"); |
353 | //清除上次的结果 关闭上次的结果 清除地图数据 | ||
354 | self.$parent.closeBufferDialog(true); | ||
354 | } | 355 | } |
355 | },true,'all',3,view.extent); | 356 | },true,'all',3,view.extent); |
356 | }) | 357 | }) |
... | @@ -375,6 +376,8 @@ | ... | @@ -375,6 +376,8 @@ |
375 | return; | 376 | return; |
376 | } | 377 | } |
377 | } | 378 | } |
379 | //将那个导入图层清除 | ||
380 | |||
378 | self.createBuffer(this.importGeo,self.bufferParams.distance,self.viewId,function (bufGeo) { | 381 | self.createBuffer(this.importGeo,self.bufferParams.distance,self.viewId,function (bufGeo) { |
379 | self.identify(self.layerUrl,self.bufferParams.layerId,bufGeo,function(res){ | 382 | self.identify(self.layerUrl,self.bufferParams.layerId,bufGeo,function(res){ |
380 | var resultes = res.results; | 383 | var resultes = res.results; |
... | @@ -383,6 +386,8 @@ | ... | @@ -383,6 +386,8 @@ |
383 | self.$parent.bottomResultDialog = true; | 386 | self.$parent.bottomResultDialog = true; |
384 | }else{ | 387 | }else{ |
385 | self.$message.success("暂无数据!!!"); | 388 | self.$message.success("暂无数据!!!"); |
389 | //清除上次的结果 关闭上次的结果 清除地图数据 | ||
390 | self.$parent.closeBufferDialog(true); | ||
386 | } | 391 | } |
387 | },true,'all',3,view.extent); | 392 | },true,'all',3,view.extent); |
388 | }) | 393 | }) |
... | @@ -401,7 +406,7 @@ | ... | @@ -401,7 +406,7 @@ |
401 | } | 406 | } |
402 | //清除结果图层和绘制图层 | 407 | //清除结果图层和绘制图层 |
403 | this.$parent.closeResultDialog(); | 408 | this.$parent.closeResultDialog(); |
404 | this.clearBufferLayer(); | 409 | this.clearBufferLayer(this.viewId); |
405 | }, | 410 | }, |
406 | //获取地籍区/地籍子区数据 | 411 | //获取地籍区/地籍子区数据 |
407 | getDjqList(){ | 412 | getDjqList(){ |
... | @@ -449,7 +454,8 @@ | ... | @@ -449,7 +454,8 @@ |
449 | } | 454 | } |
450 | }, | 455 | }, |
451 | //设置导入的空间数据 | 456 | //设置导入的空间数据 |
452 | setGeometry(geo){ | 457 | setBufferGeometry(geo){ |
458 | debugger | ||
453 | this.importGeo = geo; | 459 | this.importGeo = geo; |
454 | this.importDialog = false; | 460 | this.importDialog = false; |
455 | }, | 461 | }, | ... | ... |
-
Please register or sign in to post a comment