From a885b634a60b5b23caaba97fa0bbf8253508239d Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Tue, 14 Jun 2022 17:39:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E9=93=81=E9=A1=B9=E7=9B=AE=20?= =?UTF-8?q?=E8=A1=8C=E8=BD=A6=E6=97=A5=E5=BF=97=20=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=BD=A6=E6=AC=A1=E5=8F=B7=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/datie_02/menus/dialog/modifyTripNumber.vue | 10 ++++++++-- src/store/modules/socket.js | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) 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++;