This commit is contained in:
fan 2022-07-26 18:05:20 +08:00
commit 93a4010ea8

View File

@ -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() {