From 03d24717fa8d0813864b9e14f73bb40a97c68ba8 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Thu, 23 Dec 2021 13:50:45 +0800
Subject: [PATCH] +加模型

---
 src/components/mobilemap/index.vue           |   14 +++++++-------
 src/components/mobileCortrolButtom/index.vue |   17 ++++++++++-------
 src/store/modules/mobile.js                  |    5 +++++
 src/components/mobileCortrol/index.vue       |    3 ++-
 src/components/mobilePopupOurOnce/index.vue  |    1 +
 src/mobileDivForms/mobileDivForms.js         |   17 +++++++++++++++--
 6 files changed, 40 insertions(+), 17 deletions(-)

diff --git a/src/components/mobileCortrol/index.vue b/src/components/mobileCortrol/index.vue
index b490414..82a5c80 100644
--- a/src/components/mobileCortrol/index.vue
+++ b/src/components/mobileCortrol/index.vue
@@ -25,7 +25,8 @@
     zoomIn(val) {
       this.$store.dispatch("mapFlyTo", {
         //飞入
-        lntLat: [115.87186406, 28.74449337, 1200],
+        lntLat: [115.87988885, 28.72502592, 2100],
+        // lntLat: [115.87186406, 28.74449337, 1200],
         // lntLat: [121.50492752204283, 31.21567802276832, 2530],
         heading: 0,
         pitch: -45,
diff --git a/src/components/mobileCortrolButtom/index.vue b/src/components/mobileCortrolButtom/index.vue
index b851a50..251dacc 100644
--- a/src/components/mobileCortrolButtom/index.vue
+++ b/src/components/mobileCortrolButtom/index.vue
@@ -40,16 +40,16 @@
           lat: 28.74382592,
         },
         {
-          lnt: 121.50266534548483,
-          lat: 31.24357506330159,
+          lnt: 115.86711312,
+          lat: 28.74615701,
         },
         {
-          lnt: 121.56405019,
-          lat: 31.20845211,
+          lnt: 115.86972136,
+          lat: 28.74609846,
         },
         {
-          lnt: 121.55500463461836,
-          lat: 31.257934074839717,
+          lnt: 115.86983129,
+          lat: 28.741337,
         },
       ],
     };
@@ -71,9 +71,12 @@
       let that = this;
       console.log(command, "定位");
       // 定位
+      this.$store.commit("MSETCC_SETCC", {
+        lntLat: [command.lnt, command.lat],
+      });
       this.$store.dispatch("mapFlyTo", {
         //飞入
-        lntLat: [command.lnt, command.lat, 2530],
+        lntLat: [command.lnt, command.lat, 500],
         heading: 0,
         pitch: -45,
         roll: 0,
diff --git a/src/components/mobilePopupOurOnce/index.vue b/src/components/mobilePopupOurOnce/index.vue
index bb3a62e..39759a2 100644
--- a/src/components/mobilePopupOurOnce/index.vue
+++ b/src/components/mobilePopupOurOnce/index.vue
@@ -94,6 +94,7 @@
         return;
       }
       let that = this;
+      // console.log(that.ourData.lntLat);
       if (val == "定位") {
         //随地图移动窗口
         this.$store.commit("MSET_BIGPOPUP", false); //关闭全屏弹窗
diff --git a/src/components/mobilemap/index.vue b/src/components/mobilemap/index.vue
index 66d2a9f..cf5597c 100644
--- a/src/components/mobilemap/index.vue
+++ b/src/components/mobilemap/index.vue
@@ -262,13 +262,13 @@
       //瀑布流↑
 
       //飞入起始点
-      that.$store.dispatch("mapFlyTo", {
-        lntLat: [115.87186406, 28.74449337, 1200],
-        heading: 0,
-        pitch: -45,
-        roll: 0,
-        noOpen: true,
-      });
+      // that.$store.dispatch("mapFlyTo", {
+      //   lntLat: [115.87186406, 28.74449337, 1200],
+      //   heading: 0,
+      //   pitch: -45,
+      //   roll: 0,
+      //   noOpen: true,
+      // });
       //地图渲染完成执行srore中MSET_CREADE
       // that.$store.dispatch("MSET_CREADE");
 
diff --git a/src/mobileDivForms/mobileDivForms.js b/src/mobileDivForms/mobileDivForms.js
index 25cb2ed..9e95996 100644
--- a/src/mobileDivForms/mobileDivForms.js
+++ b/src/mobileDivForms/mobileDivForms.js
@@ -86,8 +86,20 @@
         el.addClass(className || '')
 
         $('#mobile-map_popup_content').append(el)
+        // let time;
+        // function cons(e) {
+        //     time = setTimeout(() => {
+        //         console.log(e)
+        //         console.log(e.sun._drawingBufferHeight)
+        //         console.log("roll: ", e.camera.roll)
+        //         console.log("pitch: ", e.camera.pitch)
+        //         console.log("heading: ", e.camera.heading)
+        //         clearTimeout(time);
+        //         time = "";
+        //     }, 2000);
+        // }
 
-        this._viewer.scene.postRender.addEventListener(function () {
+        this._viewer.scene.postRender.addEventListener(function (e) {
             if (!self.isOpen) {
                 return;
             }
@@ -95,7 +107,7 @@
                 self._viewer.scene,
                 position
             )
-
+            // time || cons(e);
             self.positionPopUp(windowCoord, id)
         })
     }
@@ -104,6 +116,7 @@
         if (!windowCoord) {
             return;
         }
+        // console.log(windowCoord)
         const wx = document.getElementById('app').clientWidth;
         const x = windowCoord.x - (wx / 100 * 35);
         const y = windowCoord.y - document.getElementById(id).offsetHeight - 15;
diff --git a/src/store/modules/mobile.js b/src/store/modules/mobile.js
index 16b0434..dd9a9c0 100644
--- a/src/store/modules/mobile.js
+++ b/src/store/modules/mobile.js
@@ -14,6 +14,7 @@
         popupsDom: '',//mobileDivForms的实体类
         query: {},//传输数据
         openmobileGoTo: false,//测试
+        ccDataState: false,//测试
         openmobilePanorama: false,//实景显影
         MobileWindowsHideFixed: true,//改变点击窗口的显示状态--固定窗口
         MobileWindowChangeDataFixed: false,//改变点击窗口的数据--固定窗口
@@ -53,6 +54,10 @@
             state.MobileWindowChangeData = !state.MobileWindowChangeData;
             state.MobileWindowsHide = viewer
         },
+        MSETCC_SETCC(state, viewer) {
+            state.ccDataState = !state.ccDataState;//专门测试
+            state.query = viewer;
+        },
         MSET_POPUPDOM(state, viewer) {
             state.popupsDom = viewer
         },

--
Gitblit v1.9.3