jikai commit
Showing
12 changed files
with
210 additions
and
120 deletions
... | @@ -5,28 +5,32 @@ | ... | @@ -5,28 +5,32 @@ |
5 | "alpha":100, | 5 | "alpha":100, |
6 | "children":[ | 6 | "children":[ |
7 | { | 7 | { |
8 | "label":"西安市阎良区", | 8 | "label":"西安市", |
9 | "id":"1-1", | 9 | "id":"1-1", |
10 | "type":"layerGroup", | 10 | "type":"layerGroup", |
11 | "alpha":100, | 11 | "alpha":100, |
12 | "children":[{ | 12 | "children":[{ |
13 | "label":"行政区划", | 13 | "label":"行政区划", |
14 | "id":"1-1-1", | 14 | "id":"1-1-1", |
15 | "type":"layerGroup", | 15 | "name": "testLayer", |
16 | "alpha":100, | 16 | "alpha":100, |
17 | "children":[ | 17 | "children":[ |
18 | { | 18 | { |
19 | "label":"行政区界限", | 19 | "label":"行政区界限", |
20 | "id":"1-1-1-1", | 20 | "id":"1-1-1-1", |
21 | "type":"layer", | 21 | "type":"layer", |
22 | "layerId":20, | 22 | "alpha": 100, |
23 | "name": "testLayer", | ||
24 | "layerId":0, | ||
23 | "children":null | 25 | "children":null |
24 | }, | 26 | }, |
25 | { | 27 | { |
26 | "label":"行政区", | 28 | "label":"行政区", |
27 | "id":"1-1-1-2", | 29 | "id":"1-1-1-2", |
28 | "type":"layer", | 30 | "type":"layer", |
29 | "layerId":19, | 31 | "alpha": 100, |
32 | "name": "testLayer", | ||
33 | "layerId":1, | ||
30 | "children":null | 34 | "children":null |
31 | } | 35 | } |
32 | ] | 36 | ] |
... | @@ -34,21 +38,25 @@ | ... | @@ -34,21 +38,25 @@ |
34 | { | 38 | { |
35 | "label":"地籍分区", | 39 | "label":"地籍分区", |
36 | "id":"1-1-2", | 40 | "id":"1-1-2", |
37 | "type":"layerGroup", | 41 | "name": "djfqLayer", |
38 | "alpha":100, | 42 | "alpha":100, |
39 | "children":[ | 43 | "children":[ |
40 | { | 44 | { |
41 | "label":"地籍区", | 45 | "label":"地籍区", |
42 | "id":"1-1-2-1", | 46 | "id":"1-1-2-1", |
43 | "type":"layer", | 47 | "type":"layer", |
44 | "layerId":13, | 48 | "alpha": 100, |
49 | "name": "djfqLayer", | ||
50 | "layerId":0, | ||
45 | "children":null | 51 | "children":null |
46 | }, | 52 | }, |
47 | { | 53 | { |
48 | "label":"地籍子区", | 54 | "label":"地籍子区", |
49 | "id":"1-1-2-2", | 55 | "id":"1-1-2-2", |
50 | "type":"layer", | 56 | "type":"layer", |
51 | "layerId":14, | 57 | "alpha": 100, |
58 | "name": "djfqLayer", | ||
59 | "layerId":1, | ||
52 | "children":null | 60 | "children":null |
53 | } | 61 | } |
54 | ] | 62 | ] |
... | @@ -56,77 +64,96 @@ | ... | @@ -56,77 +64,96 @@ |
56 | { | 64 | { |
57 | "label":"不动产单元", | 65 | "label":"不动产单元", |
58 | "id":"1-1-3", | 66 | "id":"1-1-3", |
59 | "type":"layerGroup", | 67 | "name": "bdcdyLayer", |
60 | "alpha":100, | 68 | "alpha":100, |
61 | "children":[ | 69 | "children":[ |
62 | { | 70 | { |
63 | "label":"线状定着物", | 71 | "label":"线状定着物", |
64 | "id":"1-1-3-1", | 72 | "id":"1-1-3-1", |
65 | "type":"layer", | 73 | "type":"layer", |
66 | "layerId":7, | 74 | "alpha": 100, |
75 | "name": "bdcdyLayer", | ||
76 | "layerId":0, | ||
67 | "children":null | 77 | "children":null |
68 | }, | 78 | }, |
69 | { | 79 | { |
70 | "label":"宗海", | 80 | "label":"宗海", |
71 | "id":"1-1-3-2", | 81 | "id":"1-1-3-2", |
72 | "type":"layer", | 82 | "type":"layer", |
73 | "layerId":9, | 83 | "alpha": 100, |
84 | "name": "bdcdyLayer", | ||
85 | "layerId":1, | ||
74 | "children":null | 86 | "children":null |
75 | }, | 87 | }, |
76 | { | 88 | { |
77 | "label":"宗地", | 89 | "label":"宗地", |
78 | "id":"1-1-3-3", | 90 | "id":"1-1-3-3", |
79 | "type":"layer", | 91 | "type":"layer", |
80 | "layerId":8, | 92 | "alpha": 100, |
93 | "name": "bdcdyLayer", | ||
94 | "layerId":2, | ||
81 | "children":null | 95 | "children":null |
82 | }, | 96 | }, |
83 | { | 97 | { |
84 | "label":"林权", | 98 | "label":"林权", |
85 | "id":"1-1-3-4", | 99 | "id":"1-1-3-4", |
86 | "type":"layer", | 100 | "type":"layer", |
87 | "layerId":5, | 101 | "alpha": 100, |
102 | "name": "bdcdyLayer", | ||
103 | "layerId":3, | ||
88 | "children":null | 104 | "children":null |
89 | }, | 105 | }, |
90 | { | 106 | { |
91 | "label":"构筑物", | 107 | "label":"构筑物", |
92 | "id":"1-1-3-5", | 108 | "id":"1-1-3-5", |
93 | "type":"layer", | 109 | "type":"layer", |
94 | "layerId":2, | 110 | "alpha": 100, |
111 | "name": "bdcdyLayer", | ||
112 | "layerId":4, | ||
95 | "children":null | 113 | "children":null |
96 | }, | 114 | }, |
97 | { | 115 | { |
98 | "label":"面状定着物", | 116 | "label":"面状定着物", |
99 | "id":"1-1-3-6", | 117 | "id":"1-1-3-6", |
100 | "type":"layer", | 118 | "type":"layer", |
101 | "layerId":6, | 119 | "alpha": 100, |
120 | "name": "bdcdyLayer", | ||
121 | "layerId":5, | ||
102 | "children":null | 122 | "children":null |
103 | }, | 123 | }, |
104 | { | 124 | { |
105 | "label":"界址线", | 125 | "label":"界址线", |
106 | "id":"1-1-3-7", | 126 | "id":"1-1-3-7", |
107 | "type":"layer", | 127 | "type":"layer", |
108 | "layerId":4, | 128 | "alpha": 100, |
129 | "name": "bdcdyLayer", | ||
130 | "layerId":6, | ||
109 | "children":null | 131 | "children":null |
110 | }, | 132 | }, |
111 | { | 133 | { |
112 | "label":"点状定着物", | 134 | "label":"点状定着物", |
113 | "id":"1-1-3-8", | 135 | "id":"1-1-3-8", |
114 | "type":"layer", | 136 | "type":"layer", |
115 | "layerId":1, | 137 | "alpha": 100, |
138 | "name": "bdcdyLayer", | ||
139 | "layerId":7, | ||
116 | "children":null | 140 | "children":null |
117 | }, | 141 | }, |
118 | { | 142 | { |
119 | "label":"自然幢", | 143 | "label":"自然幢", |
120 | "id":"1-1-3-9", | 144 | "id":"1-1-3-9", |
121 | "type":"layer", | 145 | "type":"layer", |
122 | "layerId":10, | 146 | "alpha": 100, |
147 | "name": "bdcdyLayer", | ||
148 | "layerId":8, | ||
123 | "children":null | 149 | "children":null |
124 | }, | 150 | }, |
125 | { | 151 | { |
126 | "label":"界址点", | 152 | "label":"界址点", |
127 | "id":"1-1-3-10", | 153 | "id":"1-1-3-10", |
128 | "type":"layer", | 154 | "type":"layer", |
129 | "layerId":4, | 155 | "name": "bdcdyLayer", |
156 | "layerId":9, | ||
130 | "children":null | 157 | "children":null |
131 | } | 158 | } |
132 | ] | 159 | ] |
... | @@ -134,28 +161,31 @@ | ... | @@ -134,28 +161,31 @@ |
134 | { | 161 | { |
135 | "label":"自然地理", | 162 | "label":"自然地理", |
136 | "id":"1-1-4", | 163 | "id":"1-1-4", |
137 | "type":"layerGroup", | 164 | "name": "zrdlLayer", |
138 | "alpha":100, | 165 | "alpha":100, |
139 | "children":[ | 166 | "children":[ |
140 | { | 167 | { |
141 | "label":"辅助面", | 168 | "label":"辅助面", |
142 | "id":"1-1-4-1", | 169 | "id":"1-1-4-1", |
143 | "type":"layer", | 170 | "type":"layer", |
144 | "layerId":15, | 171 | "name": "zrdlLayer", |
172 | "layerId":0, | ||
145 | "children":null | 173 | "children":null |
146 | }, | 174 | }, |
147 | { | 175 | { |
148 | "label":"植被", | 176 | "label":"植被", |
149 | "id":"1-1-4-2", | 177 | "id":"1-1-4-2", |
150 | "type":"layer", | 178 | "type":"layer", |
151 | "layerId":17, | 179 | "name": "zrdlLayer", |
180 | "layerId":1, | ||
152 | "children":null | 181 | "children":null |
153 | }, | 182 | }, |
154 | { | 183 | { |
155 | "label":"水系", | 184 | "label":"水系", |
156 | "id":"1-1-4-3", | 185 | "id":"1-1-4-3", |
157 | "type":"layer", | 186 | "type":"layer", |
158 | "layerId":16, | 187 | "name": "zrdlLayer", |
188 | "layerId":2, | ||
159 | "children":null | 189 | "children":null |
160 | } | 190 | } |
161 | ] | 191 | ] | ... | ... |
1 | [{ | 1 | [{ |
2 | "layerName": "ZDJBXX", | 2 | "layerName": "ZDJBXX", |
3 | "layerLabel": "宗地", | 3 | "layerLabel": "宗地", |
4 | "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", | 4 | "layerUrl": "https://192.168.2.146:6443/arcgis/rest/services/qj/BDCDY/MapServer", |
5 | "id":8, | 5 | "id":2, |
6 | "fieldAliases": { | 6 | "fieldAliases": { |
7 | "BSM": "标识码", | 7 | "BSM": "标识码", |
8 | "YSDM": "要素代码", | 8 | "YSDM": "要素代码", |
... | @@ -40,7 +40,7 @@ | ... | @@ -40,7 +40,7 @@ |
40 | "layerName": "ZRZ", | 40 | "layerName": "ZRZ", |
41 | "layerLabel": "自然幢", | 41 | "layerLabel": "自然幢", |
42 | "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", | 42 | "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", |
43 | "id": 10, | 43 | "id": 9, |
44 | "fieldAliases": { | 44 | "fieldAliases": { |
45 | "YSDM": "要素代码", | 45 | "YSDM": "要素代码", |
46 | "BDCDYH": "不动产单元号", | 46 | "BDCDYH": "不动产单元号", |
... | @@ -72,8 +72,8 @@ | ... | @@ -72,8 +72,8 @@ |
72 | { | 72 | { |
73 | "layerName": "DJQ", | 73 | "layerName": "DJQ", |
74 | "layerLabel": "地籍区", | 74 | "layerLabel": "地籍区", |
75 | "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", | 75 | "layerUrl": "https://192.168.2.146:6443/arcgis/rest/services/qj/DJFQ/MapServer", |
76 | "id": 13, | 76 | "id": 1, |
77 | "fieldAliases": { | 77 | "fieldAliases": { |
78 | "BSM": "标识码", | 78 | "BSM": "标识码", |
79 | "YSDM": "要素代码", | 79 | "YSDM": "要素代码", |
... | @@ -84,8 +84,8 @@ | ... | @@ -84,8 +84,8 @@ |
84 | { | 84 | { |
85 | "layerName": "DJZQ", | 85 | "layerName": "DJZQ", |
86 | "layerLabel": "地籍子区", | 86 | "layerLabel": "地籍子区", |
87 | "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", | 87 | "layerUrl": "https://192.168.2.146:6443/arcgis/rest/services/qj/DJFQ/MapServer", |
88 | "id": 14, | 88 | "id": 0, |
89 | "fieldAliases": { | 89 | "fieldAliases": { |
90 | "BSM": "标识码", | 90 | "BSM": "标识码", |
91 | "YSDM": "要素代码", | 91 | "YSDM": "要素代码", |
... | @@ -96,8 +96,8 @@ | ... | @@ -96,8 +96,8 @@ |
96 | { | 96 | { |
97 | "layerName": "XJZQ", | 97 | "layerName": "XJZQ", |
98 | "layerLabel": "行政区", | 98 | "layerLabel": "行政区", |
99 | "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", | 99 | "layerUrl": "https://192.168.2.146:6443/arcgis/rest/services/qj/XZQH/MapServer", |
100 | "id": 19, | 100 | "id": 1, |
101 | "fieldAliases": { | 101 | "fieldAliases": { |
102 | "BSM": "标识码", | 102 | "BSM": "标识码", |
103 | "YSDM": "要素代码", | 103 | "YSDM": "要素代码", |
... | @@ -109,13 +109,13 @@ | ... | @@ -109,13 +109,13 @@ |
109 | { | 109 | { |
110 | "layerName":"JZD", | 110 | "layerName":"JZD", |
111 | "layerLabel":"界址点", | 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", | 112 | "layerUrl":"https://192.168.2.146:6443/arcgis/rest/services/qj/BDCDY/MapServer", |
113 | "id":3 | 113 | "id":9 |
114 | }, | 114 | }, |
115 | { | 115 | { |
116 | "layerName":"JZX", | 116 | "layerName":"JZX", |
117 | "layerLabel":"界址线", | 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", | 118 | "layerUrl":"https://192.168.2.146:6443/arcgis/rest/services/qj/BDCDY/MapServer", |
119 | "id":4 | 119 | "id":6 |
120 | } | 120 | } |
121 | ] | 121 | ] |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -216,7 +216,7 @@ export default { | ... | @@ -216,7 +216,7 @@ export default { |
216 | // if(item.dm == 'G' || item.dm == 'J' ||item.dm == 'Z'){ | 216 | // if(item.dm == 'G' || item.dm == 'J' ||item.dm == 'Z'){ |
217 | // this.$emit("changeCreateVisible", true); | 217 | // this.$emit("changeCreateVisible", true); |
218 | // } | 218 | // } |
219 | //判断楼盘类型 | 219 | //判断楼盘类型 |
220 | switch (item.type) { | 220 | switch (item.type) { |
221 | case 'zd': | 221 | case 'zd': |
222 | this.$emit("changeIsZD", true); | 222 | this.$emit("changeIsZD", true); | ... | ... |
... | @@ -572,6 +572,7 @@ export default { | ... | @@ -572,6 +572,7 @@ export default { |
572 | this.$message.warning("不是临时数据,不能导入图形!!!"); | 572 | this.$message.warning("不是临时数据,不能导入图形!!!"); |
573 | return; | 573 | return; |
574 | } | 574 | } |
575 | console.log(this.zdData); | ||
575 | var type = this.zdData.type; | 576 | var type = this.zdData.type; |
576 | if(type == "zd"){ | 577 | if(type == "zd"){ |
577 | BSM = this.zdData.zdbsm; | 578 | BSM = this.zdData.zdbsm; |
... | @@ -579,7 +580,7 @@ export default { | ... | @@ -579,7 +580,7 @@ export default { |
579 | BSM = this.zdData.bsm; | 580 | BSM = this.zdData.bsm; |
580 | } | 581 | } |
581 | //当确定导入图形是 跳转到图形界面 | 582 | //当确定导入图形是 跳转到图形界面 |
582 | this.queryGeoByBsm(BSM,type,function (features){ | 583 | this.queryGeoByBsm(BSM,type,function (features){ |
583 | if(features && features.length > 0){ | 584 | if(features && features.length > 0){ |
584 | if(features[0].geometry && features[0].geometry.rings.length > 0){ | 585 | if(features[0].geometry && features[0].geometry.rings.length > 0){ |
585 | self.$confirm('该条数据有地块信息,是否继续导入?', '提示', { | 586 | self.$confirm('该条数据有地块信息,是否继续导入?', '提示', { | ... | ... |
... | @@ -381,7 +381,7 @@ export default { | ... | @@ -381,7 +381,7 @@ export default { |
381 | if(valid){ | 381 | if(valid){ |
382 | //选择处理方式 | 382 | //选择处理方式 |
383 | var value = self.dealForm.method; | 383 | var value = self.dealForm.method; |
384 | self.currntDealGraphic.attributes = {}; | 384 | self.currntDealGraphic.attributes = {}; |
385 | switch (value) { | 385 | switch (value) { |
386 | case '1':self.currntDealGraphic.attributes.BGZT = 1;self.saveZd(self.currntDealGraphic);break; | 386 | case '1':self.currntDealGraphic.attributes.BGZT = 1;self.saveZd(self.currntDealGraphic);break; |
387 | case "2":self.getDifference(self.currntDealGraphic,self.overResults,self.delOverGeo);break; | 387 | case "2":self.getDifference(self.currntDealGraphic,self.overResults,self.delOverGeo);break; |
... | @@ -458,8 +458,9 @@ export default { | ... | @@ -458,8 +458,9 @@ export default { |
458 | saveZd(graphic){ | 458 | saveZd(graphic){ |
459 | var self = this; | 459 | var self = this; |
460 | var points = null,lines = null, | 460 | var points = null,lines = null, |
461 | layer = self.getLayerByName("ZDJBXX"); | 461 | layer = self.getLayerByName("ZDJBXX"); |
462 | var featureUrl = layer.layerUrl.replace("MapServer","FeatureServer"); | 462 | // var featureUrl = layer.layerUrl.replace("MapServer","FeatureServer"); |
463 | var featureUrl = layer.layerUrl; | ||
463 | featureUrl += "/"+layer.id; | 464 | featureUrl += "/"+layer.id; |
464 | if(self.geoInfo){ | 465 | if(self.geoInfo){ |
465 | //替换 生成图像 高亮 | 466 | //替换 生成图像 高亮 |
... | @@ -503,8 +504,8 @@ export default { | ... | @@ -503,8 +504,8 @@ export default { |
503 | graphic.attributes = attributes; | 504 | graphic.attributes = attributes; |
504 | self.addGraphic(featureUrl,graphic,function (res) { | 505 | self.addGraphic(featureUrl,graphic,function (res) { |
505 | var addRresult = res.addFeatureResults[0]; | 506 | var addRresult = res.addFeatureResults[0]; |
506 | if(addRresult.objectId){ | 507 | // if(addRresult.objectId){ |
507 | var OBJECTID = addRresult.objectId; | 508 | // var OBJECTID = addRresult.objectId; |
508 | if(graphic.geometry) { | 509 | if(graphic.geometry) { |
509 | points = self.craetJZPoint(graphic); | 510 | points = self.craetJZPoint(graphic); |
510 | self.savejzd(points) | 511 | self.savejzd(points) |
... | @@ -514,9 +515,9 @@ export default { | ... | @@ -514,9 +515,9 @@ export default { |
514 | self.saveJzx(lines); | 515 | self.saveJzx(lines); |
515 | }); | 516 | }); |
516 | } | 517 | } |
517 | self.$message.success("保存成功!!!"); | 518 | self.$message.success("保存成功!!!"); |
518 | self.goMap(); | 519 | self.goMap(); |
519 | } | 520 | // } |
520 | }); | 521 | }); |
521 | } | 522 | } |
522 | }, | 523 | }, | ... | ... |
... | @@ -191,7 +191,8 @@ export default { | ... | @@ -191,7 +191,8 @@ export default { |
191 | layerIds.push(djqLayer.id); | 191 | layerIds.push(djqLayer.id); |
192 | layerIds.push(djzqLayer.id); | 192 | layerIds.push(djzqLayer.id); |
193 | layerIds.push(xjzqLayer.id); | 193 | layerIds.push(xjzqLayer.id); |
194 | var polygon = new Polygon(geometry); | 194 | var polygon = new Polygon(geometry); |
195 | |||
195 | identifyUtils.methods.identify(djqLayer.layerUrl,layerIds,polygon,function (res) { | 196 | identifyUtils.methods.identify(djqLayer.layerUrl,layerIds,polygon,function (res) { |
196 | var results = res.results; | 197 | var results = res.results; |
197 | var isJoint = false,layerName = "",message=""; | 198 | var isJoint = false,layerName = "",message=""; | ... | ... |
... | @@ -10,13 +10,13 @@ export default { | ... | @@ -10,13 +10,13 @@ export default { |
10 | "esri/tasks/support/IdentifyParameters" | 10 | "esri/tasks/support/IdentifyParameters" |
11 | ]).then(([ | 11 | ]).then(([ |
12 | IdentifyTask, | 12 | IdentifyTask, |
13 | IdentifyParameters | 13 | IdentifyParameters |
14 | ]) => { | 14 | ]) => { |
15 | var identifyTask = new IdentifyTask({ | 15 | var identifyTask = new IdentifyTask({ |
16 | url:url | 16 | url:url |
17 | }), | 17 | }), |
18 | identifyParameters = new IdentifyParameters(); | 18 | identifyParameters = new IdentifyParameters(); |
19 | identifyParameters.geometry = geometry; | 19 | identifyParameters.geometry = geometry; |
20 | if(layerIds){ | 20 | if(layerIds){ |
21 | identifyParameters.layerIds = layerIds; | 21 | identifyParameters.layerIds = layerIds; |
22 | } | 22 | } | ... | ... |
... | @@ -22,6 +22,8 @@ export default { | ... | @@ -22,6 +22,8 @@ export default { |
22 | var featureLayer = new FeatureLayer({ | 22 | var featureLayer = new FeatureLayer({ |
23 | url:url | 23 | url:url |
24 | }) | 24 | }) |
25 | console.log(featureLayer); | ||
26 | console.log(graphic); | ||
25 | var saveGraphics = []; | 27 | var saveGraphics = []; |
26 | if(!Array.isArray(graphic)){ | 28 | if(!Array.isArray(graphic)){ |
27 | graphic = [graphic]; | 29 | graphic = [graphic]; |
... | @@ -45,7 +47,7 @@ export default { | ... | @@ -45,7 +47,7 @@ export default { |
45 | } | 47 | } |
46 | featureLayer.applyEdits({ | 48 | featureLayer.applyEdits({ |
47 | addFeatures:saveGraphics | 49 | addFeatures:saveGraphics |
48 | }).then(function (res){ | 50 | }).then(function (res){ |
49 | if(callBackFunction && typeof callBackFunction == 'function'){ | 51 | if(callBackFunction && typeof callBackFunction == 'function'){ |
50 | callBackFunction(res); | 52 | callBackFunction(res); |
51 | } | 53 | } | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | import {loadCss,loadScript} from "esri-loader" | 2 | import {loadCss,loadScript} from "esri-loader" |
3 | 3 | ||
4 | export function init(){ | 4 | export function init(){ |
5 | loadScript({url:"http://192.168.2.38/4.16/init.js"}); | 5 | loadScript({ url:"http://192.168.2.146/arcgis_js_api/library/4.17/init.js"}); |
6 | loadCss("http://192.168.2.38/4.16/esri/themes/light/main.css"); | 6 | loadCss("http://192.168.2.146/arcgis_js_api/library/esri/css/main.css"); |
7 | } | 7 | } |
8 | init(); | 8 | init(); |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -177,7 +177,11 @@ export default { | ... | @@ -177,7 +177,11 @@ export default { |
177 | data(){ | 177 | data(){ |
178 | return{ | 178 | return{ |
179 | viewId:"testMap", | 179 | viewId:"testMap", |
180 | 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", | 180 | // 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", |
181 | layerUrl: 'https://192.168.2.146:6443/arcgis/rest/services/qj/XZQH/MapServer', // 行政区划 | ||
182 | bdcdyUrl: 'https://192.168.2.146:6443/arcgis/rest/services/qj/BDCDY/MapServer', // 不动产单元 | ||
183 | djfqUrl: 'https://192.168.2.146:6443/arcgis/rest/services/qj/DJFQ/MapServer', // 地籍分区 | ||
184 | zrdlUrl: 'https://192.168.2.146:6443/arcgis/rest/services/qj/JCDL/MapServer', // 自然地理 | ||
181 | dialogVisible:false, | 185 | dialogVisible:false, |
182 | selectResLayerId:null, | 186 | selectResLayerId:null, |
183 | features:[], | 187 | features:[], |
... | @@ -219,29 +223,37 @@ export default { | ... | @@ -219,29 +223,37 @@ export default { |
219 | view.ui.move(["zoom"], "bottom-right"); | 223 | view.ui.move(["zoom"], "bottom-right"); |
220 | loadModules([ | 224 | loadModules([ |
221 | "esri/layers/MapImageLayer" | 225 | "esri/layers/MapImageLayer" |
222 | ]).then(([ | 226 | ]).then(([ MapImageLayer ])=>{ |
223 | MapImageLayer | ||
224 | ])=>{ | ||
225 | var mapImageLayer = new MapImageLayer({ | 227 | var mapImageLayer = new MapImageLayer({ |
226 | url:self.layerUrl, | 228 | url:self.layerUrl, |
227 | id:"testLayer", | 229 | id:"testLayer", |
228 | spatialReference:view.spatialReference, | 230 | spatialReference:view.spatialReference |
229 | sublayers:[ | 231 | }); |
230 | { | 232 | view.map.add(mapImageLayer, 1); |
231 | id:19, | 233 | |
232 | visible:true | 234 | let bdcdyLayer = new MapImageLayer({ |
233 | }, | 235 | url:self.bdcdyUrl, |
234 | { | 236 | id:"bdcdyLayer", |
235 | id:8, | 237 | spatialReference:view.spatialReference |
236 | visible:true | ||
237 | }, | ||
238 | { | ||
239 | id:10, | ||
240 | visible:true | ||
241 | } | ||
242 | ] | ||
243 | }); | 238 | }); |
244 | view.map.add(mapImageLayer,1); | 239 | view.map.add(bdcdyLayer); |
240 | |||
241 | let djfqLayer = new MapImageLayer({ | ||
242 | url:self.djfqUrl, | ||
243 | id:"djfqLayer", | ||
244 | visible: false, | ||
245 | spatialReference:view.spatialReference | ||
246 | }); | ||
247 | view.map.add(djfqLayer); | ||
248 | |||
249 | let zrdlLayer = new MapImageLayer({ | ||
250 | url:self.zrdlUrl, | ||
251 | id:"zrdlLayer", | ||
252 | visible: false, | ||
253 | spatialReference:view.spatialReference | ||
254 | }); | ||
255 | view.map.add(zrdlLayer); | ||
256 | |||
245 | var query = self.$route.query; | 257 | var query = self.$route.query; |
246 | if(query && JSON.stringify(query) != "{}"){ | 258 | if(query && JSON.stringify(query) != "{}"){ |
247 | self.addGeoByBsm(query.bsm,query.type,self.viewId); | 259 | self.addGeoByBsm(query.bsm,query.type,self.viewId); |
... | @@ -355,12 +367,13 @@ export default { | ... | @@ -355,12 +367,13 @@ export default { |
355 | self.features = []; | 367 | self.features = []; |
356 | self.resultLayers = []; | 368 | self.resultLayers = []; |
357 | this.heighGraphic = null; | 369 | this.heighGraphic = null; |
358 | //清除查询图层 | 370 | //清除查询图层 |
359 | this.clearSearchLayer(this.viewId); | 371 | this.clearSearchLayer(this.viewId); |
360 | this.totalResults = data.length; | 372 | this.totalResults = data.length; |
361 | for(var i = 0;i < data.length;i++){ | 373 | for(var i = 0;i < data.length;i++){ |
362 | var layerId = data[i].layerId; | 374 | var layerId = data[i].layerId; |
363 | var layer = self.getLayerById(layerId); | 375 | var layer = self.getLayerById(layerId); |
376 | |||
364 | var layerResult = self.results.filter(function (item) { | 377 | var layerResult = self.results.filter(function (item) { |
365 | return item.layerId == layerId; | 378 | return item.layerId == layerId; |
366 | }) | 379 | }) | ... | ... |
... | @@ -90,8 +90,10 @@ export default { | ... | @@ -90,8 +90,10 @@ export default { |
90 | mixins:[draw,identifyUtils,measure,mapTools], | 90 | mixins:[draw,identifyUtils,measure,mapTools], |
91 | data(){ | 91 | data(){ |
92 | return{ | 92 | return{ |
93 | url:"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", | 93 | // url:"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", |
94 | selectResLayerId:"", | 94 | // url: 'https://192.168.2.146:6443/arcgis/rest/services/qj/XZQH/MapServer', |
95 | url: 'https://192.168.2.146:6443/arcgis/rest/services/qj/BDCDY/MapServer', | ||
96 | selectResLayerId:"", | ||
95 | features:[], | 97 | features:[], |
96 | resultLayers:[], | 98 | resultLayers:[], |
97 | results:[], | 99 | results:[], |
... | @@ -130,8 +132,8 @@ export default { | ... | @@ -130,8 +132,8 @@ export default { |
130 | var view = maps[this.viewId]; | 132 | var view = maps[this.viewId]; |
131 | var self = this; | 133 | var self = this; |
132 | this.initDraw("point",this.viewId,null,function(geo){ | 134 | this.initDraw("point",this.viewId,null,function(geo){ |
133 | self.identify(self.url,[8,10],geo,function(res){ | 135 | self.identify(self.url,[7, 9],geo,function(res){ |
134 | var resultes = res.results; | 136 | var resultes = res.results; |
135 | if(resultes && resultes.length > 0){ | 137 | if(resultes && resultes.length > 0){ |
136 | self.$parent.delIdentifyData(resultes); | 138 | self.$parent.delIdentifyData(resultes); |
137 | self.$parent.dialogVisible = true; | 139 | self.$parent.dialogVisible = true; | ... | ... |
... | @@ -30,8 +30,11 @@ | ... | @@ -30,8 +30,11 @@ |
30 | :default-checked-keys="defaultSelectNodes" | 30 | :default-checked-keys="defaultSelectNodes" |
31 | > | 31 | > |
32 | <span class="custom-tree-node" slot-scope="{ node, data }"> | 32 | <span class="custom-tree-node" slot-scope="{ node, data }"> |
33 | <span>{{ node.label }}</span> | 33 | <span>{{ node.label }}</span> |
34 | <span class="setOpacity" v-if="data.type == 'layerGroup'"> | 34 | <!-- <span class="setOpacity" v-if="data.type == 'layerGroup'"> |
35 | <el-slider v-model="data.alpha" ref="data.id" :format-tooltip="formatTooltip" @change="alphaChange(data)"></el-slider> | ||
36 | </span> --> | ||
37 | <span class="setOpacity"> | ||
35 | <el-slider v-model="data.alpha" ref="data.id" :format-tooltip="formatTooltip" @change="alphaChange(data)"></el-slider> | 38 | <el-slider v-model="data.alpha" ref="data.id" :format-tooltip="formatTooltip" @change="alphaChange(data)"></el-slider> |
36 | </span> | 39 | </span> |
37 | </span> | 40 | </span> |
... | @@ -178,22 +181,23 @@ | ... | @@ -178,22 +181,23 @@ |
178 | return{ | 181 | return{ |
179 | currentActivate:"", | 182 | currentActivate:"", |
180 | layerTreeData:[], | 183 | layerTreeData:[], |
181 | defaultSelectNodes:['1-1-1-2','1-1-3-3','1-1-3-9'], | 184 | // defaultSelectNodes:['1-1-1-2','1-1-3-3','1-1-3-9'], |
185 | defaultSelectNodes: ['1-1-1', '1-1-3'], | ||
182 | 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", | 186 | 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", |
183 | sidePanelShow:false, | 187 | sidePanelShow:false, |
184 | bufferParams:{ | 188 | bufferParams:{ |
185 | drawType:"", | 189 | drawType:"", |
186 | distance:0, | 190 | distance:0, |
187 | layerId:[], | 191 | layerId:[], |
188 | impotGeo:null, | 192 | impotGeo:null, |
189 | selectDjq:"", | 193 | selectDjq:"", |
190 | selectDjzq:"" | 194 | selectDjzq:"" |
191 | }, | 195 | }, |
192 | activeName:'hzfw', | 196 | activeName:'hzfw', |
193 | bufferLayers:[{ | 197 | bufferLayers:[{ |
194 | layerName:"宗地", | 198 | layerName:"宗地", |
195 | id:"8" | 199 | id:"8" |
196 | }, | 200 | }, |
197 | { | 201 | { |
198 | layerName:"自然幢", | 202 | layerName:"自然幢", |
199 | id:"10" | 203 | id:"10" |
... | @@ -210,15 +214,17 @@ | ... | @@ -210,15 +214,17 @@ |
210 | layerName:"宗海", | 214 | layerName:"宗海", |
211 | id:"9" | 215 | id:"9" |
212 | }], | 216 | }], |
213 | bufferDialog:false, | 217 | bufferDialog:false, |
214 | djqList:[], | 218 | djqList:[], |
215 | djzqList:[], | 219 | djzqList:[], |
216 | importDialog:false, | 220 | importDialog:false, |
217 | importGeo:"" | 221 | importGeo:"", |
222 | layerManager: ['testLayer', 'bdcdyLayer', 'djfqLayer', 'zrdlLayer'] | ||
218 | } | 223 | } |
219 | }, | 224 | }, |
220 | mounted(){ | 225 | mounted(){ |
221 | this.layerTreeData = layerTree; | 226 | this.layerTreeData = layerTree; |
227 | |||
222 | }, | 228 | }, |
223 | methods:{ | 229 | methods:{ |
224 | checkTreeNode(treeNode,checkNodeList){ | 230 | checkTreeNode(treeNode,checkNodeList){ |
... | @@ -229,24 +235,42 @@ | ... | @@ -229,24 +235,42 @@ |
229 | if (checkNodeList.checkedNodes[i].id == treeNode.id) { | 235 | if (checkNodeList.checkedNodes[i].id == treeNode.id) { |
230 | flag = true; | 236 | flag = true; |
231 | } | 237 | } |
232 | } | 238 | } |
233 | if(flag){ | 239 | |
234 | if(treeNode && treeNode.children){ | 240 | // **********************************************姬恺*************************************************************** |
235 | var ids = []; | 241 | var view = maps[this.viewId]; |
236 | this.getChildrens(treeNode,ids); | 242 | Object.prototype.toString.call(this.layerManager) === '[object Array]' && this.layerManager.forEach((e, i) => { |
237 | this.addSublayers(this.viewId,ids); | 243 | i || (this.layerManager = {}); |
238 | }else{ | 244 | this.layerManager[e] = view.map.findLayerById(e); |
239 | this.addSublayers(this.viewId,[treeNode]); | 245 | }) |
240 | } | 246 | typeof treeNode.name === 'string' ? new Promise(r => { |
241 | }else{ | 247 | typeof treeNode.layerId === 'number' ? r(treeNode.layerId) : this.layerManager[treeNode.name].visible = flag; |
242 | if(treeNode && treeNode.children){ | 248 | }).then(d => { |
243 | var ids = []; | 249 | this.layerManager[treeNode.name].findSublayerById(d).visible = flag; |
244 | this.getChildrens(treeNode,ids); | 250 | }) : Object.keys(this.layerManager).forEach(e => { |
245 | this.removeSublayer(this.viewId,ids); | 251 | this.layerManager[e].visible = flag; |
246 | }else{ | 252 | }) |
247 | this.removeSublayer(this.viewId,[treeNode]); | 253 | // **********************************************姬恺*************************************************************** |
248 | } | 254 | |
249 | } | 255 | // console.log(this.layerManager); |
256 | |||
257 | // if(flag){ | ||
258 | // if(treeNode && treeNode.children){ | ||
259 | // var ids = []; | ||
260 | // this.getChildrens(treeNode,ids); | ||
261 | // this.addSublayers(this.viewId,ids); | ||
262 | // }else{ | ||
263 | // this.addSublayers(this.viewId,[treeNode]); | ||
264 | // } | ||
265 | // }else{ | ||
266 | // if(treeNode && treeNode.children){ | ||
267 | // var ids = []; | ||
268 | // this.getChildrens(treeNode,ids); | ||
269 | // this.removeSublayer(this.viewId,ids); | ||
270 | // }else{ | ||
271 | // this.removeSublayer(this.viewId,[treeNode]); | ||
272 | // } | ||
273 | // } | ||
250 | }, | 274 | }, |
251 | //获取树节点选中的子节点 | 275 | //获取树节点选中的子节点 |
252 | getChildrens(data, childrens) { | 276 | getChildrens(data, childrens) { |
... | @@ -273,10 +297,26 @@ | ... | @@ -273,10 +297,26 @@ |
273 | alphaChange(nodeData){ | 297 | alphaChange(nodeData){ |
274 | if(nodeData.alpha == 0){ | 298 | if(nodeData.alpha == 0){ |
275 | return; | 299 | return; |
276 | } | 300 | } |
277 | var ids = []; | 301 | |
278 | this.getChildrens(nodeData,ids); | 302 | // **********************************************姬恺*************************************************************** |
279 | this.setLayerOpacity(this.viewId,ids,nodeData.alpha); | 303 | var view = maps[this.viewId]; |
304 | Object.prototype.toString.call(this.layerManager) === '[object Array]' && this.layerManager.forEach((e, i) => { | ||
305 | i || (this.layerManager = {}); | ||
306 | this.layerManager[e] = view.map.findLayerById(e); | ||
307 | }) | ||
308 | typeof nodeData.name === 'string' ? new Promise(r => { | ||
309 | typeof nodeData.layerId === 'number' ? r(nodeData.layerId) : this.layerManager[nodeData.name].opacity = nodeData.alpha / 100; | ||
310 | }).then(d => { | ||
311 | this.layerManager[nodeData.name].findSublayerById(d).opacity = nodeData.alpha / 100; | ||
312 | }) : Object.keys(this.layerManager).forEach(e => { | ||
313 | this.layerManager[e].visible = nodeData.alpha / 100; | ||
314 | }) | ||
315 | // **********************************************姬恺*************************************************************** | ||
316 | |||
317 | // var ids = []; | ||
318 | // this.getChildrens(nodeData,ids); | ||
319 | // this.setLayerOpacity(this.viewId,ids,nodeData.alpha); | ||
280 | }, | 320 | }, |
281 | //缓冲区分析 | 321 | //缓冲区分析 |
282 | bufferAnalysis(){ | 322 | bufferAnalysis(){ | ... | ... |
-
Please register or sign in to post a comment