大铁项目 行车日志 修改车次号调整

This commit is contained in:
joylink_cuiweidong 2022-06-14 17:39:59 +08:00
parent 389a700798
commit a885b634a6
2 changed files with 12 additions and 2 deletions

View File

@ -114,8 +114,8 @@ export default {
doShow(row) {
this.model.stationCode = row.stationCode;
this.model.runPlanCode = row.code;
this.oldArriveTripNumber = (row.arriveRunPlan && row.arriveRunPlan.arriveTripNumber) || '';
this.oldDepartTripNumber = (row.departRunPlan && row.departRunPlan.departTripNumber) || '';
this.oldArriveTripNumber = (row.arriveRunPlan && row.arriveRunPlan.tripNumber) || '';
this.oldDepartTripNumber = (row.departRunPlan && row.departRunPlan.tripNumber) || '';
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
@ -124,6 +124,12 @@ export default {
doClose() {
this.loading = false;
this.dialogShow = false;
this.model = {
stationCode:'', //
runPlanCode:'', //
arriveTripNumber:'', //
departTripNumber:'' //
};
this.$store.dispatch('training/emitTipFresh');
},
commit() {

View File

@ -215,6 +215,10 @@ function handle(state, data) {
// 大铁项目 ctc 运行图改变信息
case 'SIMULATION_CTC_RUN_PLAN_CHANGE':
msg.forEach(element => {
const tripNumberDe = element.departRunPlan && element.departRunPlan.tripNumber;
const tripNumberAr = element.arriveRunPlan && element.arriveRunPlan.tripNumber;
if (tripNumberDe) { parseInt(tripNumberDe[tripNumberDe.length - 1]) % 2 == 0 ? element.departRunPlan.up = tripNumberDe : element.departRunPlan.down = tripNumberDe; }
if (tripNumberAr) { parseInt(tripNumberAr[tripNumberAr.length - 1]) % 2 == 0 ? element.arriveRunPlan.up = tripNumberAr : element.arriveRunPlan.down = tripNumberAr; }
state.railCtcRunplanInitMsg[element.code] = copyAssign(state.railCtcRunplanInitMsg[element.code], element);
});
state.railCtcRunplanChange++;