e258d481 by 杨威

合并代码

2 parents 98bae8ac 3163d413
...@@ -2,15 +2,18 @@ ...@@ -2,15 +2,18 @@
2 "label":"专题树", 2 "label":"专题树",
3 "id":"1", 3 "id":"1",
4 "type":"layerGroup", 4 "type":"layerGroup",
5 "alpha":100,
5 "children":[ 6 "children":[
6 { 7 {
7 "label":"西安市阎良区", 8 "label":"西安市阎良区",
8 "id":"1-1", 9 "id":"1-1",
9 "type":"layerGroup", 10 "type":"layerGroup",
11 "alpha":100,
10 "children":[{ 12 "children":[{
11 "label":"行政区划", 13 "label":"行政区划",
12 "id":"1-1-1", 14 "id":"1-1-1",
13 "type":"layerGroup", 15 "type":"layerGroup",
16 "alpha":100,
14 "children":[ 17 "children":[
15 { 18 {
16 "label":"行政区界限", 19 "label":"行政区界限",
...@@ -32,6 +35,7 @@ ...@@ -32,6 +35,7 @@
32 "label":"地籍分区", 35 "label":"地籍分区",
33 "id":"1-1-2", 36 "id":"1-1-2",
34 "type":"layerGroup", 37 "type":"layerGroup",
38 "alpha":100,
35 "children":[ 39 "children":[
36 { 40 {
37 "label":"地籍区", 41 "label":"地籍区",
...@@ -53,6 +57,7 @@ ...@@ -53,6 +57,7 @@
53 "label":"不动产单元", 57 "label":"不动产单元",
54 "id":"1-1-3", 58 "id":"1-1-3",
55 "type":"layerGroup", 59 "type":"layerGroup",
60 "alpha":100,
56 "children":[ 61 "children":[
57 { 62 {
58 "label":"线状定着物", 63 "label":"线状定着物",
...@@ -130,6 +135,7 @@ ...@@ -130,6 +135,7 @@
130 "label":"自然地理", 135 "label":"自然地理",
131 "id":"1-1-4", 136 "id":"1-1-4",
132 "type":"layerGroup", 137 "type":"layerGroup",
138 "alpha":100,
133 "children":[ 139 "children":[
134 { 140 {
135 "label":"辅助面", 141 "label":"辅助面",
......
...@@ -210,7 +210,7 @@ ...@@ -210,7 +210,7 @@
210 import dzHb from '@components/dzHb/dzHb' 210 import dzHb from '@components/dzHb/dzHb'
211 export default { 211 export default {
212 name: "", 212 name: "",
213 inject: ['getRightTree'], 213 inject: ['getTreeByS','getTreeByBsm'],
214 components: { zdQueryData, hfghb,dzHb}, 214 components: { zdQueryData, hfghb,dzHb},
215 props: {}, 215 props: {},
216 data() { 216 data() {
...@@ -310,7 +310,7 @@ ...@@ -310,7 +310,7 @@
310 if (res.success) { 310 if (res.success) {
311 this.$message.success("合并成功"); 311 this.$message.success("合并成功");
312 //更新目录树 312 //更新目录树
313 this.getRightTree(res.result,'2'); 313 this.getTreeByS(res.result);
314 this.$router.push({ 314 this.$router.push({
315 path: '/zd', 315 path: '/zd',
316 query: { 316 query: {
...@@ -335,6 +335,7 @@ ...@@ -335,6 +335,7 @@
335 if (res.success) { 335 if (res.success) {
336 console.log(res) 336 console.log(res)
337 this.$message.success("多幢合并成功") 337 this.$message.success("多幢合并成功")
338 this.getTreeByBsm(res.result,'dz','0,1,2')
338 this.$router.push({ 339 this.$router.push({
339 path: '/dz', 340 path: '/dz',
340 query: { 341 query: {
......
...@@ -157,6 +157,17 @@ export default { ...@@ -157,6 +157,17 @@ export default {
157 } 157 }
158 } 158 }
159 layer.sublayers = items; 159 layer.sublayers = items;
160 },
161 //设置图层透明度
162 setLayerOpacity(viewId,layers,value){
163 var view = maps[viewId],
164 layer = view.map.findLayerById("testLayer");
165 for(var i = 0;i < layers.length;i++){
166 var sublayer = layer.findSublayerById(layers[i].layerId);
167 if(sublayer){
168 sublayer.opacity = value/100;
169 }
170 }
160 } 171 }
161 } 172 }
162 } 173 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -114,7 +114,12 @@ ...@@ -114,7 +114,12 @@
114 return val+"%"; 114 return val+"%";
115 }, 115 },
116 alphaChange(nodeData){ 116 alphaChange(nodeData){
117 117 if(nodeData.alpha == 0){
118 return;
119 }
120 var ids = [];
121 this.getChildrens(nodeData,ids);
122 this.setLayerOpacity(this.viewId,ids,nodeData.alpha);
118 } 123 }
119 } 124 }
120 } 125 }
......