diff --git a/src/jmapNew/theme/beijing_01/planConvert.js b/src/jmapNew/theme/beijing_01/planConvert.js index 204947410..cd8a4b848 100644 --- a/src/jmapNew/theme/beijing_01/planConvert.js +++ b/src/jmapNew/theme/beijing_01/planConvert.js @@ -129,19 +129,19 @@ export default { /** 计算非折返点车次点坐标集合*/ train.stationTimeList.forEach((elem, index) => { idx = index; - if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || - index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || - index > 0 && index < train.stationTimeList.length - 1) { + // if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || + // index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || + // index > 0 && index < train.stationTimeList.length - 1) { // ${train.directionCode} const aa = `${train.tripNumber}`; opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, pointdata.directionCode, false), elem.stationCode, aa]); - } + // } }); /** 计算折返点车次坐标点集合*/ if (!train.backup && train.reentry && service.tripNumberDataList[j + 1] && service.tripNumberDataList[j + 1].stationTimeList) { - lastPoint = train.stationTimeList[idx - 1]; - nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1]; + lastPoint = train.stationTimeList[train.stationTimeList.length - 1]; + nextPoint = service.tripNumberDataList[j + 1].stationTimeList[0]; num = this.computedReentryNumber(train.tripNumber); // ${train.directionCode} const aa = `${train.tripNumber}`; diff --git a/src/jmapNew/theme/chengdu_01/planConvert.js b/src/jmapNew/theme/chengdu_01/planConvert.js index 5dc1696f8..aa974e5bc 100644 --- a/src/jmapNew/theme/chengdu_01/planConvert.js +++ b/src/jmapNew/theme/chengdu_01/planConvert.js @@ -129,19 +129,19 @@ export default { /** 计算非折返点车次点坐标集合*/ train.stationTimeList.forEach((elem, index) => { idx = index; - if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || - index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || - index > 0 && index < train.stationTimeList.length - 1) { + // if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || + // index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || + // index > 0 && index < train.stationTimeList.length - 1) { // ${train.directionCode} const aa = `${train.tripNumber}`; opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, pointdata.directionCode, false), elem.stationCode, aa]); - } + // } }); /** 计算折返点车次坐标点集合*/ if (!train.backup && train.reentry && service.tripNumberDataList[j + 1] && service.tripNumberDataList[j + 1].stationTimeList) { - lastPoint = train.stationTimeList[idx - 1]; - nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1]; + lastPoint = train.stationTimeList[train.stationTimeList.length - 1]; + nextPoint = service.tripNumberDataList[j + 1].stationTimeList[0]; num = this.computedReentryNumber(train.tripNumber); // ${train.directionCode} const aa = `${train.tripNumber}`; diff --git a/src/jmapNew/theme/chengdu_03/planConvert.js b/src/jmapNew/theme/chengdu_03/planConvert.js index b401381ac..7bb7ae399 100644 --- a/src/jmapNew/theme/chengdu_03/planConvert.js +++ b/src/jmapNew/theme/chengdu_03/planConvert.js @@ -106,18 +106,18 @@ export default { /** 计算非折返点车次点坐标集合*/ train.stationTimeList.forEach((elem, index) => { idx = index; - if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || - index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || - index > 0 && index < train.stationTimeList.length - 1) { + // if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || + // index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || + // index > 0 && index < train.stationTimeList.length - 1) { const aa = `${train.tripNumber}`; opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, pointdata.directionCode, false), elem.stationCode, aa]); - } + // } }); /** 计算折返点车次坐标点集合*/ if (!train.backup && train.reentry && service.tripNumberDataList[j + 1] && service.tripNumberDataList[j + 1].stationTimeList) { - lastPoint = train.stationTimeList[idx - 1]; - nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1]; + lastPoint = train.stationTimeList[train.stationTimeList.length - 1]; + nextPoint = service.tripNumberDataList[j + 1].stationTimeList[0]; num = this.computedReentryNumber(train.tripNumber); const aa = `${train.tripNumber}`; opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, pointdata.directionCode, true, num), lastPoint.stationCode, aa]); diff --git a/src/jmapNew/theme/foshan_01/planConvert.js b/src/jmapNew/theme/foshan_01/planConvert.js index c1645c6b1..aa4695197 100644 --- a/src/jmapNew/theme/foshan_01/planConvert.js +++ b/src/jmapNew/theme/foshan_01/planConvert.js @@ -126,19 +126,19 @@ export default { /** 计算非折返点车次点坐标集合*/ train.stationTimeList.forEach((elem, index) => { idx = index; - if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || - index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || - index > 0 && index < train.stationTimeList.length - 1) { + // if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || + // index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || + // index > 0 && index < train.stationTimeList.length - 1) { // ${train.directionCode} const tripNumber = `${train.tripNumber}`; opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, pointdata.directionCode, false), elem.stationCode, tripNumber]); - } + // } }); /** 计算折返点车次坐标点集合*/ if (!train.backup && train.reentry && service.tripNumberDataList[j + 1] && service.tripNumberDataList[j + 1].stationTimeList) { - lastPoint = train.stationTimeList[idx - 1]; - nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1]; + lastPoint = train.stationTimeList[train.stationTimeList.length - 1]; + nextPoint = service.tripNumberDataList[j + 1].stationTimeList[0]; num = this.computedReentryNumber(train.tripNumber); opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, pointdata.directionCode, true, num), lastPoint.stationCode]); opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, pointdata.directionCode, true, num), nextPoint.stationCode]); diff --git a/src/jmapNew/theme/nanjing_02/planConvert.js b/src/jmapNew/theme/nanjing_02/planConvert.js index dc9c54f56..b9fbfcb86 100644 --- a/src/jmapNew/theme/nanjing_02/planConvert.js +++ b/src/jmapNew/theme/nanjing_02/planConvert.js @@ -195,18 +195,18 @@ export default { /** 计算非折返点车次点坐标集合*/ train.stationTimeList.forEach((elem, index) => { idx = index; - if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || - index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || - index > 0 && index < train.stationTimeList.length - 1) { + // if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || + // index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || + // index > 0 && index < train.stationTimeList.length - 1) { const aa = `${train.tripNumber}`; opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, pointdata.directionCode, false), elem.stationCode, aa]); - } + // } }); /** 计算折返点车次坐标点集合*/ if (!train.backup && train.reentry && service.tripNumberDataList[j + 1] && service.tripNumberDataList[j + 1].stationTimeList) { - lastPoint = train.stationTimeList[idx - 1]; - nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1]; + lastPoint = train.stationTimeList[train.stationTimeList.length - 1]; + nextPoint = service.tripNumberDataList[j + 1].stationTimeList[0]; num = this.computedReentryNumber(train.tripNumber); // ${train.directionCode} const aa = `${train.tripNumber}`; diff --git a/src/jmapNew/theme/ningbo_01/planConvert.js b/src/jmapNew/theme/ningbo_01/planConvert.js index 7a2b3ba9c..7eb7f1f8e 100644 --- a/src/jmapNew/theme/ningbo_01/planConvert.js +++ b/src/jmapNew/theme/ningbo_01/planConvert.js @@ -153,19 +153,18 @@ export default { /** 计算非折返点车次点坐标集合*/ train.stationTimeList.forEach((elem, index) => { idx = index; - if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || - index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || - index > 0 && index < train.stationTimeList.length - 1) { - // ${train.directionCode} + // if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || + // index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || + // index > 0 && index < train.stationTimeList.length - 1) { const aa = `${train.tripNumber}`; opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, pointdata.directionCode, false), elem.stationCode, aa, `${service.serviceNumber}${train.tripNumber}${train.destinationCode || ''}`]); - } + // } }); /** 计算折返点车次坐标点集合*/ if (!train.backup && train.reentry && service.tripNumberDataList[j + 1] && service.tripNumberDataList[j + 1].stationTimeList) { - lastPoint = train.stationTimeList[idx - 1]; - nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1]; + lastPoint = train.stationTimeList[train.stationTimeList.length - 1]; + nextPoint = service.tripNumberDataList[j + 1].stationTimeList[0]; num = this.computedReentryNumber(train.tripNumber); opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, pointdata.directionCode, true, num), lastPoint.stationCode, `${service.serviceNumber}${train.tripNumber}${train.destinationCode || ''}`]); opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, pointdata.directionCode, true, num), nextPoint.stationCode, `${service.serviceNumber}${train.tripNumber}${train.destinationCode || ''}`]); diff --git a/src/jmapNew/theme/ningbo_03/planConvert.js b/src/jmapNew/theme/ningbo_03/planConvert.js index 7fc493075..0bdce91ab 100644 --- a/src/jmapNew/theme/ningbo_03/planConvert.js +++ b/src/jmapNew/theme/ningbo_03/planConvert.js @@ -189,19 +189,19 @@ export default { /** 计算非折返点车次点坐标集合*/ train.stationTimeList.forEach((elem, index) => { idx = index; - if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || - index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || - index > 0 && index < train.stationTimeList.length - 1) { + // if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || + // index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || + // index > 0 && index < train.stationTimeList.length - 1) { // ${train.directionCode} const aa = `${train.tripNumber}`; opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, pointdata.directionCode, false), elem.stationCode, aa]); - } + // } }); /** 计算折返点车次坐标点集合*/ if (!train.backup && train.reentry && service.tripNumberDataList[j + 1] && service.tripNumberDataList[j + 1].stationTimeList) { - lastPoint = train.stationTimeList[idx - 1]; - nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1]; + lastPoint = train.stationTimeList[train.stationTimeList.length - 1]; + nextPoint = service.tripNumberDataList[j + 1].stationTimeList[0]; num = this.computedReentryNumber(train.tripNumber); // ${train.directionCode} const aa = `${train.tripNumber}`; diff --git a/src/jmapNew/theme/race_01/planConvert.js b/src/jmapNew/theme/race_01/planConvert.js index 859ae8d99..a6129a909 100644 --- a/src/jmapNew/theme/race_01/planConvert.js +++ b/src/jmapNew/theme/race_01/planConvert.js @@ -128,18 +128,18 @@ export default { /** 计算非折返点车次点坐标集合*/ train.stationTimeList.forEach((elem, index) => { idx = index; - if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || - index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || - index > 0 && index < train.stationTimeList.length - 1) { + // if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || + // index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || + // index > 0 && index < train.stationTimeList.length - 1) { const aa = `${train.tripNumber}`; opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.right, false), elem.stationCode, aa]); - } + // } }); /** 计算折返点车次坐标点集合*/ if (!train.backup && train.reentry && service.tripNumberDataList[j + 1] && service.tripNumberDataList[j + 1].stationTimeList) { - lastPoint = train.stationTimeList[idx - 1]; - nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1]; + lastPoint = train.stationTimeList[train.stationTimeList.length - 1]; + nextPoint = service.tripNumberDataList[j + 1].stationTimeList[0]; num = this.computedReentryNumber(train.tripNumber); const aa = `${train.tripNumber}`; opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.right, true, num), lastPoint.stationCode, aa]); diff --git a/src/jmapNew/theme/xian_01/planConvert.js b/src/jmapNew/theme/xian_01/planConvert.js index c4728cbd9..598974f45 100644 --- a/src/jmapNew/theme/xian_01/planConvert.js +++ b/src/jmapNew/theme/xian_01/planConvert.js @@ -139,19 +139,19 @@ export default { /** 计算非折返点车次点坐标集合*/ train.stationTimeList.forEach((elem, index) => { idx = index; - if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || - index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || - index > 0 && index < train.stationTimeList.length - 1) { + // if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || + // index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || + // index > 0 && index < train.stationTimeList.length - 1) { // ${train.directionCode} const aa = `${train.tripNumber}`; opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, pointdata.directionCode, false), elem.stationCode, aa]); - } + // } }); /** 计算折返点车次坐标点集合*/ if (!train.backup && train.reentry && service.tripNumberDataList[j + 1] && service.tripNumberDataList[j + 1].stationTimeList) { - lastPoint = train.stationTimeList[idx - 1]; - nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1]; + lastPoint = train.stationTimeList[train.stationTimeList.length - 1]; + nextPoint = service.tripNumberDataList[j + 1].stationTimeList[0]; num = this.computedReentryNumber(train.tripNumber); // ${train.directionCode} const aa = `${train.tripNumber}`; diff --git a/src/jmapNew/theme/xian_02/planConvert.js b/src/jmapNew/theme/xian_02/planConvert.js index 945bc8fbd..bea26bedb 100644 --- a/src/jmapNew/theme/xian_02/planConvert.js +++ b/src/jmapNew/theme/xian_02/planConvert.js @@ -193,19 +193,19 @@ export default { /** 计算非折返点车次点坐标集合*/ train.stationTimeList.forEach((elem, index) => { idx = index; - if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || - index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || - index > 0 && index < train.stationTimeList.length - 1) { + // if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || + // index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime || + // index > 0 && index < train.stationTimeList.length - 1) { // ${train.directionCode} const aa = `${train.tripNumber}`; opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, pointdata.directionCode, false), elem.stationCode, aa]); - } + // } }); /** 计算折返点车次坐标点集合*/ if (!train.backup && train.reentry && service.tripNumberDataList[j + 1] && service.tripNumberDataList[j + 1].stationTimeList) { - lastPoint = train.stationTimeList[idx - 1]; - nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1]; + lastPoint = train.stationTimeList[train.stationTimeList.length - 1]; + nextPoint = service.tripNumberDataList[j + 1].stationTimeList[0]; num = this.computedReentryNumber(train.tripNumber); // ${train.directionCode} const aa = `${train.tripNumber}`;