+
liuyg
2021-12-31 b41db64b0dc4c5fecb40caf788a1a80e7e4e7eb5
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)),