bd291794 by jikai

jikai commit

1 parent 54d36ce9
...@@ -5,32 +5,28 @@ ...@@ -5,32 +5,28 @@
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 "name": "testLayer", 15 "type":"layerGroup",
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 "alpha": 100, 22 "layerId":20,
23 "name": "testLayer",
24 "layerId":0,
25 "children":null 23 "children":null
26 }, 24 },
27 { 25 {
28 "label":"行政区", 26 "label":"行政区",
29 "id":"1-1-1-2", 27 "id":"1-1-1-2",
30 "type":"layer", 28 "type":"layer",
31 "alpha": 100, 29 "layerId":19,
32 "name": "testLayer",
33 "layerId":1,
34 "children":null 30 "children":null
35 } 31 }
36 ] 32 ]
...@@ -38,25 +34,21 @@ ...@@ -38,25 +34,21 @@
38 { 34 {
39 "label":"地籍分区", 35 "label":"地籍分区",
40 "id":"1-1-2", 36 "id":"1-1-2",
41 "name": "djfqLayer", 37 "type":"layerGroup",
42 "alpha":100, 38 "alpha":100,
43 "children":[ 39 "children":[
44 { 40 {
45 "label":"地籍区", 41 "label":"地籍区",
46 "id":"1-1-2-1", 42 "id":"1-1-2-1",
47 "type":"layer", 43 "type":"layer",
48 "alpha": 100, 44 "layerId":13,
49 "name": "djfqLayer",
50 "layerId":0,
51 "children":null 45 "children":null
52 }, 46 },
53 { 47 {
54 "label":"地籍子区", 48 "label":"地籍子区",
55 "id":"1-1-2-2", 49 "id":"1-1-2-2",
56 "type":"layer", 50 "type":"layer",
57 "alpha": 100, 51 "layerId":14,
58 "name": "djfqLayer",
59 "layerId":1,
60 "children":null 52 "children":null
61 } 53 }
62 ] 54 ]
...@@ -64,96 +56,77 @@ ...@@ -64,96 +56,77 @@
64 { 56 {
65 "label":"不动产单元", 57 "label":"不动产单元",
66 "id":"1-1-3", 58 "id":"1-1-3",
67 "name": "bdcdyLayer", 59 "type":"layerGroup",
68 "alpha":100, 60 "alpha":100,
69 "children":[ 61 "children":[
70 { 62 {
71 "label":"线状定着物", 63 "label":"线状定着物",
72 "id":"1-1-3-1", 64 "id":"1-1-3-1",
73 "type":"layer", 65 "type":"layer",
74 "alpha": 100, 66 "layerId":7,
75 "name": "bdcdyLayer",
76 "layerId":0,
77 "children":null 67 "children":null
78 }, 68 },
79 { 69 {
80 "label":"宗海", 70 "label":"宗海",
81 "id":"1-1-3-2", 71 "id":"1-1-3-2",
82 "type":"layer", 72 "type":"layer",
83 "alpha": 100, 73 "layerId":9,
84 "name": "bdcdyLayer",
85 "layerId":1,
86 "children":null 74 "children":null
87 }, 75 },
88 { 76 {
89 "label":"宗地", 77 "label":"宗地",
90 "id":"1-1-3-3", 78 "id":"1-1-3-3",
91 "type":"layer", 79 "type":"layer",
92 "alpha": 100, 80 "layerId":8,
93 "name": "bdcdyLayer",
94 "layerId":2,
95 "children":null 81 "children":null
96 }, 82 },
97 { 83 {
98 "label":"林权", 84 "label":"林权",
99 "id":"1-1-3-4", 85 "id":"1-1-3-4",
100 "type":"layer", 86 "type":"layer",
101 "alpha": 100, 87 "layerId":5,
102 "name": "bdcdyLayer",
103 "layerId":3,
104 "children":null 88 "children":null
105 }, 89 },
106 { 90 {
107 "label":"构筑物", 91 "label":"构筑物",
108 "id":"1-1-3-5", 92 "id":"1-1-3-5",
109 "type":"layer", 93 "type":"layer",
110 "alpha": 100, 94 "layerId":2,
111 "name": "bdcdyLayer",
112 "layerId":4,
113 "children":null 95 "children":null
114 }, 96 },
115 { 97 {
116 "label":"面状定着物", 98 "label":"面状定着物",
117 "id":"1-1-3-6", 99 "id":"1-1-3-6",
118 "type":"layer", 100 "type":"layer",
119 "alpha": 100, 101 "layerId":6,
120 "name": "bdcdyLayer",
121 "layerId":5,
122 "children":null 102 "children":null
123 }, 103 },
124 { 104 {
125 "label":"界址线", 105 "label":"界址线",
126 "id":"1-1-3-7", 106 "id":"1-1-3-7",
127 "type":"layer", 107 "type":"layer",
128 "alpha": 100, 108 "layerId":4,
129 "name": "bdcdyLayer",
130 "layerId":6,
131 "children":null 109 "children":null
132 }, 110 },
133 { 111 {
134 "label":"点状定着物", 112 "label":"点状定着物",
135 "id":"1-1-3-8", 113 "id":"1-1-3-8",
136 "type":"layer", 114 "type":"layer",
137 "alpha": 100, 115 "layerId":1,
138 "name": "bdcdyLayer",
139 "layerId":7,
140 "children":null 116 "children":null
141 }, 117 },
142 { 118 {
143 "label":"自然幢", 119 "label":"自然幢",
144 "id":"1-1-3-9", 120 "id":"1-1-3-9",
145 "type":"layer", 121 "type":"layer",
146 "alpha": 100, 122 "layerId":10,
147 "name": "bdcdyLayer",
148 "layerId":8,
149 "children":null 123 "children":null
150 }, 124 },
151 { 125 {
152 "label":"界址点", 126 "label":"界址点",
153 "id":"1-1-3-10", 127 "id":"1-1-3-10",
154 "type":"layer", 128 "type":"layer",
155 "name": "bdcdyLayer", 129 "layerId":4,
156 "layerId":9,
157 "children":null 130 "children":null
158 } 131 }
159 ] 132 ]
...@@ -161,31 +134,28 @@ ...@@ -161,31 +134,28 @@
161 { 134 {
162 "label":"自然地理", 135 "label":"自然地理",
163 "id":"1-1-4", 136 "id":"1-1-4",
164 "name": "zrdlLayer", 137 "type":"layerGroup",
165 "alpha":100, 138 "alpha":100,
166 "children":[ 139 "children":[
167 { 140 {
168 "label":"辅助面", 141 "label":"辅助面",
169 "id":"1-1-4-1", 142 "id":"1-1-4-1",
170 "type":"layer", 143 "type":"layer",
171 "name": "zrdlLayer", 144 "layerId":15,
172 "layerId":0,
173 "children":null 145 "children":null
174 }, 146 },
175 { 147 {
176 "label":"植被", 148 "label":"植被",
177 "id":"1-1-4-2", 149 "id":"1-1-4-2",
178 "type":"layer", 150 "type":"layer",
179 "name": "zrdlLayer", 151 "layerId":17,
180 "layerId":1,
181 "children":null 152 "children":null
182 }, 153 },
183 { 154 {
184 "label":"水系", 155 "label":"水系",
185 "id":"1-1-4-3", 156 "id":"1-1-4-3",
186 "type":"layer", 157 "type":"layer",
187 "name": "zrdlLayer", 158 "layerId":16,
188 "layerId":2,
189 "children":null 159 "children":null
190 } 160 }
191 ] 161 ]
......
1 [{ 1 [{
2 "layerName": "ZDJBXX", 2 "layerName": "ZDJBXX",
3 "layerLabel": "宗地", 3 "layerLabel": "宗地",
4 "layerUrl": "https://192.168.2.146:6443/arcgis/rest/services/qj/BDCDY/MapServer", 4 "layerUrl": "https://192.168.2.146:6443/arcgis/rest/services/qj/backupService/MapServer",
5 "id":2, 5 "id":8,
6 "fieldAliases": { 6 "fieldAliases": {
7 "BSM": "标识码", 7 "BSM": "标识码",
8 "YSDM": "要素代码", 8 "YSDM": "要素代码",
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
39 { 39 {
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": "https://192.168.2.146:6443/arcgis/rest/services/qj/backupService/MapServer",
43 "id": 9, 43 "id": 10,
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": "https://192.168.2.146:6443/arcgis/rest/services/qj/DJFQ/MapServer", 75 "layerUrl": "https://192.168.2.146:6443/arcgis/rest/services/qj/backupService/MapServer",
76 "id": 1, 76 "id": 13,
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": "https://192.168.2.146:6443/arcgis/rest/services/qj/DJFQ/MapServer", 87 "layerUrl": "https://192.168.2.146:6443/arcgis/rest/services/qj/backupService/MapServer",
88 "id": 0, 88 "id": 14,
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": "https://192.168.2.146:6443/arcgis/rest/services/qj/XZQH/MapServer", 99 "layerUrl": "https://192.168.2.146:6443/arcgis/rest/services/qj/backupService/MapServer",
100 "id": 1, 100 "id": 19,
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":"https://192.168.2.146:6443/arcgis/rest/services/qj/BDCDY/MapServer", 112 "layerUrl":"https://192.168.2.146:6443/arcgis/rest/services/qj/backupService/MapServer",
113 "id":9 113 "id":3
114 }, 114 },
115 { 115 {
116 "layerName":"JZX", 116 "layerName":"JZX",
117 "layerLabel":"界址线", 117 "layerLabel":"界址线",
118 "layerUrl":"https://192.168.2.146:6443/arcgis/rest/services/qj/BDCDY/MapServer", 118 "layerUrl":"https://192.168.2.146:6443/arcgis/rest/services/qj/backupService/MapServer",
119 "id":6 119 "id":4
120 } 120 }
121 ] 121 ]
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -13,18 +13,11 @@ ...@@ -13,18 +13,11 @@
13 class="row-flex-start basic_banner" 13 class="row-flex-start basic_banner"
14 :class="{ 14 :class="{
15 active_color: item.expand && item.children.length > 0, 15 active_color: item.expand && item.children.length > 0,
16 lpb_basic_banner:islpb
17 }" 16 }"
18 @click="itemClick(item)" 17 @click="itemClick(item)"
19 > 18 >
20 19
21 <div class="layer_text nowrap" @contextmenu.prevent="openMenu($event, item)"> 20 <div class="layer_text nowrap" @contextmenu.prevent="openMenu($event, item)"><i class="iconfont iconguoyou"></i> {{ item.mc }}</div><div
22 <i v-if="!islpb" class="iconfont iconguoyou"></i>
23 <i v-if="islpb && !item.expand" class="iconfont iconxiala"></i>
24 <i v-if="islpb && item.expand" class="iconfont iconxialazhankai"></i>
25 {{ item.mc }}
26 </div>
27 <div
28 class="reTree_icon" 21 class="reTree_icon"
29 :style="{ 22 :style="{
30 height: 10 + 'px', 23 height: 10 + 'px',
...@@ -32,8 +25,10 @@ ...@@ -32,8 +25,10 @@
32 }" 25 }"
33 :class="{ 26 :class="{
34 reTree_default_icon: item.children.length === 0, 27 reTree_default_icon: item.children.length === 0,
35 reTree_collapse_icon: item.expand && item.children.length > 0, 28 reTree_collapse_icon: !islpb && item.expand && item.children.length > 0,
36 reTree_expand_icon: !item.expand && item.children.length > 0, 29 reTree_expand_icon: !islpb && !item.expand && item.children.length > 0,
30 lpbTree_collapse_icon: islpb && item.expand && item.children.length > 0,
31 lpbTree_expand_icon: islpb && !item.expand && item.children.length > 0,
37 }" 32 }"
38 ></div> 33 ></div>
39 </div> 34 </div>
...@@ -572,7 +567,6 @@ export default { ...@@ -572,7 +567,6 @@ export default {
572 this.$message.warning("不是临时数据,不能导入图形!!!"); 567 this.$message.warning("不是临时数据,不能导入图形!!!");
573 return; 568 return;
574 } 569 }
575 console.log(this.zdData);
576 var type = this.zdData.type; 570 var type = this.zdData.type;
577 if(type == "zd"){ 571 if(type == "zd"){
578 BSM = this.zdData.zdbsm; 572 BSM = this.zdData.zdbsm;
......
...@@ -459,8 +459,7 @@ export default { ...@@ -459,8 +459,7 @@ export default {
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;
464 featureUrl += "/"+layer.id; 463 featureUrl += "/"+layer.id;
465 if(self.geoInfo){ 464 if(self.geoInfo){
466 //替换 生成图像 高亮 465 //替换 生成图像 高亮
...@@ -504,8 +503,8 @@ export default { ...@@ -504,8 +503,8 @@ export default {
504 graphic.attributes = attributes; 503 graphic.attributes = attributes;
505 self.addGraphic(featureUrl,graphic,function (res) { 504 self.addGraphic(featureUrl,graphic,function (res) {
506 var addRresult = res.addFeatureResults[0]; 505 var addRresult = res.addFeatureResults[0];
507 // if(addRresult.objectId){ 506 if(addRresult.objectId){
508 // var OBJECTID = addRresult.objectId; 507 var OBJECTID = addRresult.objectId;
509 if(graphic.geometry) { 508 if(graphic.geometry) {
510 points = self.craetJZPoint(graphic); 509 points = self.craetJZPoint(graphic);
511 self.savejzd(points) 510 self.savejzd(points)
...@@ -517,7 +516,7 @@ export default { ...@@ -517,7 +516,7 @@ export default {
517 } 516 }
518 self.$message.success("保存成功!!!"); 517 self.$message.success("保存成功!!!");
519 self.goMap(); 518 self.goMap();
520 // } 519 }
521 }); 520 });
522 } 521 }
523 }, 522 },
......
...@@ -22,8 +22,6 @@ export default { ...@@ -22,8 +22,6 @@ 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);
27 var saveGraphics = []; 25 var saveGraphics = [];
28 if(!Array.isArray(graphic)){ 26 if(!Array.isArray(graphic)){
29 graphic = [graphic]; 27 graphic = [graphic];
...@@ -45,10 +43,13 @@ export default { ...@@ -45,10 +43,13 @@ export default {
45 }); 43 });
46 saveGraphics.push(saveGraphic); 44 saveGraphics.push(saveGraphic);
47 } 45 }
46 console.log(saveGraphic)
48 featureLayer.applyEdits({ 47 featureLayer.applyEdits({
49 addFeatures:saveGraphics 48 addFeatures:saveGraphics,
49 // updateFeatures
50 }).then(function (res){ 50 }).then(function (res){
51 if(callBackFunction && typeof callBackFunction == 'function'){ 51 if(callBackFunction && typeof callBackFunction == 'function'){
52 console.log(res);
52 callBackFunction(res); 53 callBackFunction(res);
53 } 54 }
54 }) 55 })
...@@ -149,6 +150,7 @@ export default { ...@@ -149,6 +150,7 @@ export default {
149 featureLayer.applyEdits({ 150 featureLayer.applyEdits({
150 deleteFeatures:delGraphics 151 deleteFeatures:delGraphics
151 }).then(function (res){ 152 }).then(function (res){
153 console.log(res);
152 if(callBackFunction && typeof callBackFunction == 'function'){ 154 if(callBackFunction && typeof callBackFunction == 'function'){
153 callBackFunction(res); 155 callBackFunction(res);
154 } 156 }
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
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"});
6 // loadCss("http://192.168.2.38/4.16/esri/themes/light/main.css");
5 loadScript({ url:"http://192.168.2.146/arcgis_js_api/library/4.17/init.js"}); 7 loadScript({ url:"http://192.168.2.146/arcgis_js_api/library/4.17/init.js"});
6 loadCss("http://192.168.2.146/arcgis_js_api/library/esri/css/main.css"); 8 loadCss("http://192.168.2.146/arcgis_js_api/library/esri/css/main.css");
7 } 9 }
......
...@@ -177,11 +177,7 @@ export default { ...@@ -177,11 +177,7 @@ 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:"https://192.168.2.146:6443/arcgis/rest/services/qj/backupService/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', // 自然地理
185 dialogVisible:false, 181 dialogVisible:false,
186 selectResLayerId:null, 182 selectResLayerId:null,
187 features:[], 183 features:[],
...@@ -223,37 +219,29 @@ export default { ...@@ -223,37 +219,29 @@ export default {
223 view.ui.move(["zoom"], "bottom-right"); 219 view.ui.move(["zoom"], "bottom-right");
224 loadModules([ 220 loadModules([
225 "esri/layers/MapImageLayer" 221 "esri/layers/MapImageLayer"
226 ]).then(([ MapImageLayer ])=>{ 222 ]).then(([
223 MapImageLayer
224 ])=>{
227 var mapImageLayer = new MapImageLayer({ 225 var mapImageLayer = new MapImageLayer({
228 url:self.layerUrl, 226 url:self.layerUrl,
229 id:"testLayer", 227 id:"testLayer",
230 spatialReference:view.spatialReference 228 spatialReference:view.spatialReference,
231 }); 229 sublayers:[
232 view.map.add(mapImageLayer, 1); 230 {
233 231 id:19,
234 let bdcdyLayer = new MapImageLayer({ 232 visible:true
235 url:self.bdcdyUrl, 233 },
236 id:"bdcdyLayer", 234 {
237 spatialReference:view.spatialReference 235 id:8,
238 }); 236 visible:true
239 view.map.add(bdcdyLayer); 237 },
240 238 {
241 let djfqLayer = new MapImageLayer({ 239 id:10,
242 url:self.djfqUrl, 240 visible:true
243 id:"djfqLayer", 241 }
244 visible: false, 242 ]
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 }); 243 });
255 view.map.add(zrdlLayer); 244 view.map.add(mapImageLayer,1);
256
257 var query = self.$route.query; 245 var query = self.$route.query;
258 if(query && JSON.stringify(query) != "{}"){ 246 if(query && JSON.stringify(query) != "{}"){
259 self.addGeoByBsm(query.bsm,query.type,self.viewId); 247 self.addGeoByBsm(query.bsm,query.type,self.viewId);
...@@ -373,7 +361,6 @@ export default { ...@@ -373,7 +361,6 @@ export default {
373 for(var i = 0;i < data.length;i++){ 361 for(var i = 0;i < data.length;i++){
374 var layerId = data[i].layerId; 362 var layerId = data[i].layerId;
375 var layer = self.getLayerById(layerId); 363 var layer = self.getLayerById(layerId);
376
377 var layerResult = self.results.filter(function (item) { 364 var layerResult = self.results.filter(function (item) {
378 return item.layerId == layerId; 365 return item.layerId == layerId;
379 }) 366 })
......