修改代码

This commit is contained in:
ival 2019-11-13 10:15:54 +08:00
parent 9c0ad7adb8
commit 3fefbe2a47
3 changed files with 18 additions and 7 deletions

View File

@ -1,8 +1,9 @@
module.exports = { module.exports = {
presets: [ presets: [
'@vue/app' '@vue/app'
],
plugins: [
'@babel/plugin-transform-runtime',
'@babel/plugin-syntax-dynamic-import'
] ]
// plugins: [
// '@babel/plugin-syntax-dynamic-import'
// ]
}; };

View File

@ -10,6 +10,10 @@ export const commonTopic = '/topic/message'; // 公共topic(不区分用户)
// 建立连接并订阅地址 // 建立连接并订阅地址
export function creatSubscribe(topic, header) { export function creatSubscribe(topic, header) {
if ([displayTopic, planTopic, designDisplayTopic].includes(topic)) {
topic = `${topic}/${header.group}`;
}
try { try {
if (!Vue.prototype.$stomp) { if (!Vue.prototype.$stomp) {
Vue.prototype.$stomp = new StompClient(); Vue.prototype.$stomp = new StompClient();

View File

@ -9,7 +9,7 @@
:modal="false" :modal="false"
fullscreen fullscreen
> >
<div :id="runPlanId" /> <div :id="runPlanId" v-loading="loading" />
</el-dialog> </el-dialog>
</template> </template>
@ -164,10 +164,16 @@ export default {
}, },
watch: { watch: {
'$store.state.runPlan.planLoadedCount': function () { '$store.state.runPlan.planLoadedCount': function () {
try {
this.loadChartPage(); this.loadChartPage();
if (this.dialogShow) { if (this.dialogShow) {
this.loadInitData(this.series); this.loadInitData(this.series);
} }
} catch (e) {
console.error(e);
} finally {
this.loading = true;
}
}, },
'$store.state.runPlan.planUpdateCount': function () { '$store.state.runPlan.planUpdateCount': function () {
this.updateRunPlanData(this.$store.state.runPlan.updateData); this.updateRunPlanData(this.$store.state.runPlan.updateData);