From 624a3a11f9792ed12d75bfc5a9b9497ea3e13232 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Tue, 23 Aug 2022 16:24:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E9=93=81=E9=A1=B9=E7=9B=AE=20?= =?UTF-8?q?=E8=BD=A6=E5=8A=A1=E7=AE=A1=E7=90=86=E7=BB=88=E7=AB=AF=20?= =?UTF-8?q?=E5=88=97=E8=BD=A6=E5=9B=BA=E5=AE=9A=E5=BE=84=E8=B7=AF=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0/=E4=BF=AE=E6=94=B9=20=E4=BB=A3=E7=A0=81=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/components/utils/menuOperate.js | 2 +- src/scripts/cmdPlugin/CommandEnum.js | 3 +- .../bigTrainRunplanManage/addRunplan.vue | 121 +++++++++++------- .../directionInformation.vue | 1 + .../stationDirection.vue | 8 +- .../bigTrainRunplanManage/stationTrack.vue | 8 +- .../trackInformation.vue | 1 + .../bigTrainRunplanManage/trainFixedPath.vue | 54 ++++---- 8 files changed, 120 insertions(+), 78 deletions(-) diff --git a/src/jmapNew/theme/components/utils/menuOperate.js b/src/jmapNew/theme/components/utils/menuOperate.js index 9c5bc2680..a66a391f0 100644 --- a/src/jmapNew/theme/components/utils/menuOperate.js +++ b/src/jmapNew/theme/components/utils/menuOperate.js @@ -754,7 +754,7 @@ export const menuOperate = { // 增加列车固定径路 addTrainFixedPath:{ operation: OperationEvent.CTCCommand.addTrainFixedPath.menu.operation, - cmdType: CMD.CTC.CTC_ADD_RUN_PLAN_LIST_TO_EDIT_AREA + cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_EDIT }, // 导入列车固定径路 importTrainFixedPath:{ diff --git a/src/scripts/cmdPlugin/CommandEnum.js b/src/scripts/cmdPlugin/CommandEnum.js index 2aef8cbc9..c033c316b 100644 --- a/src/scripts/cmdPlugin/CommandEnum.js +++ b/src/scripts/cmdPlugin/CommandEnum.js @@ -442,7 +442,7 @@ export default { CTC_LOG_SET_TRANSFINITE:{value: 'CTC_LOG_SET_TRANSFINITE', label: '设置超限'}, CTC_LOG_SAVE_RUN_PLAN:{value: 'CTC_LOG_SAVE_RUN_PLAN', label: '保存运行计划'}, - CTC_ADD_RUN_PLAN_LIST_TO_EDIT_AREA:{value: 'CTC_ADD_RUN_PLAN_LIST_TO_EDIT_AREA', label: '增加列车固定径路'}, + // CTC_ADD_RUN_PLAN_LIST_TO_EDIT_AREA:{value: 'CTC_ADD_RUN_PLAN_LIST_TO_EDIT_AREA', label: '增加列车固定径路'}, CTC_COVER_RUN_PLAN_LIST_TO_EDIT_AREA:{value: 'CTC_COVER_RUN_PLAN_LIST_TO_EDIT_AREA', label: '导入列车固定径路'}, CTC_REGULAR_TRAIN_LINE_CLEAR:{value: 'REGULAR_TRAIN_LINE_CLEAR', label: '清空列车固定径路'}, CTC_REGULAR_TRAIN_LINE_DELETE:{value: 'REGULAR_TRAIN_LINE_DELETE', label: '删除列车固定径路'}, @@ -455,6 +455,7 @@ export default { CTC_STATION_IO_GATE_PUBLISH:{value: 'STATION_IO_GATE_PUBLISH', label: '出入口发布生效区'}, CTC_STATION_IO_GATE_LIST:{value: 'STATION_IO_GATE_LIST', label: '获取出入口列表'}, CTC_STATION_IO_GATE_EDIT:{value: 'STATION_IO_GATE_EDIT', label: '修改出入口'}, + CTC_REGULAR_TRAIN_LINE_EDIT:{value: 'REGULAR_TRAIN_LINE_EDIT', label: '增加列车固定径路'}, CTC_SET_ROUTE:{value: 'CTC_SET_ROUTE', label: 'CTC办理进路'}, diff --git a/src/views/bigTrainRunplanManage/addRunplan.vue b/src/views/bigTrainRunplanManage/addRunplan.vue index 6ee0a68df..dba9dcc5f 100644 --- a/src/views/bigTrainRunplanManage/addRunplan.vue +++ b/src/views/bigTrainRunplanManage/addRunplan.vue @@ -22,8 +22,8 @@ /> - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + { + return stationDirection.runStatus == 'R'; + }); + this.outDirList = mapStationDirectionList.filter(stationDirection=>{ + return stationDirection.runStatus == 'D'; + }); + if (row) { + this.addModel = Object.assign({}, row); + this.title = '修改列车固定径路'; + } else { + this.title = '增加列车固定径路'; + this.addModel.stationCode = stationCode; + } this.filterSectionList = Object.values(filterSectionMap); this.dialogShow = true; - this.addModel.stationCode = stationCode; this.$nextTick(function () { this.$store.dispatch('training/emitTipFresh'); }); }, + changeEnterDirCode(code) { + const mapStationDirection = this.mapStationDirectionMap[code]; + this.addModel.backStationCode = mapStationDirection.relativeStationCode; + }, + changeOutDirCode(code) { + const mapStationDirection = this.mapStationDirectionMap[code]; + this.addModel.fontStationCode = mapStationDirection.relativeStationCode; + }, doClose() { this.loading = false; this.dialogShow = false; this.addModel = { - stationCode:'', // 车站编码 - trackSectionCode:'', // 运行计划的默认股道 - arriveTripNumber:'', // 到达车次 - departTripNumber:'', // 出发车次 + code:'', // 只有修改的时候需要添加此参数 + stationCode:'', // 车站编码code + masterCode:'', // 股道code + arriveTipNum:'', // 到达车次 + leaveTipNum:'', // 出发车次 arriveTime:'', // 到达时间 - departTime:'', // 出发时间 - arriveDirectionCode:'', // 入口 - departDirectionCode:'', // 出口 - arriveStationCode:'', // 到达车站 - departStationCode:'', // 出发车站 + leaveTime:'', // 出发时间 + enterDirCode:'', // 车站入口 + outDirCode:'', // 出口 + fontStationCode:'', // 前方车站 + backStationCode:'', // 后方车站 + // 以下参数使用前端自己的缓存数据,取logicDataNew下面的DraftMapStationDirectionList的参数: + // 1.runStatus接发口类型 R=接车,D=发车,NO=无2.relativeStationCode + // 相对车站code接车时此code指的是后方车站发车时此code指的是前方车站 appendData:{ // 附加数据 ZHUANGXIE:false, // 装卸 LIEJIAN:false, // 列检 @@ -283,10 +310,12 @@ export default { this.$refs.form.validate((valid) => { if (valid) { this.loading = true; - const param = {stationCode:this.addModel.stationCode, runPlanParamList:[this.addModel]}; + const param = Object.assign({}, this.addModel); + if (this.title == '增加列车固定径路') { delete param.code; } commitOperate(menuOperate.CTC.addTrainFixedPath, param, 3).then(({valid})=>{ if (valid) { this.doClose(); + this.$emit('refresh'); } }).catch(() => { this.doClose(); diff --git a/src/views/bigTrainRunplanManage/directionInformation.vue b/src/views/bigTrainRunplanManage/directionInformation.vue index 9de43bd35..e6a437e8e 100644 --- a/src/views/bigTrainRunplanManage/directionInformation.vue +++ b/src/views/bigTrainRunplanManage/directionInformation.vue @@ -133,6 +133,7 @@ export default { commitOperate(menuOperate.CTC.modifyStationDirection, param, 3).then(({valid})=>{ if (valid) { this.$message.success('更新成功!'); + this.$emit('refresh'); this.doClose(); } }).catch(() => { diff --git a/src/views/bigTrainRunplanManage/stationDirection.vue b/src/views/bigTrainRunplanManage/stationDirection.vue index b3711fb22..d1537c88c 100644 --- a/src/views/bigTrainRunplanManage/stationDirection.vue +++ b/src/views/bigTrainRunplanManage/stationDirection.vue @@ -74,7 +74,7 @@ - +