From af992f8664454fcbe0ba4ed7eb51e69f222bea1b Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 8 Jul 2022 16:52:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E9=93=81=E9=A1=B9=E7=9B=AE=20ctc=20?= =?UTF-8?q?=E8=A1=8C=E8=BD=A6=E6=97=A5=E5=BF=97=20=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E5=88=B0=E8=BE=BE=20=20=E5=8F=96=E6=B6=88=E5=87=BA=E5=8F=91=20?= =?UTF-8?q?=20=E5=8F=96=E6=B6=88=E9=97=AD=E5=A1=9E=20=E6=8C=87=E4=BB=A4?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/components/utils/menuOperate.js | 16 ++++ .../theme/datie_02/menus/runplanPane.vue | 75 ++++++++++++++++--- src/scripts/cmdPlugin/CommandEnum.js | 4 + src/scripts/cmdPlugin/OperationHandler.js | 22 ++++++ 4 files changed, 108 insertions(+), 9 deletions(-) diff --git a/src/jmapNew/theme/components/utils/menuOperate.js b/src/jmapNew/theme/components/utils/menuOperate.js index 25fab991a..f8fccb4ad 100644 --- a/src/jmapNew/theme/components/utils/menuOperate.js +++ b/src/jmapNew/theme/components/utils/menuOperate.js @@ -609,6 +609,22 @@ export const menuOperate = { operation: OperationEvent.CTCCommand.agreeNotcie.menu.operation, cmdType: CMD.CTC.CTC_AGREE_NOTICE }, + // 取消到达 + cancleArrive:{ + operation: OperationEvent.CTCCommand.cancleArrive.menu.operation, + cmdType: CMD.CTC.CTC_LOG_CANCEL_ARRIVE + }, + // 取消出发 + cancleDepature:{ + operation: OperationEvent.CTCCommand.cancleDepature.menu.operation, + cmdType: CMD.CTC.CTC_LOG_CANCEL_DEPARTURE + }, + // 取消闭塞 + cancleBlock:{ + operation: OperationEvent.CTCCommand.cancleBlock.menu.operation, + cmdType: CMD.CTC.CTC_LOG_CANCEL_BLOCK + }, + // 增加列车固定径路 addTrainFixedPath:{ operation: OperationEvent.CTCCommand.addTrainFixedPath.menu.operation, diff --git a/src/jmapNew/theme/datie_02/menus/runplanPane.vue b/src/jmapNew/theme/datie_02/menus/runplanPane.vue index 74e6ccec4..90b043c32 100644 --- a/src/jmapNew/theme/datie_02/menus/runplanPane.vue +++ b/src/jmapNew/theme/datie_02/menus/runplanPane.vue @@ -64,9 +64,9 @@
出发(F4)
通过(F11)
邻站(F6)
-
取消接车(Esc)
-
取消闭塞(F6)
-
取消发车(F7)
+
取消接车(Esc)
+
取消闭塞(F6)
+
取消发车(F7)
@@ -655,6 +655,7 @@ export default { : prev.arriveRunPlan ? (prev.arriveRunPlan.actualTime || prev.arriveRunPlan.planTime) : '00:00:00'; const nextPlanTime = next.departRunPlan ? (next.departRunPlan.actualTime || next.departRunPlan.planTime) : next.arriveRunPlan ? (next.arriveRunPlan.actualTime || next.arriveRunPlan.planTime) : '00:00:00'; + // console.log(prevPlanTime, nextPlanTime, '66666666'); // const nextPlanTime = next.departRunPlan ? next.departRunPlan.planTime : next.arriveRunPlan ? next.arriveRunPlan.planTime : '00:00:00'; return new Date('2000-06-18 ' + prevPlanTime).getTime() - new Date('2000-06-18 ' + nextPlanTime).getTime(); }); @@ -710,6 +711,9 @@ export default { this.stageRunplan(); break; } + // Esc + // F6 + // F7 } } }, @@ -877,7 +881,7 @@ export default { // && this.currentRow.departRunPlan && this.currentRow.departRunPlan.adjacentMessage == 0 if (this.currentRow && this.currentRow.departRunPlan) { this.loading = true; - commitOperate(menuOperate.CTC.sendNotcie, {stationCode:this.currentRow.stationCode, runPlanCode: this.currentRow.code}, 2).then(({valid})=>{ + commitOperate(menuOperate.CTC.sendNotcie, {stationCode:this.currentRow.stationCode, runPlanCode: this.currentRow.code}, 3).then(({valid})=>{ this.loading = false; this.clearRpRow(); // if (valid) { @@ -892,10 +896,64 @@ export default { } }, - // 同意发车预告 - agreeNotcie() { - if (this.currentRow && this.currentRow.arriveRunPlan && this.currentRow.arriveRunPlan.adjacentMessage == 1) { - commitOperate(menuOperate.CTC.agreeNotcie, {stationCode:this.currentRow.stationCode, runPlanCode: this.currentRow.code}, 2).then(({valid})=>{ + // 取消接车 + cancleArrive() { + if (this.currentRow && this.currentRow.arriveRunPlan) { + // 取消到达 + commitOperate(menuOperate.CTC.cancleArrive, {stationCode:this.currentRow.stationCode, runPlanCode: this.currentRow.code}, 3).then(({valid})=>{ + this.loading = false; + this.clearRpRow(); + if (valid) { + // this.doClose(); + } + }).catch(() => { + this.loading = false; + this.clearRpRow(); + this.noticeInfo(); + }); + } + }, + // 取消发车 + cancleDepature() { + if (this.currentRow && this.currentRow.departRunPlan) { + commitOperate(menuOperate.CTC.cancleDepature, {stationCode:this.currentRow.stationCode, runPlanCode: this.currentRow.code}, 3).then(({valid})=>{ + this.loading = false; + this.clearRpRow(); + if (valid) { + // this.doClose(); + } + }).catch(() => { + this.loading = false; + this.clearRpRow(); + this.noticeInfo(); + }); + } + }, + // 取消闭塞 + cancleBlock() { + if (this.currentRow && + ( + (this.currentRow.departRunPlan && this.currentRow.departRunPlan.adjacentMessage == 1) || + (this.currentRow.arriveRunPlan && this.currentRow.arriveRunPlan.adjacentMessage == 1) + ) + ) { + commitOperate(menuOperate.CTC.cancleBlock, {stationCode:this.currentRow.stationCode, runPlanCode: this.currentRow.code}, 3).then(({valid})=>{ + this.loading = false; + this.clearRpRow(); + if (valid) { + // this.doClose(); + } + }).catch(() => { + this.loading = false; + this.clearRpRow(); + this.noticeInfo(); + }); + } + }, + // 同意发车预告 + agreeNotcie() { + if (this.currentRow && this.currentRow.arriveRunPlan && this.currentRow.arriveRunPlan.adjacentMessage == 1) { + commitOperate(menuOperate.CTC.agreeNotcie, {stationCode:this.currentRow.stationCode, runPlanCode: this.currentRow.code}, 3).then(({valid})=>{ this.loading = false; this.clearRpRow(); if (valid) { @@ -904,7 +962,6 @@ export default { }).catch(() => { this.loading = false; this.clearRpRow(); - // this.doClose(); this.noticeInfo(); }); } diff --git a/src/scripts/cmdPlugin/CommandEnum.js b/src/scripts/cmdPlugin/CommandEnum.js index 9f71a2e04..71ccdbe0c 100644 --- a/src/scripts/cmdPlugin/CommandEnum.js +++ b/src/scripts/cmdPlugin/CommandEnum.js @@ -406,6 +406,10 @@ export default { CTC_MODIFY_TRIP_NUMBER:{value: 'CTC_MODIFY_TRIP_NUMBER', label: '修改车次号(大铁CTC)'}, CTC_SEND_NOTICE:{value: 'CTC_SEND_NOTICE', label: '发送发车预告'}, CTC_AGREE_NOTICE:{value: 'CTC_AGREE_NOTICE', label: '同意发车预告'}, + CTC_LOG_CANCEL_ARRIVE:{value: 'CTC_LOG_CANCEL_ARRIVE', label: '取消到达'}, + CTC_LOG_CANCEL_DEPARTURE:{value: 'CTC_LOG_CANCEL_DEPARTURE', label: '取消出发'}, + CTC_LOG_CANCEL_BLOCK:{value: 'CTC_LOG_CANCEL_BLOCK', 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_REMOVE_RUN_PLAN_FROM_EDIT_AREA:{value: 'CTC_REMOVE_RUN_PLAN_FROM_EDIT_AREA', label: '删除列车固定径路'}, diff --git a/src/scripts/cmdPlugin/OperationHandler.js b/src/scripts/cmdPlugin/OperationHandler.js index 06e5a460b..a39f36429 100644 --- a/src/scripts/cmdPlugin/OperationHandler.js +++ b/src/scripts/cmdPlugin/OperationHandler.js @@ -3855,7 +3855,29 @@ export const OperationEvent = { operation: '1136', domId: '_Tips-CTC-modifyDispatcherLogerRpDirection-Menu{TOP}' } + }, + // 取消到达 + cancleArrive:{ + menu: { + operation: '1137', + domId: '_Tips-CTC-cancleArrive-Menu{TOP}' + } + }, + // 取消出发 + cancleDepature:{ + menu: { + operation: '1138', + domId: '_Tips-CTC-cancleDepature-Menu{TOP}' + } + }, + // 取消闭塞 + cancleBlock:{ + menu: { + operation: '1139', + domId: '_Tips-CTC-cancleBlock-Menu{TOP}' + } } + // CTC_ZONE_SAVE_TRIP_NUMBER // CTC_ZONE_SAVE_STATION },