This commit is contained in:
zyy 2020-11-06 11:25:53 +08:00
commit e823a14c48
6 changed files with 36 additions and 12 deletions

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -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;

View File

@ -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 {

View File

@ -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) {