From 58e5635a7273169c00b85cf9895aa05e67387213 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 6 Nov 2020 11:04:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=99=E5=AD=A6=E5=AE=9E=E8=AE=AD=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E5=AE=9A=E4=B9=89=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= =?UTF-8?q?=20=E8=BF=90=E8=A1=8C=E5=9B=BE=E4=BB=A3=E7=A0=81=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/theme/beijing_01/planConvert.js | 14 +++++++++++--- src/jmapNew/theme/chengdu_01/planConvert.js | 14 +++++++++++--- src/jmapNew/theme/chengdu_03/planConvert.js | 14 +++++++++++--- src/jmapNew/theme/haerbin_01/planConvert.js | 1 - src/utils/runPlan.js | 1 - .../newMap/mapsystemNew/plugin/trainingtip.vue | 4 +++- 6 files changed, 36 insertions(+), 12 deletions(-) diff --git a/src/jmapNew/theme/beijing_01/planConvert.js b/src/jmapNew/theme/beijing_01/planConvert.js index 08dadbb83..f84152532 100644 --- a/src/jmapNew/theme/beijing_01/planConvert.js +++ b/src/jmapNew/theme/beijing_01/planConvert.js @@ -1,5 +1,5 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan'; - +import store from '@/store/index_APP_TARGET'; export default { /** 边缘高度*/ EdgeHeight: 600, @@ -113,7 +113,11 @@ export default { // pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.color = '#000' || lineStyle.color; - pointdata.directionCode = train.directionCode; + pointdata.directionCode = train.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + pointdata.directionCode = train.right ? '1' : '2'; + } + // pointdata.directionCode = train.directionCode; pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; /** 给服务对象添加服务名称和标记点*/ @@ -211,8 +215,12 @@ export default { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); if (!result) { + let directionCode = elem.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + directionCode = elem.right ? '1' : '2'; + } serie.markPoint.data.push(createMartPoint({ - directionCode: elem.directionCode, + directionCode: directionCode, coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, color: lineStyle.color || '#000' diff --git a/src/jmapNew/theme/chengdu_01/planConvert.js b/src/jmapNew/theme/chengdu_01/planConvert.js index 9f9441ee4..5601b44c9 100644 --- a/src/jmapNew/theme/chengdu_01/planConvert.js +++ b/src/jmapNew/theme/chengdu_01/planConvert.js @@ -1,5 +1,5 @@ import { createMartPointReverse, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan'; - +import store from '@/store/index_APP_TARGET'; export default { /** 边缘高度*/ EdgeHeight: 600, @@ -113,7 +113,11 @@ export default { // pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.color = '#000' || lineStyle.color; - pointdata.directionCode = train.directionCode; + pointdata.directionCode = train.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + pointdata.directionCode = train.right ? '1' : '2'; + } + // pointdata.directionCode = train.directionCode; pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; /** 给服务对象添加服务名称和标记点*/ @@ -211,8 +215,12 @@ export default { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); if (!result) { + let directionCode = elem.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + directionCode = elem.right ? '1' : '2'; + } serie.markPoint.data.push(createMartPointReverse({ - directionCode: elem.directionCode, + directionCode: directionCode, coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, color: lineStyle.color || '#000' diff --git a/src/jmapNew/theme/chengdu_03/planConvert.js b/src/jmapNew/theme/chengdu_03/planConvert.js index 921c6f4da..8780b2871 100644 --- a/src/jmapNew/theme/chengdu_03/planConvert.js +++ b/src/jmapNew/theme/chengdu_03/planConvert.js @@ -1,5 +1,5 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan'; - +import store from '@/store/index_APP_TARGET'; export default { /** 边缘高度*/ EdgeHeight: 600, @@ -91,7 +91,11 @@ export default { // pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.color = '#000' || lineStyle.color; - pointdata.directionCode = train.directionCode; + // pointdata.directionCode = train.directionCode; + pointdata.directionCode = train.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + pointdata.directionCode = train.right ? '1' : '2'; + } pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; /** 给服务对象添加服务名称和标记点*/ @@ -186,8 +190,12 @@ export default { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); if (!result) { + let directionCode = elem.right ? '2' : '1'; + if (!store.state.map.mapConfig.upRight) { + directionCode = elem.right ? '1' : '2'; + } serie.markPoint.data.push(createMartPoint({ - directionCode: elem.directionCode, + directionCode: directionCode, coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, color: lineStyle.color || '#000' diff --git a/src/jmapNew/theme/haerbin_01/planConvert.js b/src/jmapNew/theme/haerbin_01/planConvert.js index 40ea90ee9..3e2521f51 100644 --- a/src/jmapNew/theme/haerbin_01/planConvert.js +++ b/src/jmapNew/theme/haerbin_01/planConvert.js @@ -168,7 +168,6 @@ export default { var isBackup = true; var opt = { name: '', markPointData: [], data: [] }; if (service.tripNumberDataList && service.tripNumberDataList.length) { - debugger; service.tripNumberDataList.forEach((train, j) => { var pointdata = {}; var idx = 0; diff --git a/src/utils/runPlan.js b/src/utils/runPlan.js index 4626244e5..5fea77427 100644 --- a/src/utils/runPlan.js +++ b/src/utils/runPlan.js @@ -22,7 +22,6 @@ export function createMartPoint(opt) { /** 创建一个车次数据点*/ export function createMartPointReverse(opt) { - debugger; const rotate = opt.directionCode == '1' ? 45 : (opt.directionCode == '2' ? -45 : 0); const position = opt.type ? 'insideBottomLeft' : 'insideTopLeft'; return { diff --git a/src/views/newMap/mapsystemNew/plugin/trainingtip.vue b/src/views/newMap/mapsystemNew/plugin/trainingtip.vue index 1d967ca0e..9a7359db2 100644 --- a/src/views/newMap/mapsystemNew/plugin/trainingtip.vue +++ b/src/views/newMap/mapsystemNew/plugin/trainingtip.vue @@ -116,9 +116,11 @@ export default { }); } } + let subDeviceType = ''; + if (newStep.subType) { subDeviceType = newStep.subType; } else { subDeviceType = newStep.type; } position = this.$jlmap.getShapeTipPoint({ code: newStep.code, - subDeviceType: newStep.type + subDeviceType: subDeviceType }); if (position) {