From 3fefbe2a47f13c670a0222a00be16b628c1ae22c Mon Sep 17 00:00:00 2001 From: ival <610568032@qq.com> Date: Wed, 13 Nov 2019 10:15:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- babel.config.js | 7 ++++--- src/utils/stomp.js | 4 ++++ src/views/display/demon/runPlanView.vue | 14 ++++++++++---- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/babel.config.js b/babel.config.js index e74f88c82..689cda254 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,8 +1,9 @@ module.exports = { presets: [ '@vue/app' + ], + plugins: [ + '@babel/plugin-transform-runtime', + '@babel/plugin-syntax-dynamic-import' ] - // plugins: [ - // '@babel/plugin-syntax-dynamic-import' - // ] }; diff --git a/src/utils/stomp.js b/src/utils/stomp.js index af557c13a..65659d69d 100644 --- a/src/utils/stomp.js +++ b/src/utils/stomp.js @@ -10,6 +10,10 @@ export const commonTopic = '/topic/message'; // 公共topic(不区分用户) // 建立连接并订阅地址 export function creatSubscribe(topic, header) { + if ([displayTopic, planTopic, designDisplayTopic].includes(topic)) { + topic = `${topic}/${header.group}`; + } + try { if (!Vue.prototype.$stomp) { Vue.prototype.$stomp = new StompClient(); diff --git a/src/views/display/demon/runPlanView.vue b/src/views/display/demon/runPlanView.vue index 5a85fe65e..95576963e 100644 --- a/src/views/display/demon/runPlanView.vue +++ b/src/views/display/demon/runPlanView.vue @@ -9,7 +9,7 @@ :modal="false" fullscreen > -
+ @@ -164,9 +164,15 @@ export default { }, watch: { '$store.state.runPlan.planLoadedCount': function () { - this.loadChartPage(); - if (this.dialogShow) { - this.loadInitData(this.series); + try { + this.loadChartPage(); + if (this.dialogShow) { + this.loadInitData(this.series); + } + } catch (e) { + console.error(e); + } finally { + this.loading = true; } }, '$store.state.runPlan.planUpdateCount': function () {