This commit is contained in:
lVAL 2021-01-28 16:28:14 +08:00
commit 6a033b2a9d
31 changed files with 439 additions and 258 deletions

View File

@ -155,3 +155,10 @@ export function queryCompetitionPracticalPermissions(params) {
params
});
}
/** 国赛获取支付二维码 */
export function getPayQrCode(mapId, monthAmount) {
return request( {
url: `/api/v1/competitionPractical/purchasePermission?mapId=${mapId}&monthAmount=${monthAmount}`,
method: 'post'
});
}

View File

@ -118,7 +118,7 @@ export default {
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)];
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], pointdata.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/
opt.markPointData.push(createMartPoint(pointdata));
@ -134,7 +134,7 @@ export default {
index > 0 && index < train.stationTimeList.length - 1) {
// ${train.directionCode}
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]);
}
});
@ -145,8 +145,8 @@ export default {
num = this.computedReentryNumber(train.tripNumber);
// ${train.directionCode}
const aa = `${train.tripNumber}`;
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.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([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, pointdata.directionCode, true, num), lastPoint.stationCode, aa]);
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, pointdata.directionCode, true, num), nextPoint.stationCode, aa]);
}
/** 如果是备用车,按车次添加线*/
@ -210,15 +210,14 @@ export default {
runPlanData[elem.serviceNumber][elem.tripNumber].sort((a, b) => {
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';
if (!store.state.map.mapConfig.upRight) {
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({
directionCode: directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
@ -229,7 +228,7 @@ export default {
}
/** 计算折返点*/
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode];
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), directionCode];
if (serie.data.length > 0) {
var lastPoint = serie.data[serie.data.length - 1];
if (lastPoint[2] !== nextPoint[2]) {

View File

@ -118,7 +118,7 @@ export default {
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)];
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], pointdata.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/
opt.markPointData.push(createMartPointReverse(pointdata));
@ -134,7 +134,7 @@ export default {
index > 0 && index < train.stationTimeList.length - 1) {
// ${train.directionCode}
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]);
}
});
@ -145,8 +145,8 @@ export default {
num = this.computedReentryNumber(train.tripNumber);
// ${train.directionCode}
const aa = `${train.tripNumber}`;
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.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([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, pointdata.directionCode, true, num), lastPoint.stationCode, aa]);
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, pointdata.directionCode, true, num), nextPoint.stationCode, aa]);
}
/** 如果是备用车,按车次添加线*/
@ -211,14 +211,14 @@ export default {
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';
if (!store.state.map.mapConfig.upRight) {
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(createMartPointReverse({
directionCode: directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
@ -229,7 +229,7 @@ export default {
}
/** 计算折返点*/
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode];
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), directionCode];
if (serie.data.length > 0) {
var lastPoint = serie.data[serie.data.length - 1];
if (lastPoint[2] !== nextPoint[2]) {

View File

@ -95,7 +95,7 @@ export default {
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)];
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], pointdata.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/
opt.markPointData.push(createMartPoint(pointdata));
@ -110,7 +110,7 @@ export default {
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.directionCode, false), elem.stationCode, aa]);
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, pointdata.directionCode, false), elem.stationCode, aa]);
}
});
@ -120,8 +120,8 @@ export default {
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
num = this.computedReentryNumber(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([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.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, pointdata.directionCode, true, num), nextPoint.stationCode, aa]);
}
/** 如果是备用车,按车次添加线*/
@ -182,15 +182,14 @@ export default {
runPlanData[elem.serviceNumber][elem.tripNumber].sort((a, b) => {
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';
if (!store.state.map.mapConfig.upRight) {
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({
directionCode: directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
@ -201,7 +200,7 @@ export default {
}
/** 计算折返点*/
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode];
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), directionCode];
if (serie.data.length > 0) {
var lastPoint = serie.data[serie.data.length - 1];
if (lastPoint[2] !== nextPoint[2]) {

View File

@ -115,7 +115,7 @@ export default {
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)];
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], pointdata.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/
opt.markPointData.push(createMartPointReverse(pointdata));
@ -131,7 +131,7 @@ export default {
index > 0 && index < train.stationTimeList.length - 1) {
// ${train.directionCode}
const tripNumber = `${train.tripNumber}`;
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, tripNumber]);
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, pointdata.directionCode, false), elem.stationCode, tripNumber]);
}
});
@ -140,8 +140,8 @@ export default {
lastPoint = train.stationTimeList[idx - 1];
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
num = this.computedReentryNumber(train.tripNumber);
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode]);
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode]);
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]);
}
/** 如果是备用车,按车次添加线*/
@ -202,15 +202,14 @@ export default {
runPlanData[elem.serviceNumber][elem.tripNumber].sort((a, b) => {
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';
if (!store.state.map.mapConfig.upRight) {
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(createMartPointReverse({
directionCode: directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
@ -221,7 +220,7 @@ export default {
}
/** 计算折返点*/
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode];
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), directionCode];
if (serie.data.length > 0) {
var lastPoint = serie.data[serie.data.length - 1];
if (lastPoint[2] !== nextPoint[2]) {

View File

@ -2,7 +2,7 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, pre
import store from '@/store/index';
export default {
/** 边缘高度*/
EdgeHeight: 180,
EdgeHeight: 1800,
/** 间隔高度*/
CoordMultiple: 2000,
@ -300,7 +300,7 @@ export default {
if (!store.state.map.mapConfig.upRight) {
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;
@ -311,7 +311,7 @@ export default {
idx = index;
// ${train.directionCode}
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];
// ${train.directionCode}
const aa = `${train.tripNumber}`;
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true), lastPoint.stationCode, aa, '折返轨']);
opt.data.push([nextPoint.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, pointdata.directionCode, true), lastPoint.stationCode, aa, '折返轨']);
}
/** 如果是备用车,按车次添加线*/
@ -385,15 +385,14 @@ export default {
runPlanData[elem.serviceNumber][elem.tripNumber].sort((a, b) => {
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';
if (!store.state.map.mapConfig.upRight) {
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({
directionCode: directionCode,
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) {
var lastPoint = serie.data[serie.data.length - 1];
if (lastPoint[2] !== nextPoint[2]) {

View File

@ -182,7 +182,7 @@ export default {
if (!store.state.map.mapConfig.upRight) {
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;
@ -193,7 +193,7 @@ export default {
idx = index;
// ${train.directionCode}
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]);
});
/** 计算折返点车次坐标点集合*/
@ -202,8 +202,8 @@ export default {
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[0];
// ${train.directionCode}
const aa = `${train.tripNumber}`;
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true), lastPoint.stationCode, aa, '折返轨']);
opt.data.push([nextPoint.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, pointdata.directionCode, true), lastPoint.stationCode, aa, '折返轨']);
}
/** 如果是备用车,按车次添加线*/
@ -269,15 +269,14 @@ export default {
runPlanData[elem.serviceNumber][elem.tripNumber].sort((a, b) => {
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';
if (!store.state.map.mapConfig.upRight) {
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({
directionCode: directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem)],
@ -288,7 +287,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) {
var lastPoint = serie.data[serie.data.length - 1];
if (lastPoint[2] !== nextPoint[2]) {

View File

@ -184,7 +184,7 @@ export default {
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)];
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], pointdata.directionCode, false)];
// pointdata.coord = [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[0], train.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/
opt.markPointData.push(createMartPoint(pointdata));
@ -199,7 +199,7 @@ export default {
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.directionCode, false), elem.stationCode, aa]);
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, pointdata.directionCode, false), elem.stationCode, aa]);
}
});
@ -210,8 +210,8 @@ export default {
num = this.computedReentryNumber(train.tripNumber);
// ${train.directionCode}
const aa = `${train.tripNumber}`;
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.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([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, pointdata.directionCode, true, num), lastPoint.stationCode, aa]);
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, pointdata.directionCode, true, num), nextPoint.stationCode, aa]);
}
/** 如果是备用车,按车次添加线*/
@ -274,15 +274,14 @@ export default {
runPlanData[elem.serviceNumber][elem.tripNumber].sort((a, b) => {
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';
if (!store.state.map.mapConfig.upRight) {
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({
directionCode: directionCode,
// coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem)],
@ -295,7 +294,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, false), elem.directionCode];
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), directionCode];
if (serie.data.length > 0) {
var lastPoint = serie.data[serie.data.length - 1];
if (lastPoint[2] !== nextPoint[2]) {

View File

@ -142,7 +142,7 @@ export default {
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)];
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], pointdata.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/
opt.markPointData.push(createMartPoint(pointdata));
@ -158,7 +158,7 @@ export default {
index > 0 && index < train.stationTimeList.length - 1) {
// ${train.directionCode}
const aa = `${train.tripNumber}`;
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa, `${service.serviceNumber}${train.tripNumber}${train.destinationCode || ''}`]);
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, pointdata.directionCode, false), elem.stationCode, aa, `${service.serviceNumber}${train.tripNumber}${train.destinationCode || ''}`]);
}
});
@ -167,8 +167,8 @@ export default {
lastPoint = train.stationTimeList[idx - 1];
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
num = this.computedReentryNumber(train.tripNumber);
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode, `${service.serviceNumber}${train.tripNumber}${train.destinationCode || ''}`]);
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode, `${service.serviceNumber}${train.tripNumber}${train.destinationCode || ''}`]);
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 || ''}`]);
}
/** 如果是备用车,按车次添加线*/
@ -229,15 +229,14 @@ export default {
runPlanData[elem.serviceNumber][elem.tripNumber].sort((a, b) => {
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';
if (!store.state.map.mapConfig.upRight) {
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({
directionCode: directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
@ -248,7 +247,7 @@ export default {
}
/** 计算折返点*/
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode];
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), directionCode];
if (serie.data.length > 0) {
var lastPoint = serie.data[serie.data.length - 1];
if (lastPoint[2] !== nextPoint[2]) {

View File

@ -201,7 +201,7 @@ export default {
// },
commit() {
if (this.accept) {
debugger;
// debugger;
const sationEle = this.$store.getters['map/getDeviceByCode'](this.selected.code);
if (sationEle.controlMode == 'Center') {
this.requestCommit(this.selected.code);

View File

@ -1,5 +1,5 @@
import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList, prefixTime } from '@/utils/runPlan';
import store from '@/store/index';
export default {
/** 边缘高度*/
EdgeHeight: 600,
@ -173,8 +173,12 @@ 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.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)];
// 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], pointdata.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/
opt.markPointData.push(createMartPoint(pointdata));
@ -190,7 +194,7 @@ export default {
index > 0 && index < train.stationTimeList.length - 1) {
// ${train.directionCode}
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]);
}
});
@ -201,8 +205,8 @@ export default {
num = this.computedReentryNumber(train.tripNumber);
// ${train.directionCode}
const aa = `${train.tripNumber}`;
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.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([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, pointdata.directionCode, true, num), lastPoint.stationCode, aa]);
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, pointdata.directionCode, true, num), nextPoint.stationCode, aa]);
}
/** 如果是备用车,按车次添加线*/
@ -267,12 +271,16 @@ export default {
return parseInt(a.secondTime) - parseInt(b.secondTime);
});
let directionCode = elem.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
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({
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'
@ -282,7 +290,7 @@ export default {
/** 计算折返点*/
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) {
var lastPoint = serie.data[serie.data.length - 1];
if (lastPoint[2] !== nextPoint[2]) {

View File

@ -128,7 +128,7 @@ export default {
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)];
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], pointdata.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/
opt.markPointData.push(createMartPoint(pointdata));
@ -144,7 +144,7 @@ export default {
index > 0 && index < train.stationTimeList.length - 1) {
// ${train.directionCode}
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);
// ${train.directionCode}
const aa = `${train.tripNumber}`;
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.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([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, pointdata.directionCode, true, num), lastPoint.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);
});
/** 如果此记录车组号的数据为第一条时,则打上标签*/
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';
}
/** 如果此记录车组号的数据为第一条时,则打上标签*/
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({
directionCode: directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
@ -240,7 +241,7 @@ export default {
/** 计算折返点*/
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) {
var lastPoint = serie.data[serie.data.length - 1];
if (lastPoint[2] !== nextPoint[2]) {

View File

@ -182,7 +182,7 @@ export default {
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)];
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], pointdata.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/
opt.markPointData.push(createMartPoint(pointdata));
@ -198,7 +198,7 @@ export default {
index > 0 && index < train.stationTimeList.length - 1) {
// ${train.directionCode}
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]);
}
});
@ -209,8 +209,8 @@ export default {
num = this.computedReentryNumber(train.tripNumber);
// ${train.directionCode}
const aa = `${train.tripNumber}`;
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.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([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, pointdata.directionCode, true, num), lastPoint.stationCode, aa]);
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, pointdata.directionCode, true, num), nextPoint.stationCode, aa]);
}
/** 如果是备用车,按车次添加线*/
@ -276,14 +276,15 @@ export default {
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';
if (!store.state.map.mapConfig.upRight) {
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({
directionCode: directionCode,
coord: [parseInt(time), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
@ -295,7 +296,7 @@ export default {
/** 计算折返点*/
// var num = this.computedReentryNumber(elem.tripNumber);
var nextPoint = [parseInt(time), this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, elem.directionCode];
var nextPoint = [parseInt(time), this.getCoordYByElem(stations, kmRangeCoordMap, elem, directionCode, false), elem.stationCode, directionCode];
if (serie.data.length > 0) {
var lastPoint = serie.data[serie.data.length - 1];

View File

@ -232,6 +232,9 @@ const menuOperation = {
spliceRequestList: ({ commit }, request) => {
commit('spliceRequestList', request);
},
resetRequestList: ({ commit }) => {
commit('resetRequestList');
},
/** 西安二号线排列进路保存信号机进路数据 */
setRouteSelectStartSignal: ({ commit }, param) => {
commit('setRouteSelectStartSignal', param);

View File

@ -0,0 +1,105 @@
<template>
<el-dialog
title="购买详情"
:visible.sync="dialogVisible"
width="30%"
center
:before-close="handleClose"
>
<el-row style="font-size: 16px; height: 30px;line-height: 30px;">
<el-col :span="6" :offset="2">产品</el-col>
<el-col :span="16">全国行车调度员大赛训练系统</el-col>
</el-row>
<el-row style="font-size: 16px; height: 30px;line-height: 30px;">
<el-col :span="6" :offset="2">单价</el-col>
<el-col :span="16">200/</el-col>
</el-row>
<el-row style="font-size: 16px; height: 30px;line-height: 30px;">
<el-col :span="6" :offset="2">购买月数</el-col>
<el-col :span="16"><el-input-number v-model="monthAmount" size="mini" :min="1" :max="999" :precision="0" :step="1" :disabled="!changeMonth" /></el-col>
</el-row>
<el-row style="font-size: 16px; height: 30px;line-height: 30px;">
<el-col :span="6" :offset="2">总价</el-col>
<el-col :span="16">{{ unitPrice * monthAmount + ' 元' }}</el-col>
</el-row>
<div style="text-align: center;margin: 20px;">
<el-button type="primary" size="mini" :disabled="!changeMonth" @click="orderDetermine">获取支付码</el-button>
<el-button type="primary" size="mini" :disabled="changeMonth" @click="changeOrder">修改订单</el-button>
</div>
<el-row style="font-size: 16px; height: 30px;line-height: 30px;">
<el-col :span="6" :offset="2">订单号</el-col>
<el-col :span="16">{{ orderCode }}</el-col>
</el-row>
<el-row style="font-size: 16px;">
<el-col :span="6" :offset="2">支付码</el-col>
<el-col :span="16">
<div style="width: 150px;">
<qrcode-vue
v-loading="loading"
:value="url"
:size="150"
element-loading-spinner="el-icon-refresh"
element-loading-background="rgba(255, 255, 255, 0.9)"
/>
</div>
</el-col>
</el-row>
<!--<div>订单支付成功</div>-->
</el-dialog>
</template>
<script>
import { getPayQrCode } from '@/api/competition';
import QrcodeVue from 'qrcode.vue';
export default {
name: 'PayPage',
components: { QrcodeVue },
data() {
return {
dialogVisible: false,
monthAmount: 1,
unitPrice: 200,
loading: true,
changeMonth: true,
url: '',
orderCode: ''
};
},
methods: {
handleClose() {
this.dialogVisible = false;
},
doShow() {
this.loading = true;
this.dialogVisible = true;
this.monthAmount = 1;
this.url = '';
this.changeMonth = true;
},
changeOrder() {
this.loading = true;
this.changeMonth = true;
this.orderCode = '';
this.url = '';
},
orderDetermine() {
this.loading = true;
this.changeMonth = false;
getPayQrCode(this.$route.query.mapId, this.monthAmount).then(resp => {
console.log(this.url, '===', resp.data);
this.url = resp.data.code_url;
this.orderCode = resp.data.orderCode;
this.loading = false;
}).catch(error => {
console.error(error);
this.dialogVisible = false;
this.$messageBox('生成支付二维码错误,请您重新尝试!');
});
}
}
};
</script>
<style scoped>
</style>

View File

@ -9,7 +9,7 @@
<!-- 三维视图/数字沙盘 -->
<el-button v-if="jl3dnameShow && !isContest && project !== 'bjd'" size="small" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
<!-- cctv视图 -->
<el-button v-if="cctvShow && !isContest && project !== 'bjd'" size="small" @click="jumpjl3dpassflow">{{ jl3dpassflow }}</el-button>
<el-button v-if="jl3dnameShow && !isContest && project !== 'bjd'" size="small" @click="jumpjl3dpassflow">{{ jl3dpassflow }}</el-button>
<!-- 客流规划视图 -->
<!-- <el-button v-if="trafficplanShow && project == 'bjd' && !isContest" size="small" @click="jumpjl3dtrafficplan">{{ jl3dtrafficplan }}</el-button>
<el-button v-if="trafficplanShow && project == 'bjd' && !isContest" size="small" @click="jumpjl3dtraffictrain">{{ $t('display.demon.traffictraintext') }}</el-button> -->
@ -26,6 +26,7 @@
<el-button v-if="messageBoard" size="small" @click="messageBoardShow">留言板</el-button>
<!-- v-if="isContest" -->
<el-button v-if="!isLocal" size="small" @click="contectUs">联系方式</el-button>
<el-button size="small" @click="goToPay">购买</el-button>
</el-button-group>
</div>
<Jl3d-Device
@ -39,6 +40,7 @@
<scheduling v-if="scheduleLoadShow" ref="scheduling" :group="group" />
<scheduling-view v-if="schedulePreviewShow" ref="schedulingView" :group="group" />
<contect-us ref="contectUs" />
<pay-page ref="payPage" />
</div>
</template>
<script>
@ -48,6 +50,7 @@ import { getToken } from '@/utils/auth';
import { getSessionStorage } from '@/utils/auth';
import Scheduling from '@/views/newMap/displayNew/demon/scheduling';
import SchedulingView from '@/views/newMap/displayNew/demon/schedulingView';
import PayPage from '@/views/newMap/displayNew/demon/payPage';
import { EventBus } from '@/scripts/event-bus';
import ContectUs from '@/views/newMap/displayNew/dispatherContest/contectUs';
import { getPostByProjectCode } from '@/api/learn';
@ -59,7 +62,8 @@ export default {
Jl3dDrive,
Scheduling,
SchedulingView,
ContectUs
ContectUs,
PayPage
},
props:{
isAllShow:{
@ -289,6 +293,9 @@ export default {
},
contectUs() {
this.$refs.contectUs.doShow();
},
goToPay() {
this.$refs.payPage.doShow();
}
}
};

View File

@ -198,7 +198,6 @@ export default {
const trainNumList = this.$store.state.socket.trainPfiNum;
trainNumList.forEach(stationNum=>{
stationNum.deviceType = 'TRAIN';
console.log(stationNum.num, 'inital');
});
this.$store.dispatch('training/updateMapState', trainNumList);
}

View File

@ -220,6 +220,7 @@ export default {
EventBus.$off('viewLoading');
EventBus.$off('viewProgressAt');
this.$store.dispatch('socket/clearSimulationRoleList');
this.$store.dispatch('menuOperation/resetRequestList');
this.$store.dispatch('map/mapClear');
if (this.$jlmap) {
this.$jlmap.dispose();

View File

@ -232,6 +232,7 @@ export default {
await this.$store.dispatch('training/end', null);
await this.$store.dispatch('training/reset');
await this.$store.dispatch('map/mapClear');
await this.$store.dispatch('menuOperation/resetRequestList');
Message.closeAll();
},
methods: {
@ -484,7 +485,7 @@ export default {
if (this.$store.state.training.prdType == '04') {
this.panelShow = false;
this.drivingShow = true;
this.$refs.Jl3dDrive.show(this.mapId, this.group, 34,"isTraining");
this.$refs.Jl3dDrive.show(this.mapId, this.group, 34, 'isTraining');
} else {
const routeData = this.$router.resolve({
path:'/jlmap3d/sandbox',

View File

@ -13,6 +13,7 @@
/>
<schedule
ref="schedule"
v-loading="runplanLoading"
:plan-convert="PlanConvert"
:load-run-plan-id="loadRunPlanId"
:load-run-plan-name="loadRunPlanName"
@ -71,7 +72,7 @@ import ModifyingStationStopTime from './menus/modifyingStationStopTime';
import PopulatingGenericData from './menus/populatingGenericData';
import { deletePlanService } from '@/api/runplan';
import { checkLoginLine } from '@/api/login';
import { getPublishMapDetailById } from '@/api/jmap/map';
import { loadMapDataById } from '@/utils/loaddata';
export default {
name: 'Menus',
@ -106,7 +107,8 @@ export default {
timeDemon: null,
runPlanList: [],
loadRunPlanId: '',
loadRunPlanName: ''
loadRunPlanName: '',
runplanLoading:false
};
},
computed: {
@ -114,6 +116,12 @@ export default {
return this.$route.query.lineCode || '02';
}
},
watch: {
'$store.state.map.mapDataLoadedCount': function (val) {
this.loadRunPlanId = this.$route.query.planId;
this.runplanLoading = false;
}
},
created() {
this.PlanConvert = this.$theme.loadPlanConvert(this.lineCode);
},
@ -121,7 +129,6 @@ export default {
this.timeDemon = setInterval(() => {
checkLoginLine();
}, 5000 * 60);
this.loadRunPlanId = this.$route.query.planId;
this.loadRunPlanName = this.$route.query.planName;
if (this.$route.query.mapId) {
this.refreshRunPlanList(true);
@ -149,10 +156,9 @@ export default {
});
},
async loadMap() {
const res = await getPublishMapDetailById(this.$route.query.mapId);
if (res && res.code == 200) {
this.$store.dispatch('map/setMapData', res.data.graphDataNew);
}
this.runplanLoading = true;
//
loadMapDataById(this.$route.query.mapId, 'parse');
},
handleConfirm(params) {
if (params.operate == 'AddPlanningTrain') {

View File

@ -462,8 +462,8 @@ export default {
// });
this.$emit('refresh');
this.$message.success(this.$t('tip.addTaskSuccessfully'));
}).catch(() => {
this.$messageBox(this.$t('tip.addTaskFailed'));
}).catch((error) => {
this.$messageBox(this.$t('tip.addTaskFailed') + ': ' + error.message);
});
}

View File

@ -49,7 +49,7 @@ export default {
overTime: '', //
runLevel:'', //
departureInterval:180, //
reentryTime:80, //
reentryTime:120, //
inboundRouting:'', // code
outboundRouting:'', // code
runningRouting1: '', // code1
@ -113,7 +113,7 @@ export default {
{ prop: 'overTime', label: '结束时间', type: 'timePicker', selectableRange:'02:00:00-23:59:59'},
{ prop: 'runLevel', label: '运行等级', type: 'select', options: this.runLevelList },
{ prop: 'departureInterval', label: '发车间隔', type: 'number', show:this.formModel.gernarateType == '02', min:0, step:1, precisionFlag:true, precision:0, message:'s'},
{ prop: 'reentryTime', label: '折返时间', type: 'number', min:0, step:1, precisionFlag:true, precision:0, message:'s' },
{ prop: 'reentryTime', label: '折返时间', type: 'number', min:120, step:1, precisionFlag:true, precision:0, message:'s' },
{ prop: 'outboundRouting', label: '出库交路', type: 'select', options: this.covertRouting('OUTBOUND'), noDataText:'请先设置交路'},
{ prop: 'runningRouting1', label: '环路交路1', type: 'select', show:true, options: this.covertRouting('LOOP'), noDataText:'请先设置交路', change:true, onChange:this.changeRoute2 },
{ prop: 'runningRouting2', label: '环路交路2', type: 'select', show:true, options: this.covertRouting('LOOP'), noDataText:'请先设置交路', change:true, onChange:this.changeRoute1},

View File

@ -42,7 +42,7 @@ export default {
overTime: '',
departureTimeInterval: 180, //
// parkedTime: 30, //
reentryTime: 60, //
reentryTime: 120, //
runningRouting1:'', // code1
runningRouting2:'' // code2
// startStationCode: '',
@ -92,7 +92,7 @@ export default {
{ prop: 'overTime', label: '结束时间', type: 'timePicker', selectableRange:'02:00:00-23:59:59'},
{ prop: 'departureTimeInterval', label: '发车间隔', type: 'number', min:0, step:1, precisionFlag:true, precision:0, message:'s'},
// { prop: 'parkedTime', label: '', type: 'number', min:0, step:1, precisionFlag:true, precision:0},
{ prop: 'reentryTime', label: '折返时间', type: 'number', min:0, step:1, precisionFlag:true, precision:0, message:'s'},
{ prop: 'reentryTime', label: '折返时间', type: 'number', min:120, step:1, precisionFlag:true, precision:0, message:'s'},
{ prop: 'right', label: '发车类型', type: 'checkBox', children: [
{ name: '上行发车', value: 1 },
{ name: '下次发车', value: 2 },

View File

@ -84,7 +84,7 @@ import ModifyingStationIntervalTime from '../editTool/menus/modifyingStationInte
import { deletePlanService } from '@/api/runplan';
import { checkLoginLine } from '@/api/login';
import { getRpListByMapId } from '@/api/runplan';
import { getPublishMapDetailById } from '@/api/jmap/map';
import { loadMapDataById } from '@/utils/loaddata';
export default {
name: 'Menus',
@ -194,10 +194,9 @@ export default {
this.$store.dispatch('runPlan/refresh');
},
async loadMap() {
const res = await getPublishMapDetailById(this.$route.query.mapId);
if (res && res.code == 200) {
this.$store.dispatch('map/setMapData', res.data.graphDataNew);
}
this.runplanLoading = true;
//
loadMapDataById(this.$route.query.mapId, 'parse');
},
refreshRunPlanList(planId) {
getRpListByMapId(this.$route.query.mapId).then(resp => {

View File

@ -469,8 +469,8 @@ export default {
// });
this.$emit('refresh');
this.$message.success(this.$t('tip.addTaskSuccessfully'));
}).catch(() => {
this.$messageBox(this.$t('tip.addTaskFailed'));
}).catch((error) => {
this.$messageBox(this.$t('tip.addTaskFailed') + ': ' + error.message);
});
}

View File

@ -19,8 +19,7 @@
</template>
<script>
import { getStationList, populatingGenericData } from '@/api/runplan';
import { listUserRoutingData, populatingGenericData } from '@/api/runplan';
export default {
props: {
loadRunPlanId: {
@ -33,7 +32,8 @@ export default {
data() {
return {
dialogShow: false,
stationList: [],
// stationList: [],
routingList: [],
loading: false,
formModel: {
stationRunningTime: 60, //
@ -41,10 +41,12 @@ export default {
beginTime: '',
overTime: '',
departureTimeInterval: 180, //
parkedTime: 30, //
reentryTime: 60, //
startStationCode: '',
endStationCode: ''
// parkedTime: 30, //
reentryTime: 120, //
runningRouting1:'', // code1
runningRouting2:'' // code2
// startStationCode: '',
// endStationCode: ''
},
rules: {
@ -57,18 +59,24 @@ export default {
departureTimeInterval: [
{ required: true, message: '请填写发车间隔', trigger: 'blur' }
],
parkedTime: [
{ required: true, message: '请填写停站时间', trigger: 'blur' }
],
// parkedTime: [
// { required: true, message: '', trigger: 'blur' }
// ],
reentryTime: [
{ required: true, message: '请填写折返时间', trigger: 'blur' }
],
startStationCode: [
{ required: true, message: '请选择起始站', trigger: 'change' }
runningRouting1: [
{ required: true, validator: this.validateRunningRouting, trigger: 'change' }
],
endStationCode: [
{ required: true, message: '请选择终止站', trigger: 'change' }
runningRouting2: [
{ required: true, validator: this.validateRunningRouting, trigger: 'change' }
]
// startStationCode: [
// { required: true, message: '', trigger: 'change' }
// ],
// endStationCode: [
// { required: true, message: '', trigger: 'change' }
// ]
}
};
},
@ -82,34 +90,43 @@ export default {
items: [
{ prop: 'beginTime', label: '开始时间', type: 'timePicker', selectableRange:'02:00:00-23:59:59'},
{ prop: 'overTime', label: '结束时间', type: 'timePicker', selectableRange:'02:00:00-23:59:59'},
{ prop: 'departureTimeInterval', label: '发车间隔', type: 'number'},
{ prop: 'parkedTime', label: '停站时间', type: 'number'},
{ prop: 'reentryTime', label: '折返时间', type: 'number'},
{ prop: 'departureTimeInterval', label: '发车间隔', type: 'number', min:0, step:1, precisionFlag:true, precision:0, message:'s'},
// { prop: 'parkedTime', label: '', type: 'number', min:0, step:1, precisionFlag:true, precision:0},
{ prop: 'reentryTime', label: '折返时间', type: 'number', min:120, step:1, precisionFlag:true, precision:0, message:'s'},
{ prop: 'right', label: '发车类型', type: 'checkBox', children: [
{ name: '上行发车', value: 1 },
{ name: '下次发车', value: 2 },
{ name: '同时发车', value: 3 }
] },
{ prop: 'startStationCode', label: '起始站', type: 'select', options: this.stationList },
{ prop: 'endStationCode', label: '终止站', type: 'select', options: this.stationList }
{ prop: 'runningRouting1', label: '环路交路1', type: 'select', show:true, options: this.covertRouting('LOOP'), noDataText:'请先设置交路', change:true, onChange:this.changeRoute2 },
{ prop: 'runningRouting2', label: '环路交路2', type: 'select', show:true, options: this.covertRouting('LOOP'), noDataText:'请先设置交路', change:true, onChange:this.changeRoute1}
// { prop: 'startStationCode', label: '', type: 'select', options: this.stationList },
// { prop: 'endStationCode', label: '', type: 'select', options: this.stationList }
]
};
}
},
created() {
const mapId = this.$route.query.mapId;
if (mapId) {
getStationList(mapId).then(response => {
this.stationList = response.data.map(elem => { return { value: elem.code, label: elem.name }; });
}).catch(() => {
this.$messageBox(`获取车站列表失败`);
});
}
// const mapId = this.$route.query.mapId;
// if (mapId) {
// getStationList(mapId).then(response => {
// this.stationList = response.data.map(elem => { return { value: elem.code, label: elem.name }; });
// }).catch(() => {
// this.$messageBox(``);
// });
// }
},
methods: {
doShow(params) {
this.loading = false;
const mapId = this.$route.query.mapId;
if (mapId) {
listUserRoutingData(mapId).then(response => {
this.routingList = response.data.map(elem => { return { value: elem.code, label: elem.name, routingType:elem.routingType }; });
}).catch(() => {
this.$messageBox(`获取交路列表失败`);
});
}
this.dialogShow = true;
},
doClose() {
@ -134,6 +151,7 @@ export default {
this.$store.dispatch('runPlan/refresh');
}).catch(error => {
console.log(error);
this.$messageBox('生成通用数据失败: ' + error.message);
this.doClose();
});
} else {
@ -141,18 +159,29 @@ export default {
}
});
},
//
formatDateTime(date) {
console.log(date, 3333);
let h = date.getHours();
h = h < 10 ? ('0' + h) : h;
let minute = date.getMinutes();
let second = date.getSeconds();
minute = minute < 10 ? ('0' + minute) : minute;
second = second < 10 ? ('0' + second) : second;
return h + ':' + minute + ':' + second;
validateRunningRouting(rule, value, callback) {
if (value.trim().length == 0) {
return callback(new Error('请选择环路'));
} else {
if (this.formModel.runningRouting1 == this.formModel.runningRouting2) {
return callback(new Error('环路交路1和环路交路2不能相同'));
} else {
return callback();
}
}
},
changeRoute2() {
this.changeRoute('runningRouting2');
},
changeRoute1() {
this.changeRoute('runningRouting1');
},
changeRoute(runningRouting) {
if (this.formModel[runningRouting]) { this.$refs.dataform.validateField([runningRouting]); }
},
covertRouting(routingType) {
return this.routingList.filter(route=>{ return route.routingType == routingType; });
}
}
};
</script>

View File

@ -41,9 +41,9 @@ export default {
return {};
},
computed: {
skinCode() {
return this.$route.query.skinCode;
},
// skinCode() {
// return this.$route.query.skinCode;
// },
width() {
return this.$store.state.app.width > 1920 ? 1920 : this.$store.state.app.width;
},

View File

@ -3,6 +3,7 @@
v-dialogDrag
:title="title"
:visible.sync="dialogVisible"
append-to-body
width="500px"
:before-close="handleClose"
center

View File

@ -1,8 +1,23 @@
<template>
<div>
<!-- style="position:relative" -->
<div class="scriptRecordNew" :style="{bottom:(offsetBottom-15)+'px'}">
<div v-show="isShow" class="scriptRecordNewIn">
<div class="scriptRecordNew">
<div v-if="!dialogVisible" class="scriptRecordNewTitle" @click="minisize">
<span class="titleStyle">{{ $t('scriptRecord.scriptRecordTitle') }}</span>
</div>
</div>
<div>
<el-dialog
v-dialogDrag
:title="$t('scriptRecord.scriptRecordTitle')"
z-index="2008"
class="__scriptRecord"
:visible.sync="dialogVisible"
:modal="false"
append-to-body
:close-on-click-modal="false"
width="700px"
>
<div class="scriptRecordNewIn">
<el-tabs type="card">
<el-tab-pane :label="$t('scriptRecord.scriptRecordTitle')+'('+language+')'">
<div class="eachScriptPanel">
@ -61,9 +76,7 @@
</el-tab-pane>
</el-tabs>
</div>
<div class="scriptRecordNewTitle" @click="minisize">
<span class="titleStyle">{{ $t('scriptRecord.scriptRecordTitle') }}</span>
</div>
</el-dialog>
</div>
<add-script-member ref="addScriptMember" @addScriptMember="addScriptMember" />
<condition-manage ref="conditionManage" @clearConditionActionId="clearConditionActionId" />
@ -94,10 +107,6 @@ export default {
type: String,
required: true
},
offsetBottom:{
type: Number,
required: true
},
offset:{
type: Number,
required: true
@ -109,7 +118,6 @@ export default {
},
data() {
return {
isShow:true,
isFirst:true,
language:'',
isPause:false,
@ -128,7 +136,8 @@ export default {
memberList:[],
driverList:[],
activeTrainList:[],
oldMember:{id:null, type:''}
oldMember:{id:null, type:''},
dialogVisible: false
};
},
computed:{
@ -295,11 +304,7 @@ export default {
return '';
},
minisize() {
if (this.isShow) {
this.isShow = false;
} else {
this.isShow = true;
}
this.dialogVisible = true;
},
covert(data, roleTypeList) {
let lastData = data;
@ -568,10 +573,29 @@ export default {
}
};
</script>
<style lang="scss" scoped>
.selectRolesTitle{
<style lang="scss">
.__scriptRecord {
padding: 0;
pointer-events: none !important;
}
.__scriptRecord {
.el-dialog__header {
padding: 10px 0;
pointer-events: all !important;
text-align: center;
}
.el-dialog__body {
padding: 0;
pointer-events: all !important;
}
.el-dialog__headerbtn {
top: 10px;
right: 10px;
}
}
</style>
<style lang="scss" scoped>
.button-group{
position: absolute;
left: 0;
@ -598,18 +622,16 @@ export default {
}
.scriptRecordNew{
position: absolute;
width: 700px;
z-index: 10;
left: 50%;
bottom: 0px;
transform: translateX(-50%) translateY(0);
right: 12px;
top: calc(45% + 100px);
}
.scriptRecordNewTitle{
position: absolute;
background: #fff;
border-radius: 5px 5px 0px 0px ;
border-radius: 5px 0px 0px 5px ;
padding: 5px 0px;
width: 100px;
width: 23px;
text-align: center;
left: 50%;
transform: translateX(-50%);
@ -619,9 +641,7 @@ export default {
.scriptRecordNewIn{
padding: 10px;
background: #fff;
border-radius: 5px 5px 0px 0px ;
height: 380px;
box-shadow: -1px -1px 3px #656565;
}
.scriptPanelRight{