【仿真功能】iscs界面,屏蔽门系统切换车站时以前是有订阅的,现在没了

This commit is contained in:
joylink_cuiweidong 2023-02-02 17:22:14 +08:00
parent 9759cb7cc1
commit 2aae79d71e

View File

@ -46,6 +46,12 @@ export default {
}
},
watch: {
'stationId': function (newVal, oldVal) {
this.clearSubscribe(oldVal);
this.subscribe(newVal);
}
},
beforeDestroy() {
this.clearSubscribe(this.stationId);
},
@ -72,7 +78,6 @@ export default {
viewLoaded() {
},
subscribe(stationCode) {
this.clearSubscribe();
const header = { group: this.$route.query.group || '', 'X-Token': getToken() };
creatSubscribe(getTopic('ISCSPSD', this.$route.query.group, {stationCode} ), header);
this.$store.dispatch('app/animationsClose');