Merge remote-tracking branch 'origin/develop' into local-test
Some checks failed
local-test分支构建发布到本地服务器 / Build-Publish (push) Failing after 3m5s

This commit is contained in:
joylink_fanyuhong 2024-06-28 14:04:50 +08:00
commit 25f94a4a57
2 changed files with 15 additions and 5 deletions

View File

@ -35,7 +35,7 @@ export function getTopic(type, group, param) {
topic = `/queue/simulation/${group}/iscs/gate/${param.stationCode}`;
break;
case 'TMS':
topic = `/queue/simulation/${group}/train/001/tms`;
topic = `/queue/simulation/${group}/train/${param.groupNumber}/tms`;
break;
case 'PIS_STAND':
topic = `/queue/simulation/${group}/standPis/${param.standCode}`;

View File

@ -8,7 +8,7 @@
<td>网压</td>
<td>网流</td>
<td>速度</td>
<td>牵引/制动级位</td>
<td>牵引/制动级位111</td>
<td>里程标</td>
<td>下一站</td>
<td>目的站</td>
@ -143,7 +143,7 @@
</div>
</td></template
>
<template v-else-if="k === '交流输出电压'">
<template v-else-if="k === '交流输出电压111'">
<td v-for="(item, j) in v" :key="j">
{{ item }}
</td></template
@ -230,6 +230,7 @@ export default {
data() {
return {
localStatic: JL3D_LOCAL_STATIC,
groupNumber: '001',
trainInfo: {
voltage: 1600,
current: 317,
@ -261,6 +262,14 @@ export default {
}
};
},
watch: {
'$store.state.training.roleDeviceCode': function (val) {
if(val) {
this.unsubscribe();
this.subscribe();
}
}
},
mounted() {
this.group = this.$route.query.group;
this.subscribe();
@ -275,7 +284,8 @@ export default {
methods: {
subscribe() {
const header = { group: this.group || "", "X-Token": getToken() };
creatSubscribe(getTopic("TMS", this.group), header, msg => {
this.groupNumber = this.$store.state.training.roleDeviceCode
creatSubscribe(getTopic("TMS", this.group, { groupNumber: this.groupNumber }), header, msg => {
let res = JSON.parse(msg.body);
console.log(res);
console.log(res.parkingBreakPressure);
@ -315,7 +325,7 @@ export default {
});
},
unsubscribe() {
clearSubscribe(getTopic("TMS", this.group));
clearSubscribe(getTopic("TMS", this.group, { groupNumber: this.groupNumber }));
},
setTractionWave(flag) {
if (timer) {