大铁项目 ctc 行车日志 增加 修改股道 发送计划 取消红闪 指令

修改 发送计划按钮闪烁的标识
This commit is contained in:
joylink_cuiweidong 2022-07-06 13:45:41 +08:00
parent 78c3e41f9c
commit 00f1d98829
6 changed files with 191 additions and 73 deletions

View File

@ -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:{

View File

@ -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,13 +200,13 @@ export default {
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.addModel.planParamList.length > 0) {
// if (this.addModel.planParamList.length > 0) {
const params = this.addModel;
this.loading = true;
commitOperate(menuOperate.CTC.batchModifyTrackSection, params, 3).then(({valid})=>{
commitOperate(menuOperate.CTC.stationSendRunplan, params, 3).then(({valid})=>{
this.loading = false;
if (valid) {
this.$emit('closeFlash');
// this.$emit('closeFlash');
this.doClose();
}
}).catch(() => {
@ -214,7 +214,7 @@ export default {
this.doClose();
this.$emit('noticeInfo');
});
}
// }
// * @param stationCode
// * @param runPlanCode

View File

@ -88,7 +88,7 @@
width="100"
>
<template slot-scope="scope">
<div>{{ scope.row.tripNumber }} {{ scope.row.delete?'(删)':'' }}</div>
<div :class="scope.row.twinkle?'flashTrip':''">{{ scope.row.tripNumber }} {{ scope.row.delete?'(删)':scope.row.twinkle?'(*)':'' }}</div>
</template>
</el-table-column>
<el-table-column label="到 达">
@ -483,7 +483,8 @@
</div>
</div>
<send-runplan ref="sendRunplan" @closeFlash="closeFlash" @noticeInfo="noticeInfo" />
<send-runplan ref="sendRunplan" @noticeInfo="noticeInfo" />
<!-- @closeFlash="closeFlash" -->
<stage-runplan ref="stageRunplan" @closeFlash="closeStageFlash" @noticeInfo="noticeInfo" />
<modify-adjacent-station ref="modifyAdjacentStation" @clearRpRow="clearRpRow" @noticeInfo="noticeInfo" />
<delete-runplan ref="deleteRunplan" @clearRpRow="clearRpRow" @noticeInfo="noticeInfo" />
@ -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{

View File

@ -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)'},

View File

@ -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: {

View File

@ -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 车务管理 端运行图信息