bd291794 by jikai

jikai commit

1 parent 54d36ce9
1 [{ 1 [{
2 "label":"专题树", 2 "label":"专题树",
3 "id":"1", 3 "id":"1",
4 "type":"layerGroup", 4 "type":"layerGroup",
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>
...@@ -123,7 +118,7 @@ ...@@ -123,7 +118,7 @@
123 <el-dialog v-dialogDrag :close-on-click-modal="false" title="导入图形" :modal="false" custom-class="importDialog" :visible.sync="improtDialog" width="30%" @close="closeImportDialog"> 118 <el-dialog v-dialogDrag :close-on-click-modal="false" title="导入图形" :modal="false" custom-class="importDialog" :visible.sync="improtDialog" width="30%" @close="closeImportDialog">
124 <import-geo :property-info="zdData" :timeLine="new Date().getTime()" :geo-info="currentClickZdGeo" @closeImportDialog="closeImportDialog"></import-geo> 119 <import-geo :property-info="zdData" :timeLine="new Date().getTime()" :geo-info="currentClickZdGeo" @closeImportDialog="closeImportDialog"></import-geo>
125 </el-dialog> 120 </el-dialog>
126 <!-- 添加定着物弹框 --> 121 <!-- 添加定着物弹框 -->
127 <el-dialog v-dialogDrag :close-on-click-modal="false" title="新建" :modal="false" :visible.sync="dialogVisible" width="48%"> 122 <el-dialog v-dialogDrag :close-on-click-modal="false" title="新建" :modal="false" :visible.sync="dialogVisible" width="48%">
128 <Create @closeDialog="closeDialog" :auth="true" :createZrz="createZrz" ></Create> 123 <Create @closeDialog="closeDialog" :auth="true" :createZrz="createZrz" ></Create>
129 </el-dialog> 124 </el-dialog>
...@@ -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;
...@@ -580,7 +574,7 @@ export default { ...@@ -580,7 +574,7 @@ export default {
580 BSM = this.zdData.bsm; 574 BSM = this.zdData.bsm;
581 } 575 }
582 //当确定导入图形是 跳转到图形界面 576 //当确定导入图形是 跳转到图形界面
583 this.queryGeoByBsm(BSM,type,function (features){ 577 this.queryGeoByBsm(BSM,type,function (features){
584 if(features && features.length > 0){ 578 if(features && features.length > 0){
585 if(features[0].geometry && features[0].geometry.rings.length > 0){ 579 if(features[0].geometry && features[0].geometry.rings.length > 0){
586 self.$confirm('该条数据有地块信息,是否继续导入?', '提示', { 580 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,9 +458,8 @@ export default { ...@@ -458,9 +458,8 @@ 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;
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)
...@@ -515,9 +514,9 @@ export default { ...@@ -515,9 +514,9 @@ export default {
515 self.saveJzx(lines); 514 self.saveJzx(lines);
516 }); 515 });
517 } 516 }
518 self.$message.success("保存成功!!!"); 517 self.$message.success("保存成功!!!");
519 self.goMap(); 518 self.goMap();
520 // } 519 }
521 }); 520 });
522 } 521 }
523 }, 522 },
......
...@@ -198,7 +198,7 @@ export default { ...@@ -198,7 +198,7 @@ export default {
198 if(!results || results.length == 0){ 198 if(!results || results.length == 0){
199 callBacFunction(true,"不在行政区内,请检查空间位置信息!!!"); 199 callBacFunction(true,"不在行政区内,请检查空间位置信息!!!");
200 } 200 }
201 for(var i = 0;i < results.length;i++){ 201 for(var i = 0;i < results.length;i++){
202 var feature = results[i].feature; 202 var feature = results[i].feature;
203 var flag = geometryEngine.intersects(polygon,feature.geometry); 203 var flag = geometryEngine.intersects(polygon,feature.geometry);
204 var withinFlag = geometryEngine.within(polygon,feature.geometry); 204 var withinFlag = geometryEngine.within(polygon,feature.geometry);
......
...@@ -10,16 +10,16 @@ export default { ...@@ -10,16 +10,16 @@ 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 }
23 identifyParameters.layerOption = layerOption ? layerOption : "all"; 23 identifyParameters.layerOption = layerOption ? layerOption : "all";
24 identifyParameters.tolerance = tolerance ? tolerance : 3; 24 identifyParameters.tolerance = tolerance ? tolerance : 3;
25 identifyParameters.mapExtent = mapExtent ? mapExtent : geometry.extent; 25 identifyParameters.mapExtent = mapExtent ? mapExtent : geometry.extent;
......
...@@ -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,
50 }).then(function (res){ 49 // updateFeatures
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 }
......
1 1
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.146/arcgis_js_api/library/4.17/init.js"}); 5 // loadScript({url:"http://192.168.2.38/4.16/init.js"});
6 loadCss("http://192.168.2.146/arcgis_js_api/library/esri/css/main.css"); 6 // loadCss("http://192.168.2.38/4.16/esri/themes/light/main.css");
7 loadScript({ url:"http://192.168.2.146/arcgis_js_api/library/4.17/init.js"});
8 loadCss("http://192.168.2.146/arcgis_js_api/library/esri/css/main.css");
7 } 9 }
8 init(); 10 init();
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -175,13 +175,9 @@ export default { ...@@ -175,13 +175,9 @@ export default {
175 sideTools 175 sideTools
176 }, 176 },
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);
...@@ -367,13 +355,12 @@ export default { ...@@ -367,13 +355,12 @@ export default {
367 self.features = []; 355 self.features = [];
368 self.resultLayers = []; 356 self.resultLayers = [];
369 this.heighGraphic = null; 357 this.heighGraphic = null;
370 //清除查询图层 358 //清除查询图层
371 this.clearSearchLayer(this.viewId); 359 this.clearSearchLayer(this.viewId);
372 this.totalResults = data.length; 360 this.totalResults = data.length;
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 })
......