From 19621635052322005f31579f7f3d481750898d7c Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 31 Dec 2021 08:56:36 +0800
Subject: [PATCH] 部分更改
---
src/components/map/components/mapPopup.vue | 30 ++++++++++++++++++++++++++----
1 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/src/components/map/components/mapPopup.vue b/src/components/map/components/mapPopup.vue
index d3a9c40..10d7f4c 100644
--- a/src/components/map/components/mapPopup.vue
+++ b/src/components/map/components/mapPopup.vue
@@ -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)),
--
Gitblit v1.9.3