diff --git a/src/views/newMap/mapsystemNew/index.vue b/src/views/newMap/mapsystemNew/index.vue index 13360dbce..e8d8631b5 100644 --- a/src/views/newMap/mapsystemNew/index.vue +++ b/src/views/newMap/mapsystemNew/index.vue @@ -118,11 +118,11 @@ export default { async subscribe() { this.clearSubscribe(); const header = { group: this.$route.query.group || '', 'X-Token': getToken() }; - creatSubscribe(`${displayTopic}\/${this.$route.query.group}`, header); - creatSubscribe(getTopic('STATE', this.$route.query.group), header); + await creatSubscribe(`${displayTopic}\/${this.$route.query.group}`, header); + await creatSubscribe(getTopic('STATE', this.$route.query.group), header); // if (this.$route.query.ctc == 'true') { if (this.$route.query.lineCode == '16') { - creatSubscribe(getTopic('CTC', this.$route.query.group), header); + await creatSubscribe(getTopic('CTC', this.$route.query.group), header); } // $route.query.lineCode === '16'; // if (this.$route.query.dispatcherStation == 'true') { @@ -133,9 +133,9 @@ export default { async subscribeNew() { this.clearSubscribeNew(); const header = { 'X-Token': getToken() }; - creatSubscribe(getTopic('ATS', this.$route.query.group), header); - creatSubscribe(getTopic('SYSTIME', this.$route.query.group), header); - creatSubscribe(getTopic('STATE', this.$route.query.group), header); + await creatSubscribe(getTopic('ATS', this.$route.query.group), header); + await creatSubscribe(getTopic('SYSTIME', this.$route.query.group), header); + await creatSubscribe(getTopic('STATE', this.$route.query.group), header); await this.$store.dispatch('training/setHasSubscribed'); }, clearSubscribeNew() {