From 8409c653e725ad975b589419ddb9177f3be1e9fb Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Wed, 15 Dec 2021 08:41:37 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/school-web

---
 src/components/orgNavBar/index.vue |   47 ++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 44 insertions(+), 3 deletions(-)

diff --git a/src/components/orgNavBar/index.vue b/src/components/orgNavBar/index.vue
index 16f1fe4..7579241 100644
--- a/src/components/orgNavBar/index.vue
+++ b/src/components/orgNavBar/index.vue
@@ -21,7 +21,8 @@
             <div class="content">
                 <ul>
                     <li v-for="(item, index) in navList"
-                        :key="index">
+                        :key="index"
+                        @click="mapPopup(item)">
                         <img :src="item.icon"
                              alt="">
                         <span>
@@ -35,11 +36,13 @@
 </template>
 
 <script>
+import { mapGetters } from 'vuex'
 export default {
     name: 'OrgNavBar',
     data () {
         return {
-            moveFlag: false
+            moveFlag: false,
+            DC: null
         }
     },
     props: {
@@ -49,6 +52,16 @@
         title: {
             type: String
         }
+    },
+    created () {
+        this.DC = global.DC
+    },
+    computed: {
+        ...mapGetters([
+            'viewer',
+            'popupBgUrl',
+            'pupupQRUrl'
+        ])
     },
     methods: {
         move (e) {
@@ -99,6 +112,33 @@
         },
         closeModel () {
             this.$parent.closeModel()
+        },
+        mapPopup (item) {
+            this.$store.commit('SET_POPUPBGURL', item.bgImg)
+            this.$store.commit('SET_POPUPQRURL', item.QRImg)
+
+            console.log(this.popupBgUrl)
+            var that = this
+            // item.alt, item.heading, item.pitch, item.roll
+            this.viewer.zoomToPosition(
+                new this.DC.Position(item.longitude, item.latitude, item.alt, 35, -45, 0),
+                function () {
+                    that.newPopup(item)
+                }
+            )
+        },
+        newPopup (item) {
+            const position = this.DC.Transform.transformWGS84ToCartesian(new this.DC.Position(item.longitude, item.latitude, item.alt, 35, -45, 0))
+            // eslint-disable-next-line new-cap
+            var popup = new this.DC.divForms(this.viewer, {
+                domId: 'div1',
+                title: item.navTitle,
+                className: 'divForms-dom',
+                content: document.getElementById('mapChildContent'),
+                position: [
+                    position
+                ]
+            })
         }
     }
 }
@@ -122,7 +162,7 @@
             width: 100%;
             height: 36px;
             line-height: 36px;
-            background-color: #2196f3;
+            background-color: #020c17;
             .title {
                 padding-left: 10px;
                 img {
@@ -160,6 +200,7 @@
             overflow-y: auto;
             background: url(/img/bg/nav-bg.jpeg) no-repeat;
             background-size: 100% 100%;
+            border-radius: 0 0 8px 8px;
             ul {
                 padding: 15px;
                 padding-top: 4px;

--
Gitblit v1.9.3