代码调整

This commit is contained in:
joylink_cuiweidong 2022-07-07 15:29:37 +08:00
parent cf7915cef3
commit 9c9697d706

View File

@ -77,6 +77,7 @@
border border
height="695" height="695"
highlight-current-row highlight-current-row
:row-class-name="judgeColor"
style="width: 100%;border:1px #ccc solid" style="width: 100%;border:1px #ccc solid"
@cell-click="selectedTripNumber" @cell-click="selectedTripNumber"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
@ -88,7 +89,7 @@
width="100" width="100"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div :class="scope.row.twinkle?'flashTrip noChange':'noChange'">{{ scope.row.tripNumber }} {{ scope.row.delete?'(删)':scope.row.twinkle?'(*)':'' }}</div> <div :class="scope.row.twinkle?'flashTrip noChange':'noChange'" style="color:#000">{{ scope.row.tripNumber }} {{ scope.row.delete?'(删)':scope.row.twinkle?'(*)':'' }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到 达"> <el-table-column label="到 达">
@ -135,6 +136,7 @@
popper-class="stationSelect" popper-class="stationSelect"
@change="changeArriveRunPlan($event,scope.row,scope.$index)" @change="changeArriveRunPlan($event,scope.row,scope.$index)"
> >
<!-- :class="judgeColor({scope.row,scope.$index})" -->
<el-option <el-option
v-for="item in filterSectionList" v-for="item in filterSectionList"
:key="item.code" :key="item.code"
@ -183,7 +185,7 @@
<div class="runplanTableNo">8</div> <div class="runplanTableNo">8</div>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.arriveRunPlan" :class="scope.row.arriveRunPlan.finish? (scope.row.passenger=='PASSENGER'?'fontRed':'fontBlue'):'fontBlack'"> <div v-if="scope.row.arriveRunPlan" style="line-height:28px" :class="scope.row.arriveRunPlan.finish? (scope.row.passenger=='PASSENGER'?'fontRed':'fontBlue'):'fontBlack'">
{{ scope.row.arriveRunPlan.actualTime }} {{ scope.row.arriveRunPlan.actualTime }}
</div> </div>
</template> </template>
@ -592,6 +594,25 @@ export default {
} }
}, },
methods:{ methods:{
judgeColor({row, rowIndex}) {
if (row.effect) {
if (row.passenger == 'PASSENGER') {
return 'fontRed';
} else if (row.passenger == 'GOODS_TRAIN') {
return 'fontBlue';
} else {
return 'fontBlack';
}
} else {
if (row.passenger == 'PASSENGER') {
return 'fontPink';
} else if (row.passenger == 'GOODS_TRAIN') {
return 'fontLightBlue';
} else {
return 'fontBlack';
}
}
},
judgeStationCtcRunplan() { judgeStationCtcRunplan() {
const changedCtcRunplanMap = this.$store.state.socket.changedCtcRunplanMap; const changedCtcRunplanMap = this.$store.state.socket.changedCtcRunplanMap;
const stationCode = this.$store.state.training.roleDeviceCode; const stationCode = this.$store.state.training.roleDeviceCode;
@ -1235,4 +1256,6 @@ export default {
.fontRed{color:#f00} .fontRed{color:#f00}
.fontBlue{color:#00f} .fontBlue{color:#00f}
.fontBlack{color:#000} .fontBlack{color:#000}
.fontPink{color: #FF1493;}
.fontLightBlue{color: #87CEFA;}
</style> </style>