代码调整

This commit is contained in:
joylink_cuiweidong 2022-08-29 13:37:50 +08:00
parent 7388fc707f
commit 2310b54e11
2 changed files with 20 additions and 4 deletions

View File

@ -242,10 +242,18 @@ export default {
this.mapStationDirectionMap = mapStationDirectionMap;
const mapStationDirectionList = Object.values(mapStationDirectionMap);
this.enterDirList = mapStationDirectionList.filter(stationDirection=>{
return stationDirection.runStatus == 'R' && stationDirection.stationCode == stationCode;
return stationDirection.stationCode == stationCode && (
stationDirection.ioDirection == 'DOWN_IN_STATION' ||
stationDirection.ioDirection == 'UP_IN_STATION' ||
stationDirection.ioDirection == ' BOTH_WAY_STATION'
);
});
this.outDirList = mapStationDirectionList.filter(stationDirection=>{
return stationDirection.runStatus == 'D' && stationDirection.stationCode == stationCode;
return stationDirection.stationCode == stationCode && (
stationDirection.ioDirection == 'DOWN_OUT_STATION' ||
stationDirection.ioDirection == 'UP_OUT_STATION' ||
stationDirection.ioDirection == ' BOTH_WAY_STATION'
);
});
if (row) {
this.addModel = Object.assign({}, row);

View File

@ -206,10 +206,18 @@ export default {
this.mapStationDirectionMap = mapStationDirectionMap;
const mapStationDirectionList = Object.values(mapStationDirectionMap);
this.enterDirList = mapStationDirectionList.filter(stationDirection=>{
return stationDirection.runStatus == 'R' && stationDirection.stationCode == stationCode;
return stationDirection.stationCode == stationCode && (
stationDirection.ioDirection == 'DOWN_IN_STATION' ||
stationDirection.ioDirection == 'UP_IN_STATION' ||
stationDirection.ioDirection == ' BOTH_WAY_STATION'
);
});
this.outDirList = mapStationDirectionList.filter(stationDirection=>{
return stationDirection.runStatus == 'D' && stationDirection.stationCode == stationCode;
return stationDirection.stationCode == stationCode && (
stationDirection.ioDirection == 'DOWN_OUT_STATION' ||
stationDirection.ioDirection == 'UP_OUT_STATION' ||
stationDirection.ioDirection == ' BOTH_WAY_STATION'
);
});
this.addModel.stationCode = stationCode;
this.filterSectionList = Object.values(filterSectionMap);