大铁项目 发送发车预告 代码调整

This commit is contained in:
joylink_cuiweidong 2022-06-15 13:32:42 +08:00
parent 30ca5c7cb1
commit e697233c6c
2 changed files with 47 additions and 13 deletions

View File

@ -149,6 +149,11 @@
</div> </div>
<div class="runplanTableNo">5</div> <div class="runplanTableNo">5</div>
</template> </template>
<template slot-scope="scope">
<div v-if="scope.row.arriveRunPlan&&scope.row.arriveRunPlan.adjacentMessage==1 && scope.row.passenger=='PASSENGER'" class="passagerTrain" />
<div v-if="scope.row.arriveRunPlan&&scope.row.arriveRunPlan.adjacentMessage==1 && scope.row.passenger=='GOODS_TRAIN'" class="goodTrain" />
<div v-if="scope.row.arriveRunPlan&&scope.row.arriveRunPlan.adjacentMessage==2 ">{{ scope.row.adjacentMessage }}</div>
</template>
</el-table-column> </el-table-column>
<el-table-column width="70"> <el-table-column width="70">
<template slot="header"> <template slot="header">
@ -313,6 +318,11 @@
</div> </div>
<div class="runplanTableNo">23</div> <div class="runplanTableNo">23</div>
</template> </template>
<template slot-scope="scope">
<div v-if="scope.row.departRunPlan&&scope.row.departRunPlan.adjacentMessage==1 && scope.row.passenger=='PASSENGER'" class="passagerTrain" />
<div v-if="scope.row.departRunPlan&&scope.row.departRunPlan.adjacentMessage==1 && scope.row.passenger=='GOODS_TRAIN'" class="goodTrain" />
<div v-if="scope.row.departRunPlan&&scope.row.departRunPlan.adjacentMessage==2 ">{{ scope.row.adjacentMessage }}</div>
</template>
</el-table-column> </el-table-column>
<el-table-column width="70"> <el-table-column width="70">
<template slot="header"> <template slot="header">
@ -559,6 +569,7 @@ export default {
this.tableData = []; this.tableData = [];
this.loadData(); this.loadData();
this.isShow = true; this.isShow = true;
window.addEventListener('keydown', this.handleKeyDown);
// arriveRunPlan: Object // arriveRunPlan: Object
// code: "00110010" // code: "00110010"
// departRunPlan: Object // departRunPlan: Object
@ -572,6 +583,19 @@ export default {
this.isShow = false; this.isShow = false;
this.rpMenuPopShow = false; this.rpMenuPopShow = false;
this.currentRow = null; this.currentRow = null;
window.removeEventListener('keydown', this.handleKeyDown);
},
handleKeyDown(event) {
event.stopPropagation();
event.preventDefault();
switch (event.code) {
case 'F1':
this.sendNotcie();
break;
case 'F2':
this.agreeNotcie();
break;
}
}, },
sendRunplan() { sendRunplan() {
if (document.getElementById('sendRunplan').className.includes('active')) { if (document.getElementById('sendRunplan').className.includes('active')) {
@ -680,13 +704,13 @@ export default {
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}, 2).then(({valid})=>{
this.loading = false; this.loading = false;
this.clearRpRow(); this.clearRpRow();
if (valid) { // if (valid) {
this.doClose(); // this.doClose();
} // }
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
this.clearRpRow(); this.clearRpRow();
this.doClose(); // this.doClose();
this.noticeInfo(); this.noticeInfo();
}); });
@ -699,12 +723,12 @@ export default {
this.loading = false; this.loading = false;
this.clearRpRow(); this.clearRpRow();
if (valid) { if (valid) {
this.doClose(); // this.doClose();
} }
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
this.clearRpRow(); this.clearRpRow();
this.doClose(); // this.doClose();
this.noticeInfo(); this.noticeInfo();
}); });
} }
@ -725,7 +749,7 @@ export default {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
z-index: 38; z-index: 2010;
margin-top: 34px; margin-top: 34px;
display: block; display: block;
overflow: scroll; overflow: scroll;
@ -1021,4 +1045,6 @@ export default {
background-color: #6aa8ec; background-color: #6aa8ec;
color: #fff; color: #fff;
} }
.passagerTrain{background:#f00}
.goodTrain{background:#00f}
</style> </style>

View File

@ -209,7 +209,8 @@ function handle(state, data) {
const tripNumberAr = element.arriveRunPlan && element.arriveRunPlan.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 (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; } if (tripNumberAr) { parseInt(tripNumberAr[tripNumberAr.length - 1]) % 2 == 0 ? element.arriveRunPlan.up = tripNumberAr : element.arriveRunPlan.down = tripNumberAr; }
state.railCtcRunplanInitMsg[element.code] = element; const code = element.stationCode + '' + element.code;
state.railCtcRunplanInitMsg[code] = element;
}); });
break; break;
// 大铁项目 ctc 运行图改变信息 // 大铁项目 ctc 运行图改变信息
@ -217,11 +218,18 @@ function handle(state, data) {
msg.forEach(element => { msg.forEach(element => {
const tripNumberDe = element.departRunPlan && element.departRunPlan.tripNumber; const tripNumberDe = element.departRunPlan && element.departRunPlan.tripNumber;
const tripNumberAr = element.arriveRunPlan && element.arriveRunPlan.tripNumber; const tripNumberAr = element.arriveRunPlan && element.arriveRunPlan.tripNumber;
element.departRunPlan.up = ''; if (tripNumberDe) {
element.departRunPlan.down = ''; element.departRunPlan.up = '';
if (tripNumberDe) { parseInt(tripNumberDe[tripNumberDe.length - 1]) % 2 == 0 ? element.departRunPlan.up = tripNumberDe : element.departRunPlan.down = tripNumberDe; } element.departRunPlan.down = '';
if (tripNumberAr) { parseInt(tripNumberAr[tripNumberAr.length - 1]) % 2 == 0 ? element.arriveRunPlan.up = tripNumberAr : element.arriveRunPlan.down = tripNumberAr; } parseInt(tripNumberDe[tripNumberDe.length - 1]) % 2 == 0 ? element.departRunPlan.up = tripNumberDe : element.departRunPlan.down = tripNumberDe;
state.railCtcRunplanInitMsg[element.code] = copyAssign(state.railCtcRunplanInitMsg[element.code], element); }
if (tripNumberAr) {
element.arriveRunPlan.up = '';
element.arriveRunPlan.down = '';
parseInt(tripNumberAr[tripNumberAr.length - 1]) % 2 == 0 ? element.arriveRunPlan.up = tripNumberAr : element.arriveRunPlan.down = tripNumberAr;
}
const code = element.stationCode + '' + element.code;
state.railCtcRunplanInitMsg[code] = copyAssign(state.railCtcRunplanInitMsg[code], element);
}); });
state.railCtcRunplanChange++; state.railCtcRunplanChange++;
break; break;