福州一号线 运行图绘图 折返点计算调整
This commit is contained in:
parent
a034a9ed91
commit
c9a8d09e67
@ -2,7 +2,7 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, pre
|
|||||||
import store from '@/store/index';
|
import store from '@/store/index';
|
||||||
export default {
|
export default {
|
||||||
/** 边缘高度*/
|
/** 边缘高度*/
|
||||||
EdgeHeight: 180,
|
EdgeHeight: 1800,
|
||||||
|
|
||||||
/** 间隔高度*/
|
/** 间隔高度*/
|
||||||
CoordMultiple: 2000,
|
CoordMultiple: 2000,
|
||||||
@ -300,7 +300,7 @@ export default {
|
|||||||
if (!store.state.map.mapConfig.upRight) {
|
if (!store.state.map.mapConfig.upRight) {
|
||||||
pointdata.directionCode = train.right ? '1' : '2';
|
pointdata.directionCode = train.right ? '1' : '2';
|
||||||
}
|
}
|
||||||
pointdata.coord = [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[0], train.directionCode, false)];
|
pointdata.coord = [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[0], pointdata.directionCode, false)];
|
||||||
|
|
||||||
/** 给服务对象添加服务名称和标记点*/
|
/** 给服务对象添加服务名称和标记点*/
|
||||||
opt.name = '' + service.serviceNumber;
|
opt.name = '' + service.serviceNumber;
|
||||||
@ -311,7 +311,7 @@ export default {
|
|||||||
idx = index;
|
idx = index;
|
||||||
// ${train.directionCode}
|
// ${train.directionCode}
|
||||||
const aa = `${train.tripNumber}`;
|
const aa = `${train.tripNumber}`;
|
||||||
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]);
|
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, pointdata.directionCode, false), elem.stationCode, aa]);
|
||||||
});
|
});
|
||||||
|
|
||||||
/** 计算折返点车次坐标点集合*/
|
/** 计算折返点车次坐标点集合*/
|
||||||
@ -320,8 +320,8 @@ export default {
|
|||||||
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[0];
|
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[0];
|
||||||
// ${train.directionCode}
|
// ${train.directionCode}
|
||||||
const aa = `${train.tripNumber}`;
|
const aa = `${train.tripNumber}`;
|
||||||
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true), lastPoint.stationCode, aa, '折返轨']);
|
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, pointdata.directionCode, true), lastPoint.stationCode, aa, '折返轨']);
|
||||||
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true), lastPoint.stationCode, aa, '折返轨']);
|
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, pointdata.directionCode, true), lastPoint.stationCode, aa, '折返轨']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 如果是备用车,按车次添加线*/
|
/** 如果是备用车,按车次添加线*/
|
||||||
@ -385,15 +385,14 @@ export default {
|
|||||||
runPlanData[elem.serviceNumber][elem.tripNumber].sort((a, b) => {
|
runPlanData[elem.serviceNumber][elem.tripNumber].sort((a, b) => {
|
||||||
return parseInt(a.secondTime) - parseInt(b.secondTime);
|
return parseInt(a.secondTime) - parseInt(b.secondTime);
|
||||||
});
|
});
|
||||||
|
|
||||||
/** 如果此记录车组号的数据为第一条时,则打上标签*/
|
|
||||||
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';
|
let directionCode = elem.right ? '2' : '1';
|
||||||
if (!store.state.map.mapConfig.upRight) {
|
if (!store.state.map.mapConfig.upRight) {
|
||||||
directionCode = elem.right ? '1' : '2';
|
directionCode = elem.right ? '1' : '2';
|
||||||
}
|
}
|
||||||
|
/** 如果此记录车组号的数据为第一条时,则打上标签*/
|
||||||
|
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) {
|
||||||
serie.markPoint.data.push(createMartPoint({
|
serie.markPoint.data.push(createMartPoint({
|
||||||
directionCode: directionCode,
|
directionCode: directionCode,
|
||||||
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem)],
|
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem)],
|
||||||
@ -404,7 +403,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 计算折返点*/
|
/** 计算折返点*/
|
||||||
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem), elem.directionCode];
|
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem), directionCode];
|
||||||
if (serie.data.length > 0) {
|
if (serie.data.length > 0) {
|
||||||
var lastPoint = serie.data[serie.data.length - 1];
|
var lastPoint = serie.data[serie.data.length - 1];
|
||||||
if (lastPoint[2] !== nextPoint[2]) {
|
if (lastPoint[2] !== nextPoint[2]) {
|
||||||
|
@ -144,7 +144,7 @@ export default {
|
|||||||
index > 0 && index < train.stationTimeList.length - 1) {
|
index > 0 && index < train.stationTimeList.length - 1) {
|
||||||
// ${train.directionCode}
|
// ${train.directionCode}
|
||||||
const aa = `${train.tripNumber}`;
|
const aa = `${train.tripNumber}`;
|
||||||
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]);
|
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, pointdata.directionCode, false), elem.stationCode, aa]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -155,8 +155,8 @@ export default {
|
|||||||
num = this.computedReentryNumber(train.tripNumber);
|
num = this.computedReentryNumber(train.tripNumber);
|
||||||
// ${train.directionCode}
|
// ${train.directionCode}
|
||||||
const aa = `${train.tripNumber}`;
|
const aa = `${train.tripNumber}`;
|
||||||
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode, aa]);
|
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, pointdata.directionCode, true, num), lastPoint.stationCode, aa]);
|
||||||
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode, aa]);
|
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, pointdata.directionCode, true, num), nextPoint.stationCode, aa]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 如果是备用车,按车次添加线*/
|
/** 如果是备用车,按车次添加线*/
|
||||||
@ -221,14 +221,15 @@ export default {
|
|||||||
return parseInt(a.secondTime) - parseInt(b.secondTime);
|
return parseInt(a.secondTime) - parseInt(b.secondTime);
|
||||||
});
|
});
|
||||||
|
|
||||||
/** 如果此记录车组号的数据为第一条时,则打上标签*/
|
|
||||||
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';
|
let directionCode = elem.right ? '2' : '1';
|
||||||
if (!store.state.map.mapConfig.upRight) {
|
if (!store.state.map.mapConfig.upRight) {
|
||||||
directionCode = elem.right ? '1' : '2';
|
directionCode = elem.right ? '1' : '2';
|
||||||
}
|
}
|
||||||
|
/** 如果此记录车组号的数据为第一条时,则打上标签*/
|
||||||
|
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) {
|
||||||
|
|
||||||
serie.markPoint.data.push(createMartPoint({
|
serie.markPoint.data.push(createMartPoint({
|
||||||
directionCode: directionCode,
|
directionCode: directionCode,
|
||||||
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
|
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
|
||||||
@ -240,7 +241,7 @@ export default {
|
|||||||
|
|
||||||
/** 计算折返点*/
|
/** 计算折返点*/
|
||||||
var num = this.computedReentryNumber(elem.tripNumber);
|
var num = this.computedReentryNumber(elem.tripNumber);
|
||||||
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false, num), elem.directionCode];
|
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, directionCode, false, num), directionCode];
|
||||||
if (serie.data.length > 0) {
|
if (serie.data.length > 0) {
|
||||||
var lastPoint = serie.data[serie.data.length - 1];
|
var lastPoint = serie.data[serie.data.length - 1];
|
||||||
if (lastPoint[2] !== nextPoint[2]) {
|
if (lastPoint[2] !== nextPoint[2]) {
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
/>
|
/>
|
||||||
<schedule
|
<schedule
|
||||||
ref="schedule"
|
ref="schedule"
|
||||||
|
v-loading="runplanLoading"
|
||||||
:plan-convert="PlanConvert"
|
:plan-convert="PlanConvert"
|
||||||
:load-run-plan-id="loadRunPlanId"
|
:load-run-plan-id="loadRunPlanId"
|
||||||
:load-run-plan-name="loadRunPlanName"
|
:load-run-plan-name="loadRunPlanName"
|
||||||
@ -71,7 +72,7 @@ import ModifyingStationStopTime from './menus/modifyingStationStopTime';
|
|||||||
import PopulatingGenericData from './menus/populatingGenericData';
|
import PopulatingGenericData from './menus/populatingGenericData';
|
||||||
import { deletePlanService } from '@/api/runplan';
|
import { deletePlanService } from '@/api/runplan';
|
||||||
import { checkLoginLine } from '@/api/login';
|
import { checkLoginLine } from '@/api/login';
|
||||||
import { getPublishMapDetailById } from '@/api/jmap/map';
|
import { loadMapDataById } from '@/utils/loaddata';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Menus',
|
name: 'Menus',
|
||||||
@ -106,7 +107,8 @@ export default {
|
|||||||
timeDemon: null,
|
timeDemon: null,
|
||||||
runPlanList: [],
|
runPlanList: [],
|
||||||
loadRunPlanId: '',
|
loadRunPlanId: '',
|
||||||
loadRunPlanName: ''
|
loadRunPlanName: '',
|
||||||
|
runplanLoading:false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -114,6 +116,12 @@ export default {
|
|||||||
return this.$route.query.lineCode || '02';
|
return this.$route.query.lineCode || '02';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.map.mapDataLoadedCount': function (val) {
|
||||||
|
this.loadRunPlanId = this.$route.query.planId;
|
||||||
|
this.runplanLoading = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
this.PlanConvert = this.$theme.loadPlanConvert(this.lineCode);
|
this.PlanConvert = this.$theme.loadPlanConvert(this.lineCode);
|
||||||
},
|
},
|
||||||
@ -121,7 +129,6 @@ export default {
|
|||||||
this.timeDemon = setInterval(() => {
|
this.timeDemon = setInterval(() => {
|
||||||
checkLoginLine();
|
checkLoginLine();
|
||||||
}, 5000 * 60);
|
}, 5000 * 60);
|
||||||
this.loadRunPlanId = this.$route.query.planId;
|
|
||||||
this.loadRunPlanName = this.$route.query.planName;
|
this.loadRunPlanName = this.$route.query.planName;
|
||||||
if (this.$route.query.mapId) {
|
if (this.$route.query.mapId) {
|
||||||
this.refreshRunPlanList(true);
|
this.refreshRunPlanList(true);
|
||||||
@ -149,10 +156,9 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
async loadMap() {
|
async loadMap() {
|
||||||
const res = await getPublishMapDetailById(this.$route.query.mapId);
|
this.runplanLoading = true;
|
||||||
if (res && res.code == 200) {
|
// 加载地图数据
|
||||||
this.$store.dispatch('map/setMapData', res.data.graphDataNew);
|
loadMapDataById(this.$route.query.mapId, 'parse');
|
||||||
}
|
|
||||||
},
|
},
|
||||||
handleConfirm(params) {
|
handleConfirm(params) {
|
||||||
if (params.operate == 'AddPlanningTrain') {
|
if (params.operate == 'AddPlanningTrain') {
|
||||||
|
@ -84,7 +84,7 @@ import ModifyingStationIntervalTime from '../editTool/menus/modifyingStationInte
|
|||||||
import { deletePlanService } from '@/api/runplan';
|
import { deletePlanService } from '@/api/runplan';
|
||||||
import { checkLoginLine } from '@/api/login';
|
import { checkLoginLine } from '@/api/login';
|
||||||
import { getRpListByMapId } from '@/api/runplan';
|
import { getRpListByMapId } from '@/api/runplan';
|
||||||
import { getPublishMapDetailById } from '@/api/jmap/map';
|
import { loadMapDataById } from '@/utils/loaddata';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Menus',
|
name: 'Menus',
|
||||||
@ -194,10 +194,9 @@ export default {
|
|||||||
this.$store.dispatch('runPlan/refresh');
|
this.$store.dispatch('runPlan/refresh');
|
||||||
},
|
},
|
||||||
async loadMap() {
|
async loadMap() {
|
||||||
const res = await getPublishMapDetailById(this.$route.query.mapId);
|
this.runplanLoading = true;
|
||||||
if (res && res.code == 200) {
|
// 加载地图数据
|
||||||
this.$store.dispatch('map/setMapData', res.data.graphDataNew);
|
loadMapDataById(this.$route.query.mapId, 'parse');
|
||||||
}
|
|
||||||
},
|
},
|
||||||
refreshRunPlanList(planId) {
|
refreshRunPlanList(planId) {
|
||||||
getRpListByMapId(this.$route.query.mapId).then(resp => {
|
getRpListByMapId(this.$route.query.mapId).then(resp => {
|
||||||
|
Loading…
Reference in New Issue
Block a user