From bf9ae048b9006d58f29674b9d70ee01d8e3c0b59 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 04 Dec 2023 17:10:18 +0800
Subject: [PATCH] 移动端,不同校区的逻辑适配

---
 src/components/mobileCortrolButtom/index.vue |   74 ++++--------------------------------
 1 files changed, 9 insertions(+), 65 deletions(-)

diff --git a/src/components/mobileCortrolButtom/index.vue b/src/components/mobileCortrolButtom/index.vue
index 9d5a97d..88dffdb 100644
--- a/src/components/mobileCortrolButtom/index.vue
+++ b/src/components/mobileCortrolButtom/index.vue
@@ -4,15 +4,16 @@
 mobileCortrolButtom
         -->
         <!-- <div class="m-l-inbut" @click="mubiao"><i class="el-icon-s-help"></i></div> -->
-        <div class="m-l-inbut" v-show="false">
+        <div class="m-l-inbut" v-show="true">
             <!-- <i class="el-icon-s-flag"></i> -->
             <el-dropdown trigger="click" @command="handleCommand">
                 <span class="el-dropdown-link icons">
                     <i class="el-icon-s-flag icon"></i>
                 </span>
                 <el-dropdown-menu slot="dropdown">
-                    <el-dropdown-item v-for="(item, index) in tabTable" :key="index" :command="item">{{ item.title
-                    }}</el-dropdown-item>
+                    <el-dropdown-item v-for="(item, index) in tabTable" :key="index" :command="item">
+                        {{ item.dictValue }}
+                    </el-dropdown-item>
                 </el-dropdown-menu>
             </el-dropdown>
         </div>
@@ -81,7 +82,7 @@
         ])
     },
     created () {
-        // this.getStreet();
+        this.getStreet()
     },
     mounted () {
         // eslint-disable-next-line no-undef
@@ -220,44 +221,7 @@
             // 测试fllyTo
         },
         handleCommand (command) {
-            const that = this
-            const position = [+command.lnt + 0.00027, +command.lat + 0.00048, 450]
-            // 定位
-            // this.$store.commit("MSETCC_SETCC", {
-            //   lntLat: position,
-            // });
-            // this.$store.dispatch("mapFlyTo", {
-            //   //飞入
-            //   lntLat: [...position, 450],
-            //   heading: 0,
-            //   pitch: -90,
-            //   roll: 0,
-            //   noOpen: true,
-            // });
-            global.viewer.camera.setView({
-                // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
-                // fromDegrees()方法,将经纬度和高程转换为世界坐标
-                // eslint-disable-next-line new-cap
-                destination: new global.DC.Namespace.Cesium.Cartesian3.fromDegrees(
-                    // 114.0351,
-                    // 27.6314,
-                    // 200.0
-                    position[0],
-                    position[1],
-                    position[2]
-                ),
-                orientation: {
-                    heading: global.DC.Namespace.Cesium.Math.toRadians(
-                        that.dimensionData.heading
-                    ),
-                    pitch: global.DC.Namespace.Cesium.Math.toRadians(
-                        that.dimensionData.pitch
-                    ),
-                    // heading: data.heading,
-                    // pitch: data.pitch,
-                    roll: that.dimensionData.roll
-                }
-            })
+            this.$parent.setCampusValue(command.dictKey)
         },
         openBigPopupAfter () {
             this.$store.commit('MSET_BIGPOPUPAFTER', true)
@@ -274,30 +238,10 @@
             // });
         },
         getStreet () {
-            const that = this
             getListarc().then((res) => {
-                const title = []
-                const data = res.data.data
-                for (let k = 0; k < data.length; k++) {
-                    title.push({
-                        title: data[k].dictValue,
-                        flag: false,
-                        key: data[k].dictKey,
-                        child: [],
-                        lnt: that.ccData[k].lnt,
-                        lat: that.ccData[k].lat
-                    })
-                }
-                // res.data.data.forEach((item) => {
-                //   title.push({
-                //     title: item.dictValue,
-                //     flag: false,
-                //     key: item.dictKey,
-                //     child: [],
-                //   });
-                // });
-                this.tabTable = title
-                this.$store.commit('MSET_POPUPTABLENAME', title)
+                this.tabTable = res.data.data
+
+                this.$parent.setCampusValue(res.data.data[0].dictKey)
             })
         }
     },

--
Gitblit v1.9.3