大铁项目 代码调整

This commit is contained in:
joylink_cuiweidong 2022-06-17 13:01:51 +08:00
parent 8b475d497f
commit 307600ec5e
2 changed files with 24 additions and 5 deletions

View File

@ -155,7 +155,7 @@
<div v-if="scope.row.arriveRunPlan&&scope.row.arriveRunPlan.adjacentMessage==2 ">{{ coverTime(scope.row.arriveRunPlan.adjacentMessageTime) }}</div>
</template>
</el-table-column>
<el-table-column width="70">
<el-table-column width="70" prop="arriveRunPlan.adjacentDepart">
<template slot="header">
<div class="runplanTableTname runplanThreeLevel"><br><br><br></div>
<div class="runplanTableNo">6</div>
@ -167,6 +167,9 @@
<div class="runplanTableTname runplanFourLevel"><br></div>
<div class="runplanTableNo">7</div>
</template>
<template slot-scope="scope">
<div v-if="scope.row.arriveRunPlan">{{ coverTime(scope.row.arriveRunPlan.planTime) }}</div>
</template>
</el-table-column>
<el-table-column width="70" prop="arriveRunPlan.actualTime">
<template slot="header">
@ -324,7 +327,7 @@
<div v-if="scope.row.departRunPlan&&scope.row.departRunPlan.adjacentMessage==2 ">{{ coverTime(scope.row.departRunPlan.adjacentMessageTime) }}</div>
</template>
</el-table-column>
<el-table-column width="70">
<el-table-column width="70" prop="departRunPlan.adjacentDepart">
<template slot="header">
<div class="runplanTableTname runplanThreeLevel"><br><br><br></div>
<div class="runplanTableNo">24</div>
@ -336,6 +339,9 @@
<div class="runplanTableTname runplanFourLevel"><br></div>
<div class="runplanTableNo">25</div>
</template>
<template slot-scope="scope">
<div v-if="scope.row.departRunPlan">{{ coverTime(scope.row.departRunPlan.planTime) }}</div>
</template>
</el-table-column>
<el-table-column width="70" prop="departRunPlan.actualTime">
<template slot="header">
@ -551,15 +557,27 @@ export default {
loadData() {
this.tableData = [];
const railCtcRunplanInitMsg = copyAssign({}, this.$store.state.socket.railCtcRunplanInitMsg);
this.tableData = Object.values(railCtcRunplanInitMsg).filter(data=>{
const tableData = Object.values(railCtcRunplanInitMsg).filter(data=>{
if (data.departRunPlan) {
data.departRunPlan.planTime = data.departRunPlan.planTime.split(':').splice(0, 2).join(':');
// data.departRunPlan.planTime = this.coverTime(data.departRunPlan.planTime);
if (data.departRunPlan.adjacentDepart) { data.departRunPlan.adjacentDepart = this.coverTime(data.departRunPlan.adjacentDepart); }
if (data.departRunPlan.actualTime) { data.departRunPlan.actualTime = this.coverTime(data.departRunPlan.actualTime); }
}
if (data.arriveRunPlan) {
data.arriveRunPlan.planTime = data.arriveRunPlan.planTime.split(':').splice(0, 2).join(':');
// data.arriveRunPlan.planTime = this.coverTime(data.arriveRunPlan.planTime);
if (data.arriveRunPlan.adjacentDepart) { data.arriveRunPlan.adjacentDepart = this.coverTime(data.arriveRunPlan.adjacentDepart); }
if (data.arriveRunPlan.actualTime) { data.arriveRunPlan.actualTime = this.coverTime(data.arriveRunPlan.actualTime); }
}
return data.stationCode == this.$store.state.training.roleDeviceCode;
});
this.tableData = tableData.sort((prev, next)=>{
const prevPlanTime = prev.departRunPlan ? prev.departRunPlan.planTime : prev.arriveRunPlan ? prev.arriveRunPlan.planTime : '00:00:00';
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();
});
},
coverTime(time) {
return time.split(':').splice(0, 2).join(':');
},
doShow() {
this.filterSectionList = [];

View File

@ -407,6 +407,7 @@ export default {
data.arriveTime = this.coverTime(data.arriveTime);
data.departTime = this.coverTime(data.departTime);
return data.stationCode == this.currentStationCode;
});
// stationCode
// trackSectionCode