运行图编制 代码调整
This commit is contained in:
parent
42b59cc752
commit
7ac00f45dc
@ -213,7 +213,7 @@ export default {
|
|||||||
tripNumber: '',
|
tripNumber: '',
|
||||||
planId: '',
|
planId: '',
|
||||||
serviceNumber: '',
|
serviceNumber: '',
|
||||||
startTbFront: false,
|
startTbFront: false,
|
||||||
endTbFront: false
|
endTbFront: false
|
||||||
},
|
},
|
||||||
tripNumberList: [{ value: '', label: this.$t('planMonitor.automatic') }],
|
tripNumberList: [{ value: '', label: this.$t('planMonitor.automatic') }],
|
||||||
@ -281,8 +281,16 @@ export default {
|
|||||||
endStationFilterMap[routing.endStationCode] = {text:formatName(routing.endStationCode), value:routing.endStationCode};
|
endStationFilterMap[routing.endStationCode] = {text:formatName(routing.endStationCode), value:routing.endStationCode};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.startStationFilters = Object.values(startStationFilterMap);
|
this.startStationFilters = Object.values(startStationFilterMap).sort((a, b)=>{
|
||||||
this.endStationFilters = Object.values(endStationFilterMap);
|
const startStationA = this.$store.getters['map/getDeviceByCode'](a.value);
|
||||||
|
const startStationB = this.$store.getters['map/getDeviceByCode'](b.value);
|
||||||
|
return startStationA.kmRange - startStationB.kmRange;
|
||||||
|
});
|
||||||
|
this.endStationFilters = Object.values(endStationFilterMap).sort((a, b)=>{
|
||||||
|
const endStationA = this.$store.getters['map/getDeviceByCode'](a.value);
|
||||||
|
const endStationB = this.$store.getters['map/getDeviceByCode'](b.value);
|
||||||
|
return endStationA.kmRange - endStationB.kmRange;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
getMapStationRunUser(mapId).then(resp =>{
|
getMapStationRunUser(mapId).then(resp =>{
|
||||||
@ -324,10 +332,10 @@ export default {
|
|||||||
compuntedRunTime(list, index, runLevel) {
|
compuntedRunTime(list, index, runLevel) {
|
||||||
let runTime = 0;
|
let runTime = 0;
|
||||||
|
|
||||||
if ((index == 0 && String(this.addModel.startTbFront) != 'undefined') ||
|
if ((index == 0 && String(this.addModel.startTbFront) != 'undefined') ||
|
||||||
(index == list.length-1 && String(this.addModel.endTbFront) != 'undefined')) {
|
(index == list.length - 1 && String(this.addModel.endTbFront) != 'undefined')) {
|
||||||
return 0
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index < list.length - 1) {
|
if (index < list.length - 1) {
|
||||||
const stopStationObj = this.stopStationMap[[list[index].sectionCode, list[index + 1].sectionCode].toString()];
|
const stopStationObj = this.stopStationMap[[list[index].sectionCode, list[index + 1].sectionCode].toString()];
|
||||||
@ -371,14 +379,14 @@ export default {
|
|||||||
elem.speedLevelTime = realRunlevel;
|
elem.speedLevelTime = realRunlevel;
|
||||||
elem.speedLevel = runLevelObj.label;
|
elem.speedLevel = runLevelObj.label;
|
||||||
|
|
||||||
let fronTime = 0;
|
let fronTime = 0;
|
||||||
if (index == 0 && String(this.addModel.startTbFront) == 'false') {
|
if (index == 0 && String(this.addModel.startTbFront) == 'false') {
|
||||||
const data = this.reentryData[elem.stationCode]||{};
|
const data = this.reentryData[elem.stationCode] || {};
|
||||||
fronTime = data.tbTo || 0;
|
fronTime = data.tbTo || 0;
|
||||||
} else if (index == list.length - 2 && String(this.addModel.endTbFront) == 'false') {
|
} else if (index == list.length - 2 && String(this.addModel.endTbFront) == 'false') {
|
||||||
const data = this.reentryData[list[index+1].stationCode]||{};
|
const data = this.reentryData[list[index + 1].stationCode] || {};
|
||||||
fronTime = data.tbTo || 0;
|
fronTime = data.tbTo || 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
tempTime = tempTime + fronTime + elem.stopTime + elem.speedLevelTime;
|
tempTime = tempTime + fronTime + elem.stopTime + elem.speedLevelTime;
|
||||||
});
|
});
|
||||||
@ -397,8 +405,8 @@ export default {
|
|||||||
this.addModel.endSectionCode = row.endSectionCode;
|
this.addModel.endSectionCode = row.endSectionCode;
|
||||||
this.addModel.startSectionCode = row.startSectionCode;
|
this.addModel.startSectionCode = row.startSectionCode;
|
||||||
this.addModel.routingCode = row.code;
|
this.addModel.routingCode = row.code;
|
||||||
this.addModel.startTbFront = row.startTbFront;
|
this.addModel.startTbFront = row.startTbFront;
|
||||||
this.addModel.endTbFront = row.endTbFront;
|
this.addModel.endTbFront = row.endTbFront;
|
||||||
this.computedDetailList('routingCode');
|
this.computedDetailList('routingCode');
|
||||||
},
|
},
|
||||||
handleCommit() {
|
handleCommit() {
|
||||||
|
Loading…
Reference in New Issue
Block a user