From eb6be7e76f6d12ebbc5a552a6fe67e9a79758cb4 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Thu, 20 Jan 2022 17:30:34 +0800
Subject: [PATCH] +

---
 src/components/mobileLeftNav/index.vue |   47 ++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 36 insertions(+), 11 deletions(-)

diff --git a/src/components/mobileLeftNav/index.vue b/src/components/mobileLeftNav/index.vue
index 5f84749..0d05c62 100644
--- a/src/components/mobileLeftNav/index.vue
+++ b/src/components/mobileLeftNav/index.vue
@@ -9,6 +9,7 @@
         v-for="(item, index) in leftNavData"
         :key="index"
         @click="leftNavClick(item)"
+        v-show="!item.notShow"
       >
         <img :style="[imgStyle]" :src="item.img" alt="" />
         <span>{{ item.label }}</span>
@@ -45,7 +46,7 @@
     },
   },
   computed: {
-    ...mapGetters(["iconHide"]),
+    ...mapGetters(["iconHide", "dimensionData"]),
   },
   data() {
     return {
@@ -58,9 +59,10 @@
       },
       leftNavData: [
         {
-          flag: false,
+          flag: true,
           label: "标签",
-          img: "/img/leftnav/tag.png",
+          // img: "/img/leftnav/tag.png",
+          img: "/img/leftnav/tag-checked.png",
           normal: "/img/leftnav/tag.png",
           checked: "/img/leftnav/tag-checked.png",
           layer: "tagLayer",
@@ -121,6 +123,7 @@
           type: 9,
           imgSrc: "img/leftnav/map-aed.png",
           // imgSrc: "img/mobile/pink.png",
+          notShow: true,
         },
         {
           flag: false,
@@ -169,6 +172,7 @@
       this.$store.commit("MSET_ICONHIDE", !isif);
     },
     leftNavClick(item) {
+      // console.log(123132);
       //判断并关闭已开启标签
       let lnd = this.leftNavData;
       for (let k in lnd) {
@@ -190,7 +194,7 @@
         item.img = item.checked;
         this[item.layer].show = true;
         // console.log("飞入");
-        this.flyTo(item);
+        // this.flyTo(item);
         this.$store.dispatch("closeMobileWindowsDom"); //关闭弹窗
       } else {
         item.img = item.normal;
@@ -198,16 +202,29 @@
       }
     },
     flyTo(item) {
+      let that = this;
       let posi = this[item.layer].positions[0];
       // console.log(posi);
+      let lntLat =
+        that.dimensionData.pitch == -45
+          ? [posi.lng + 0.00917, posi.lat - 0.0188, 500]
+          : [posi.lng + 0.01197, posi.lat - 0.00055, 500];
+      // that.mviewer.camera.flyTo({
+      //   destination: Cesium.Cartesian3.fromDegrees(
+      //     lntLat[0],
+      //     lntLat[1],
+      //     lntLat[2]
+      //   ),
+      // });
+      // return;
       this.$store.dispatch("mapFlyTo", {
         //飞入
-        lntLat: [posi.lng + 0.00917, posi.lat - 0.0188, 2100],
+        lntLat: lntLat,
         // lntLat: [posi.lng + 0.01187, posi.lat - 0.0308, 4000],
         // lntLat: [121.50492752204283, 31.21567802276832, 2530],
-        heading: 0,
-        pitch: -45,
-        roll: 0,
+        heading: that.dimensionData.heading,
+        pitch: that.dimensionData.pitch,
+        roll: that.dimensionData.roll,
         noOpen: true,
       });
     },
@@ -351,6 +368,7 @@
                 video: data[k].videourl || "",
                 from: "labels",
                 introduce: data[k].introduce,
+                panoramaurl: data[k].panoramaurl,
               };
               // 定制化窗体
               that.openPopupS(
@@ -362,9 +380,16 @@
             that[that.leftNavData[n].layer].addOverlay(divIcon); //加入图标
           }
           that[that.leftNavData[n].layer]["positions"] = position;
-          that[that.leftNavData[n].layer].show = false;
+          if (that.leftNavData[n].layer == "tagLayer") {
+            // that.leftNavData[n].img = that.leftNavData[n].checked;
+          } else {
+            that[that.leftNavData[n].layer].show = false;
+          }
         });
       }
+      // setTimeout(() => {
+      //   this.tagLayer.show = false;
+      // }, 500);
     },
     changePoiton(data) {
       // console.log(data);
@@ -395,7 +420,7 @@
 };
 </script>
 
-<style scoped lang='scss'>
+<style scoped lang="scss">
 .m-left-nav {
   position: fixed;
   bottom: 30px;
@@ -407,7 +432,7 @@
   .m-left-coutrol {
     position: absolute;
     left: -24px;
-    top: 96px;
+    top: 79px;
     width: 25px;
     height: 60px;
     background-color: #fff;

--
Gitblit v1.9.3