zpf 1 yıl önce
ebeveyn
işleme
d101142480

+ 16 - 15
src/components/sceneAtttribute/camera/rotate.vue

@@ -144,21 +144,22 @@ export default {
     handlerPoint.clear();
   },
   mounted() {
-    this.$nextTick(() => {
-      // console.log(window.viewer, 99999);
-      windowPosition = new Cesium.Cartesian2();
-      scratchTiltFrame = new Cesium.Matrix4();
-      scratchOldTransform = new Cesium.Matrix4();
-      handlerPoint = new Cesium.DrawHandler(
-        window.viewer,
-        Cesium.DrawMode.Point
-      );
-      if (camera) {
-        return;
-      }
-      camera = scene.camera;
-      camera.flyCircleLoop = true;
-    });
+    // this.$nextTick(() => {
+    //   console.log(window.viewer, 99999);
+    //   windowPosition = new Cesium.Cartesian2();
+    //   scratchTiltFrame = new Cesium.Matrix4();
+    //   scratchOldTransform = new Cesium.Matrix4();
+    //   handlerPoint = new Cesium.DrawHandler(
+    //     window.viewer,
+    //     Cesium.DrawMode.Point
+    //   );
+    //   if (camera) {
+    //     return;
+    //   }
+    //   viewer.scene.camera
+    //   camera = scene.camera;
+    //   camera.flyCircleLoop = true;
+    // });
 
     this.init();
   },

+ 2 - 1
src/views/map3d.vue

@@ -103,7 +103,8 @@ export default {
   },
   methods: {
     viewerChange(isbig){
-      this.$refs.routeViewRef[ isbig ? 'switchPack_down':'switchPack_up']()
+      // this.$refs.routeViewRef[ isbig ? 'switchPack_down':'switchPack_up']()
+      this.$refs.routeViewRef['switch']()
     },
     handleMenuSelect(item) {
       this.$router.push({ path: item });

+ 19 - 10
src/views/viewer.vue

@@ -1,12 +1,12 @@
 <template>
-    <div>
+    <div v-show="flag">
         <JSYD />
-        <TDSC/>
-        <HYSY/>
-        <TDSY/>
-        <GDBH/>
-        <STXF/>
-        <WPJG/>
+        <TDSC />
+        <HYSY />
+        <TDSY />
+        <GDBH />
+        <STXF />
+        <WPJG />
     </div>
 </template>
 
@@ -23,16 +23,25 @@ import STXF from './cockpitNew/stxf';
 import WPJG from './cockpitNew/wpjg';
 
 export default {
-    components: {JSYD ,TDSC,HYSY,TDSY ,GDBH,STXF,WPJG},
+    components: { JSYD, TDSC, HYSY, TDSY, GDBH, STXF, WPJG },
     data() {
-        return {};
+        return {
+            flag: true
+        };
     },
     //监听属性 类似于data概念
     computed: {},
     //监控data中的数据变化
     watch: {},
     //方法集合
-    methods: {},
+    methods: {
+        switch() {
+            console.log(this.flag);
+
+            this.flag = !this.flag;
+            
+        }
+    },
     beforeCreate() { }, //生命周期 - 创建之前
     created() { }, //生命周期 - 创建完成(可以访问当前this实例)
     beforeMount() { }, //生命周期 - 挂载之前