This commit is contained in:
sunzhenyu 2020-04-20 17:31:50 +08:00
commit ff5bae2b8c
47 changed files with 1551 additions and 571 deletions

View File

@ -536,4 +536,42 @@ export function getFlankProtectionList(mapId, params) {
params
});
}
/** 创建车站区段停站时间 */
export function createStationParkTime(data) {
return request({
url: `/api/mapBuild/stationParkTime`,
method: 'post',
data
});
}
/** 删除车站区段停站时间 */
export function deleteStationParkTime(stationParkTimeId) {
return request({
url: `/api/mapBuild/stationParkTime/${stationParkTimeId}`,
method: 'delete'
});
}
/** 获取车站区段停站时间 */
export function getStationParkTime(stationParkTimeId, params) {
return request({
url: `/api/mapBuild/stationParkTime/${stationParkTimeId}`,
method: 'get',
params
});
}
/** 更新车站区段停站时间 */
export function updateStationParkTime(data) {
return request({
url: `/api/mapBuild/stationParkTime/${data.id}`,
method: 'get',
data
});
}
/** 分页获取车站区段停站时间 */
export function getStationParkTimeList(mapId, params) {
return request({
url: `/api/mapBuild/${mapId}/stationParkTime`,
method: 'get',
params
});
}

View File

@ -45,3 +45,35 @@ export function generateSchedulingAgain(group) {
method: 'delete'
});
}
/** 生成地图通用派班计划 */
export function generateCommonScheduling (data) {
return request({
url: `/api/v1/scheduling/generate/common`,
method: 'post',
data
});
}
/** 查询某天的派班计划 */
export function querySechedulingNew (group, params) {
return request({
url: `/api/v1/scheduling/${group}/day`,
method: 'get',
params
});
}
/** 生成某天的基础派班计划 */
export function generateSchedulingNew (group, params) {
return request({
url: `/api/v1/scheduling/${group}/generate`,
method: 'post',
params
});
}
/** 保存派班计划数据 */
export function saveSchedulingNew(group, data) {
return request({
url: `/api/v1/scheduling/${group}/save`,
method: 'post',
data
});
}

View File

@ -162,7 +162,7 @@ export default {
createSchedulePlanSuccess: 'Create schedule plan success',
regenerateSchedulePlanSuccess: 'Regenerate schedule plan success',
checkPassed: 'Check passed',
checkFailed: 'Check failed',
checkFailed: 'Data check failed',
checkSchedulePlanFailed: 'Check schedule plan failed',
saveSchedulePlanSuccess: 'Save schedule plan success',
saveSchedulePlanFail: 'Save schedule plan fail',

View File

@ -234,5 +234,9 @@ export default {
mapSortSuccessfully: 'Map sort successfully',
mapSortFailed: 'Map sort failed',
enterTrainingRoomFailed: 'Failed to enter the comprehensive drill, please consult the administrator is still in the room!',
failedToAddNewRoom: 'Failed to add new room'
failedToAddNewRoom: 'Failed to add new room',
dwellTimeSuccessful: 'Create dwell time successful!',
dwellTimeFailed: 'Failed to create dwell time!',
updateDwellTimeSuccessful: 'Update dwell time successful!',
updateDwellTimeFailed: 'Failed to update dwell time!'
};

View File

@ -161,8 +161,8 @@ export default {
schedulePlanSuccess: '派班计划成功!',
createSchedulePlanSuccess: '创建派班计划成功',
regenerateSchedulePlanSuccess: '重新生成派班计划成功',
checkPassed: '检查通过',
checkFailed: '检查不通过',
checkPassed: '数据检查校验通过',
checkFailed: '数据检查校验不通过',
checkSchedulePlanFailed: '检查派班计划失败',
saveSchedulePlanSuccess: '保存派班计划成功',
saveSchedulePlanFail: '保存派班失败',

View File

@ -234,5 +234,9 @@ export default {
mapSortSuccessfully: '地图排序成功!',
mapSortFailed: '地图排序失败!',
enterTrainingRoomFailed: '进入综合演练失败,请咨询管理员是否还在房间内!',
failedToAddNewRoom: '加入新房间失败'
failedToAddNewRoom: '加入新房间失败',
dwellTimeSuccessful: '创建停站时间成功!',
dwellTimeFailed: '创建停站时间失败!',
updateDwellTimeSuccessful: '更新停站时间成功!',
updateDwellTimeFailed: '更新停站时间失败!'
};

View File

@ -134,5 +134,6 @@ export const drawSectionStyle = {
continueProtectSection: 'rgba(255,0,255,0.5)',
signalNearSectionCBTC: 'rgba(255, 0, 0, 0.5)',
signalNearSectionReserve: 'rgba(160, 32, 240, 0.5)',
signalNearSection: 'rgba(124, 252, 0, 0.5)'
signalNearSection: 'rgba(124, 252, 0, 0.5)',
routingSection: 'rgba(255, 20, 147, 0.9)'
};

View File

@ -266,6 +266,7 @@ class SkinCode extends defaultStyle {
},
standEmergent: { // 紧急关闭
mergentR: 4, // 站台紧急关闭半径
mergentN: 4, // 站台紧急关闭边数
insideOffset: { x: 0, y: -40 }, // 内站台紧急关闭偏移量
outsideOffset: { x: 0, y: 20 }, // 外站台紧急关闭偏移量
closeColor: '#F61107' // 站台紧急关闭颜色

View File

@ -214,6 +214,7 @@ class SkinCode extends defaultStyle {
},
standEmergent: { // 紧急关闭
mergentR: 4, // 站台紧急关闭半径
mergentN: 4, // 站台紧急关闭边数
insideOffset: { x: 0, y: 25 }, // 内站台紧急关闭偏移量
outsideOffset: { x: 0, y: -25}, // 外站台紧急关闭偏移量
closeColor: 'red' // 站台紧急关闭颜色

View File

@ -220,6 +220,7 @@ class SkinCode extends defaultStyle {
standEmergent: { // 紧急关闭
flicker: true, // 闪烁
mergentR: 5, // 站台紧急关闭半径
mergentN: 4, // 站台紧急关闭边数
insideOffset: { x: 0, y: 30 }, // 内站台紧急关闭偏移量
outsideOffset: { x: 0, y: -30}, // 外站台紧急关闭偏移量
closeColor: '#F61107' // 站台紧急关闭颜色

View File

@ -128,8 +128,8 @@ class SkinCode extends defaultStyle {
},
text: {
show: true, // 信号机名称显示
distance: 0, // 文字和灯杆的距离
isAlignCenter: true, // 信号字体对其方式
distance: 3, // 文字和灯杆的距离
isAlignCenter: false, // 信号字体对其方式
fontSize: 11, // 信号机名称字体大小
fontWeight: 'bold', // 信号机名称字体粗细
defaultColor: '#FFFFFF', // 信号灯字体默认色
@ -209,6 +209,7 @@ class SkinCode extends defaultStyle {
},
standEmergent: { // 紧急关闭
mergentR: 4, // 站台紧急关闭半径
mergentN: 4, // 站台紧急关闭边数
insideOffset: { x: 0, y: 25}, // 内站台紧急关闭偏移量
outsideOffset: { x: 0, y: 15}, // 外站台紧急关闭偏移量
closeColor: '#F61107' // 站台紧急关闭颜色

View File

@ -128,8 +128,8 @@ class SkinCode extends defaultStyle {
},
text: {
show: true, // 信号机名称显示
distance: 0, // 文字和灯杆的距离
isAlignCenter: true, // 信号字体对其方式
distance: 3, // 文字和灯杆的距离
isAlignCenter: false, // 信号字体对其方式
fontSize: 11, // 信号机名称字体大小
fontWeight: 'bold', // 信号机名称字体粗细
defaultColor: '#FFFFFF', // 信号灯字体默认色
@ -206,6 +206,7 @@ class SkinCode extends defaultStyle {
},
standEmergent: { // 紧急关闭
mergentR: 4, // 站台紧急关闭半径
mergentN: 4, // 站台紧急关闭边数
insideOffset: { x: 0, y: 25 }, // 内站台紧急关闭偏移量
outsideOffset: { x: 0, y: -25 }, // 外站台紧急关闭偏移量
closeColor: '#F61107' // 站台紧急关闭颜色

View File

@ -214,6 +214,7 @@ class SkinCode extends defaultStyle {
},
standEmergent: { // 紧急关闭
mergentR: 4, // 站台紧急关闭半径
mergentN: 4, // 站台紧急关闭边数
insideOffset: { x: -10, y: -20 }, // 内站台紧急关闭偏移量
outsideOffset: { x: -10, y: -10}, // 外站台紧急关闭偏移量
closeColor: '#F61107', // 站台紧急关闭颜色

View File

@ -318,6 +318,7 @@ class SkinCode extends defaultStyle {
},
standEmergent: { // 紧急关闭
mergentR: 4, // 站台紧急关闭半径
mergentN: 4, // 站台紧急关闭边数
insideOffset: { x: 0, y: 25 }, // 内站台紧急关闭偏移量
outsideOffset: { x: 0, y: -25 }, // 外站台紧急关闭偏移量
closeColor: 'red' // 站台紧急关闭颜色

View File

@ -14,7 +14,7 @@ class SkinCode extends defaultStyle {
distance: 18, // 文字离区段距离
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色
fontColor: 'lightgreen', // 字体颜色
textAlign: 'center', // 水平对齐方式
textPosition: 'inside', // 文字位置
textVerticalAlign: 'middle' // 文字垂直对齐方式
@ -146,8 +146,8 @@ class SkinCode extends defaultStyle {
},
text: {
show: true, // 信号机名称显示
distance: 0, // 文字和灯杆的距离
isAlignCenter: true, // 信号字体对其方式
distance: 3, // 文字和灯杆的距离
isAlignCenter: false, // 信号字体对其方式
fontSize: 11, // 信号机名称字体大小
fontWeight: 'bold', // 信号机名称字体粗细
defaultColor: 'white', // 信号灯字体默认色
@ -245,21 +245,27 @@ class SkinCode extends defaultStyle {
doorOpenColor:'#007f00' // 车门开启状态颜色(西安二号线线路样式)
},
standEmergent: { // 紧急关闭
mergentR: 4, // 站台紧急关闭半径
insideOffset: { x: 0, y: 25 }, // 内站台紧急关闭偏移量
outsideOffset: { x: 0, y: -25}, // 外站台紧急关闭偏移量
closeColor: 'red' // 站台紧急关闭颜色
mergentR: 9, // 站台紧急关闭半径
mergentN: 8, // 站台紧急关闭边数(西安二号线特殊样式)
insideOffset: { x: 0, y: 50 }, // 内站台紧急关闭偏移量
outsideOffset: { x: 0, y: -50}, // 外站台紧急关闭偏移量
closeColor: 'red', // 站台紧急关闭颜色
defaultColor:'#808080', // 西安二号线特殊样式(默认颜色)
special:true // 西安二号线特殊样式
},
reentry: {}, // 站台折返策略
detainCar: { // 扣车
position: -1, // 扣车标识在站台上显示方向
text: 'H', // 扣车显示内容
offset: {x: -8, y: 13}, // 扣车偏移量
offset: {x: 8, y: 0}, // 扣车偏移量
centerTrainColor: 'white', // 中心扣车颜色
andCenterTrainColor: 'red', // 车站+中心扣车颜色
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
fontSize: 10,
fontWeight: 'normal'
fontWeight: 'normal',
circleWidth:14, // 西安二号线特殊样式 圆圈的宽度
defaultColor:'#808080', // 默认颜色
special:true // 西安二号线特殊样式
},
stopTime: { // 停站时间
position: 1, // 停站时间方向
@ -397,9 +403,9 @@ class SkinCode extends defaultStyle {
text: {
show: true, // 道岔名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
offset: {x: 0, y: 8}, // 道岔名称与区段距离
offset: { x: -15, y: 9 }, // 道岔名称与区段距离
fontSize: 11, // 字体大小
fontColor: '#FFFFFF', // 道岔名称颜色
fontColor: '#C0C0C0', // 道岔名称颜色
fontWeight: 'normal', // 字体粗细
borderColor: '#FE0000', // 道岔边框颜色
lossColor: 'lightgreen', // 道岔失去颜色
@ -537,10 +543,10 @@ class SkinCode extends defaultStyle {
};
this[deviceType.Axle] = {
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
lineLength: 18,
lineWidth: 3,
distance: 7,
radiusR: 5,
lineLength: 14,
lineWidth: 2,
distance: 5,
radiusR: 3,
strokeColor: '#9F9C9C',
fillColor: '#9F9C9C',
resetStrokeColor: '#FFFF00',
@ -552,23 +558,15 @@ class SkinCode extends defaultStyle {
distance: 30, // 模式间距
psd: {
text: 'PSD',
defaultColor: '#9F9C9C'
defaultColor: '#FFF'
},
mfa: {
text: 'MFA',
defaultColor: '#9F9C9C'
mf: {
text: 'MF',
defaultColor: '#FFF'
},
mfb: {
text: 'MFB',
defaultColor: '#9F9C9C'
},
pfa: {
text: 'PFA',
defaultColor: '#9F9C9C'
},
pfb: {
text: 'PFB',
defaultColor: '#9F9C9C'
pf: {
text: 'PF',
defaultColor: '#FFF'
}
};
this[deviceType.ReturnModeGroup] = {

View File

@ -294,7 +294,7 @@ class Jlmap {
}
showStationHandlePsd(oDevice, stationCode) {
const standDevice = this.mapDevice[oDevice.standCode];
if (standDevice.deviceStationCode === stationCode || !stationCode) {
if (standDevice && standDevice.deviceStationCode === stationCode || !stationCode) {
this.$painter.updateSpecialShowStation(oDevice, true);
} else {
this.$painter.updateSpecialShowStation(oDevice, false);

View File

@ -26,66 +26,110 @@ export default class EDeviceStatus extends Group {
textVerticalAlign: model.style.textStyle.textVerticalAlign
}
});
this.mfa = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: model.x + model.style.FaultStatusGroup.distance,
y: model.y,
fontWeight: model.style.textStyle.fontWeight,
fontSize: model.style.FaultStatusGroup.fontSize,
fontFamily: model.style.fontFamily,
text: model.style.FaultStatusGroup.mfa.text,
textFill: model.style.FaultStatusGroup.mfa.defaultColor,
textAlign: model.style.textStyle.textAlign,
textVerticalAlign: model.style.textStyle.textVerticalAlign
}
this.mfList = [];
for (let i = 0; i < model.mfNum; i++) {
const mf = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: model.x + model.style.FaultStatusGroup.distance * (i + 1),
y: model.y,
fontWeight: model.style.textStyle.fontWeight,
fontSize: model.style.FaultStatusGroup.fontSize,
fontFamily: model.style.fontFamily,
text: model.style.FaultStatusGroup.mf.text + String.fromCharCode((65 + i)),
textFill: model.style.FaultStatusGroup.mf.defaultColor,
textAlign: model.style.textStyle.textAlign,
textVerticalAlign: model.style.textStyle.textVerticalAlign
}
});
this.mfList.push(mf);
}
this.pfList = [];
for (let i = 0; i < model.pfNum; i++) {
const pf = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: model.x + model.style.FaultStatusGroup.distance * (this.mfList.length + i + 1),
y: model.y,
fontWeight: model.style.textStyle.fontWeight,
fontSize: model.style.FaultStatusGroup.fontSize,
fontFamily: model.style.fontFamily,
text: model.style.FaultStatusGroup.pf.text + String.fromCharCode((65 + i)),
textFill: model.style.FaultStatusGroup.pf.defaultColor,
textAlign: model.style.textStyle.textAlign,
textVerticalAlign: model.style.textStyle.textVerticalAlign
}
});
this.pfList.push(pf);
}
this.mfList.forEach(item => {
this.add(item);
});
this.mfb = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: model.x + model.style.FaultStatusGroup.distance * 2,
y: model.y,
fontWeight: model.style.textStyle.fontWeight,
fontSize: model.style.FaultStatusGroup.fontSize,
fontFamily: model.style.fontFamily,
text: model.style.FaultStatusGroup.mfb.text,
textFill: model.style.FaultStatusGroup.mfb.defaultColor,
textAlign: model.style.textStyle.textAlign,
textVerticalAlign: model.style.textStyle.textVerticalAlign
}
});
this.pfa = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: model.x + model.style.FaultStatusGroup.distance * 3,
y: model.y,
fontWeight: model.style.textStyle.fontWeight,
fontSize: model.style.FaultStatusGroup.fontSize,
fontFamily: model.style.fontFamily,
text: model.style.FaultStatusGroup.pfa.text,
textFill: model.style.FaultStatusGroup.pfa.defaultColor,
textAlign: model.style.textStyle.textAlign,
textVerticalAlign: model.style.textStyle.textVerticalAlign
}
});
this.pfb = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: model.x + model.style.FaultStatusGroup.distance * 4,
y: model.y,
fontWeight: model.style.textStyle.fontWeight,
fontSize: model.style.FaultStatusGroup.fontSize,
fontFamily: model.style.fontFamily,
text: model.style.FaultStatusGroup.pfb.text,
textFill: model.style.FaultStatusGroup.pfb.defaultColor,
textAlign: model.style.textStyle.textAlign,
textVerticalAlign: model.style.textStyle.textVerticalAlign
}
this.pfList.forEach(item => {
this.add(item);
});
// this.mfa = new Text({
// zlevel: this.zlevel,
// z: this.z,
// style: {
// x: model.x + model.style.FaultStatusGroup.distance,
// y: model.y,
// fontWeight: model.style.textStyle.fontWeight,
// fontSize: model.style.FaultStatusGroup.fontSize,
// fontFamily: model.style.fontFamily,
// text: model.style.FaultStatusGroup.mfa.text,
// textFill: model.style.FaultStatusGroup.mfa.defaultColor,
// textAlign: model.style.textStyle.textAlign,
// textVerticalAlign: model.style.textStyle.textVerticalAlign
// }
// });
// this.mfb = new Text({
// zlevel: this.zlevel,
// z: this.z,
// style: {
// x: model.x + model.style.FaultStatusGroup.distance * 2,
// y: model.y,
// fontWeight: model.style.textStyle.fontWeight,
// fontSize: model.style.FaultStatusGroup.fontSize,
// fontFamily: model.style.fontFamily,
// text: model.style.FaultStatusGroup.mfb.text,
// textFill: model.style.FaultStatusGroup.mfb.defaultColor,
// textAlign: model.style.textStyle.textAlign,
// textVerticalAlign: model.style.textStyle.textVerticalAlign
// }
// });
// this.pfa = new Text({
// zlevel: this.zlevel,
// z: this.z,
// style: {
// x: model.x + model.style.FaultStatusGroup.distance * 3,
// y: model.y,
// fontWeight: model.style.textStyle.fontWeight,
// fontSize: model.style.FaultStatusGroup.fontSize,
// fontFamily: model.style.fontFamily,
// text: model.style.FaultStatusGroup.pfa.text,
// textFill: model.style.FaultStatusGroup.pfa.defaultColor,
// textAlign: model.style.textStyle.textAlign,
// textVerticalAlign: model.style.textStyle.textVerticalAlign
// }
// });
// this.pfb = new Text({
// zlevel: this.zlevel,
// z: this.z,
// style: {
// x: model.x + model.style.FaultStatusGroup.distance * 4,
// y: model.y,
// fontWeight: model.style.textStyle.fontWeight,
// fontSize: model.style.FaultStatusGroup.fontSize,
// fontFamily: model.style.fontFamily,
// text: model.style.FaultStatusGroup.pfb.text,
// textFill: model.style.FaultStatusGroup.pfb.defaultColor,
// textAlign: model.style.textStyle.textAlign,
// textVerticalAlign: model.style.textStyle.textVerticalAlign
// }
// });
this.add(this.psd);
this.add(this.mfa);
this.add(this.mfb);

View File

@ -93,6 +93,8 @@ export default class SaidLamp extends Group {
z: this.z,
x: model.position.x,
y: model.position.y,
mfNum: model.mfNum,
pfNum: model.pfNum,
style: this.style
});
this.add(this.control);

View File

@ -4,87 +4,81 @@
import Path from 'zrender/src/graphic/Path';
// 计轴
export const EAxle = Path.extend({
export default Path.extend({
type: 'EAxle',
_subType: '',
shape: {
// style: this.style,
// traingle: traingle11,
// drictx: 1,
// dricty: 1,
// point: this.model.points[0]
},
buildPath: function (ctx, model) {
if (model && model.style && model.traingle) {
const axleLength = 2 * model.style.Section.axle.radius;
const positionx = model.point.x + model.drictx * (model.traingle.getCos(axleLength) * 1.2);
const positiony = model.point.y + model.dricty * (model.traingle.getCos(axleLength) * 1.2);
buildPath: function (path, shape) {
if (shape && shape.style && shape.traingle) {
const axleLength = 2 * shape.style.Section.axle.radius;
// const positionx = shape.point.x + shape.drictx * (shape.traingle.getCos(axleLength) * 1.2);
// const positiony = shape.point.y + shape.dricty * (shape.traingle.getCos(axleLength) * 1.2);
const positionx = shape.point.x + shape.drictx * (shape.traingle.getCos(axleLength) * 1.05);
const positiony = shape.point.y + shape.dricty * (shape.traingle.getCos(axleLength) * 1.05);
// 圆弧
const arcX = positionx - model.dricty * model.traingle.getSin(axleLength);
const arcY = positiony + model.drictx * model.traingle.getSin(axleLength);
const arcR = model.style.Section.axle.radius;
ctx.arc(arcX, arcY, arcR, 0, 2 * Math.PI, false);
ctx.closePath();
const arcX = positionx - shape.dricty * shape.traingle.getSin(axleLength);
const arcY = positiony + shape.drictx * shape.traingle.getSin(axleLength);
const arcR = shape.style.Section.axle.radius;
path.arc(arcX, arcY, arcR, 0, 2 * Math.PI, false);
path.closePath();
const x1 = positionx - model.traingle.getCos(axleLength * model.multiple1) - model.dricty * model.traingle.getSin(axleLength);
const y1 = positiony + model.drictx * model.traingle.getSin(axleLength * model.multiple1) - model.traingle.getSin(axleLength);
const x2 = positionx + model.traingle.getCos(axleLength * model.multiple2) - model.dricty * model.traingle.getSin(axleLength);
const y2 = positiony + model.drictx * model.traingle.getSin(axleLength * model.multiple2) + model.traingle.getSin(axleLength);
ctx.moveTo(x1, y1);
ctx.lineTo(x2, y2);
ctx.closePath();
const x1 = positionx - shape.traingle.getCos(axleLength * shape.multiple1) - shape.dricty * shape.traingle.getSin(axleLength);
const y1 = positiony + shape.drictx * shape.traingle.getSin(axleLength * shape.multiple1) - shape.traingle.getSin(axleLength);
const x2 = positionx + shape.traingle.getCos(axleLength * shape.multiple2) - shape.dricty * shape.traingle.getSin(axleLength);
const y2 = positiony + shape.drictx * shape.traingle.getSin(axleLength * shape.multiple2) + shape.traingle.getSin(axleLength);
path.moveTo(x1, y1);
path.lineTo(x2, y2);
path.closePath();
}
}
});
// export default class EAxle extends Group {
// constructor(model) {
// super();
// this.model = model;
// this.zlevel = model.zlevel;
// this.z = 5;
// this.create(model);
// }
// constructor(model) {
// super();
// this.model = model;
// this.zlevel = model.zlevel;
// this.z = 5;
// this.create(model);
// }
// create(model) {
// if (model && model.style && model.traingle) {
// const axleLength = 2 * model.style.Section.axle.radius;
// const positionx = model.point.x + model.drictx * (model.traingle.getCos(axleLength));
// const positiony = model.point.y + model.dricty * (model.traingle.getCos(axleLength));
// create(model) {
// if (model && model.style && model.traingle) {
// const axleLength = 2 * model.style.Section.axle.radius;
// const positionx = model.point.x + model.drictx * (model.traingle.getCos(axleLength) * 1.2);
// const positiony = model.point.y + model.dricty * (model.traingle.getCos(axleLength) * 1.2);
// this.line = new Line({
// zlevel: this.zlevel,
// z: this.z,
// progressive: model.progressive,
// shape: {
// x1: positionx - model.traingle.getCos(axleLength) - model.dricty * model.traingle.getSin(axleLength),
// y1: positiony + model.drictx * model.traingle.getSin(axleLength) - model.traingle.getSin(axleLength),
// x2: positionx + model.traingle.getCos(axleLength) - model.dricty * model.traingle.getSin(axleLength),
// y2: positiony + model.drictx * model.traingle.getSin(axleLength) + model.traingle.getSin(axleLength)
// },
// style: {
// GBaseLineWidth: 2,
// stroke: model.style.Section.axle.color
// }
// });
// this.axle = new Circle({
// zlevel: this.zlevel,
// z: this.z,
// progressive: model.progressive,
// shape: {
// cx: positionx - model.dricty * model.traingle.getSin(axleLength),
// cy: positiony + model.drictx * model.traingle.getSin(axleLength),
// r: model.style.Section.axle.radius
// },
// style: {
// GBaseLineWidth: 1,
// stroke: model.style.Section.axle.color,
// fill: model.style.transparentColor
// }
// });
// this.line = new Line({
// zlevel: this.zlevel,
// z: this.z,
// progressive: model.progressive,
// shape: {
// x1: positionx - model.traingle.getCos(axleLength) - model.dricty * model.traingle.getSin(axleLength),
// y1: positiony + model.drictx * model.traingle.getSin(axleLength) - model.traingle.getSin(axleLength),
// x2: positionx + model.traingle.getCos(axleLength) - model.dricty * model.traingle.getSin(axleLength),
// y2: positiony + model.drictx * model.traingle.getSin(axleLength) + model.traingle.getSin(axleLength)
// },
// style: {
// GBaseLineWidth: 1,
// stroke: model.style.Section.axle.color
// }
// });
// this.axle = new Circle({
// zlevel: this.zlevel,
// z: this.z,
// progressive: model.progressive,
// shape: {
// cx: positionx - model.dricty * model.traingle.getSin(axleLength),
// cy: positiony + model.drictx * model.traingle.getSin(axleLength),
// r: model.style.Section.axle.radius
// },
// style: {
// GBaseLineWidth: 1,
// stroke: model.style.Section.axle.color,
// fill: model.style.transparentColor
// }
// });
// this.add(this.line);
// this.add(this.axle);
// }
// }
// this.add(this.line);
// this.add(this.axle);
// }
// }
// }

View File

@ -6,7 +6,7 @@ import ELines from './ELines'; // 创建多线条 曲线 (私有)
import EblockLines from './EblockLines'; // 区段封锁特有
import ESeparator from './ESeparator'; // 分隔符 (私有)
import EMouse from './EMouse';
import { EAxle } from './EAxle'; // 创建计轴
import EAxle from './EAxle'; // 创建计轴
import { EBackArrow, EBackArrowTriangle } from './EBackArrow'; // 折返进路箭头
import ELimitName from './ELimitName'; // 成都三号线 限速名称
import JTriangle from '../../utils/JTriangle';
@ -60,6 +60,7 @@ export default class Section extends Group {
multiple2: 1.5
},
style: {
lineWidth: 2,
fill: this.style.Section.axle.color,
stroke: this.style.Section.axle.color
}
@ -79,6 +80,7 @@ export default class Section extends Group {
multiple2: 1
},
style: {
lineWidth: 2,
fill: this.style.Section.axle.color,
stroke: this.style.Section.axle.color
}

View File

@ -0,0 +1,67 @@
import Group from 'zrender/src/container/Group';
import Circle from 'zrender/src/graphic/shape/Circle';
import Line from 'zrender/src/graphic/shape/Line';
class EDetainCircle extends Group {
constructor(model) {
super();
this.model = model;
this.create();
}
create() {
const model = this.model;
const style = this.model.style;
this.detainCircle = new Circle({
zlevel: model.zlevel,
z: model.z,
shape: {
cx: model.x,
cy: model.y,
r: model.radius
},
style:{
lineWidth:2,
stroke:style.StationStand.detainCar.defaultColor
}
});
this.line1 = new Line({
zlevel: model.zlevel,
z: model.z,
shape:{
x1:model.x - model.radius * 0.7,
y1:model.y - model.radius * 0.7,
x2:model.x + model.radius * 0.7,
y2:model.y + model.radius * 0.7
},
style:{
lineWidth:2,
stroke:style.StationStand.detainCar.defaultColor
}
});
this.line2 = new Line({
zlevel: model.zlevel,
z: model.z,
shape:{
x1:model.x - model.radius * 0.7,
y1:model.y + model.radius * 0.7,
x2:model.x + model.radius * 0.7,
y2:model.y - model.radius * 0.7
},
style:{
lineWidth:2,
stroke:style.StationStand.detainCar.defaultColor
}
});
this.add(this.detainCircle);
this.add(this.line1);
this.add(this.line2);
}
setColor(color) {
this.detainCircle.setStyle('stroke', color);
this.line1.setStyle('stroke', color);
}
}
export default EDetainCircle;

View File

@ -1,6 +1,7 @@
import Group from 'zrender/src/container/Group';
import Isogon from 'zrender/src/graphic/shape/Isogon';
import Polygon from 'zrender/src/graphic/shape/Polygon';
import Line from 'zrender/src/graphic/shape/Line';
import {arrow} from '../utils/ShapePoints';
class ESafeEmergent extends Group {
@ -8,6 +9,9 @@ class ESafeEmergent extends Group {
super();
this.model = model;
this.isNew = false;
if (this.model.style.StationStand.standEmergent.special) {
this.create();
}
}
create() {
@ -43,18 +47,63 @@ class ESafeEmergent extends Group {
n: model.n
},
style: {
lineWidth: 0,
stroke: style.StationStand.standEmergent.closeColor,
fill: style.StationStand.standEmergent.closeColor
lineWidth: 0
}
});
if (style.StationStand.standEmergent.special) {
this.emergent.setStyle('lineWidth', 2);
this.emergent.setStyle('stroke', style.StationStand.standEmergent.defaultColor);
} else {
this.emergent.setStyle('stroke', style.StationStand.standEmergent.closeColor);
this.emergent.setStyle('fill', style.StationStand.standEmergent.closeColor);
}
this.add(this.emergent);
if (style.StationStand.standEmergent.special) {
// r*Math.r*cos(Math.PI/180*22.5)
// Math.sin(Math.PI/180*50)
// Math.cos(Math.PI/180*50)
this.emergent.rotation = Math.PI / 8;
this.emergent.origin = [model.x, model.y];
this.emergent.dirty();
this.emergentLine1 = new Line({
zlevel: model.zlevel,
z: model.z,
shape:{
x1:model.x - model.r * 0.5939,
y1:model.y - model.r * 0.7077,
x2:model.x + model.r * 0.5939,
y2:model.y + model.r * 0.7077
},
style:{
lineWidth:2,
stroke:style.StationStand.standEmergent.defaultColor
}
});
this.emergentLine2 = new Line({
zlevel: model.zlevel,
z: model.z,
shape:{
x1:model.x + model.r * 0.5939,
y1:model.y - model.r * 0.7077,
x2:model.x - model.r * 0.5939,
y2:model.y + model.r * 0.7077
},
style:{
lineWidth:2,
stroke:style.StationStand.standEmergent.defaultColor
}
});
this.add(this.emergentLine1);
this.add(this.emergentLine2);
}
}
}
}
hideMode() {
this.emergent && this.emergent.hide();
if (!this.model.style.StationStand.standEmergent.special) {
this.emergent && this.emergent.hide();
}
}
showMode() {

View File

@ -12,6 +12,7 @@ import EHighlight from '../element/EHighlight';
import ETrainStop from './ETrainStop';
import ETrainDepart from './ETrainDepart';
import EControl from '../element/EControl';
import EDetainCircle from './EDetainCircle';
import {isShowThePrdType} from '../../utils/handlePath';
class StationStand extends Group {
@ -74,7 +75,7 @@ class StationStand extends Group {
x: emergentX,
y: emergentY,
r: style.StationStand.standEmergent.mergentR,
n: 4
n: style.StationStand.standEmergent.mergentN
});
this.add(this.emergent);
@ -131,21 +132,34 @@ class StationStand extends Group {
this.add(this.reentry);
}
/** 站台扣车*/
const detainD = model.right ? 1 : -1;
const detainX = model.position.x - style.StationStand.detainCar.position * detainD * (style.StationStand.detainCar.offset.x - model.width / 2);
const detainY = model.position.y + detainD * (style.StationStand.detainCar.offset.y - model.height / 2);
this.detain = new EDetain({
zlevel: this.zlevel,
z: this.z,
style: style,
x: detainX,
y: detainY,
width: model.width,
inside: model.inside,
right: model.right
});
this.add(this.detain);
if (style.StationStand.detainCar.special) {
const detainD = model.right ? 1 : -1;
this.detainCircle = new EDetainCircle({
zlevel: this.zlevel,
z: this.z,
style: style,
x: model.position.x + (model.width / 2) * detainD + detainD * style.StationStand.detainCar.offset.x + detainD * style.StationStand.detainCar.circleWidth / 2,
y: model.position.y,
radius:style.StationStand.detainCar.circleWidth / 2
});
this.add(this.detainCircle);
} else {
/** 站台扣车*/
const detainD = model.right ? 1 : -1;
const detainX = model.position.x - style.StationStand.detainCar.position * detainD * (style.StationStand.detainCar.offset.x - model.width / 2);
const detainY = model.position.y + detainD * (style.StationStand.detainCar.offset.y - model.height / 2);
this.detain = new EDetain({
zlevel: this.zlevel,
z: this.z,
style: style,
x: detainX,
y: detainY,
width: model.width,
inside: model.inside,
right: model.right
});
this.add(this.detain);
}
/** 停站时间*/
if (style.StationStand.stopTime.offset) {

View File

@ -3,6 +3,7 @@ import store from '@/store/index_APP_TARGET';
import router from './router/index_APP_TARGET';
import {PermissionParam} from '@/scripts/ProjectConfig';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import { admin} from './router/index_APP_TARGET';
import { getToken, removeToken} from '@/utils/auth';
import { LoginParams } from '@/utils/login';

View File

@ -2,7 +2,7 @@
<div>
<el-table
:size="size"
:stripe="rowStyle? null: stripe"
:stripe="rowStyle? false: stripe"
:border="border"
:data="tableData"
:max-height="maxHeight"
@ -93,79 +93,79 @@
<script>
export default {
props: {
maxHeight: {
type: Number,
default() {
return 400;
}
},
height: {
type: Number,
default() {
return 400;
}
},
size: {
type: String,
default() {
return 'mini';
}
},
border: {
type: Boolean
},
stripe: {
type: Boolean
},
tableData: {
type: Array,
default() {
return [];
}
},
tableForm: {
type: Object,
required: true
},
rowStyle: {
type: Function,
default() {
return null;
}
}
},
data() {
return {
scope: null,
labelWidth: '120'
};
},
methods: {
obtainOptions(column) {
return column.options();
},
checkFieldType(field, type) {
return field == type;
},
formatText(column, row) {
return column.format ? column.format(row) : row[column.prop];
},
handleClick(action, scope) {
this.handleBlur(this.scope);
action.handleClick(scope.$index, scope.row);
},
handleFocus(scope) {
this.handleBlur(this.scope);
this.$set(this.tableData[scope.$index], 'editing', true);
this.scope = scope;
},
handleBlur(scope) {
if (scope) {
this.$set(this.tableData[scope.$index], 'editing', false);
}
}
}
props: {
maxHeight: {
type: Number,
default() {
return 400;
}
},
height: {
type: Number,
default() {
return 400;
}
},
size: {
type: String,
default() {
return 'mini';
}
},
border: {
type: Boolean
},
stripe: {
type: Boolean
},
tableData: {
type: Array,
default() {
return [];
}
},
tableForm: {
type: Object,
required: true
},
rowStyle: {
type: Function,
default() {
return null;
}
}
},
data() {
return {
scope: null,
labelWidth: '120'
};
},
methods: {
obtainOptions(column) {
return column.options();
},
checkFieldType(field, type) {
return field == type;
},
formatText(column, row) {
return column.format ? column.format(row) : row[column.prop];
},
handleClick(action, scope) {
this.handleBlur(this.scope);
action.handleClick(scope.$index, scope.row);
},
handleFocus(scope) {
this.handleBlur(this.scope);
this.$set(this.tableData[scope.$index], 'editing', true);
this.scope = scope;
},
handleBlur(scope) {
if (scope) {
this.$set(this.tableData[scope.$index], 'editing', false);
}
}
}
};
</script>
<style lang="scss" scoped>

View File

@ -263,18 +263,24 @@ export default {
this.disabled = true;
setTimeout(() => {
const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType };
schedulingNotify(data).then(resp => {
const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser };
try {
if (this.drawWay) {
this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query });
createSimulationNew(data).then(resp => {
const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser };
this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query });
launchFullscreen();
});
} else {
this.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
schedulingNotify(data).then(resp => {
const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser };
this.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
launchFullscreen();
});
}
launchFullscreen();
}).catch(error => {
this.$messageBox(this.$t('error.createSimulationFailed') + error.message);
} catch (e) {
this.$messageBox(this.$t('error.createSimulationFailed') + e.message);
this.disabled = false;
});
}
}, 100);
},
jump() {

View File

@ -22,31 +22,27 @@
size="small"
type="date"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
@change="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="12">
<el-form-item :label="$t('display.schedule.runDiagramName')">
<el-select v-model="formModel.runPlanName" size="small" style="display: inline-block">
<el-option
v-for="item in runPlanList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('display.schedule.scheduleMode')">
<div>{{ formModel.mode }}</div>
<!--<el-select v-model="formModel.runPlanName" size="small" style="display: inline-block">-->
<!--<el-option-->
<!--v-for="item in runPlanList"-->
<!--:key="item.value"-->
<!--:label="item.label"-->
<!--:value="item.value"-->
<!--/>-->
<!--</el-select>-->
<el-input v-model="formModel.runPlanName" size="small" style="width:140px;" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item style="text-align: right">
<el-button-group>
<el-button size="small" type="warning" @click="handleCheck">{{ $t('display.schedule.check') }}</el-button>
<el-button size="small" type="primary" @click="handleSave">{{ $t('display.schedule.save') }}</el-button>
</el-button-group>
</el-form-item>
@ -65,7 +61,7 @@
</template>
<script>
import { querySecheduling, generateScheduling, getSchedulingAllTrains, checkScheduling, saveScheduling, generateSchedulingAgain } from '@/api/scheduling';
import { querySechedulingNew, generateSchedulingNew, saveSchedulingNew, generateSchedulingAgain } from '@/api/scheduling';
import { hexColor } from '@/utils/runPlan';
import EditTable from '@/views/components/editTable/index';
@ -87,6 +83,11 @@ export default {
loading: false,
runPlanList: [],
groupNumberList: [],
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now() - 24 * 3600 * 1000;
}
},
formModel: {
id: '',
mode: '',
@ -96,14 +97,14 @@ export default {
tableForm: {
index: true,
columns: [
{
title: this.$t('display.schedule.driverNumber'),
prop: 'driverCode',
type: 'text'
},
// {
// title: this.$t('display.schedule.driverNumber'),
// prop: 'driverCode',
// type: 'text'
// },
{
title: this.$t('display.schedule.trainNumber'),
prop: 'trainCode',
prop: 'groupNumber',
type: 'select',
width: '150',
options: () => { return this.groupNumberList; },
@ -112,42 +113,47 @@ export default {
},
{
title: this.$t('display.schedule.onlineSection'),
prop: 'onlineSection',
type: 'text'
prop: 'outDepotTrip.outDepotSectionCode',
type: 'text',
format: (row) => { return this.handleDeviceName(row.outDepotTrip.outDepotSectionCode); }
},
{
title: this.$t('display.schedule.onlineServerNumber'),
prop: 'onlineServerNumber',
type: 'text'
prop: 'outDepotTrip.serviceNumber',
type: 'text',
format: (row) => { return row.outDepotTrip.serviceNumber; }
},
{
title: this.$t('display.schedule.onlineTargetNumber'),
prop: 'onlineTargetNumber',
type: 'text'
prop: 'outDepotTrip.destinationCode',
type: 'text',
format: (row) => { return row.outDepotTrip.destinationCode; }
},
{
title: this.$t('display.schedule.onlineTime'),
prop: 'onlineTime',
type: 'text'
prop: 'outDepotTrip.outDepotTime',
type: 'text',
format: (row) => { return row.outDepotTrip.outDepotTime; }
},
{
title: this.$t('display.schedule.onlineTripNumber'),
prop: 'onlineTripNumber',
prop: 'outDepotTrip.tripNumber',
type: 'text',
format: (row) => { return `${row.onlineDirectionCode}${row.onlineTripNumber}`; }
format: (row) => { return row.outDepotTrip.tripNumber; }
},
{
title: this.$t('display.schedule.outDepot'),
prop: 'outDepot',
type: 'text'
prop: 'outDepotTrip.outDepotCode',
type: 'text',
format: (row) => { return this.handleDeviceName(row.outDepotTrip.outDepotCode); }
},
{
title: this.$t('display.schedule.outDepotStatus'),
prop: 'outStatus',
prop: 'outDepotTrip.status',
type: 'tag',
columnValue: (row) => { return this.$ConstSelect.translate(row.outStatus, 'Whether'); },
columnValue: (row) => { return this.$ConstSelect.translate(row.outDepotTrip.status, 'Whether'); },
tagType: (row) => {
switch (row.outStatus) {
switch (row.outDepotTrip.status) {
case true: return 'success';
case false: return 'danger';
}
@ -156,41 +162,46 @@ export default {
{
title: this.$t('display.schedule.offlineSection'),
prop: 'offlineSection',
type: 'text'
type: 'text',
format: (row) => { return this.handleDeviceName(row.inDepotTrip.inDepotSectionCode); }
},
{
title: this.$t('display.schedule.offlineServerNumber'),
prop: 'offlineServerNumber',
type: 'text'
type: 'text',
format: (row) => { return row.inDepotTrip.serviceNumber; }
},
{
title: this.$t('display.schedule.offlineTargetNumber'),
prop: 'offlineTargetNumber',
type: 'text'
type: 'text',
format: (row) => { return row.inDepotTrip.destinationCode; }
},
{
title: this.$t('display.schedule.offlineTime'),
prop: 'offlineTime',
type: 'text'
type: 'text',
format: (row) => { return row.inDepotTrip.inDepotTime; }
},
{
title: this.$t('display.schedule.offlineTripNumber'),
prop: 'offlineTripNumber',
type: 'text',
format: (row) => { return `${row.offlineDirectionCode}${row.offlineTripNumber}`; }
format: (row) => { return row.inDepotTrip.tripNumber; }
},
{
title: this.$t('display.schedule.inDepot'),
prop: 'inDepot',
type: 'text'
type: 'text',
format: (row) => { return this.handleDeviceName(row.inDepotTrip.inDepotCode); }
},
{
title: this.$t('display.schedule.inDepotStatus'),
prop: 'inStatus',
type: 'tag',
columnValue: (row) => { return this.$ConstSelect.translate(row.inStatus, 'Whether'); },
columnValue: (row) => { return this.$ConstSelect.translate(row.inDepotTrip.status, 'Whether'); },
tagType: (row) => {
switch (row.inStatus) {
switch (row.inDepotTrip.status) {
case true: return 'success';
case false: return 'danger';
}
@ -206,8 +217,14 @@ export default {
return this.$t('display.schedule.schedulePlan');
}
},
created() {
this.loadInitData();
watch: {
'$store.state.map.mapDataLoadedCount': function () {
const trainList = this.$store.state.map.map.trainList || [];
this.groupNumberList = [];
trainList.forEach(item => {
this.groupNumberList.push({value: item.code, label: item.groupNumber});
});
}
},
methods: {
doShow() {
@ -217,16 +234,10 @@ export default {
doClose() {
this.show = false;
},
loadInitData() {
this.groupNumberList = [];
getSchedulingAllTrains(this.group).then(resp => {
this.groupNumberList = resp.data.map(elem => { return {value: elem.code, label: elem.groupNumber}; });
});
},
handleQuery(day) {
if (day) {
this.loading = true;
querySecheduling(this.group, {day}).then(resp => {
querySechedulingNew(this.group, {day}).then(resp => {
if (!resp.data) {
this.$confirm(this.$t('display.schedule.noSchedulePlan'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
@ -258,7 +269,7 @@ export default {
}
},
handleGenerate(day) {
generateScheduling(this.group, {day}).then(resp => {
generateSchedulingNew(this.group, {day}).then(resp => {
this.loading = false;
this.tableData = this.initTableData(resp.data.planList || []);
this.formModel.id = resp.data.id;
@ -285,27 +296,15 @@ export default {
this.$messageBox(`${error.message}`);
});
},
handleCheck() {
if (this.formModel.planDate) {
checkScheduling(this.group, this.tableData).then(resp => {
const data = resp.data;
this.setConflictList(data.conflictList);
if (data.pass) {
this.$message.success(this.$t('display.schedule.checkPassed'));
} else {
this.$message.warning(this.$t('display.schedule.checkFailed'));
}
}).catch(error => {
this.$messageBox(`${this.$t('display.schedule.checkSchedulePlanFailed')}: ${error.message}`);
});
} else {
this.$messageBox(this.$t('display.schedule.selectSchedulePlan'));
}
},
handleSave() {
if (this.formModel.planDate) {
saveScheduling(this.group, this.tableData).then(resp => {
this.$message.success(this.$t('display.schedule.saveSchedulePlanSuccess'));
saveSchedulingNew(this.group, this.tableData).then(resp => {
if (resp.data && !resp.data.pass) {
this.setConflictList(resp.data.conflictList);
this.$message.warning(this.$t('display.schedule.checkFailed'));
} else {
this.$message.success(this.$t('display.schedule.saveSchedulePlanSuccess'));
}
}).catch(() => {
this.$messageBox(this.$t('display.schedule.saveSchedulePlanFail'));
});
@ -314,17 +313,16 @@ export default {
}
},
handleRowStyle({rowIndex}) {
const row = this.tableData[rowIndex];
return row['$conflict'] ? `background: ${row['$conflict']}` : `background: #fff`;
handleRowStyle({row, rowIndex}) {
return row['$conflict'] ? {background: row.$conflict} : {background: '#FFF'};
},
setConflictList(list) {
this.tableData.forEach(elem => { elem['$conflict'] = null; });
if (list && list.length) {
list.forEach(idList => {
const color = hexColor.colorRandom();
this.tableData.forEach(elem => {
if (idList.includes(parseInt(elem.id))) {
const color = hexColor.colorRandom();
elem['$conflict'] = color;
}
});
@ -334,7 +332,7 @@ export default {
},
initTableData(tableData) {
tableData.forEach(elem => {
elem['$conflict'] = null;
this.$set(elem, '$conflict', null);
});
return tableData;
@ -342,6 +340,10 @@ export default {
clearData() {
this.formModel.planDate = '';
this.tableData = [];
},
handleDeviceName(code) {
const device = this.$store.getters['map/getDeviceByCode'](code) || {};
return device.name;
}
}
};

View File

@ -8,9 +8,9 @@
<div class="display-draft" :style="{bottom: offsetBottom + 'px'}">
<el-button-group>
<el-button v-if="isShowScheduling" type="primary" @click="jumpScheduling">{{ $t('display.demon.dispatchingPlan') }}</el-button>
<el-button type="jl3dpassflow" @click="jumpjl3dpassflow">{{ jl3dpassflow }}</el-button>
<el-button type="jumpjlmap3d" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
<el-button v-if="isShow3dmodel" type="jumpjlmap3dmodel" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button>
<el-button v-if="!isShowScheduling" type="jl3dpassflow" @click="jumpjl3dpassflow">{{ jl3dpassflow }}</el-button>
<el-button v-if="!isShowScheduling" type="jumpjlmap3d" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
<el-button v-if="isShow3dmodel && !isShowScheduling" type="jumpjlmap3dmodel" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button>
<template v-if="isShowQuest">
<!-- && !isDesignPlatform -->
<el-button v-if="!isDesignPlatform " type="danger" @click="handleQuitQuest">{{ $t('display.demon.exitScript') }}</el-button>

View File

@ -10,13 +10,13 @@
<el-button-group>
<el-button v-if="isDemon && isDesignPlatform" size="small" :disabled="viewDisabled" type="success" @click="viewScriptRoles">{{ $t('display.schema.selectRoles') }}</el-button>
<!-- 加载剧本 -->
<el-button v-if="isDemon && !isDesignPlatform" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">{{ $t('display.schema.loadScript') }}</el-button>
<el-button v-if="isDemon && !isDesignPlatform && !isScheduling" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">{{ $t('display.schema.loadScript') }}</el-button>
<el-button v-if="notScript && runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
<el-button v-if="!runing && notScript" size="small" :disabled="viewDisabled" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
<el-button v-if="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">{{ $t('display.schema.faultSetting') }}</el-button>
</el-button-group>
<el-radio-group v-model="mode" size="small" @change="changeOperateMode(mode)">
<el-radio-group v-if="!isScheduling" v-model="mode" size="small" @change="changeOperateMode(mode)">
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{ $t('display.schema.normalOperation') }}</el-radio-button>
<el-radio-button class="mode" :label="OperateMode.FAULT">{{ $t('display.schema.faultOperation') }}</el-radio-button>
</el-radio-group>
@ -104,6 +104,9 @@ export default {
},
isDesignPlatform() {
return this.$route.fullPath.includes('design/display/demon');
},
isScheduling() {
return this.$route.query.prdType === '05';
}
},
watch: {

View File

@ -5,7 +5,7 @@
<progress-bar ref="progressBar" />
<zoom-box v-if="!isScreen" :scale-rate="dataZoom.scaleRate" @setShrink="setShrink" @setMagnify="setMagnify" />
<show-mode v-if="isDesign" :local-station-show="localStationShow" @setShowMode="setShowMode" />
<switch-station v-show="isDesign && (showMode === '03') && localStationShow" ref="switchStation" :concentration-station-list="concentrationStationList" @setShowStation="setShowStation" />
<switch-station v-if="isDesign && (showMode === '03') && localStationShow" ref="switchStation" :concentration-station-list="concentrationStationList" @setShowStation="setShowStation" />
<div v-if="show" class="zoom-view" :style="{ width: width +'px'}">
<el-form :model="dataZoom" label-width="80px" size="mini" inline>
<el-form-item :label="$t(`global.offset`)">

View File

@ -0,0 +1,201 @@
<template>
<el-dialog v-dialogDrag class="autoSignal" :title="$t('map.automaticSignalList')" :visible.sync="show" width="85%" :before-do-close="doClose">
<div>
<QueryListPage
ref="queryListPage"
:pager-config="pagerConfig"
:query-form="queryForm"
:query-list="queryList"
/>
</div>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { listMap } from '@/api/jmap/mapdraft';
import { getStationParkTimeList, deleteStationParkTime, getStationParkTime } from '@/api/jmap/mapdraft';
export default {
name: 'RouteDetail',
props: {
mapInfo: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
show: false,
mapList: [],
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
labelWidth: '120px',
queryObject: {
code: {
type: 'text',
label: this.$t('map.autoSignalCode'),
config: {
data: []
}
},
signalCode: {
type: 'select',
label: this.$t('map.signal'),
config: {
data: []
}
}
}
},
queryList: {
query: this.queryFunction,
afterQuery: this.afterQuery,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: '停站车站',
prop: 'stationCode',
type: 'tag',
columnValue: (row) => { return this.formatName(row.stationCode); },
tagType: (row) => { return ''; }
},
{
title: '停站时间',
prop: 'parkingTimeVOList',
type: 'tagMore',
columnValue: (row) => { return this.handelParkingTime(row.parkingTimeVOList); },
tagType: (row) => { return ''; }
},
{
type: 'button',
title: this.$t('map.operation'),
width: '200',
buttons: [
{
name: this.$t('map.compile'),
handleClick: this.editObj
},
{
name: this.$t('map.deleteObj'),
handleClick: this.deleteObj,
type: 'danger'
}
]
}
]
}
};
},
computed: {
...mapGetters('map', [
'sectionList',
'signalList',
'stationStandList'
])
},
watch: {
signalList: function (val, old) {
const list = [];
if (val && val.length) {
for (let i = 0; i < val.length; i++) {
list.push({ label: val[i].uniqueName, value: val[i].code });
}
this.queryForm.queryObject.signalCode.config.data = list;
}
}
},
mounted() {
this.acquireMapList();
},
methods: {
doShow() {
this.show = true;
this.reloadTable();
},
handelParkingTime(parkingTimeVOList) {
const nameList = [];
parkingTimeVOList.forEach(item => {
nameList.push(`${this.formatName(item.sectionCode)}(${item.parkingTime}s)`);
});
return nameList;
},
doClose() {
this.show = false;
},
formatName(code) {
let name = '';
const device = this.$store.getters['map/getDeviceByCode'](code);
if (device) {
name = device.uniqueName || device.name;
}
console.log(code, name, device);
return name;
},
queryFunction(params) {
if (this.mapInfo && this.mapInfo.id) {
return getStationParkTimeList(this.mapInfo.id, params);
}
},
acquireMapList() {
//
listMap({ drawWay:true}).then(response => {
this.mapList = response.data;
});
},
afterQuery(data) {
if (data && data.list) {
const that = this;
const list = data.list;
if (list) {
list.map(elem => {
that.$convertSpecifiedField(elem, that.mapList, 'id', 'name', ['mapId']);
elem.code = elem.signalCode;
elem.signalCode = that.formatName(elem.signalCode);
});
}
}
return data;
},
editObj(index, row) {
getStationParkTime(row.id).then(response => {
const data = response.data;
this.$emit('autoMaticoSelected', data);
this.doClose();
});
},
deleteObj(index, row) {
if (this.mapInfo && this.mapInfo.id && row) {
//
deleteStationParkTime(row.id).then(response => {
this.$message.success(this.$t('map.successfullyDelete'));
this.reloadTable();
}).catch(() => {
this.$messageBox(this.$t('map.failDelete'));
});
}
},
reloadTable() {
if (this.queryList && this.queryList.reload) {
this.queryList.reload();
}
}
}
};
</script>
<style lang="scss">
.autoSignal .el-dialog__body {
padding: 0px 20px 10px 20px;
color: #606266;
font-size: 14px;
}
.autoSignal .el-dialog{
margin-top: 5vh !important;
}
</style>

View File

@ -0,0 +1,265 @@
<template>
<div style="height: 100%;">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-form ref="form" :model="addModel" :rules="rules" label-width="80px" size="mini">
<div class="definition">
<el-form-item label="停站车站" prop="stationCode">
<el-select v-model="addModel.stationCode" clearable :filterable="true">
<el-option
v-for="item in stationList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
<el-button
:type=" field === 'parkStationCode' ? 'danger' : 'primary'"
@click="hover('parkStationCode')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="停站时间:" prop="parkingTimeVOList">
<div style="margin-left: 10px; margin-top: 15px;">
<span style="text-align:right;vertical-align:middle;font-size:14px;color:#606266;font-weight: 700;">停站区段:</span>
<el-select v-model="sectionCode" clearable :filterable="true" :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in filterSectionList"
:key="item.code"
:label="`${item.name}(${item.code})`"
:value="item.code"
/>
</el-select>
<el-button
:type=" field === 'parkSection' ? 'danger' : 'primary'"
@click="hover('parkSection')"
>{{ $t('map.activate') }}</el-button>
</div>
<div style="margin-left: 10px; margin-top: 15px; margin-bottom: 15px;">
<span style="text-align:right;vertical-align:middle;font-size:14px;color:#606266;font-weight: 700;">停站时间:</span>
<el-input-number v-model="parkingTime" controls-position="right" :min="0" /><span>(s)</span>
<el-button
type="primary"
style="position: absolute; right: 10px;"
@click="pushSection(addModel.parkingTimeVOList, {sectionCode: sectionCode, parkingTime:parkingTime})"
>
{{ $t('map.add') }}
</el-button>
</div>
<el-table :data="addModel.parkingTimeVOList" border style="width: 97%">
<el-table-column prop="sectionCode" label="停车区段">
<template slot-scope="scope">
<span>{{ formatName(scope.row.sectionCode) }}</span>
</template>
</el-table-column>
<el-table-column prop="parkingTime" label="停车时间">
<template slot-scope="scope">
<span>{{ scope.row.parkingTime }}</span>
</template>
</el-table-column>
<el-table-column fixed="right" :label="$t('map.operation')" width="50">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.prevent="deleteSection(addModel.routingSectionList, scope.$index)"
>
{{ $t('map.remove') }}
</el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button v-if="isSave" type="primary" size="small" :loading="loading" @click="save">{{ $t('map.save') }}
</el-button>
<el-button v-else type="warning" size="small" :loading="loading" @click="update">{{ $t('map.updata') }}
</el-button>
</el-button-group>
</el-form-item>
</div>
</el-form>
</el-scrollbar>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { setUID } from '@/jmapNew/utils/Uid';
import { createStationParkTime, updateStationParkTime } from '@/api/jmap/mapdraft';
import { ViewMode } from '@/scripts/ConstDic';
import { formatName } from '@/utils/runPlan';
export default {
name: 'RouteOperation',
props: {
selected: {
type: Object,
default() {
return null;
}
},
mapInfo: {
type: Object,
default() {
return null;
}
},
routeData: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
ViewMode: ViewMode,
field: '',
isSave: true,
loading: false,
sectionCode: '',
parkingTime: 0,
addModel: {
id: '',
code: '',
mapId: '',
stationCode: '',
parkingTimeVOList: []
},
editShow: false,
rules: {
signalCode: [
{ required: true, message: this.$t('map.pleaseSelectSignal'), trigger: 'change' }
]
// sectionList: [
// { required: true, message: this.$t('map.triggerSegmentData'), trigger: 'change' }
// ]
}
};
},
computed: {
...mapGetters('map', [
'sectionList',
'stationList'
]),
filterSectionList() {
if (this.sectionList) {
return this.sectionList.filter(elem => { return elem.standTrack || elem.reentryTrack || elem.transferTrack; });
} else {
return [];
}
}
},
watch: {
mapInfo(val) {
if (val) {
this.addModel.mapId = val.id;
}
},
routeData(val, old) {
if (val) {
this.addModel = val;
if (val.parkingTimeVOList.length) {
this.sectionCode = val.parkingTimeVOList[0].sectionCode;
this.parkingTime = val.parkingTimeVOList[0].parkingTime;
}
this.editShow = true;
}
}
},
mounted() {
},
methods: {
hover(field) {
this.field = field === this.field ? '' : field;
},
formatName(code) {
return formatName(code);
},
pushSection(list, data) {
list.push(data);
},
setSelected(selected) {
if (selected) {
if (selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field.toUpperCase() === 'parkStationCode'.toUpperCase()) {
this.addModel.stationCode = selected.code;
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'parkSection'.toUpperCase()) {
if (selected.standTrack || selected.reentryTrack || selected.transferTrack) {
this.sectionCode = selected.code;
} else {
this.$message.error('请选择可以停车的区段!');
}
}
}
},
buildModel(code) {
const model = Object.assign({}, this.addModel);
if (code) { model['code'] = code; }
model['mapId'] = this.mapInfo.id;
model['id'] = this.addModel.id;
return model;
},
save() {
this.$refs.form.validate((valid) => {
if (valid) {
this.loading = true;
createStationParkTime(this.buildModel(setUID('dwellTime'))).then(resp => {
this.$message.success(this.$t('tip.dwellTimeSuccessful'));
this.loading = false;
this.clear();
}).catch(() => {
this.$messageBox(this.$t('tip.dwellTimeFailed'));
this.loading = false;
});
}
});
},
update() {
this.$refs.form.validate((valid) => {
if (valid) {
this.loading = true;
updateStationParkTime(this.buildModel()).then(resp => {
this.$message.success(this.$t('tip.updateDwellTimeSuccessful'));
this.loading = false;
this.clear();
}).catch(() => {
this.$messageBox(this.$t('tip.updateDwellTimeFailed'));
this.loading = false;
});
}
});
},
clear() {
if (this.$refs && this.$refs.form && this.mapInfo) {
delete this.addModel.id;
this.$refs.form.resetFields();
this.addModel.mapId = this.mapInfo.id;
this.addModel.stationCode = '';
this.addModel.parkingTimeVOList = [];
this.sectionCode = '';
this.parkingTime = 0;
this.addModel.code = '';
this.isSave = true;
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-radio {
margin-right: 10px;
}
/deep/ {
.el-select .el-tag {
height: auto;
display: flex;
align-items: center;
justify-content: center;
padding-right: 15px;
box-sizing: border-box;
white-space: normal;
}
.el-input__suffix{
right: 2px;
}
}
</style>

View File

@ -0,0 +1,87 @@
<template>
<div style="height: 100%;">
<dwell-time-draft
ref="routeEdit"
:selected="selected"
:map-info="mapInfo"
:route-data="routeData"
/>
<dwell-time-detail ref="routeDetail" :map-info="mapInfo" @autoMaticoSelected="autoMaticoSelected" />
</div>
</template>
<script>
import DwellTimeDraft from './dwellTime';
import DwellTimeDetail from './detail';
export default {
name: 'DwellTimeOperate',
components: {
DwellTimeDraft,
DwellTimeDetail
},
props: {
mapInfo: {
type: Object,
default() {
return null;
}
},
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
enabledTab: 'Route',
routeData: null
};
},
methods: {
clickEvent(e, model) {
this.onSelect(model);
},
onSelect(model) {
if (model) {
this.selected = model;
} else {
this.selected = null;
}
},
setDelayUnlockStatus(data, status) {
if (data && data.delayShowList) {
data.delayShowList.forEach(elem => {
elem.status = status;
});
}
},
autoMaticoSelected: function (data) {
this.routeData = data;
if (this.$refs && this.$refs.routeEdit) {
this.$refs.routeEdit.isSave = false;
}
},
previewRouteEvent: function () {
if (this.$refs && this.$refs.routeDetail) {
this.$refs.routeDetail.doShow();
}
},
deleteSection(list, index) {
list.splice(index, 1);
},
createRouteEvent: function () {
if (this.$refs && this.$refs.routeEdit) {
this.$refs.routeEdit.clear();
}
},
setSelected(selected) {
this.$refs.routeEdit.setSelected(selected);
},
setCenter(code) {
this.$emit('setCenter', code);
}
}
};
</script>

View File

@ -69,6 +69,14 @@
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="停站时间" class="tab_pane_box" name="dwellTime">
<dwell-time-operate
ref="dwellTimeOperate"
:map-info="mapInfo"
:selected="selected"
@setCenter="setCenter"
/>
</el-tab-pane>
</el-tabs>
</div>
</div>
@ -84,6 +92,7 @@ import RunLevelOperate from './runLeveloperate/index';
import SignalOperate from './signaloperate/index';
import TurnedOperate from './turnedoperate/index';
import FlankProtectOperate from './flankProtectOperate/index';
import DwellTimeOperate from './dwellTimeOperate/index';
export default {
name: 'DataRelation',
@ -95,7 +104,8 @@ export default {
FlankProtectOperate,
// PathOperate,
SignalOperate,
TurnedOperate
TurnedOperate,
DwellTimeOperate
},
props: {
selected: {
@ -120,7 +130,8 @@ export default {
signal: 'signalOperate',
runLevel: 'runLevelOperate',
turned: 'turnedOperate',
flankProtect: 'flankProtectOperate'
flankProtect: 'flankProtectOperate',
dwellTime: 'dwellTimeOperate'
}
};
},

View File

@ -87,10 +87,10 @@ export default {
},
{
title: this.$t('map.routingDirection'),
prop: 'directionCode',
prop: 'right',
type: 'tag',
columnValue: (row) => { return this.$ConstSelect.translate(row.directionCode, 'DirectionCodeList'); },
tagType: (row) => { if (row.directionCode === '0') { return 'primary'; } else { return 'success'; } }
columnValue: (row) => { if (row.right) { return '右行'; } else { return '左行'; } },
tagType: (row) => { if (row.right) { return 'primary'; } else { return 'success'; } }
},
{
title: this.$t('map.destination'),
@ -98,17 +98,14 @@ export default {
},
{
title: this.$t('map.remarks'),
prop: 'remarks'
prop: 'description'
},
{
type: 'button',
title: this.$t('map.sectionData'),
buttons: [
{
name: this.$t('map.preview'),
handleClick: this.sectionDetail
}
]
prop: 'parkSectionCodeList',
type: 'tagMore',
columnValue: (row) => { return this.handlerParkSectionCodeList(row.parkSectionCodeList); },
tagType: 'primary'
},
{
type: 'button',
@ -159,6 +156,15 @@ export default {
doClose() {
this.show = false;
},
handlerParkSectionCodeList(parkSectionCodeList) {
const nameList = [];
this.sectionList.forEach(item => {
if (parkSectionCodeList.includes(item.code)) {
nameList.push(item.name);
}
});
return nameList;
},
formatName(code) {
let name = '';
const device = this.$store.getters['map/getDeviceByCode'](code);
@ -223,10 +229,10 @@ export default {
const fieldList = {
id: row.id,
mapId: this.$route.params.mapId,
title: '区段列表',
title: '',
name: row.name,
model: {
field: 'routingSectionList',
field: 'parkSectionCodeList',
items: [
{ prop: 'stationCode', label: this.$t('map.stationCodeClomn'), type: 'text' },
{

View File

@ -66,7 +66,7 @@
<el-input v-model="addModel.destinationCode" />
</el-form-item>
<el-form-item :label="$t('map.routingDirection')" prop="directionCode">
<el-select v-model="addModel.directionCode" clearable :filterable="true" :placeholder="$t('map.pleaseSelect')">
<el-select v-model="addModel.right" clearable :filterable="true" :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in DirectionCodeList"
:key="item.value"
@ -75,68 +75,79 @@
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('map.remarksColon')" prop="remarks">
<el-input v-model="addModel.remarks" type="textarea" :rows="4" :placeholder="$t('map.pleaseSelect')" />
<el-form-item :label="$t('map.remarksColon')" prop="description">
<el-input v-model="addModel.description" type="textarea" :rows="4" :placeholder="$t('map.pleaseSelect')" />
</el-form-item>
<el-form-item :label="$t('map.trafficSegmentData')" prop="routingSectionList">
<div>
<el-select v-model="stationCode" clearable :filterable="true" :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in filterStationList"
:key="item.code"
:label="`${item.name}(${item.code})`"
:value="item.code"
/>
</el-select>
<el-button
:type="field === 'routingStation' ? 'danger' : 'primary'"
@click="hover('routingStation')"
>{{ $t('map.activate') }}</el-button>
</div>
<div>
<el-select v-model="sectionCode" clearable :filterable="true" :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in sectionList"
:key="item.code"
:label="`${item.name}(${item.code})`"
:value="item.code"
/>
</el-select>
<el-button
:type=" field === 'routingSection' ? 'danger' : 'primary'"
@click="hover('routingSection')"
>{{ $t('map.activate') }}</el-button>
<el-button
type="primary"
@click="pushSection(addModel.routingSectionList, {stationCode: stationCode, sectionCode: sectionCode})"
>
{{ $t('map.add') }}
</el-button>
</div>
<el-table :data="addModel.routingSectionList" border style="width: 97%">
<el-table-column prop="sectionCode" :label="$t('map.stationName')">
<template slot-scope="scope">
<span>{{ formatName(scope.row.stationCode) }}</span>
</template>
</el-table-column>
<el-table-column prop="sectionCode" :label="$t('map.sectionName')">
<template slot-scope="scope">
<span>{{ formatName(scope.row.sectionCode) }}</span>
</template>
</el-table-column>
<el-table-column fixed="right" :label="$t('map.operation')" width="50">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.prevent="deleteSection(addModel.routingSectionList, scope.$index)"
>
{{ $t('map.remove') }}
</el-button>
</template>
</el-table-column>
</el-table>
<el-form-item :label="$t('map.trafficSegmentData')" prop="parkSectionCodeList">
<el-select v-model="addModel.parkSectionCodeList" multiple>
<el-option
v-for="item in sectionList"
:key="item.code"
:label="`${item.name}(${item.code})`"
:value="item.code"
/>
</el-select>
<el-button :type=" field === 'routingSection' ? 'danger' : 'primary'" @click="hover('routingSection')">{{ $t('map.activate') }}</el-button>
</el-form-item>
<!--<el-form-item :label="$t('map.trafficSegmentData')" prop="routingSectionList">-->
<!--<div>-->
<!--<el-select v-model="stationCode" clearable :filterable="true" :placeholder="$t('map.pleaseSelect')">-->
<!--<el-option-->
<!--v-for="item in filterStationList"-->
<!--:key="item.code"-->
<!--:label="`${item.name}(${item.code})`"-->
<!--:value="item.code"-->
<!--/>-->
<!--</el-select>-->
<!--<el-button-->
<!--:type="field === 'routingStation' ? 'danger' : 'primary'"-->
<!--@click="hover('routingStation')"-->
<!--&gt;{{ $t('map.activate') }}</el-button>-->
<!--</div>-->
<!--<div>-->
<!--<el-select v-model="sectionCode" clearable :filterable="true" :placeholder="$t('map.pleaseSelect')">-->
<!--<el-option-->
<!--v-for="item in sectionList"-->
<!--:key="item.code"-->
<!--:label="`${item.name}(${item.code})`"-->
<!--:value="item.code"-->
<!--/>-->
<!--</el-select>-->
<!--<el-button-->
<!--:type=" field === 'routingSection' ? 'danger' : 'primary'"-->
<!--@click="hover('routingSection')"-->
<!--&gt;{{ $t('map.activate') }}</el-button>-->
<!--<el-button-->
<!--type="primary"-->
<!--@click="pushSection(addModel.routingSectionList, {stationCode: stationCode, sectionCode: sectionCode})"-->
<!--&gt;-->
<!--{{ $t('map.add') }}-->
<!--</el-button>-->
<!--</div>-->
<!--<el-table :data="addModel.routingSectionList" border style="width: 97%">-->
<!--<el-table-column prop="sectionCode" :label="$t('map.stationName')">-->
<!--<template slot-scope="scope">-->
<!--<span>{{ formatName(scope.row.stationCode) }}</span>-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column prop="sectionCode" :label="$t('map.sectionName')">-->
<!--<template slot-scope="scope">-->
<!--<span>{{ formatName(scope.row.sectionCode) }}</span>-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column fixed="right" :label="$t('map.operation')" width="50">-->
<!--<template slot-scope="scope">-->
<!--<el-button-->
<!--type="text"-->
<!--size="small"-->
<!--@click.native.prevent="deleteSection(addModel.routingSectionList, scope.$index)"-->
<!--&gt;-->
<!--{{ $t('map.remove') }}-->
<!--</el-button>-->
<!--</template>-->
<!--</el-table-column>-->
<!--</el-table>-->
<!--</el-form-item>-->
<el-form-item>
<el-button-group>
<el-button v-if="isSave" type="primary" size="small" :loading="loading" @click="save">{{ $t('map.save') }}
@ -188,19 +199,19 @@ export default {
sectionCode: '',
isSave: true,
loading: false,
DirectionCodeList: this.$ConstSelect.DirectionCodeList,
DirectionCodeList: [{label: '右行', value: true}, {label: '左行', value: false}],
addModel: {
name: '',
mapId: '',
code: '',
directionCode: '',
right: true,
destinationCode: '',
startStationCode: '',
startSectionCode: '',
endStationCode: '',
endSectionCode: '',
remarks: '',
routingSectionList: []
description: '',
parkSectionCodeList: []
},
editShow: false,
rules: {
@ -243,6 +254,9 @@ export default {
} else {
return [];
}
},
newParkSectionCodeList() {
return JSON.stringify(this.addModel.parkSectionCodeList);
}
},
watch: {
@ -256,6 +270,18 @@ export default {
this.addModel = val;
this.editShow = true;
}
},
newParkSectionCodeList: {
handler: function(val, old) {
const obj = JSON.parse(val);
const objOld = JSON.parse(old);
if (objOld && objOld.length) {
this.changeSectionSelected(objOld);
}
if (obj && obj.length) {
this.changeSectionSelected(obj);
}
}
}
},
mounted() {
@ -293,7 +319,7 @@ export default {
this.addModel.endSectionCode = selected.code;
this.addModel.destinationCode = selected.destinationCode || '';
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() == 'routingSection'.toUpperCase()) {
this.sectionCode = selected.code;
this.addModel.parkSectionCodeList.push(selected.code);
} else if (selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field.toUpperCase() == 'routingStation'.toUpperCase()) {
this.stationCode = selected.code;
}
@ -313,9 +339,9 @@ export default {
list.splice(index, 1);
},
buildModel(code) {
this.addModel.routingSectionList.forEach((elem, index) => {
elem['orderNum'] = index + 1;
});
// this.addModel.routingSectionList.forEach((elem, index) => {
// elem['orderNum'] = index + 1;
// });
const model = Object.assign({}, this.addModel);
model['mapId'] = this.mapInfo.id;
@ -360,12 +386,37 @@ export default {
delete this.addModel.id;
this.$refs.form.resetFields();
this.addModel.mapId = this.mapInfo.id;
this.addModel.routingSectionList = [];
this.addModel.parkSectionCodeList = [];
this.addModel.code = '';
this.stationCode = '';
this.sectionCode = '';
this.isSave = true;
}
},
changeSectionSelected(list) {
let type = '';
let flag = true;
list && list.forEach((item) => {
const section = this.$store.getters['map/getDeviceByCode'](item);
if (this.addModel.parkSectionCodeList.includes(item)) {
type = 'routingSection';
flag = true;
} else {
type = '';
flag = false;
}
this.setSectionSelectedType(section, flag, type);
});
},
setSectionSelectedType(section, flag, type) {
if (section && section.logicSectionCodeList && section.logicSectionCodeList.length) {
section.logicSectionCodeList.forEach( (logicSectionCode) => {
const logicSection = this.$store.getters['map/getDeviceByCode'](logicSectionCode);
logicSection && logicSection.instance.drawBatchSelected(flag, flag ? type : '');
});
} else {
section && section.instance.drawBatchSelected(flag, flag ? type : '');
}
}
}
};

View File

@ -103,8 +103,12 @@ export default {
this.timeDemon = setInterval(() => {
checkLoginLine();
}, 5000 * 60);
EventBus.$on('SELECTON', () => {
this.selected = null;
});
},
beforeDestroy() {
EventBus.$off('SELECTON');
this.clearAutoSave();
this.$store.dispatch('map/mapClear');
if (this.timeDemon) {
@ -309,6 +313,9 @@ export default {
},
saveMapEvent() { //
const map = this.$store.state.map.map;
// map.signalList.forEach(item => {
// item.lampPostType = '02';
// });
if (this.$refs.jlmapVisual && map && parseInt(this.$route.params.mapId)) {
if (this.verifySectionPoint(map)) {
this.mapSaveing = true;

View File

@ -43,22 +43,41 @@
</template>
<template v-if="checkFieldType(item, 'multiSelect')">
<el-form-item v-if="!item.isHidden" :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
<el-select
v-model="formModel[item.prop]"
filterable
multiple
:placeholder="item.placeholder"
:disabled="item.disabled"
:clearable="item.clearable"
@change="item.deviceChange"
>
<el-option
v-for="option in item.options"
:key="option[item.optionValue]"
:label="handleLabel(option, item.optionLabel)"
:value="option[item.optionValue]"
/>
</el-select>
<template v-if="item.change">
<el-select
v-model="formModel[item.prop]"
filterable
multiple
:placeholder="item.placeholder"
:disabled="item.disabled"
:clearable="item.clearable"
@change="item.deviceChange"
>
<el-option
v-for="option in item.options"
:key="option[item.optionValue]"
:label="handleLabel(option, item.optionLabel)"
:value="option[item.optionValue]"
/>
</el-select>
</template>
<template v-else>
<el-select
v-model="formModel[item.prop]"
filterable
multiple
:placeholder="item.placeholder"
:disabled="item.disabled"
:clearable="item.clearable"
>
<el-option
v-for="option in item.options"
:key="option[item.optionValue]"
:label="handleLabel(option, item.optionLabel)"
:value="option[item.optionValue]"
/>
</el-select>
</template>
</el-form-item>
</template>
<template v-if="checkFieldType(item, 'selectHover')">

View File

@ -114,7 +114,9 @@ export default {
position: {
x: 0,
y: 0
}
},
mfNum: 0,
pfNum: 0
},
addModel: {
code: '',
@ -124,7 +126,9 @@ export default {
position: {
x: 0,
y: 0
}
},
mfNum: 0,
pfNum: 0
},
rules: {
code: [
@ -168,6 +172,8 @@ export default {
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
] },
{ prop: 'mfNum', label: '报警指示故障数量:', type: 'number', min: 0, isHidden: this.editModel.type !== 'FaultStatusGroup' },
{ prop: 'pfNum', label: '电源故障数量:', type: 'number', min: 0, isHidden: this.editModel.type !== 'FaultStatusGroup'},
{ prop:'stationCode', label: '所属车站', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList}
]
}
@ -185,7 +191,9 @@ export default {
{ prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '140px', children: [
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
] }
] },
{ prop: 'mfNum', label: '报警指示故障数量:', type: 'number', min: 0, isHidden: this.addModel.type !== 'FaultStatusGroup' },
{ prop: 'pfNum', label: '电源故障数量:', type: 'number', min: 0, isHidden: this.addModel.type !== 'FaultStatusGroup'}
]
};
return form;
@ -468,6 +476,8 @@ export default {
x: this.addModel.position.x,
y: this.addModel.position.y
},
mfNum: this.addModel.mfNum,
pfNum: this.addModel.pfNum,
stationCode: this.addModel.stationCode //
};
models.push(model);

View File

@ -221,6 +221,7 @@ export default {
trainWindowCode: '',
destinationCodePoint: { x: 0, y: 0 },
curve: false,
nameShow: true,
relevanceSectionList: [],
points: [],
leftAxlePosition: 0,

View File

@ -64,7 +64,11 @@ export default {
SectionSepTypeList: [],
regionList: [],
viewSelect: false,
axlePositionList: [{value: 1, label: '下方显示'}, {value: 0, label: '不显示'}, {value: -1, label: '上方显示'}],
axlePositionList: [
{value: 1, label: '下方显示'},
{value: 0, label: '不显示'},
{value: -1, label: '上方显示'}
],
editModel: {
code: '',
name: '',
@ -129,7 +133,7 @@ export default {
'lineCode'
]),
form() {
const form = {
return {
labelWidth: '160px',
items: {
code: {
@ -183,7 +187,7 @@ export default {
] },
{ prop: 'switchSection', label: this.$t('map.isSwitchSection'), type: 'checkbox', disabled: true }, //
{ prop: 'relSwitchCode', label: this.$t('map.relSwitchCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.switchList, isHidden: this.isStandTrackShow, disabled: true }, //
{ prop: 'relSwitchCode', label: this.$t('map.relSwitchCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.switchList, isHidden: !this.isRelevanceSwitchShow, disabled: true }, //
{ prop: 'logicSectionShow', label: this.$t('map.displayLogicalExtents'), type: 'checkbox', isHidden: !this.isSwitchSectionType }, // 1
{ prop: 'logicSectionNameSort', label: this.$t('map.logicSectionNameSort'), type: 'radio', optionLabel: 'label', optionValue: 'value', isHidden: !this.isLogicSectionNameSort, radioList: [
@ -204,14 +208,13 @@ export default {
{ prop: 'leftStopPointOffset', label: this.$t('map.leftStopPointOffset'), type: 'number', min: 0, disabled: true, isHidden: !this.isStopPointOffset },
{ prop: 'rightStopPointOffset', label: this.$t('map.rightStopPointOffset'), type: 'number', min: 0, disabled: true, isHidden: !this.isStopPointOffset },
{ prop: 'region', label: this.$t('map.sectionColon'), type: 'select', optionLabel: 'label', optionValue: 'value', options: this.regionList, isHidden: !this.sectionColonShow },
{ prop: 'trainWindowCode', label: '关联车次窗', type: 'input', disabled: true, isHidden: this.hasAssociatedSection },
{ prop: 'trainWindowCode', label: '关联车次窗', type: 'input', disabled: true, isHidden: !this.isSwitchSectionShow },
{ prop: 'kmRangeLeft', label: this.$t('map.leftKilometerMark'), type: 'number', min: 0, placeholder: this.$t('map.meter') },
{ prop: 'kmRangeRight', label: this.$t('map.rightKilometerMark'), type: 'number', min: 0, placeholder: this.$t('map.meter') }
]
}
}
};
return form;
},
rules() {
var validateAssociatedSection = (rule, value, callback) => {
@ -312,9 +315,15 @@ export default {
isLogicSectionNameSort() { //
return this.editModel.type == '01';
},
isSwitchSectionShow() { //
return this.editModel.type != '03';
},
isPointsShow() {
return this.editModel.type !== '04' && this.editModel.points.length > 0;
},
isRelevanceSwitchShow() {
return this.editModel.type == '04' && this.editModel.type == '03';
},
isStandTrackShow() {
return this.editModel.type != '04' && this.editModel.type != '03';
},
@ -408,6 +417,8 @@ export default {
this.oldPoint = JSON.parse(JSON.stringify(selected.points));
this.oldLeftSectionCode = selected.leftSectionCode;
this.oldRightSectionCode = selected.rightSectionCode;
this.editModel.leftAxlePosition = selected.leftAxlePosition || 0; //
this.editModel.rightAxlePosition = selected.rightAxlePosition || 0; //
this.$refs.logicBlock.computedLogicSectionNumList(this.editModel.logicSectionNum);
if (this.field.toUpperCase() === 'splitSection'.toUpperCase()) {
this.$refs.splitOrMerge.addModel.splitOffsetMax = Math.sqrt(new JTriangle(selected.points[0], selected.points[selected.points.length - 1]).abspowz);
@ -457,7 +468,7 @@ export default {
},
//
edit() {
this.$refs['dataform'].validate((valid) => {
this.$refs['dataform'].validate(valid => {
if (valid) {
if (this.editModel.type === '03' && this.editModel.leftSectionCode && this.editModel.rightSectionCode) {
this.$messageBox('道岔区段应仅有一侧关联区段!');

View File

@ -176,6 +176,7 @@ export default {
trainPosType: model.trainPosType,
points: points,
curve: false,
nameShow: true,
lengthFact: lineLength ? lineLength.toFixed(3) : lineLength,
trainWindowCode: '',
kmRangeRight: model.kmRangeRight,

View File

@ -70,6 +70,8 @@
<script>
import { getUID } from '@/jmapNew/utils/Uid';
import { deepAssign } from '@/utils/index';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'SplitOrMerge',
props: {
@ -139,6 +141,13 @@ export default {
}
};
},
watch: {
field(val) {
if (val) {
EventBus.$emit('SELECTON');
}
}
},
methods: {
hover(filed) {
this.$emit('hover', filed);
@ -183,6 +192,7 @@ export default {
sepTypeRight: index == this.addModel.splitNumber ? selected.sepTypeRight : '01', // ( 01)
offsetRight: selected.offsetRight,
curve: selected.curve,
nameShow: true,
lengthFact: 0,
points: [
{
@ -266,6 +276,7 @@ export default {
switchSection: false,
relSwitchCode: '',
curve: false,
nameShow: true,
kmRangeRight: '',
kmRangeLeft: '',
region: '',

View File

@ -360,7 +360,8 @@ export default {
parentCode: '',
stationCode: sectiona.stationCode,
trainPosType: sectiona.trainPosType,
curve: false
curve: false,
nameShow: true
});
}
});

View File

@ -3,16 +3,16 @@
<div style="height: 100%;">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-form ref="oprt1" :model="fromData" label-width="130px" size="mini" :rules="mergeRules">
<el-form-item label="关联区段" prop="relevanceSectionList">
<el-select v-model="fromData.relevanceSectionList" filterable multiple :placeholder="$t('rules.pleaseSelect')">
<el-form-item label="关联区段" prop="relevanceSwitchList">
<el-select v-model="fromData.relevanceSwitchList" filterable multiple :placeholder="$t('rules.pleaseSelect')">
<el-option
v-for="item in sectionList"
v-for="item in switchList"
:key="item.code"
:label="item.name + '(' + item.code + ')'"
:value="item.code"
/>
</el-select>
<el-button :type="field === 'relevanceSectionList' ? 'danger' : 'primary'" size="small" @click="hover('relevanceSectionList')">{{ $t('map.activate') }}</el-button>
<el-button :type="field === 'relevanceSwitchList' ? 'danger' : 'primary'" size="small" @click="hover('relevanceSwitchList')">{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item>
<el-button-group>
@ -27,6 +27,8 @@
import { deepAssign } from '@/utils/index';
import { mapGetters } from 'vuex';
import { getUID } from '@/jmapNew/utils/Uid';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'CreateAxle',
props:{
@ -38,9 +40,12 @@ export default {
data() {
return {
fromData: {
relevanceSectionList: []
relevanceSectionList: [],
relevanceSwitchList: []
},
mergeRules: {}
mergeRules: {
relevanceSwitchList: [{ required: true, message: '请选择关联道岔', trigger: 'change' }]
}
};
},
computed: {
@ -49,77 +54,98 @@ export default {
'switchList'
])
},
watch: {
field(val) {
if (val) {
EventBus.$emit('SELECTON');
}
}
},
methods:{
hover(field) {
this.$emit('hover', field);
},
createSwitchSectionManual() {
const models = [];
const uid = getUID('T', this.sectionList);
let sectiona = [];
this.fromData.relevanceSectionList.forEach(item => {
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item));
section.parentCode = uid;
const length = section.points.length - 1;
if (sectiona.length > 0) {
sectiona.forEach(each=>{
if ((section.points[0].x == each.x && section.points[0].y == each.y) || (section.points[length].x == each.x && section.points[length].y == each.y)) {
sectiona = [];
sectiona.push(each);
}
this.$refs.oprt1.validate((valid) => {
if (valid) {
const models = [];
this.hover(''); // field
const uid = getUID('T', this.sectionList);
let sectiona = [];
this.fromData.relevanceSectionList = [];
this.fromData.relevanceSwitchList.forEach(item => {
const switchModel = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item));
this.fromData.relevanceSectionList.push(switchModel.sectionACode);
this.fromData.relevanceSectionList.push(switchModel.sectionBCode);
this.fromData.relevanceSectionList.push(switchModel.sectionCCode);
});
} else {
sectiona.push(section.points[0]);
sectiona.push(section.points[section.points.length - 1]);
this.fromData.relevanceSectionList.forEach(item => {
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item));
section.parentCode = uid;
const length = section.points.length - 1;
if (sectiona.length > 0) {
sectiona.forEach(each=>{
if ((section.points[0].x == each.x && section.points[0].y == each.y) || (section.points[length].x == each.x && section.points[length].y == each.y)) {
sectiona = [];
sectiona.push(each);
}
});
} else {
sectiona.push(section.points[0]);
sectiona.push(section.points[section.points.length - 1]);
}
models.push(section);
});
if (sectiona.length <= 0) {
return false;
}
models.push({
_type: 'Section',
code: uid,
name: uid,
type: '04',
namePosition: {
x: sectiona[sectiona.length - 1].x,
y: sectiona[sectiona.length - 1].y
},
standTrack: false,
kmRangeRight: '',
kmRangeLeft: '',
region: '',
standTrackName: '',
standTrackNamePosition: { x: 0, y: 0 },
reentryTrack: false,
reentryTrackName: '',
reentryTrackNamePosition: { x: 0, y: 0 },
transferTrack: false,
transferTrackName: '',
transferTrackNamePosition: { x: 0, y: 0 },
// segmentation: false,
segmentationPosition: { x: 0, y: 0 },
switchSection: true,
relSwitchCode: '',
relevanceSectionList: this.fromData.relevanceSectionList,
points: [{ x: 0, y: 0 }, { x: 0, y: 0 }],
logicSectionNum: [0],
logicSectionShow: false,
sepTypeLeft: '00',
offsetLeft: 0,
sepTypeRight: '00',
offsetRight: 0,
parentCode: '',
stationCode: sectiona.stationCode,
trainPosType: sectiona.trainPosType,
curve: false,
nameShow: true
});
this.$emit('updateMapModel', models);
this.fromData.relevanceSectionList = [];
this.fromData.relevanceSwitchList = [];
}
models.push(section);
});
if (sectiona.length <= 0) {
return false;
}
models.push({
_type: 'Section',
code: uid,
name: uid,
type: '04',
namePosition: {
x: sectiona[sectiona.length - 1].x,
y: sectiona[sectiona.length - 1].y
},
standTrack: false,
kmRangeRight: '',
kmRangeLeft: '',
region: '',
standTrackName: '',
standTrackNamePosition: { x: 0, y: 0 },
reentryTrack: false,
reentryTrackName: '',
reentryTrackNamePosition: { x: 0, y: 0 },
transferTrack: false,
transferTrackName: '',
transferTrackNamePosition: { x: 0, y: 0 },
// segmentation: false,
segmentationPosition: { x: 0, y: 0 },
switchSection: true,
relSwitchCode: '',
relevanceSectionList: this.fromData.relevanceSectionList,
points: [{ x: 0, y: 0 }, { x: 0, y: 0 }],
logicSectionNum: [0],
logicSectionShow: false,
sepTypeLeft: '00',
offsetLeft: 0,
sepTypeRight: '00',
offsetRight: 0,
parentCode: '',
stationCode: sectiona.stationCode,
trainPosType: sectiona.trainPosType,
curve: false
});
this.$emit('updateMapModel', models);
this.fromData.relevanceSectionList = [];
},
pushData(data) {
this.fromData.relevanceSectionList.push(data);
this.fromData.relevanceSwitchList.push(data);
}
}
};

View File

@ -60,11 +60,11 @@ export default {
this.$emit('fieldSelectSwitchSection', this.field);
},
deviceSelect(selected) {
if (this.field.toUpperCase() != 'relevanceSectionList'.toUpperCase() && selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase() && this.field.toUpperCase() === 'relevanceSwitchList'.toUpperCase()) {
this.$refs.createAxle.pushData(selected.code);
} else if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
this.activeName = 'first';
this.$refs.switchModel.setModel(selected);
} else if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'relevanceSectionList'.toUpperCase()) {
this.$refs.createAxle.pushData(selected.code);
}
},
findSectionDataByLinkCodeAndPoint(code, point) {

View File

@ -117,11 +117,11 @@ export default {
name: this.$t('global.exportMap'),
handleClick: this.handleExportMap
},
{
name: this.$t('global.export'),
handleClick: this.handleExportMapSame,
showControl: () => { return process.env.NODE_ENV === 'development'; }
},
// {
// name: this.$t('global.export'),
// handleClick: this.handleExportMapSame,
// showControl: () => { return process.env.NODE_ENV === 'development'; }
// },
{
name: this.$t('publish.setTheProject'),
handleClick: this.handleSetProject
@ -263,34 +263,38 @@ export default {
}).catch(() => { });
},
//
// json
async handleExportMap(index, row) {
const res = await getPublishMapExport(row.id);
const resultData = res.data;
if (resultData === false) {
return;
}
// const self = this;
// import('@/utils/Export2Excel').then(excel => {
// self.queryExportData(resultData).then(data => {
// excel.export_json_excel(data, resultData.name);
// }).catch(error => {
// self.$message.error(`${this.$t('error.exportException')}:${error.message}`);
// });
// });
const content = new Blob([JSON.stringify(resultData)]);
const urlObject = window.URL || window.webkitURL || window;
const url = urlObject.createObjectURL(content);
const el = document.createElement('a');
el.href = url;
el.download = `${resultData.name}.json`;
el.click();
urlObject.revokeObjectURL(url);
this.$confirm('您是否导出地图数据?', this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'
}).then(async () => {
const res = await getPublishMapExport(row.id);
const resultData = res.data;
if (resultData === false) {
return;
}
// const self = this;
// import('@/utils/Export2Excel').then(excel => {
// self.queryExportData(resultData).then(data => {
// excel.export_json_excel(data, resultData.name);
// }).catch(error => {
// self.$message.error(`${this.$t('error.exportException')}:${error.message}`);
// });
// });
const content = new Blob([JSON.stringify(resultData)]);
const urlObject = window.URL || window.webkitURL || window;
const url = urlObject.createObjectURL(content);
const el = document.createElement('a');
el.href = url;
el.download = `${resultData.name}.json`;
el.click();
urlObject.revokeObjectURL(url);
}).catch(() => { });
},
//
// exls
async handleExportMapSame(index, row) {
const res = await getPublishMapExport(row.id);
const resultData = res.data;