Merge remote-tracking branch 'origin/develop'
All checks were successful
master分支构建发布到公网服务器 / Build-Publish (push) Successful in 7m48s

This commit is contained in:
joylink_fanyuhong 2024-08-16 09:59:38 +08:00
commit 478261512c
9 changed files with 590 additions and 560 deletions

View File

@ -122,7 +122,7 @@ class Handler {
const group = router.currentRoute.query.group; const group = router.currentRoute.query.group;
const stepInfo = store.state.trainingNew.stepInfo; const stepInfo = store.state.trainingNew.stepInfo;
endTrainingStep(group, stepInfo.id).then(resp => { endTrainingStep(group, stepInfo.id).then(resp => {
store.dispatch('trainingNew/clearOperateOrder'); // store.dispatch('trainingNew/clearOperateOrder');
}).catch(e => { }).catch(e => {
console.error('进入下一步失败!', e); console.error('进入下一步失败!', e);
}); });

View File

@ -83,6 +83,7 @@ const training = {
if (store.state.training.myMemberId == state.stepInfo.memberId) { if (store.state.training.myMemberId == state.stepInfo.memberId) {
state.stepRecord.push({ stepId: state.stepInfo.id, success: false, clientOperations: [] }); state.stepRecord.push({ stepId: state.stepInfo.id, success: false, clientOperations: [] });
} }
state.operateOrder = 0;
Handler.judgeIsTextSendOperation(); Handler.judgeIsTextSendOperation();
}, },
clearStepInfo: (state, stepInfo) => { clearStepInfo: (state, stepInfo) => {

View File

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

View File

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

View File

@ -418,7 +418,7 @@ export default {
// this.$emit('dispatchOperate', { // this.$emit('dispatchOperate', {
// dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: Object.assign({refresh: true}, this.$route.query) // dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: Object.assign({refresh: true}, this.$route.query)
// }); // });
this.$emit('refresh'); this.$store.dispatch('runPlan/refresh');
this.$message.success(this.$t('tip.addTaskSuccessfully')); this.$message.success(this.$t('tip.addTaskSuccessfully'));
}).catch((error) => { }).catch((error) => {
this.$messageBox(this.$t('tip.addTaskFailed') + ': ' + error.message); this.$messageBox(this.$t('tip.addTaskFailed') + ': ' + error.message);

View File

@ -61,9 +61,9 @@ export default {
deletePlanTrip(model).then(resp => { deletePlanTrip(model).then(resp => {
this.$store.dispatch('runPlan/setSelected', {}); this.$store.dispatch('runPlan/setSelected', {});
this.$store.dispatch('runPlan/setDraftSelected', {}); this.$store.dispatch('runPlan/setDraftSelected', {});
this.$emit('refresh'); this.$store.dispatch('runPlan/refresh');
// this.$emit('dispatchOperate', { // this.$emit('dispatchOperate', {
// dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: Object.assign({refresh: true}, this.$route.query) // dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: Object.assign({refresh: true}, this.$route.query)
// }); // });
this.$message.success(this.$t('tip.deleteTaskSuccessfully')); this.$message.success(this.$t('tip.deleteTaskSuccessfully'));
}).catch(() => { }).catch(() => {

View File

@ -714,6 +714,14 @@ export default {
confirmPublish() { confirmPublish() {
publishRunPlanAllUser(this.loadRunPlanId, this.publishName || this.loadRunPlanName).then(resp => { publishRunPlanAllUser(this.loadRunPlanId, this.publishName || this.loadRunPlanName).then(resp => {
this.$message.success(this.$t('tip.publishRunPlanSuccess')); this.$message.success(this.$t('tip.publishRunPlanSuccess'));
if (resp.data && resp.data.length > 0) {
let message = '';
resp.data.forEach(msg => message += (msg + ';'))
this.$confirm(message, this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
showCancelButton: false
})
}
this.publishVisible = false; this.publishVisible = false;
}).catch(() => { }).catch(() => {
this.$messageBox(this.$t('tip.publishRunPlanFail')); this.$messageBox(this.$t('tip.publishRunPlanFail'));

View File

@ -205,7 +205,11 @@ export default {
// //
const trainingDesign = this.$store.state.training.domConfig ? this.$store.state.training.domConfig.trainingDesign : false; const trainingDesign = this.$store.state.training.domConfig ? this.$store.state.training.domConfig.trainingDesign : false;
const terminal = this.findTerminalFromMap(trainingDesign ? 'driverAtsWork' : 'drivingPlan'); const terminal = this.findTerminalFromMap(trainingDesign ? 'driverAtsWork' : 'drivingPlan');
this.changePictureShow(terminal); if (this.$route.query.type === 'TMS') {
this.changePictureShow(this.findTerminalFromMap('tms'));
} else {
this.changePictureShow(terminal);
}
} else if (this.roles === 'NCC_DISPATCHER') { } else if (this.roles === 'NCC_DISPATCHER') {
const terminal = this.findTerminalFromMap('nccWork'); const terminal = this.findTerminalFromMap('nccWork');
this.changePictureShow(terminal); this.changePictureShow(terminal);

View File

@ -717,6 +717,13 @@ export default {
confirmPublish() { confirmPublish() {
publishRunPlanAllUser(this.loadRunPlanId, this.publishName || this.loadRunPlanName).then(resp => { publishRunPlanAllUser(this.loadRunPlanId, this.publishName || this.loadRunPlanName).then(resp => {
this.$message.success(this.$t('tip.publishRunPlanSuccess')); this.$message.success(this.$t('tip.publishRunPlanSuccess'));
if (resp.data && resp.data.length > 0) {
let message = '';
resp.data.forEach(msg => message += (msg + ';'))
this.$confirm(message, this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm')
})
}
this.publishVisible = false; this.publishVisible = false;
}).catch(() => { }).catch(() => {
this.$messageBox(this.$t('tip.publishRunPlanFail')); this.$messageBox(this.$t('tip.publishRunPlanFail'));