Jelajahi Sumber

Merge branch 'master' of http://114.244.114.158:8802/siwei/real3d-portalsite

zpf 11 bulan lalu
induk
melakukan
1f598b17d9

+ 9 - 5
src/components/Combinations/LayerManage/LayerManage.vue

@@ -75,7 +75,9 @@ export default {
       switch (obj.type) {
       switch (obj.type) {
         case "S3M": //场景
         case "S3M": //场景
           if (this.sceneLayers[obj.title]) {
           if (this.sceneLayers[obj.title]) {
-            this.sceneLayers[obj.title][0][0].visible = visible;
+            for (let i = 0; i < this.sceneLayers[obj.title][0].length; i++) {
+              this.sceneLayers[obj.title][0][i].visible = visible;
+            }
           }
           }
           break;
           break;
         case "3DTiles": //场景
         case "3DTiles": //场景
@@ -201,9 +203,9 @@ export default {
         promiseArray,
         promiseArray,
         (layers) => {
         (layers) => {
           this_.sceneLayers[obj.title] = layers;
           this_.sceneLayers[obj.title] = layers;
-          if (sceneName) {
-            this.flyTo(sceneName);
-          }
+          // if (sceneName) {
+          //   this.flyTo(sceneName);
+          // }
           if (obj.title == "分层分户") {
           if (obj.title == "分层分户") {
             store.setLayerList(layers[0][0]);
             store.setLayerList(layers[0][0]);
             layers[0][0].setQueryParameter({
             layers[0][0].setQueryParameter({
@@ -276,7 +278,9 @@ export default {
         this.addlayerdata.push(obj);
         this.addlayerdata.push(obj);
         switch (obj.type) {
         switch (obj.type) {
           case "S3M": //场景
           case "S3M": //场景
-            let s = viewer.scene.open(obj.url);
+            let s = viewer.scene.open(obj.url, undefined, {
+              autoSetView: false
+            });
             this.vectorlayerlist.push(obj);
             this.vectorlayerlist.push(obj);
             this.promiseWhen([s], undefined, obj);
             this.promiseWhen([s], undefined, obj);
             // store.setModelLayerList(this.vectorlayerlist);
             // store.setModelLayerList(this.vectorlayerlist);

+ 1 - 1
src/components/Combinations/toolBar/toolBar.vue

@@ -152,7 +152,7 @@ export default {
       scene.cloudBox = null;
       scene.cloudBox = null;
       this.currentSkyBox = this.ViewerSkyBox[this.Skybox];
       this.currentSkyBox = this.ViewerSkyBox[this.Skybox];
       if (!this.last) {
       if (!this.last) {
-        this.defaultSkyBox = window.scene.skyBox;
+        // this.defaultSkyBox = window.viewer.scene.skyBox;
         this.last = !this.last;
         this.last = !this.last;
         for (let attr in this.ViewerSkyBox) {
         for (let attr in this.ViewerSkyBox) {
           this.ViewerSkyBox[attr].update(scene.frameState, true);
           this.ViewerSkyBox[attr].update(scene.frameState, true);