调整西安运行图流程
This commit is contained in:
parent
bbae7bfb1b
commit
699053f46f
@ -277,20 +277,18 @@ export default {
|
||||
}
|
||||
|
||||
/** 计算折返点*/
|
||||
var num = this.computedReentryNumber(elem.tripNumber);
|
||||
var nextPoint = [parseInt(time), this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false, num), elem.stationCode, elem.directionCode];
|
||||
/** 添加车组号数据到对应的服务图数据中*/
|
||||
serie.data.push(nextPoint);
|
||||
// var num = this.computedReentryNumber(elem.tripNumber);
|
||||
var nextPoint = [parseInt(time), this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, elem.directionCode];
|
||||
|
||||
if (serie.data.length > 0) {
|
||||
var lastPoint = serie.data[serie.data.length - 1];
|
||||
// if (elem.reentry) {
|
||||
// console.log(1111, '折返');
|
||||
// }
|
||||
if (lastPoint[3] !== nextPoint[3]) {
|
||||
serie.data.push([lastPoint[0], this.getYvalueByDirectionCode(lastPoint[1], lastPoint[3], num), lastPoint[2], lastPoint[3]]);
|
||||
serie.data.push([nextPoint[0], this.getYvalueByDirectionCode(nextPoint[1], nextPoint[3], num), nextPoint[2], nextPoint[3]]);
|
||||
serie.data.push([lastPoint[0], this.getYvalueByDirectionCode(lastPoint[1], lastPoint[3]), lastPoint[2], lastPoint[3]]);
|
||||
serie.data.push([nextPoint[0], this.getYvalueByDirectionCode(nextPoint[1], lastPoint[3]), lastPoint[2], nextPoint[3]]);
|
||||
}
|
||||
}
|
||||
/** 添加车组号数据到对应的服务图数据中*/
|
||||
serie.data.push(nextPoint);
|
||||
|
||||
/** 保证原始数据排序*/
|
||||
serie.data.sort((a, b) => {
|
||||
@ -354,9 +352,9 @@ export default {
|
||||
/** 根据方向计算y折返偏移量*/
|
||||
getYvalueByDirectionCode(defaultVlue, directionCode, num) {
|
||||
if (directionCode == '1') {
|
||||
defaultVlue -= this.EdgeHeight / 2 * num;
|
||||
defaultVlue -= this.EdgeHeight / 2;
|
||||
} else if (directionCode == '2') {
|
||||
defaultVlue += this.EdgeHeight / 2 * num;
|
||||
defaultVlue += this.EdgeHeight / 2;
|
||||
}
|
||||
|
||||
return defaultVlue;
|
||||
|
@ -220,22 +220,12 @@ export default {
|
||||
const initialPlanData = this.$store.state.runPlan.initialPlanData;
|
||||
data.forEach(item => {
|
||||
if (item && initialPlanData[item.serviceNumber]) {
|
||||
// if (initialPlanData[item.serviceNumber]) {
|
||||
// console.log(this.runSeries, data, '=====');
|
||||
// debugger;
|
||||
// }
|
||||
Object.keys(initialPlanData[item.serviceNumber].trainMap).forEach(ele => {
|
||||
if (initialPlanData[item.serviceNumber].trainMap[ele + ''].tripNumber == item.tripNumber) {
|
||||
item.directionCode = initialPlanData[item.serviceNumber].trainMap[ele + ''].directionCode;
|
||||
// item.reentry = initialPlanData[item.serviceNumber].trainMap[ele + ''].reentry;
|
||||
// if (item.reentry) {
|
||||
// debugger;
|
||||
// }
|
||||
// item.stationCode = initialPlanData[item.serviceNumber].trainMap[ele + ''].stationCode;
|
||||
}
|
||||
});
|
||||
item.secondTime = item.second;
|
||||
// item.backup = initialPlanData[item.serviceNumber].backup;
|
||||
}
|
||||
});
|
||||
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
|
||||
|
Loading…
Reference in New Issue
Block a user