From 00f1d9882919d6f91f846fb1ca4bef155e8166bd Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Wed, 6 Jul 2022 13:45:41 +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=A2=9E=E5=8A=A0=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=82=A1=E9=81=93=20=E5=8F=91=E9=80=81?= =?UTF-8?q?=E8=AE=A1=E5=88=92=20=E5=8F=96=E6=B6=88=E7=BA=A2=E9=97=AA=20?= =?UTF-8?q?=E6=8C=87=E4=BB=A4=20=E4=BF=AE=E6=94=B9=20=E5=8F=91=E9=80=81?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E6=8C=89=E9=92=AE=E9=97=AA=E7=83=81=E7=9A=84?= =?UTF-8?q?=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/components/utils/menuOperate.js | 23 +++- .../datie_02/menus/dialog/sendRunplan.vue | 76 +++++------ .../theme/datie_02/menus/runplanPane.vue | 125 ++++++++++++++---- src/scripts/cmdPlugin/CommandEnum.js | 7 +- src/scripts/cmdPlugin/OperationHandler.js | 27 +++- src/store/modules/socket.js | 6 + 6 files changed, 191 insertions(+), 73 deletions(-) diff --git a/src/jmapNew/theme/components/utils/menuOperate.js b/src/jmapNew/theme/components/utils/menuOperate.js index 0755d7f2a..469de01eb 100644 --- a/src/jmapNew/theme/components/utils/menuOperate.js +++ b/src/jmapNew/theme/components/utils/menuOperate.js @@ -564,10 +564,25 @@ export const menuOperate = { operation: OperationEvent.CTCCommand.autoTrigger.menu.operation, cmdType: CMD.CTC.CTC_AUTO_TRIGGER }, - // 批量修改股道 - batchModifyTrackSection:{ - operation: OperationEvent.CTCCommand.batchModifyTrackSection.menu.operation, - cmdType: CMD.CTC.CTC_BATCH_MODIFY_RUN_PLAN + // // 批量修改股道 + // batchModifyTrackSection:{ + // operation: OperationEvent.CTCCommand.batchModifyTrackSection.menu.operation, + // cmdType: CMD.CTC.CTC_BATCH_MODIFY_RUN_PLAN + // }, + // 修改股道 + modifyTrackSection:{ + operation: OperationEvent.CTCCommand.modifyTrackSection.menu.operation, + cmdType: CMD.CTC.CTC_MODIFY_SECTION + }, + // 车站发送计划 + stationSendRunplan:{ + operation: OperationEvent.CTCCommand.stationSendRunplan.menu.operation, + cmdType: CMD.CTC.CTC_STATION_SEND_OUT_RUN_PLAN + }, + // 车站取消红闪 + stationCancleTwinkle:{ + operation: OperationEvent.CTCCommand.stationCancleTwinkle.menu.operation, + cmdType: CMD.CTC.CTC_CANCEL_TWINKLE }, // 移除行车日志 deleteRunplan:{ diff --git a/src/jmapNew/theme/datie_02/menus/dialog/sendRunplan.vue b/src/jmapNew/theme/datie_02/menus/dialog/sendRunplan.vue index 26e4fb5dd..a56d5f917 100644 --- a/src/jmapNew/theme/datie_02/menus/dialog/sendRunplan.vue +++ b/src/jmapNew/theme/datie_02/menus/dialog/sendRunplan.vue @@ -134,9 +134,9 @@ export default { tableData1:[], tableData2:[], addModel:{ - stationCode:'', - planParamList:[], - force:1 + stationCode:'' + // planParamList:[], + // force:1 } }; }, @@ -148,15 +148,15 @@ export default { return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; }, domIdConfirm() { - return this.dialogShow ? OperationEvent.CTCCommand.batchModifyTrackSection.menu.domId : ''; + return this.dialogShow ? OperationEvent.CTCCommand.stationSendRunplan.menu.domId : ''; }, title() { return '发送计划'; } }, methods:{ - doShow(tableData, activeDepartRunPlan, activeArriveRunPlan, filterSectionList) { - this.addModel.planParamList = []; + doShow(tableData, filterSectionList) { + // this.addModel.planParamList = []; this.tableData1 = []; tableData.forEach(element => { if (element.arriveRunPlan && element.arriveRunPlan.sectionCode) { @@ -171,24 +171,24 @@ export default { }); // filterSectionList this.addModel.stationCode = this.$store.state.training.roleDeviceCode; - const activeDepartRunPlanList = Object.values(activeDepartRunPlan).filter(activeDepart=>{ return activeDepart.changeSectionCode && activeDepart.changeSectionCode != activeDepart.sectionCode; }); - if (activeDepartRunPlanList.length > 0) { - activeDepartRunPlanList.forEach(depart=>{ - this.addModel.planParamList.push({ - runPlanCode:depart.code, - departSectionCode:depart.changeSectionCode - }); - }); - } - const activeArriveRunPlanList = Object.values(activeArriveRunPlan).filter(activeArrive=>{ return activeArrive.changeSectionCode && activeArrive.changeSectionCode != activeArrive.sectionCode; }); - if (activeArriveRunPlanList.length > 0) { - activeArriveRunPlanList.forEach(arrive=>{ - this.addModel.planParamList.push({ - runPlanCode:arrive.code, - arriveSectionCode:arrive.changeSectionCode - }); - }); - } + // const activeDepartRunPlanList = Object.values(activeDepartRunPlan).filter(activeDepart=>{ return activeDepart.changeSectionCode && activeDepart.changeSectionCode != activeDepart.sectionCode; }); + // if (activeDepartRunPlanList.length > 0) { + // activeDepartRunPlanList.forEach(depart=>{ + // this.addModel.planParamList.push({ + // runPlanCode:depart.code, + // departSectionCode:depart.changeSectionCode + // }); + // }); + // } + // const activeArriveRunPlanList = Object.values(activeArriveRunPlan).filter(activeArrive=>{ return activeArrive.changeSectionCode && activeArrive.changeSectionCode != activeArrive.sectionCode; }); + // if (activeArriveRunPlanList.length > 0) { + // activeArriveRunPlanList.forEach(arrive=>{ + // this.addModel.planParamList.push({ + // runPlanCode:arrive.code, + // arriveSectionCode:arrive.changeSectionCode + // }); + // }); + // } this.dialogShow = true; this.$nextTick(function () { this.$store.dispatch('training/emitTipFresh'); @@ -200,21 +200,21 @@ export default { this.$store.dispatch('training/emitTipFresh'); }, commit() { - if (this.addModel.planParamList.length > 0) { - const params = this.addModel; - this.loading = true; - commitOperate(menuOperate.CTC.batchModifyTrackSection, params, 3).then(({valid})=>{ - this.loading = false; - if (valid) { - this.$emit('closeFlash'); - this.doClose(); - } - }).catch(() => { - this.loading = false; + // if (this.addModel.planParamList.length > 0) { + const params = this.addModel; + this.loading = true; + commitOperate(menuOperate.CTC.stationSendRunplan, params, 3).then(({valid})=>{ + this.loading = false; + if (valid) { + // this.$emit('closeFlash'); this.doClose(); - this.$emit('noticeInfo'); - }); - } + } + }).catch(() => { + this.loading = false; + this.doClose(); + this.$emit('noticeInfo'); + }); + // } // * @param stationCode 车站编码 // * @param runPlanCode 运行编码 diff --git a/src/jmapNew/theme/datie_02/menus/runplanPane.vue b/src/jmapNew/theme/datie_02/menus/runplanPane.vue index 036da1041..cdaf3bf9a 100644 --- a/src/jmapNew/theme/datie_02/menus/runplanPane.vue +++ b/src/jmapNew/theme/datie_02/menus/runplanPane.vue @@ -88,7 +88,7 @@ width="100" > @@ -483,7 +483,8 @@ - + + @@ -542,8 +543,8 @@ export default { Rph:Rph, tableData:[], filterSectionList:[], - activeDepartRunPlan:{}, - activeArriveRunPlan:{}, + // activeDepartRunPlan:{}, + // activeArriveRunPlan:{}, currentRailwaySimulationRunplan:{}, // radioSelected:'' currentRow:null @@ -560,11 +561,21 @@ export default { }, '$store.state.socket.railwaySimulationRunplanSendChange': function (val) { this.getRailwaySimulationRunplanSend(); + }, + '$store.state.socket.changedCtcRunplanMap': function (val) { + this.judgeStationCtcRunplan(); } - // railwaySimulationRunplanSendMap - // railwaySimulationRunplanSendChange }, methods:{ + judgeStationCtcRunplan() { + const changedCtcRunplanMap = this.$store.state.socket.changedCtcRunplanMap; + const stationCode = this.$store.state.training.roleDeviceCode; + if (changedCtcRunplanMap[stationCode]) { + document.getElementById('sendRunplan').classList.add('active'); + } else { + this.closeFlash(); + } + }, getRailwaySimulationRunplanSend() { const stationCode = this.$store.state.training.roleDeviceCode; const railwaySimulationRunplanSendMap = this.$store.state.socket.railwaySimulationRunplanSendMap; @@ -573,8 +584,8 @@ export default { document.getElementById('stageRunplan').classList.add('active'); this.currentRailwaySimulationRunplan = railwaySimulationRunplanSendMap; } else { - const sendRunplan = document.getElementById('stageRunplan').className; - document.getElementById('stageRunplan').className = sendRunplan.replace('active', ''); + const stageRunplan = document.getElementById('stageRunplan').className; + document.getElementById('stageRunplan').className = stageRunplan.replace('active', ''); } }, loadData() { @@ -611,6 +622,7 @@ export default { this.loadData(); this.isShow = true; this.getRailwaySimulationRunplanSend(); + this.judgeStationCtcRunplan(); window.addEventListener('keydown', this.handleKeyDown); // arriveRunPlan: Object // code: "00110010" @@ -654,7 +666,8 @@ export default { }, sendRunplan() { if (document.getElementById('sendRunplan').className.includes('active')) { - this.$refs.sendRunplan.doShow(this.tableData, this.activeDepartRunPlan, this.activeArriveRunPlan, this.filterSectionList); + this.$refs.sendRunplan.doShow(this.tableData, this.filterSectionList); + // this.activeDepartRunPlan, this.activeArriveRunPlan, } }, stageRunplan() { @@ -664,27 +677,62 @@ export default { } }, focusDepartRunPlan(event, row) { - this.activeDepartRunPlan[row.code] = {sectionCode:event, code:row.code}; + // this.activeDepartRunPlan[row.code] = {sectionCode:event, code:row.code}; }, // 发车股道 changeDepartRunPlan(event, row, index) { - const activeDepart = this.activeDepartRunPlan[row.code]; - if (activeDepart) { - activeDepart.changeSectionCode = event; - document.getElementById('sendRunplan').classList.add('active'); - } + const params = { + stationCode:row.stationCode, + runPlanCode:row.code, + arriveSection:'', + departSection:row.departRunPlan.sectionCode, + force:1 + }; + commitOperate(menuOperate.CTC.modifyTrackSection, params, 3).then(({valid})=>{ + this.loading = false; + if (valid) { + } + }).catch(() => { + this.loading = false; + }); + // const activeDepart = this.activeDepartRunPlan[row.code]; + // if (activeDepart) { + // activeDepart.changeSectionCode = event; + // document.getElementById('sendRunplan').classList.add('active'); + // } // console.log(event, this.tableData[index].departRunPlan.sectionCode, row.departRunPlan.sectionCode, '------'); }, focusArriveRunPlan(event, row) { - this.activeArriveRunPlan[row.code] = {sectionCode:event, code:row.code}; + // this.activeArriveRunPlan[row.code] = {sectionCode:event, code:row.code}; }, changeArriveRunPlan(event, row, index) { - const activeArrive = this.activeArriveRunPlan[row.code]; - if (activeArrive) { - activeArrive.changeSectionCode = event; - // if(activeArrive.changeSectionCode!=) - document.getElementById('sendRunplan').classList.add('active'); - } + const params = { + stationCode:row.stationCode, + runPlanCode:row.code, + arriveSection:row.arriveRunPlan.sectionCode, + departSection:'', + force:1 + }; + // stationCode 车站编码 + // runPlanCode 运行计划 + // arriveSection 到达股道 + // departSection 出发股道 + // force 是否强制 + // element.arriveRunPlan.sectionCode + // element.departRunPlan.sectionCode + commitOperate(menuOperate.CTC.modifyTrackSection, params, 3).then(({valid})=>{ + this.loading = false; + if (valid) { + } + }).catch(() => { + this.loading = false; + }); + // const activeArrive = this.activeArriveRunPlan[row.code]; + // if (activeArrive) { + // activeArrive.changeSectionCode = event; + // // if(activeArrive.changeSectionCode!=) + // document.getElementById('sendRunplan').classList.add('active'); + // } // CTC_MODIFY_TRACK_SECTION // 参数: // * @param stationCode 车站编码 @@ -704,18 +752,18 @@ export default { // force 是否强制 0:不强制。1:强制 }, closeDialog() { - this.closeFlash(); + // this.closeFlash(); this.doClose(); - this.activeDepartRunPlan = {}; - this.activeArriveRunPlan = {}; + // this.activeDepartRunPlan = {}; + // this.activeArriveRunPlan = {}; }, closeFlash() { const sendRunplan = document.getElementById('sendRunplan').className; document.getElementById('sendRunplan').className = sendRunplan.replace('active', ''); }, closeStageFlash() { - const sendRunplan = document.getElementById('stageRunplan').className; - document.getElementById('stageRunplan').className = sendRunplan.replace('active', ''); + const stageRunplan = document.getElementById('stageRunplan').className; + document.getElementById('stageRunplan').className = stageRunplan.replace('active', ''); const stationCode = this.$store.state.training.roleDeviceCode; this.$store.dispatch('socket/deleteRailwaySimulationRunplan', stationCode); }, @@ -1028,6 +1076,11 @@ export default { -moz-animation:changeColor 1s infinite; /* Firefox */ -webkit-animation:changeColor 1s infinite; /* Safari and Chrome */ } +.flashTrip{ + animation:flashColor 1s infinite; + -moz-animation:flashColor 1s infinite; /* Firefox */ + -webkit-animation:flashColor 1s infinite; /* Safari and Chrome */ +} @keyframes changeColor { 0% {background:#f0f0f0;} @@ -1046,6 +1099,24 @@ export default { 50% {background:#ff1900;} 100% {background:#f0f0f0;} } +@keyframes flashColor +{ + 0% {background:#fff;} + 50% {background:#ff1900;} + 100% {background:#fff;} +} +@-moz-keyframes flashColor /* Firefox */ +{ + 0% {background:#fff;} + 50% {background:#ff1900;} + 100% {background:#fff;} +} +@-webkit-keyframes flashColor /* Safari and Chrome */ +{ + 0% {background:#fff;} + 50% {background:#ff1900;} + 100% {background:#fff;} +} .eachRpImage{display: inline-block;vertical-align: top;margin-top: 3px;} .eachRpImageIn{height:26px;cursor: pointer;} .rpMenuPop{ diff --git a/src/scripts/cmdPlugin/CommandEnum.js b/src/scripts/cmdPlugin/CommandEnum.js index f88a38649..40129d634 100644 --- a/src/scripts/cmdPlugin/CommandEnum.js +++ b/src/scripts/cmdPlugin/CommandEnum.js @@ -395,7 +395,12 @@ export default { CTC_ASSIST_PRESS_BLOCK:{value: 'ASSIST_PRESS_BLOCK', label: '阻塞'}, CTC_ASSIST_PRESS_RESTORE:{value: 'ASSIST_PRESS_RESTORE', label: '复原'}, CTC_ASSIST_PRESS_ACCIDENT:{value: 'ASSIST_PRESS_ACCIDENT', label: '事故'}, - CTC_BATCH_MODIFY_RUN_PLAN:{value: 'CTC_BATCH_MODIFY_RUN_PLAN', label: '批量修改股道'}, + + // CTC_BATCH_MODIFY_RUN_PLAN:{value: 'CTC_BATCH_MODIFY_RUN_PLAN', label: '批量修改股道'}, + CTC_MODIFY_SECTION:{value: 'CTC_MODIFY_SECTION', label: '修改股道'}, + CTC_STATION_SEND_OUT_RUN_PLAN:{value: 'CTC_STATION_SEND_OUT_RUN_PLAN', label: '车站发送计划'}, + CTC_CANCEL_TWINKLE:{value: 'CTC_CANCEL_TWINKLE', label: '车站取消红闪'}, + CTC_REMOVE_RUN_PLAN:{value: 'CTC_REMOVE_RUN_PLAN', label: '移除行车日志'}, CTC_MODIFY_ADJACENT_STATION:{value: 'CTC_MODIFY_ADJACENT_STATION', label: '修改邻站信息'}, CTC_MODIFY_TRIP_NUMBER:{value: 'CTC_MODIFY_TRIP_NUMBER', label: '修改车次号(大铁CTC)'}, diff --git a/src/scripts/cmdPlugin/OperationHandler.js b/src/scripts/cmdPlugin/OperationHandler.js index 6a3636d19..dec078cbb 100644 --- a/src/scripts/cmdPlugin/OperationHandler.js +++ b/src/scripts/cmdPlugin/OperationHandler.js @@ -3667,11 +3667,18 @@ export const OperationEvent = { domId: '_Tips-CTC-AssistPressAccident-Menu{TOP}' } }, - // 批量修改股道 - batchModifyTrackSection:{ + // // 批量修改股道 + // batchModifyTrackSection:{ + // menu: { + // operation: '1111', + // domId: '_Tips-CTC-batchModifyTrackSection-Menu{TOP}' + // } + // }, + // 修改股道 + modifyTrackSection:{ menu: { operation: '1111', - domId: '_Tips-CTC-batchModifyTrackSection-Menu{TOP}' + domId: '_Tips-CTC-modifyTrackSection-Menu{TOP}' } }, // 移除行车日志 @@ -3820,6 +3827,20 @@ export const OperationEvent = { operation: '1132', domId: '_Tips-CTC-modifyDispatcherLogerRpSection-Menu{TOP}' } + }, + // 车站发送计划 + stationSendRunplan:{ + menu: { + operation: '1133', + domId: '_Tips-CTC-stationSendRunplan-Menu{TOP}' + } + }, + // 车站取消红闪 + stationCancleTwinkle:{ + menu: { + operation: '1134', + domId: '_Tips-CTC-stationCancleTwinkle-Menu{TOP}' + } } }, RailCommand: { diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index 125128086..6622a4c52 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -269,6 +269,11 @@ function handle(state, data) { case 'SIMULATION_RAIL_CTC_DISPATCH_COMMAND': state.dispatchCommandMsg = msg; break; + // 车站发送计划信息 + case 'SIMULATION_CTC_RUN_PLAN_CONFIRM_SEND': + state.changedCtcRunplanMap = msg; + break; + // // // 大铁项目 调度台 运行图信息 初始化消息 // case 'SIMULATION_RAILWAY_RUN_PLAN_INIT': // state.railwaySimulationRpMsg = {}; @@ -445,6 +450,7 @@ const socket = { loggedOutMsg: '', railCtcStatusMsg: {}, // 占线板信息 dispatchCommandMsg: {}, // 调度命令信息 + changedCtcRunplanMap:{}, // 大铁项目 ctc 被修改运行计划的车站信息 railCtcRunplanInitMsg:{}, // 大铁项目 ctc 运行图初始化信息 railCtcRunplanChange:0, // 大铁项目 ctc 运行图信息变化 railCtcStationManageRpMsg:{}, // 大铁项目 ctc 车务管理 端运行图信息