diff --git a/src/jmapNew/theme/datie_02/menus/dialog/modifyTripNumber.vue b/src/jmapNew/theme/datie_02/menus/dialog/modifyTripNumber.vue index 4ef3d9e20..e009dd642 100644 --- a/src/jmapNew/theme/datie_02/menus/dialog/modifyTripNumber.vue +++ b/src/jmapNew/theme/datie_02/menus/dialog/modifyTripNumber.vue @@ -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() { diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index 536534499..270c3169f 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -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++;