From acb45c731c3ccd0a67061efb4e7bdf4f56005672 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 12 Jan 2022 08:52:13 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/school-web

---
 src/components/map/components/mapPopup.vue |   35 +++++++++++++++++++++++++++++------
 1 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/src/components/map/components/mapPopup.vue b/src/components/map/components/mapPopup.vue
index d3a9c40..4b4b143 100644
--- a/src/components/map/components/mapPopup.vue
+++ b/src/components/map/components/mapPopup.vue
@@ -263,7 +263,7 @@
             'teachList',
             // 科研
             'liveList',
-            // 校内导航的显示关闭
+            // 社区内导航的显示关闭
             'campusNavFlag'
         ])
     },
@@ -271,9 +271,28 @@
         this.DC = global.DC
     },
     watch: {
-        introduceText: function (newQuestion, oldQuestion) {
-            var zhText = encodeURI(newQuestion)
-            this.audioSource = `<source src="http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=4&text=${zhText}" type="audio/mpeg"><embed height="0" width="0" src="http://tts.baidu.com/text2audio?text=${zhText}">`
+        introduceText: {
+            immediate: true,
+            handler (newQuestion, oldQuestion) {
+                var zhText = encodeURI(newQuestion)
+                this.audioSource = `<source src="http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=4&text=${zhText}" type="audio/mpeg"><embed height="0" width="0" src="http://tts.baidu.com/text2audio?text=${zhText}">`
+            }
+        },
+        teachList: {
+            immediate: true,
+            handler (newCode, oldCode) {
+                if (newCode.length > 0) {
+                    this.tabBtnFlag = '教学科研行政'
+                }
+            }
+        },
+        liveList: {
+            immediate: true,
+            handler (newCode, oldCode) {
+                if (newCode.length > 0 && this.teachList.length == 0) {
+                    this.tabBtnFlag = '生活服务'
+                }
+            }
         }
     },
     methods: {
@@ -384,7 +403,6 @@
 
         mechanismDetailPopup (num, param) {
             getMechanismDetail({ num: num, mechanismName: param }).then(res => {
-                console.log(res)
                 var result = res.data.data
                 this.$store.commit('CLEAR_ALL', null)
 
@@ -399,6 +417,10 @@
                 this.$store.commit('SET_INTRODUCETEXT', result.introduce)
                 this.$store.commit('SET_POPUPIMGATLAS', imgArr)
 
+                if (result.videourl && result.videourl != '') {
+                    this.$store.commit('SET_MONITORURL', result.videourl)
+                }
+
                 this.newPopup(result)
                 this.viewer.flyToPosition(
                     new this.DC.Position(Number(result.jd), Number(result.wd), 3000, Number(result.heading), Number(result.pitch), Number(result.roll)),
@@ -410,7 +432,7 @@
         },
 
         newPopup (item) {
-            const position = this.DC.Transform.transformWGS84ToCartesian(new this.DC.Position(Number(item.jd), Number(item.wd), Number(item.gd), Number(item.heading), Number(item.pitch), Number(item.roll)))
+            const position = this.DC.Transform.transformWGS84ToCartesian(new this.DC.Position(Number(item.jd), Number(item.wd), Number(item.gd)))
             // eslint-disable-next-line no-unused-vars
             var popup = new this.DC.DivForms(this.viewer, {
                 domId: 'divFormsDomBox',
@@ -420,6 +442,7 @@
             })
 
             this.$store.commit('SET_PANORAMAPOPUP', false)
+            this.$store.commit('SET_MONITORPOPUP', false)
             this.$store.commit('SET_DETAILSPOPUP', true)
         }
     }

--
Gitblit v1.9.3