From 9c5734f4870ba0486957e8a5e536ec9f332e83eb Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 11 Feb 2022 13:48:08 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/school-web

---
 src/store/modules/mobile.js |   75 +++++++++++++++++++++++++------------
 1 files changed, 51 insertions(+), 24 deletions(-)

diff --git a/src/store/modules/mobile.js b/src/store/modules/mobile.js
index 2df62a2..831c8f3 100644
--- a/src/store/modules/mobile.js
+++ b/src/store/modules/mobile.js
@@ -75,6 +75,7 @@
     drawALineLayerMany: null, //活动路线图层
     drawAPointLayerMany: null, //活动点图层
     isOpenDrawALineMany: null, //是否开启活动
+    seeRight: true, //右侧控制栏显影
   },
   mutations: {
     MSET_VIEWER(state, viewer) {
@@ -224,9 +225,9 @@
         state.startPointFn(); //移动默认视角
         state.areaLayer.show = true; //绿布
         //2.5D视角限制
-        state.mviewer.scene.screenSpaceCameraController.minimumZoomDistance = 190;
+        state.mviewer.scene.screenSpaceCameraController.minimumZoomDistance = 80;
         // 最大
-        state.mviewer.scene.screenSpaceCameraController.maximumZoomDistance = 400;
+        state.mviewer.scene.screenSpaceCameraController.maximumZoomDistance = 200;
         // 设置相机缩小时的速率
         state.mviewer.scene.screenSpaceCameraController._minimumZoomRate = 2000;
         // 设置相机放大时的速率
@@ -335,6 +336,9 @@
       state.select.overlay = data[0];
       state.select.color = data[1];
     },
+    SET_SeeAndNotSee(state, data) {
+      state.seeRight = data;
+    },
   },
   actions: {
     MSET_CREADE({ state, commit, dispatch }) {
@@ -434,8 +438,24 @@
         0,
         state.dimensionData.pitch
       );
+      if (!state.MobileWindowsHide) {
+        //关闭弹窗
+        commit("MSET_MOBILEWINDOWSHIDE", true);
+      }
+      if (
+        state.select.overlay != undefined &&
+        data.query.fromTo != "mapClick"
+      ) {
+        //关闭绿色边框
+        state.select.overlay.setStyle({
+          material: state.select.color,
+          outline: false,
+        });
+        commit("mset_changeSelect", [undefined, undefined]);
+      }
       // console.log(state.dimension);
       if (state.dimension != "2.5D") {
+        // if (true) {
         // if (true) {
         dispatch("mapFlyTo", {
           //飞入
@@ -445,28 +465,35 @@
           roll: Position.roll,
         });
       } else {
-        state.mviewer.camera.setView({
-          // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
-          // fromDegrees()方法,将经纬度和高程转换为世界坐标
-          destination: new global.DC.Namespace.Cesium.Cartesian3.fromDegrees(
-            // 114.0351,
-            // 27.6314,
-            // 200.0
-            Position.lng - 0.012,
-            Position.lat,
-            Position.alt || 15000.0
-          ),
-          orientation: {
-            heading: global.DC.Namespace.Cesium.Math.toRadians(
-              Position.heading
-            ),
-            pitch: global.DC.Namespace.Cesium.Math.toRadians(Position.pitch),
-            // heading: data.heading,
-            // pitch: data.pitch,
-            roll: Position.roll,
-          },
+        dispatch("mapFlyTo", {
+          //飞入
+          lntLat: [Position.lng, +Position.lat - 0.0003, 160],
+          heading: Position.heading,
+          pitch: Position.pitch,
+          roll: Position.roll,
         });
-        commit("MSET_MOBILEWINDOWSHIDE", false); // 显示弹窗
+        // state.mviewer.camera.setView({
+        //   // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
+        //   // fromDegrees()方法,将经纬度和高程转换为世界坐标
+        //   destination: new global.DC.Namespace.Cesium.Cartesian3.fromDegrees(
+        //     // 114.0351,
+        //     // 27.6314,
+        //     // 200.0
+        //     Position.lng - 0.012,
+        //     Position.lat - 0.0003,
+        //     Position.alt || 15000.0
+        //   ),
+        //   orientation: {
+        //     heading: global.DC.Namespace.Cesium.Math.toRadians(
+        //       Position.heading
+        //     ),
+        //     pitch: global.DC.Namespace.Cesium.Math.toRadians(Position.pitch),
+        //     // heading: data.heading,
+        //     // pitch: data.pitch,
+        //     roll: Position.roll,
+        //   },
+        // });
+        // commit("MSET_MOBILEWINDOWSHIDE", false); // 显示弹窗
       }
       // })
       commit("MSET_POPUPDOM", popupsDom);
@@ -540,7 +567,7 @@
             // 自定义回调
             setTimeout(() => {
               data.fn();
-            }, 500);
+            }, 200);
           }
           if (!data.noOpen) {
             setTimeout(() => {

--
Gitblit v1.9.3