This commit is contained in:
sunleking 2020-03-02 08:53:11 +08:00
commit 2360d9af1c
57 changed files with 767 additions and 469 deletions

View File

@ -108,5 +108,12 @@ export default {
getRealDeviceFailed: 'Failed to get real device failed',
mapDataError: 'Map data error',
runningChartDataError: 'Running chart data error',
runningChartIsNotLoaded: 'Running chart is not loaded'
runningChartIsNotLoaded: 'Running chart is not loaded',
runningDataError: 'Running data error',
systemError: 'System error',
simulationDoesNotExist: 'Simulation does not exist',
simulationOperationIsNotDefined: 'The simulation operation is not defined',
simulationOperationFailed: 'The simulation operation failed',
operationConflict: 'Operation conflict',
simulationOperationProcessingMethodNotFound: 'Simulation operation processing method not found'
};

View File

@ -586,5 +586,6 @@ export default {
logicalSectionStartOffset: 'Logical section start offset:',
logicalSectionEndOffset: 'Logical section start offset:',
associateSwitchSection: 'Associate switch section:',
failedToSetParkingPointOffset: 'failed to set parking point offset: the actual length of the section is less than the offset distance.'
failedToSetParkingPointOffset: 'failed to set parking point offset: the actual length of the section is less than the offset distance.',
correlationWindow: 'Correlation window'
};

View File

@ -108,5 +108,12 @@ export default {
getRealDeviceFailed: '获取真实设备失败!',
mapDataError: '地图数据错误',
runningChartDataError: '运行图数据错误',
runningChartIsNotLoaded: '运行图未加载'
runningChartIsNotLoaded: '运行图未加载',
runningDataError: '运行数据错误',
systemError: '系统错误',
simulationDoesNotExist: '仿真不存在',
simulationOperationIsNotDefined: '仿真操做未定义',
simulationOperationFailed: '仿真操做执行失败',
operationConflict: '操做冲突',
simulationOperationProcessingMethodNotFound: '仿真操做处理方法未找到'
};

View File

@ -579,5 +579,6 @@ export default {
logicalSectionStartOffset: '逻辑区段起点偏移:',
logicalSectionEndOffset: '逻辑区段终点偏移:',
associateSwitchSection: '关联道岔区段:',
failedToSetParkingPointOffset: '设置停车点偏移量失败:区段实际长度小于偏移距离。'
failedToSetParkingPointOffset: '设置停车点偏移量失败:区段实际长度小于偏移距离。',
correlationWindow: '关联车次窗'
};

View File

@ -132,6 +132,9 @@ class SkinCode extends defaultStyle {
endWidth: 1.5, // 尽头分隔符宽度
endColor: '#7F7F7F', // 尽头分隔符颜色
color: '#7F7F7F' // 区段边界符颜色
},
block: {
special: false, // 区段特殊显示
}
};
@ -352,6 +355,10 @@ class SkinCode extends defaultStyle {
inversionColor: '#9C9D09', // 道岔反位颜色
monolockColor: '#870E10' // 道岔单锁颜色
},
sectionAction: {
flag: false, // 道岔 关联区段显示
spareColor: '#5b5b5b', // 区段显示颜色
},
core: {
length: 6 // 道岔单边长度
},

View File

@ -132,6 +132,9 @@ class SkinCode extends defaultStyle {
endWidth: 1.5, // 尽头分隔符宽度
endColor: '#FFFFFF', // 尽头分隔符颜色
color: 'white' // 区段边界符颜色
},
block: {
special: false, // 区段特殊显示
}
};
@ -344,6 +347,10 @@ class SkinCode extends defaultStyle {
inversionColor: 'lightgreen', // 道岔反位颜色
monolockColor: '#FFFFFF' // 道岔单锁颜色
},
sectionAction: {
flag: false, // 道岔 关联区段显示
spareColor: '#5b5b5b', // 区段显示颜色
},
core: {
length: 10 // 道岔单边长度
},

View File

@ -135,6 +135,9 @@ class SkinCode extends defaultStyle {
},
shuttleBack: { // 折返进路 (存在此对象 显示折返箭头)
distance: 5 // 限速线距离区段距离
},
block: {
special: false, // 区段特殊显示
}
};
@ -349,6 +352,10 @@ class SkinCode extends defaultStyle {
inversionColor: '#FFFF00', // 道岔反位颜色
monolockColor: '#FFFFFF' // 道岔单锁颜色
},
sectionAction: {
flag: false, // 道岔 关联区段显示
spareColor: '#5b5b5b', // 区段显示颜色
},
core: {
length: 6 // 道岔单边长度
},

View File

@ -125,6 +125,9 @@ class SkinCode extends defaultStyle {
endWidth: 3.5, // 尽头分隔符宽度
endColor: '#3F3F3F', // 尽头分隔符颜色
color: '#3149C3' // 区段边界符颜色
},
block: {
special: false, // 区段特殊显示
}
};
@ -335,6 +338,10 @@ class SkinCode extends defaultStyle {
inversionColor: '#9C9D09', // 道岔反位颜色
monolockColor: '#870E10' // 道岔单锁颜色
},
sectionAction: {
flag: false, // 道岔 关联区段显示
spareColor: '#5b5b5b', // 区段显示颜色
},
core: {
length: 6 // 道岔单边长度
},

View File

@ -90,17 +90,17 @@ class SkinCode extends defaultStyle {
width: 5, // 区段宽度
beyondWidth: 1, // 区段宽超出宽度
invadeColor: '#EF0C08', // 区段侵入颜色
spareColor: '#3F3F3F', // 区段空闲颜色
communicationOccupiedColor: '#FF329A', // 区段通信车占用颜
unCommunicationOccupiedColor: '#FE0000', // 区段非通讯车占用颜
routeLockColor: '#FFFFFF', // 区段路由锁定颜色
spareColor: '#ffff00', // 区段空闲颜色 (黄色)
communicationOccupiedColor: '#ff0000', // 区段通信车占用颜色 红
unCommunicationOccupiedColor: '#ff0000', // 区段非通讯车占用颜色 红
routeLockColor: '#00FF00', // 区段路由锁定颜色
faultLockColor: '#9B4A0A', // 区段故障锁定颜色
undefinedColor: '#0071C1', // 区段未定义颜色
protectionLockedColor: '#FEFF00', // 保护区段锁闭(未用)
blockColor: '#800080', // 区段封锁颜
blockColor: '#000080', // 区段封锁颜色 深蓝
atcExcisionColor: '#A0522D', // 区段atc切除颜色
atsExcisionColor: '#A0522D', // 区段ats切除颜色
timeReleaseColor: '#3F3F3F', // 区段延时释放颜色
timeReleaseColor: '#ffff00', // 区段延时释放颜色
protectiveLockColor: '#FFFF00', // 区段保护锁闭
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
@ -125,6 +125,9 @@ class SkinCode extends defaultStyle {
endWidth: 3.5, // 尽头分隔符宽度
endColor: '#3F3F3F', // 尽头分隔符颜色
color: '#3149C3' // 区段边界符颜色
},
block: {
special: true, // 区段特殊显示
}
};
@ -333,13 +336,17 @@ class SkinCode extends defaultStyle {
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
offset: { x: 0, y: 8 }, // 道岔名称与区段距离
fontSize: 11, // 字体大小
fontColor: '#C0C0C0', // 道岔名称颜色
fontColor: '#fff', // 道岔名称颜色
fontWeight: 'bold', // 字体粗细
borderColor: '#FE0000', // 道岔边框颜色
borderColor: 'red', // 道岔边框颜色
lossColor: '#FFFFFF', // 道岔失去颜色
locateColor: '#00FF00', // 道岔定位颜色
inversionColor: '#9C9D09', // 道岔反位颜色
monolockColor: '#870E10' // 道岔单锁颜色
locateColor: '#fff', // 道岔定位颜色
inversionColor: '#fff', // 道岔反位颜色
monolockColor: '#fff' // 道岔单锁颜色
},
sectionAction: {
flag: true, // 道岔 关联区段显示
spareColor: '#5b5b5b', // 区段显示颜色
},
core: {
splice: true, // 哈尔滨特殊显示
@ -347,13 +354,18 @@ class SkinCode extends defaultStyle {
},
block: { // 道岔封锁配置
blockName: 'default', // 默认道岔封锁类型
nameBorderShow: true, // 道岔名称是否有包围框 显示
contentRectShow: false // 道岔封锁显示
nameBorderShow: false, // 道岔名称是否有包围框 显示
contentRectShow: false, // 道岔封锁显示
contentRectColor: '#fff', // 道岔封锁名称颜色
rhomboidShow: true, // 道岔单独显示
},
monolock: { // 道岔单锁配置
locationColor: '#ea282c', // 道岔单锁定位颜色 (红色)
inversionColor: '#ea282c', // 道岔单锁反位颜色 (红色)
rectShow: false // 道岔单锁 矩形框是否显示
locationColor: '#fff', // 道岔单锁定位颜色 (红色)
inversionColor: '#fff', // 道岔单锁反位颜色 (红色)
nameBorderShow: true, // 道岔名称是否有包围框 显示
rectShow: false, // 道岔单锁 矩形框是否显示
rectWidth: 18, // 矩形框 宽高
rectBorderColor: 'red' // 矩形边框颜色
}
};
@ -469,7 +481,7 @@ class SkinCode extends defaultStyle {
trainServerOffset: { x: 26, y: 1 }// 列车服务号偏移
},
trainTarget: {
tripNumberPrefix: '0000', // 车次号前缀
tripNumberPrefix: '<', // 车次号前缀
defaultDirectionCode: 'D', // 默认车次号1
defaultTripNumber: 'CCC', // 默认车次号2
trainTargetOffset: { x: 42, y: 1 }// 列车车次号偏移
@ -489,7 +501,7 @@ class SkinCode extends defaultStyle {
trainHeadFillColor: '#EF0C08'// 列车车头矩形填充颜色
},
common: {
trainHeight: 17, // 列车高度
trainHeight: 30, // 列车高度
trainHeadDistance: 2, // 列车和车头之间的间距
trainWidth: 76, // 列车长度
trainTextFontSize: 15, // 列车字号
@ -505,11 +517,11 @@ class SkinCode extends defaultStyle {
},
trainStatusStyle: {
destinationStatus: [
{ status: '01', showColor: '#FFFFFF' },
{ status: '01', showColor: '#FFFF00' },
{ status: '02', showColor: '#00FF00' },
{ status: '03', showColor: '#3265FF' },
{ status: '04', showColor: '#9B4A09' },
{ status: '05', showColor: '#EF0C08' },
{ status: '04', showColor: '#FF14E9' },
{ status: '05', showColor: '#FF0000' },
{ status: '06', showColor: '#FFFFFF' },
{ status: '07', showColor: '#FFFF00' }
], // 目的地状态 01准点 02早点 03严重早点 04晚点 05严重晚点 06头码车 07ATP切除

View File

@ -132,6 +132,9 @@ class SkinCode extends defaultStyle {
endWidth: 1.5, // 尽头分隔符宽度
endColor: '#FFFFFF', // 尽头分隔符颜色
color: 'white' // 区段边界符颜色
},
block: {
special: false, // 区段特殊显示
}
};
@ -345,6 +348,10 @@ class SkinCode extends defaultStyle {
inversionColor: '#FFFF00', // 道岔反位颜色
monolockColor: '#FFFFFF' // 道岔单锁颜色
},
sectionAction: {
flag: false, // 道岔 关联区段显示
spareColor: '#5b5b5b', // 区段显示颜色
},
core: {
length: 10 // 道岔单边长度
},

View File

@ -28,7 +28,7 @@ class Status {
}
handleSection(device) {
this.statusObj = {
blockade: device.blockade, // 是否封锁
blockade: device.blockade, // 轨道是否封锁
routeLock: device.routeLock, // 是否进路锁闭
overlapLock: device.overlapLock, // 进路延续保护锁闭
ctOccupied: device.ctOccupied, // 通信车占用
@ -98,6 +98,10 @@ class Status {
this.statusObj = {
};
}
handleTrainWindow(device) {
this.statusObj = {
};
}
getStatus() {
return this.statusObj;
}

View File

@ -240,8 +240,17 @@ class Jlmap {
}
});
}
setUpdateMapDevice(list) {
store.dispatch('map/updateMapDevice', list);
(list || []).forEach(elem => {
const code = elem.code;
const type = elem._type;
const oDevice = this.mapDevice[code] || deviceFactory(type, elem);
this.hookHandle(oDevice, elem)
});
}
update(list) {
this.setUpdateMapDevice(list || []); // 增加一个 前数据 处理 为了在区段中 获取全部的 道岔信息
(list || []).forEach(elem => {
const code = elem.code;
const type = elem._type;
@ -258,9 +267,9 @@ class Jlmap {
if (elem.dispose) {
this.$painter.delete(oDevice);
} else {
if (this.hookHandle(oDevice, elem)) {
// if (this.hookHandle(oDevice, elem)) {
this.$painter.update(oDevice);
}
// }
}
}

View File

@ -26,8 +26,7 @@ export default class ELines extends Group {
shape[`y1`] = model.points[0].y;
shape[`x2`] = model.points[model.points.length - 1].x;
shape[`y2`] = model.points[model.points.length - 1].y;
this.add(new BezierCurve({
this.section = new BezierCurve({
isLine: true,
zlevel: this.zlevel,
progressive: model.progressive,
@ -39,7 +38,8 @@ export default class ELines extends Group {
stroke: model.style.Section.line.spareColor,
fillOpacity: 0
}
}));
});
this.add(this.section);
} else {
for (let i = 0; i < (model.points.length - 1); i++) {
this.add(new Line({
@ -71,6 +71,18 @@ export default class ELines extends Group {
});
}
hide() {
this.eachChild((child) => {
child.hide();
});
}
show() {
this.eachChild((child) => {
// console.log(child);
child.show();
});
}
animateStyle(loop, animates) {
if (animates && animates.length) {
this.eachChild((child) => {

View File

@ -0,0 +1,187 @@
import Group from 'zrender/src/container/Group';
import Line from 'zrender/src/graphic/shape/Line';
import BezierCurve from 'zrender/src/graphic/shape/BezierCurve';
import {
cubicSubdivide,
quadraticAt,
cubicAt,
quadraticDerivativeAt,
cubicDerivativeAt } from 'zrender/src/core/curve';
import * as vec2 from 'zrender/src/core/vector';
/** 创建区段线集合*/
export default class ELines extends Group {
constructor(model) {
super();
this.model = model;
this.zlevel = model.zlevel;
this.z = model.z;
this.create(model);
}
create(model) {
/** 创建区段*/
if (model && model.points.length > 1) {
if (model.isCurve) { // 曲线 用贝塞尔曲线绘图 封锁 必须4个点来绘图
const shape = {};
for (let i = 1; i < (model.points.length - 1); i++) {
shape[`cpx${i}`] = model.points[i].x;
shape[`cpy${i}`] = model.points[i].y;
}
shape[`x1`] = model.points[0].x;
shape[`y1`] = model.points[0].y;
shape[`x2`] = model.points[model.points.length - 1].x;
shape[`y2`] = model.points[model.points.length - 1].y;
this.section = new BezierCurve({
isLine: true,
zlevel: this.zlevel,
progressive: model.progressive,
z: this.z + 1,
culling: true,
shape: this.couvert(shape),
style: {
lineWidth: model.style.Section.line.width,
stroke: model.style.Section.line.blockColor,
fillOpacity: 0
}
});
this.add(this.section);
} else {
if (model.points.length == 2) {
const spaceX= (model.points[1].x - model.points[0].x) / 3;
const spaceY= (model.points[1].y - model.points[0].y) / 3;
this.sectionM = new Line({
isLine: true,
zlevel: this.zlevel,
progressive: model.progressive,
z: this.z,
shape: {
x1: model.points[0].x + spaceX,
y1: model.points[0].y + spaceY,
x2: model.points[0].x + spaceX + spaceX,
y2: model.points[0].y + spaceY + spaceY
},
style: {
lineWidth: model.style.Section.line.width,
stroke: model.style.Section.line.blockColor
}
});
this.add(this.sectionM);
}
}
}
}
setStyle(styles) {
this.eachChild((child) => {
if (child.setStyle && child.isLine) {
child.setStyle(styles);
}
});
}
hide() {
this.eachChild((child) => {
child.hide();
});
}
show() {
this.eachChild((child) => {
child.show();
});
}
animateStyle(loop, animates) {
if (animates && animates.length) {
this.eachChild((child) => {
if (child.animateStyle && child.isLine) {
let an = child.animateStyle(loop);
animates.forEach(elem => {
an = an.when(elem.time, elem.styles);
});
an.start();
}
});
}
}
stopAnimation(flag) {
this.eachChild((child) => {
if (child.stopAnimation && child.isLine) {
child.stopAnimation(flag);
}
});
}
setBorderVisible(isVisible) {
this.lineBorder && this.lineBorder.hide();
if (isVisible) {
this.lineBorder && this.lineBorder.show();
}
}
// 寻找相同的曲线点位
someVectorAt(shape, t, isTangent) {
var cpx2 = shape.cpx2;
var cpy2 = shape.cpy2;
if (cpx2 === null || cpy2 === null) {
return [
(isTangent ? cubicDerivativeAt : cubicAt)(shape.x1, shape.cpx1, shape.cpx2, shape.x2, t),
(isTangent ? cubicDerivativeAt : cubicAt)(shape.y1, shape.cpy1, shape.cpy2, shape.y2, t)
];
}
else {
return [
(isTangent ? quadraticDerivativeAt : quadraticAt)(shape.x1, shape.cpx1, shape.x2, t),
(isTangent ? quadraticDerivativeAt : quadraticAt)(shape.y1, shape.cpy1, shape.y2, t)
];
}
}
// 重新计算居中距离点
couvert(shape) {
let out = [];
var x1 = shape.x1;
var y1 = shape.y1;
var x2 = shape.x2;
var y2 = shape.y2;
var cpx1 = shape.cpx1;
var cpy1 = shape.cpy1;
var cpx2 = shape.cpx2;
var cpy2 = shape.cpy2;
cubicSubdivide(
x1, cpx1, cpx2, x2, 0.3, out
);
var n_x1 = out[3];
cubicSubdivide(
x1, cpx1, cpx2, x2, 0.7, out
);
var n_x2 = out[3];
cubicSubdivide(
y1, cpy1, cpy2, y2, 0.3, out
);
var n_y1 = out[3];
cubicSubdivide(
y1, cpy1, cpy2, y2, 0.7, out
);
var n_y2 = out[3];
var p = this.someVectorAt(shape, 0.5, true);
var v = vec2.normalize(p, p);
var x0 = Math.sqrt((Math.pow(cpx1-x1, 2)+Math.pow(x2-cpx2, 2))/2, 2);
var y0 = Math.sqrt((Math.pow(cpy1-y1, 2)+Math.pow(y2-cpy2, 2))/2, 2);
return {
x1: n_x1,
y1: n_y1,
x2: n_x2,
y2: n_y2,
cpx1: (cpx1+cpx2)/2 + v[1]*x0*0.128,
cpy1: (cpy1+cpy2)/2 + v[0]*y0*0.128
};
}
}

View File

@ -3,6 +3,7 @@ import ETextName from '../element/ETextName'; // 名称文字 (共有)
import ERelease from './ERelease'; // 线段 (共有)
import ELimitLines from './ELimitLines'; // 区段限速 (私有)
import ELines from './ELines'; // 创建多线条 曲线 (私有)
import EblockLines from './EblockLines'; // 区段封锁特有
import ESeparator from './ESeparator'; // 分隔符 (私有)
import EMouse from './EMouse';
import { EAxle } from './EAxle'; // 创建计轴 (私有)
@ -73,8 +74,18 @@ export default class Section extends Group {
points: model.points,
style: style
});
// 创建哈尔滨特殊区段(用作封锁显示)
this.sectionBlock = new EblockLines({
zlevel: this.zlevel,
z: this.z,
isSwitchSection: model.switchSection,
isCurve: model.curve,
points: model.points,
style: style
});
this.add(this.section);
this.add(this.sectionBlock);
}
// 折返箭头
@ -563,6 +574,7 @@ export default class Section extends Group {
recover() {
if (this.section) {
this.section.stopAnimation(true);
this.sectionBlock && this.sectionBlock.hide(); // 因此特殊区段
this.section.setStyle({
fill: this.style.backgroundColor,
stroke: this.style.Section.line.spareColor,
@ -631,8 +643,10 @@ export default class Section extends Group {
/** 封锁 06*/
block() {
if (this.section) {
this.section.setStyle({
if (this.style.Section.block.special) {
this.sectionBlock && this.sectionBlock.show();
} else {
this.section && this.section.setStyle({
stroke: this.style.Section.line.blockColor,
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
});
@ -760,30 +774,30 @@ export default class Section extends Group {
/** 设置状态*/
setState(model) {
this.recover();
// 实际上就是 状态重置 必须在设置其他状态之前 设置颜色之类的
if (this.style.Switch.sectionAction.flag && model.relSwitchCode) {
const switchModel = store.getters['map/getDeviceByCode'](model.relSwitchCode);
if (switchModel.normalPosition && switchModel.sectionCCode == model.code) {
this.section.setStyle({ stroke: this.style.Switch.sectionAction.spareColor })
} else if (switchModel.reversePosition && switchModel.sectionBCode == model.code) {
this.section.setStyle({ stroke: this.style.Switch.sectionAction.spareColor })
}
}
/** 道岔保护区段锁闭 */
if (model.overlapLock) {
this.protectiveLock();
}
model.overlapLock && this.protectiveLock();
/** 空闲锁闭或者叫进路锁闭 */
if (model.routeLock) {
this.routeLock();
}
model.routeLock && this.routeLock();
/** 轨道封锁 */
// model.blockade = 1;
model.blockade && this.block();
/** 非CBTC车占用 */
if (model.nctOccupied) {
this.unCommunicationOccupied();
}
model.nctOccupied && this.unCommunicationOccupied();
/** CBTC车占用 */
if (model.ctOccupied) {
this.communicationOccupied();
}
model.ctOccupied && this.communicationOccupied();
/** 区段切除*/
if (model.cutOff) {
this.sectionCutOff();
}
model.cutOff && this.sectionCutOff();
/** 是否限速*/
if (model.speedUpLimit > 0) {
this.setSpeedUpperLimit();
}
model.speedUpLimit && this.setSpeedUpperLimit();
/** 道岔区段更新岔心颜色 */
if (model.type === '03' && model.switch) {
const sectionSwitch = store.getters['map/getDeviceByCode'](model.switch.code);

View File

@ -32,6 +32,9 @@ class ESwName extends Group {
const rect = this.nameText.getBoundingRect();
let textWidth = rect.width * 0.8;
if (style.Switch.monolock.nameBorderShow) {
textWidth = rect.width * 0.8 + 8;
}
if (model.triangle.drictx !== 1) {
rect.x += rect.width;
textWidth = -textWidth;
@ -49,7 +52,6 @@ class ESwName extends Group {
},
style: {
lineWidth: 0,
// lineDash: [3, 3],
stroke: style.Switch.text.borderColor,
fill: style.transparentColor
}

View File

@ -19,9 +19,9 @@ class ETriangle extends Group {
},
style: {
fill: style.Section.line.spareColor,
// fill: 'green',
lineWidth: 0,
stroke: style.Section.line.spareColor
// fill: 'green'
},
cursor: model.cursor,
onmouseover: model.onmouseover,

View File

@ -123,9 +123,13 @@ export default class Switch extends Group {
onmouseout: () => { this.name.getArrowText().hide(); }
});
let spointLength1 = 8;
const Tspoint1 = [model.intersection.x + directx * width3 + directx * (width2 + width1) - directx * width3, model.intersection.y + directy * switchWidth1];
const Tspoint2 = [Tspoint1[0] - directx * 8, Tspoint1[1]];
const Tspoint3 = [Tspoint1[0] - directx * 8, model.intersection.y - directy * switchWidth1];
if (this.style.Switch.block.rhomboidShow) {
spointLength1 = 16
}
const Tspoint2 = [Tspoint1[0] - directx * spointLength1, Tspoint1[1]];
const Tspoint3 = [Tspoint1[0] - directx * spointLength1, model.intersection.y - directy * switchWidth1];
const Tspoint4 = [model.intersection.x + directx * width3, Tspoint3[1]];
const Tspoint5 = [Tspoint1[0], Tspoint1[1]];
this.sheltertriangle = new ETriangle({ // 平行四边形覆盖范围 内侧三角形覆盖物 (用于宁波线路'挤岔' 专用)其他线路不能使用
@ -322,6 +326,9 @@ export default class Switch extends Group {
if (this.style.Switch.monolock.rectShow) { // 判断单锁矩形是否显示
this.lockRect.show();
}
if (this.style.Switch.monolock.nameBorderShow) { // 单锁显示名称包围框
this.setHasTextBorder(1);
}
if (this.model.normalPosition) {
this.setTextColor(this.style.Switch.monolock.locationColor); // 定位 设置道岔名称颜色
} else if (this.model.reversePosition) {
@ -336,6 +343,9 @@ export default class Switch extends Group {
} else if (this.style.Switch.block.contentRectShow) {
this.lockRect.show();
this.lockRect.setStyle({ stroke: this.style.Switch.block.contentRectColor });
} else if (this.style.Switch.block.rhomboidShow && this.model.reversePosition) { // 范围且封锁时显示
this.sheltertriangle.show();
this.sheltertriangle.getSection().setStyle('fill', '#000080');
}
}
@ -409,7 +419,7 @@ export default class Switch extends Group {
}
/** 道岔单锁 */
model.singleLock && this.setMonolock();
/** 道岔 */
/** 道岔锁 */
model.blockade && this.block();
/** 区段切除*/
model.cutOff && this.setSwitchCutOff();

View File

@ -167,8 +167,9 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate);
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//

View File

@ -25,8 +25,7 @@
</el-table-column>
<el-table-column prop="status" label="控制状态" width="180">
<template slot-scope="scope">
<span v-if="scope.row.controlType == '01'">自动不进行冲突检测</span>
<span v-else>人工</span>
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
</template>
</el-table-column>
</el-table>

View File

@ -148,7 +148,6 @@ export default {
},
methods: {
doShow(operate, selected, tempData) {
debugger;
this.selected = selected;
this.allSelect = false;
this.changeList = [];
@ -169,7 +168,7 @@ export default {
if (tempData && tempData.length > 0) {
tempData.forEach(elem => {
elem.check = false;
this.changeList.push(false);
elem.disabled = false;
//
if (operate.operation === OperationEvent.Signal.humanControl.menu.operation &&
@ -304,10 +303,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
@ -327,10 +326,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
cancel() {
@ -339,7 +338,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -243,10 +243,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
}
},

View File

@ -113,7 +113,7 @@ export default {
pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.directionCode;
pointdata.coord = [train.stationTimeList[1].secondTime || train.stationTimeList[1].second, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)];
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/
opt.markPointData.push(createMartPoint(pointdata));
@ -125,10 +125,10 @@ export default {
train.stationTimeList.forEach((elem, index) => {
idx = index;
if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode ||
index == train.stationTimeList.length - 2 && (train.stationTimeList[index].secondTime || train.stationTimeList[index].second) != (train.stationTimeList[index + 1].secondTime|| train.stationTimeList[index + 1].secondTime) ||
index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime ||
index > 0 && index < train.stationTimeList.length - 1) {
const aa = `${train.directionCode}${train.tripNumber}`;
opt.data.push([elem.secondTime || elem.second, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]);
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]);
}
});
@ -138,8 +138,8 @@ export default {
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
num = this.computedReentryNumber(train.tripNumber);
const aa = `${train.directionCode}${train.tripNumber}`;
opt.data.push([lastPoint.secondTime || lastPoint.second, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode, aa]);
opt.data.push([nextPoint.secondTime || nextPoint.second, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode, aa]);
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]);
}
/** 如果是备用车,按车次添加线*/
@ -201,21 +201,21 @@ export default {
runPlanData[elem.serviceNumber][elem.tripNumber].push(elem);
runPlanData[elem.serviceNumber][elem.tripNumber].sort((a, b) => {
return parseInt(a.secondTime || a.second) - parseInt(b.secondTime || b.second);
return parseInt(a.secondTime) - parseInt(b.secondTime);
});
/** 如果此记录车组号的数据为第一条时,则打上标签*/
if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) {
serie.markPoint.data.push(createMartPoint({
directionCode: elem.directionCode,
coord: [parseInt(elem.secondTime || elem.second), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.directionCode}${elem.tripNumber}`,
color: lineStyle.color || '#000'
}));
}
/** 计算折返点*/
var nextPoint = [parseInt(elem.secondTime || elem.second), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode];
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode];
if (serie.data.length > 0) {
var lastPoint = serie.data[serie.data.length - 1];
if (lastPoint[2] !== nextPoint[2]) {

View File

@ -220,14 +220,11 @@ export default {
setStopTime() {
const step = {
start: true,
over:true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.setStopTime.menu.operation,
param: {
standCode: `${this.selected.code}`
},
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {

View File

@ -56,7 +56,7 @@
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.controlType ? controlTypeMap[scope.row.controlType] : '自动' }}
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
</div>
</template>
</el-table-column>
@ -94,10 +94,10 @@ export default {
tempData: [],
stationName: '',
signalName: '',
controlTypeMap: {
'01': '自动',
'02': '人工'
}
// controlTypeMap: {
// '01': '',
// '02': ''
// }
};
},
computed: {

View File

@ -39,7 +39,7 @@
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.controlType ? controlTypeMap[scope.row.controlType] : '自动' }}
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
</div>
</template>
</el-table-column>
@ -87,13 +87,9 @@ export default {
selection: [],
stationName: '',
signalName: '',
allSelect: false,
highlight: true,
row: '',
controlTypeMap: {
'01': '自动',
'02': '人工'
}
commitDisabled: true
};
},
computed: {
@ -125,14 +121,6 @@ export default {
return '进路交自动控';
}
return '';
},
commitDisabled() {
let disabled = true;
if (this.selection && this.selection.length) {
disabled = false;
}
return disabled;
}
},
mounted() {
@ -143,6 +131,8 @@ export default {
methods: {
doShow(operate, selected, tempData) {
this.selected = selected;
this.selection = [];
this.commitDisabled = true;
//
if (!this.dialogShow) {
this.signalName = '';
@ -160,10 +150,10 @@ export default {
elem.disabled = false;
//
if (operate.operation === OperationEvent.Signal.humanControl.menu.operation &&
elem.atsControl == '0') {
(elem.atsControl == '0') ) {
elem.disabled = true;
} if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation &&
elem.atsControl == '1') {
(elem.atsControl == '1') ) {
elem.disabled = true;
}
});
@ -200,27 +190,13 @@ export default {
this.$refs.tempTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
allSelectChange() {
if (this.allSelect) {
this.tempData.forEach(item => {
if (!item.disabled) {
item.check = true;
}
});
} else {
this.tempData.forEach(item => {
if (!item.disabled) {
item.check = false;
}
});
}
},
clickEvent(row, event, column) {
this.highlight = false;
if (row && !row.disabled) {
this.highlight = true;
this.selection = [row];
this.commitDisabled = false;
this.beforeSectionList = row.containSectionList || [];
this.row = row;
//

View File

@ -57,7 +57,7 @@
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.controlType ? controlTypeMap[scope.row.controlType] : '自动' }}
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
</div>
</template>
</el-table-column>
@ -110,12 +110,9 @@ export default {
display: true,
stationName: '',
signalName: '',
commitDisabled:true,
tableStyle: {
'border-bottom': 'none'
},
controlTypeMap: {
'01': '自动',
'02': '人工'
}
};
},
@ -135,13 +132,6 @@ export default {
title() {
return '办理进路';
},
commitDisabled() {
let disabled = true;
if (this.row) {
disabled = !this.row.canSetting;
}
return disabled;
},
...mapGetters('map', [
'signalList',
'sectionList',
@ -189,6 +179,7 @@ export default {
},
doShow(operate, selected, tempData) {
this.selected = selected;
this.commitDisabled = true;
//
if (!this.dialogShow) {
this.signalName = '';
@ -232,6 +223,7 @@ export default {
//
this.restoreBeforeDevices();
row.canSetting = true;
this.commitDisabled = false;
//
const containSectionList = [];
if (row.routeSectionList && row.routeSectionList.length) {

View File

@ -171,9 +171,9 @@
>
人工</el-radio>
<div style="float: left; margin-left: 20px;">
<span v-if="radio2 != 2">站停时间</span>
<!-- <span v-if="radio2 != 2">站停时间</span> -->
<span v-if="radio2 == 2">运行等级</span>
<el-input
<!-- <el-input
v-if="radio2 != 2"
:id="domIdStopTime"
v-model="trainStopTime"
@ -181,7 +181,7 @@
size="small"
:disabled="radio == '01'"
@blur="stopTimeBlur"
/>
/> -->
<el-select
v-if="radio2 == 2"
:id="domIdRunLevel"
@ -273,7 +273,7 @@ export default {
],
tripNumber: '',
effective: '01',
trainStopTime: 0,
// trainStopTime: 0,
trainRunlevel: '01'
};
},
@ -351,7 +351,7 @@ export default {
this.radio = '01';
this.radio1 = '1';
this.radio2 = '1';
this.trainStopTime = 0;
// this.trainStopTime = 0;
this.effective = '01';
if (data == OperationEvent.StationStand.setDetainTrain.menu.operation) {
this.radio1 = '1';
@ -401,7 +401,7 @@ export default {
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation || this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
this.radio = selected.direction;
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
this.trainStopTime = Number(tempDate.parkingTime) === -1 ? 15 : Number(tempDate.parkingTime);
// this.trainStopTime = Number(tempDate.parkingTime) === -1 ? 15 : Number(tempDate.parkingTime);
this.radio = Number(tempDate.parkingTime) === -1 ? '01' : '02';
this.effective = tempDate.parkingValidStatus ? '01' : '02';
}
@ -495,7 +495,7 @@ export default {
operate.operation = OperationEvent.StationStand.setRunLevel.choose1.operation;
}
if (this.radio === '01') {
this.trainStopTime = 0;
// this.trainStopTime = 0;
this.trainRunlevel = '01';
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
@ -560,10 +560,10 @@ export default {
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
@ -592,10 +592,10 @@ export default {
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
@ -621,10 +621,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
@ -646,10 +646,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
@ -662,7 +662,7 @@ export default {
val: [`${this.radio}`, this.trainStopTime, forver].join('::'),
param: {
standStopControl: `${this.radio}`,
standStopTime: this.trainStopTime,
// standStopTime: this.trainStopTime,
standAlwaysValid: forver
}
};
@ -673,9 +673,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
@ -705,9 +706,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
cancel() {

View File

@ -186,7 +186,7 @@ export default {
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
});
@ -195,12 +195,11 @@ export default {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.doClose();
});
}

View File

@ -66,14 +66,12 @@ export default {
}
}
}
return JsonData;
},
/** 将后台数据解析成图表*/
convertDataToModels(data, stations, kmRangeCoordMap, lineStyle) {
var models = [];
if (data && data.serviceNumberDataList && data.serviceNumberDataList.length) {
/** 按服务遍历数据*/
data.serviceNumberDataList.forEach((service) => {
@ -93,7 +91,7 @@ export default {
pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.directionCode;
pointdata.coord = [train.stationTimeList[1].secondTime || train.stationTimeList[1].second, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)];
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/
opt.markPointData.push(createMartPoint(pointdata));
@ -105,10 +103,10 @@ export default {
train.stationTimeList.forEach((elem, index) => {
idx = index;
if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode ||
index == train.stationTimeList.length - 2 && (train.stationTimeList[index].secondTime || train.stationTimeList[index].second) != (train.stationTimeList[index + 1].secondTime || train.stationTimeList[index + 1].second) ||
index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime ||
index > 0 && index < train.stationTimeList.length - 1) {
const aa = `${train.directionCode}${train.tripNumber}`;
opt.data.push([elem.secondTime || elem.second, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]);
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]);
}
});
@ -118,8 +116,8 @@ export default {
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
num = this.computedReentryNumber(train.tripNumber);
const aa = `${train.directionCode}${train.tripNumber}`;
opt.data.push([lastPoint.secondTime || lastPoint.second, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode, aa]);
opt.data.push([nextPoint.secondTime || nextPoint.second, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode, aa]);
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]);
}
/** 如果是备用车,按车次添加线*/
@ -158,7 +156,6 @@ export default {
if (!runPlanData[elem.serviceNumber]) {
/** 创建一个新服务号标记*/
runPlanData[elem.serviceNumber] = {};
/** 不存在此服务号则需要创建一条新的line*/
series.push(createSeriesModel({
zlevel: 1,
@ -179,21 +176,21 @@ export default {
runPlanData[elem.serviceNumber][elem.tripNumber].push(elem);
runPlanData[elem.serviceNumber][elem.tripNumber].sort((a, b) => {
return parseInt(a.secondTime || a.second) - parseInt(b.secondTime || b.second);
return parseInt(a.secondTime) - parseInt(b.secondTime);
});
/** 如果此记录车组号的数据为第一条时,则打上标签*/
if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) {
serie.markPoint.data.push(createMartPoint({
directionCode: elem.directionCode,
coord: [parseInt(elem.secondTime || elem.second), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.directionCode}${elem.tripNumber}`,
color: lineStyle.color || '#000'
}));
}
/** 计算折返点*/
var nextPoint = [parseInt(elem.secondTime || elem.second), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode];
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode];
if (serie.data.length > 0) {
var lastPoint = serie.data[serie.data.length - 1];
if (lastPoint[2] !== nextPoint[2]) {

View File

@ -162,15 +162,15 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
@ -182,15 +182,15 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
@ -202,15 +202,15 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
@ -222,15 +222,15 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
@ -242,15 +242,15 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
// ATS
@ -262,15 +262,15 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
@ -283,15 +283,15 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
@ -304,15 +304,15 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
@ -325,15 +325,15 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
cancel() {
@ -341,7 +341,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -279,7 +279,7 @@ export default {
this.setMessage(this.$t('tip.firstConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
@ -299,7 +299,7 @@ export default {
this.setMessage(this.$t('tip.firstConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 1 });
@ -325,7 +325,7 @@ export default {
this.setMessage(this.$t('tip.secondConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1;
@ -355,7 +355,7 @@ export default {
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
@ -385,7 +385,7 @@ export default {
}
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
@ -402,7 +402,7 @@ export default {
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -161,15 +161,15 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
@ -182,7 +182,7 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -201,7 +201,7 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -220,7 +220,7 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -240,7 +240,7 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -260,7 +260,7 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -280,7 +280,7 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -301,7 +301,7 @@ export default {
this.doClose();
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -318,7 +318,7 @@ export default {
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -34,9 +34,14 @@
highlight-current-row
:height="140"
>
<el-table-column :id="domIdChoose" prop="name" :label="this.$t('menu.route')" style="margin-left:30px">
<el-table-column :id="domIdChoose" :label="this.$t('menu.route')" style="margin-left:30px">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.check" :disabled="scope.row.disabled" />
<!-- <el-checkbox v-model="scope.row.check" :disabled="scope.row.disabled" /> -->
<el-checkbox
v-model="changeList[scope.$index]"
:disabled="scope.row.disabled"
@change="changeCheck(changeList[scope.$index],scope.row.code)"
/>
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.name }}</span>
</template>
</el-table-column>
@ -95,11 +100,14 @@ export default {
return {
dialogShow: false,
loading: false,
selected: null,
tempData: [],
operation: null,
selection: [],
stationName: '',
signalName: ''
signalName: '',
changeList:[],
commitDisabled: true
};
},
computed: {
@ -132,24 +140,9 @@ export default {
return this.$t('menu.menuSignal.atsAutoControl');
}
return '';
},
commitDisabled() {
let disabled = true;
if (this.selection && this.selection.length) {
disabled = false;
}
return disabled;
}
},
watch: {
//
tempData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
},
deep: true
}
},
mounted() {
this.$nextTick(() => {
@ -158,6 +151,10 @@ export default {
},
methods: {
doShow(operate, selected, tempData) {
this.selected = selected;
this.changeList = [];
this.commitDisabled = true;
this.selection = [];
//
if (!this.dialogShow) {
this.signalName = '';
@ -172,14 +169,14 @@ export default {
if (tempData && tempData.length > 0) {
tempData.forEach(elem => {
elem.check = false;
this.changeList.push(false);
elem.disabled = false;
//
if (operate.operation === OperationEvent.Signal.humanControl.menu.operation &&
elem.controlType != '01') {
(elem.atsControl == '0')) {
elem.disabled = true;
} if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation &&
elem.controlType == '01') {
(elem.atsControl == '1')) {
elem.disabled = true;
}
});
@ -199,19 +196,16 @@ export default {
this.$refs.tempTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
checkTableDataSelction(data) {
const selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.check && !row.disabled) {
selection.push(row);
changeCheck(check, code) {
if (check) {
this.selection.push(code);
} else {
this.selection.splice(this.selection.indexOf(code), 1);
}
});
}
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.handleChooseChange(selection);
this.selection = selection;
if (this.selection.length > 0) {
this.commitDisabled = false;
} else {
this.commitDisabled = true;
}
},
handleChooseChange(selection) {
@ -252,58 +246,55 @@ export default {
},
//
humanControl() {
const codeList = this.selection.map(elem => { return elem.code; });
const operate = {
over: true,
operation: OperationEvent.Signal.humanControl.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
param:{
Route_Code_List: codeList
routeCodeList:this.selection
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
atsAutoControl() {
const codeList = this.selection.map(elem => { return elem.code; });
const operate = {
over: true,
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
param:{
Route_Code_List: codeList
routeCodeList:this.selection
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -110,8 +110,8 @@ export default {
}
/** status 04:封锁*/
const signal = (selected || {}).status;
this.tempData = [{ code: selected.code, name: selected.name, status: signal.status != '04' ? this.$t('menu.unblocked') : this.$t('menu.blocked') }];
const signal = selected;
this.tempData = [{ code: selected.code, name: selected.name, status: signal.blockade ? this.$t('menu.blocked') : this.$t('menu.unblocked') }];
const timer = setInterval(() => {
if (this.$refs.table) {
this.$refs.table.setCurrentRow(this.tempData[0]);
@ -138,15 +138,15 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
cancel() {

View File

@ -1,5 +1,5 @@
<template>
<el-dialog v-dialogDrag class="haerbin-01__systerm route-setting" :title="title" :visible.sync="show" width="500px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-dialog v-dialogDrag class="haerbin-01__systerm route-setting" :title="title" :visible.sync="show" width="350px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row class="header">
<el-col :span="8"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="8" :offset="2"><span>{{ $t('menu.startSignal') }}</span></el-col>
@ -14,17 +14,6 @@
</el-row>
<el-table ref="table" :data="tempData" border style="width: 100%; margin-top:10px" size="mini" height="120" highlight-current-row @row-click="clickEvent">
<el-table-column :id="domIdChoose" prop="name" :label="this.$t('menu.route')" style="margin-left:30px" />
<el-table-column prop="protectedSection" :label="this.$t('menu.protectionSection')" :width="180">
<template slot-scope="scope">
<span>{{ getProtectedSectionName(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column prop="canSetting" :label="this.$t('global.status')" :width="100">
<template slot-scope="scope">
<span v-if="scope.row.canSetting">{{ $t('menu.allowSelection') }}</span>
<span v-else>{{ $t('menu.notAllowSelection') }}</span>
</template>
</el-table-column>
</el-table>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="4">
@ -40,20 +29,19 @@
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import ConfirmControl from './childDialog/confirmControl';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { deepAssign } from '@/utils/index';
export default {
name: 'RouteSelection',
components: {
ConfirmControl,
NoticeInfo
},
data() {
@ -62,11 +50,15 @@ export default {
beforeSectionList: [],
dialogShow: false,
loading: false,
selected: null,
row: null,
operation: '',
display: true,
stationName: '',
signalName: ''
signalName: '',
tableStyle: {
'border-bottom': 'none'
}
};
},
computed: {
@ -99,26 +91,8 @@ export default {
});
},
methods: {
getProtectedSectionName(row) {
let name = '';
if (row &&
row.overlapSectionList &&
row.overlapSectionList &&
row.overlapSectionList.length > 0) {
const protect = row.overlapSectionList[0];
name = `${protect.name}`;
if (protect.parentName) {
name = `${protect.parentName}${protect.name}`;
}
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
if (station) {
name = `${name}(${station.name})`;
}
}
return name;
},
doShow(operate, selected, tempData) {
this.selected = selected;
//
if (!this.dialogShow) {
this.signalName = '';
@ -161,30 +135,40 @@ export default {
this.row = row;
if (row) {
//
this.row.canSetting = true;
this.restoreBeforeDevices();
if (row.canSetting) {
const containSectionList = [];
if (!row.setting) {
//
if (row.containSectionList && row.containSectionList.length) {
//
row.containSectionList.forEach(elem => {
elem.cutOff = true;
if (row.routeSectionList && row.routeSectionList.length) {
row.routeSectionList.forEach(elem => {
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem));
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
section.logicSectionCodeList.forEach(item => {
const sec = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item));
sec.cutOff = true;
containSectionList.push(sec);
});
} else {
section.cutOff = true;
containSectionList.push(section);
}
});
}
this.$store.dispatch('training/updateMapState', [...row.containSectionList]);
this.beforeSectionList = row.containSectionList || [];
this.$store.dispatch('training/updateMapState', [...containSectionList]);
this.beforeSectionList = containSectionList || [];
//
const operate = {
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
val: row.code,
param: {
Route_Code: row.code
routeCode: row.code
}
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
@ -194,30 +178,25 @@ export default {
},
commit() {
if (this.row && this.row.canSetting) {
let names = '';
if (this.row.overlapSectionList && this.row.overlapSectionList.length > 0) {
names = names + this.row.overlapSectionList.map(elem => { return elem.name; }).join('');
}
if (this.row.overlapSwitchList && this.row.overlapSwitchList.length > 0) {
names = names + this.row.overlapSwitchList.map(elem => { return elem.name; }).join('');
}
const operate = {
over: true,
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
messages: [this.$t('menu.accessSetting') + this.$t('global.colon') + `${this.row.name}${names}(${this.row.stationName})`]
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
param: {
routeCode: this.row.code
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate);
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
}
},
@ -226,7 +205,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -109,16 +109,16 @@ export default {
}
],
Center: [
// {
// label: this.$t('menu.menuSignal.routeSelect'),
// handler: this.arrangementRoute,
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
// },
// {
// label: this.$t('menu.menuSignal.routeCancel'),
// handler: this.cancelTrainRoute,
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
// },
{
label: '排列进路',
handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
{
label: '取消进路',
handler: this.cancelTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
},
{
label: '封锁信号',
handler: this.lock,
@ -183,6 +183,9 @@ export default {
...mapGetters('menuOperation', [
'buttonOperation'
]),
...mapGetters('map', [
'routeList'
]),
group() {
return this.$route.query.group;
}
@ -230,10 +233,10 @@ export default {
operation: OperationEvent.Signal.stoppage.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
param: {
Signal_Code: `${this.selected.code}`
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
@ -251,10 +254,10 @@ export default {
operation: OperationEvent.Signal.cancelStoppage.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
param: {
Signal_Code: `${this.selected.code}`
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
@ -271,17 +274,24 @@ export default {
code: `${this.selected.code}`,
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.routeSelection.doShow(step.operation, this.selected, tempData);
// querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
// const tempData = resp.data;
// this.$refs.routeSelection.doShow(step.operation, this.selected, tempData);
// });
const routes = [];
this.routeList.forEach(elem => {
if (elem.startSignalCode === this.selected.code) {
routes.push(elem);
}
});
this.$refs.routeSelection.doShow(step.operation, this.selected, routes);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
@ -294,10 +304,10 @@ export default {
code: `${this.selected.code}`,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$refs.routeControl.doShow(step, this.selected);
@ -308,17 +318,17 @@ export default {
lock() {
const step = {
start: true,
code: `${this.selected.code}`,
code: this.selected.code,
operation: OperationEvent.Signal.lock.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
signalCode: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeLock.doShow(step.operation, this.selected);
this.$refs.routeLock.doShow(step, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
@ -331,10 +341,10 @@ export default {
code: `${this.selected.code}`,
operation: OperationEvent.Signal.unlock.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeCmdControl.doShow(step, this.selected);
@ -348,10 +358,10 @@ export default {
code: `${this.selected.code}`,
operation: OperationEvent.Signal.reopenSignal.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(step, this.selected);
@ -365,10 +375,10 @@ export default {
code: `${this.selected.code}`,
operation: OperationEvent.Signal.guide.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$refs.routeCmdControl.doShow(step, this.selected);
@ -382,10 +392,10 @@ export default {
code: `${this.selected.code}`,
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(step, this.selected);
@ -399,10 +409,10 @@ export default {
code: `${this.selected.code}`,
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(step, this.selected);
@ -413,13 +423,15 @@ export default {
setAutoTrigger() {
const step = {
start: true,
over: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.setAutoTrigger.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
signalCode: `${this.selected.code}`
},
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(step, this.selected);
@ -433,10 +445,10 @@ export default {
code: `${this.selected.code}`,
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(step, this.selected);
@ -450,10 +462,10 @@ export default {
code: `${this.selected.code}`,
operation: OperationEvent.Signal.signalClose.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(step, this.selected);
@ -467,37 +479,50 @@ export default {
code: `${this.selected.code}`,
operation: OperationEvent.Signal.humanControl.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.routeHandControl.doShow(step, this.selected, tempData);
const routes = [];
this.routeList.forEach(elem => {
if (elem.startSignalCode === this.selected.code) {
routes.push(elem);
}
});
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeHandControl.doShow(step, this.selected, routes);
// querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
// const tempData = resp.data;
// this.$refs.routeHandControl.doShow(step, this.selected, tempData);
// });
}
});
},
// ATS
// ATS
atsAutoControl() {
const step = {
start: true,
Signal_Code: `${this.selected.code}`,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.routeHandControl.doShow(step, this.selected, tempData);
const routes = [];
this.routeList.forEach(elem => {
if (elem.startSignalCode === this.selected.code) {
routes.push(elem);
}
});
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeHandControl.doShow(step, this.selected, routes);
// querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
// const tempData = resp.data;
// this.$refs.routeHandControl.doShow(step, this.selected, tempData);
// });
}
});
}

View File

@ -179,8 +179,9 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate);
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//

View File

@ -41,8 +41,9 @@
</el-table-column>
<el-table-column prop="status" label="控制状态" width="180">
<template slot-scope="scope">
<span v-if="scope.row.controlType == '01'">自动不进行冲突检测</span>
<span v-else>人工</span>
<!-- <span v-if="scope.row.controlType == '01'">自动不进行冲突检测</span>
<span v-else>人工</span> -->
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
</template>
</el-table-column>
</el-table>

View File

@ -162,7 +162,7 @@ export default {
if (tempData && tempData.length > 0) {
tempData.forEach(elem => {
elem.check = false;
this.changeList.push(false);
elem.disabled = false;
//
if (operate.operation === OperationEvent.Signal.humanControl.menu.operation &&

View File

@ -145,10 +145,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
cancel() {

View File

@ -91,22 +91,6 @@ export default {
});
},
methods: {
getProtectedSectionName(row) {
let name = '';
if (row &&
row.overlapSectionList &&
row.overlapSectionList &&
row.overlapSectionList.length > 0) {
const protect = row.overlapSectionList[0];
name = `${protect.name}`;
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
if (station) {
name = `${name}(${station.name})`;
}
}
return name;
},
expandPath() {
console.log('展开进路预览');
},
@ -210,10 +194,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
}
},

View File

@ -214,10 +214,10 @@ export default {
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
@ -251,10 +251,10 @@ export default {
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
cancel() {

View File

@ -314,10 +314,10 @@ export default {
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
cancelDetainTrainAuto() { //
@ -338,10 +338,10 @@ export default {
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
@ -363,10 +363,10 @@ export default {
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
@ -388,10 +388,10 @@ export default {
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//

View File

@ -245,7 +245,7 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -261,7 +261,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -257,10 +257,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
@ -285,10 +285,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
cancel() {

View File

@ -296,7 +296,7 @@ export default {
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME,
param: {
runLevelTime: this.time,
parkingAlwaysValid: this.tempData[0].check
runLevelTimeForever: !!this.tempData[0].check
}
};
@ -306,9 +306,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
} else {
this.doClose();

View File

@ -21,7 +21,7 @@
</div>
<el-radio :id="control === '02'? '': domIdChoose1" label="02">全人工</el-radio>
</el-radio-group>
<el-input-number
<!-- <el-input-number
:id="domIdInput"
v-model="time"
:disabled="disabledInput"
@ -31,15 +31,15 @@
style="width: 130px; padding-left:30px;display: block; float: left; margin-top: 15px;"
@change="inputTime"
/>
<div style="float: left;margin-top: 22px; margin-left: 5px;"></div>
<div style="float: left;margin-top: 22px; margin-left: 5px;"></div> -->
</div>
</div>
<div style="padding: 10px 15px; border: 1px double lightgray; height: 60px;">
<span class="base-label" style="left: -9px;">有效次数</span>
<div style=" position: relative; top:-10px;">
<el-radio-group v-model="effective" :disabled="disabledTime" @change="chooseEffective">
<el-radio :id="effective === false? '': domIdChoose2" :label="false">一次有效</el-radio>
<el-radio :id="effective === true? '': domIdChoose2" :label="true">一直有效</el-radio>
<el-radio :id="effective === 0? '': domIdChoose2" label="0" name="effective">一次有效</el-radio>
<el-radio :id="effective === 1? '': domIdChoose2" label="1" name="effective">一直有效</el-radio>
</el-radio-group>
</div>
</div>
@ -72,10 +72,10 @@ export default {
return {
dialogShow: false,
loading: false,
time: 0,
// time: 0,
control: '01',
direction: '01',
effective: false,
effective: '0',
selected: null,
standName: '',
stationName: ''
@ -143,9 +143,9 @@ export default {
}
this.control = Number(tempDate.parkingTime) === -1 ? '01' : '02';
this.time = Number(tempDate.parkingTime) === -1 ? 15 : Number(tempDate.parkingTime);
// this.time = Number(tempDate.parkingTime) === -1 ? 15 : Number(tempDate.parkingTime);
// this.effective = tempDate.parkingValidStatus ? true : false;
this.effective = tempDate.parkingValidStatus;
this.effective = tempDate.parkingValidStatus ? '1' : '0';
this.direction = selected.direction;
}
this.dialogShow = true;
@ -163,7 +163,7 @@ export default {
/** 自动时的默认时间*/
if (control == '01') {
this.inputTime = 15;
this.effective = true;
this.effective = 1;
}
const operate = {
@ -187,18 +187,18 @@ export default {
}
});
},
inputTime() {
const operate = {
repeat: true,
operation: OperationEvent.StationStand.setStopTime.input.operation
};
// inputTime() {
// const operate = {
// repeat: true,
// operation: OperationEvent.StationStand.setStopTime.input.operation
// };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
// if (valid) {
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// }
// });
// },
commit() {
const operate = {
send: true,
@ -206,8 +206,8 @@ export default {
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME,
param: {
parkingTime: this.control == '01' ? -1 : 1,
runLevelTime: this.time,
parkingAlwaysValid: this.effective
// runLevelTime: this.time,
parkingAlwaysValid: this.effective == '1'
}
// messages: [`: ${this.stationName} - ${this.standName}, ${this.control == '01' ? '' : this.time + ''}, ${this.effective == false ? '' : ''}`]
};
@ -220,9 +220,10 @@ export default {
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.confirmControl.doShow(operate);
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
cancel() {

View File

@ -138,7 +138,7 @@ export default {
pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.directionCode;
pointdata.coord = [train.stationTimeList[1].secondTime || train.stationTimeList[1].second, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)];
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/
opt.markPointData.push(createMartPoint(pointdata));
@ -150,10 +150,10 @@ export default {
train.stationTimeList.forEach((elem, index) => {
idx = index;
if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode ||
index == train.stationTimeList.length - 2 && (train.stationTimeList[index].second||train.stationTimeList[index].secondTime) != (train.stationTimeList[index + 1].second || train.stationTimeList[index + 1].secondTime) ||
index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime ||
index > 0 && index < train.stationTimeList.length - 1) {
const aa = `${train.directionCode}${train.tripNumber}`;
opt.data.push([elem.secondTime || elem.second, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]);
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]);
}
});
@ -162,8 +162,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 || lastPoint.second, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode]);
opt.data.push([nextPoint.secondTime || nextPoint.second, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode]);
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]);
}
/** 如果是备用车,按车次添加线*/
@ -222,21 +222,21 @@ export default {
runPlanData[elem.serviceNumber][elem.tripNumber].push(elem);
runPlanData[elem.serviceNumber][elem.tripNumber].sort((a, b) => {
return parseInt(a.second || a.secondTime) - parseInt(b.second || b.secondTime);
return parseInt(a.secondTime) - parseInt(b.secondTime);
});
/** 如果此记录车组号的数据为第一条时,则打上标签*/
if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) {
serie.markPoint.data.push(createMartPoint({
directionCode: elem.directionCode,
coord: [parseInt(elem.second || elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.directionCode}${elem.tripNumber}`,
color: lineStyle.color || '#000'
}));
}
/** 计算折返点*/
var nextPoint = [parseInt(elem.second || elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode];
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode];
if (serie.data.length > 0) {
var lastPoint = serie.data[serie.data.length - 1];
if (lastPoint[2] !== nextPoint[2]) {

View File

@ -498,6 +498,11 @@ const map = {
state.mapDevice = {};
}
},
updateMapDevice: (state, list) => {
list.forEach(elem => {
state.mapDevice[elem.code] = deepAssign(state.mapDevice[elem.code] || {}, elem);
})
},
setMapConfig: (state, config) => {
state.mapConfig = config;
},
@ -624,6 +629,9 @@ const map = {
setMapData: ({ commit }, map) => { // 设置地图数据
commit('setMapData', map);
},
updateMapDevice: ({ commit }, list) => {
commit('updateMapDevice', list);
},
setMapConfig: ({ commit }, config) => { // 设置地图所属线路
commit('setMapConfig', config);
},

View File

@ -22,6 +22,7 @@ export function creatSubscribe(topic, header) {
function callback(Response) {
if (store) {
var data = JSON.parse(Response.body);
console.log(data);
store.dispatch('socket/setStomp', data);
} else {
callback(Response);

View File

@ -235,7 +235,6 @@
if (this.myChart && this.myChart.isDisposed) {
this.myChart.clear();
}
let startValue = 3600 + this.PlanConvert.TranslationTime;
const offsetTime = 3600;
const initTime = toTimeStamp(formatDuring(this.$store.state.training.initTime));
@ -254,7 +253,6 @@
reject(error);
}
});
},
updateRunPlanData(data) {
const stations = this.$store.state.runPlan.stations;
@ -267,6 +265,9 @@
}
});
}
if (data[0]) {
data[0].secondTime = data[0].second;
}
this.series = this.PlanConvert.updateDataToModels(data, stations, this.kmRangeCoordMap,
planData, this.series, { color: '#FF00DE', width: 0.5 }
);

View File

@ -175,6 +175,20 @@ export default {
this.$messageBox(this.$t('error.runningChartDataError') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '5003') {
this.$messageBox(this.$t('error.runningChartIsNotLoaded') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '5004') {
this.$messageBox(this.$t('error.runningDataError') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '5000') {
this.$messageBox(this.$t('error.systemError') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '4000') {
this.$messageBox(this.$t('error.simulationDoesNotExist') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '4001') {
this.$messageBox(this.$t('error.simulationOperationIsNotDefined') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '4002') {
this.$messageBox(this.$t('error.simulationOperationProcessingMethodNotFound') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '4003') {
this.$messageBox(this.$t('error.simulationOperationFailed') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '4004') {
this.$messageBox(this.$t('error.operationConflict') + ',' + this.$t('error.startSimulationFailed'));
}
});
},

View File

@ -33,9 +33,8 @@ import FaultChoose from './demon/faultChoose';
import AddQuest from './demon/addQuest';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { getStationList, queryRunPlan } from '@/api/runplan';
import { getStationList } from '@/api/runplan';
import { getEveryDayRunPlanNew } from '@/api/simulation';
import {getRpDetailByUserMapId} from '@/api/designPlatform';
//
export default {
@ -121,7 +120,6 @@ export default {
this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
}
});
});
}).catch(() => {
this.$messageBox(this.$t('display.schema.getStationListFail'));

View File

@ -114,6 +114,20 @@ export default {
this.$messageBox(this.$t('error.runningChartDataError') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '5003') {
this.$messageBox(this.$t('error.runningChartIsNotLoaded') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '5004') {
this.$messageBox(this.$t('error.runningDataError') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '5000') {
this.$messageBox(this.$t('error.systemError') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '4000') {
this.$messageBox(this.$t('error.simulationDoesNotExist') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '4001') {
this.$messageBox(this.$t('error.simulationOperationIsNotDefined') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '4002') {
this.$messageBox(this.$t('error.simulationOperationProcessingMethodNotFound') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '4003') {
this.$messageBox(this.$t('error.simulationOperationFailed') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '4004') {
this.$messageBox(this.$t('error.operationConflict') + ',' + this.$t('error.startSimulationFailed'));
}
});
},

View File

@ -296,6 +296,20 @@ export default {
this.$messageBox(this.$t('error.runningChartDataError') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '5003') {
this.$messageBox(this.$t('error.runningChartIsNotLoaded') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '5004') {
this.$messageBox(this.$t('error.runningDataError') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '5000') {
this.$messageBox(this.$t('error.systemError') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '4000') {
this.$messageBox(this.$t('error.simulationDoesNotExist') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '4001') {
this.$messageBox(this.$t('error.simulationOperationIsNotDefined') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '4002') {
this.$messageBox(this.$t('error.simulationOperationProcessingMethodNotFound') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '4003') {
this.$messageBox(this.$t('error.simulationOperationFailed') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '4004') {
this.$messageBox(this.$t('error.operationConflict') + ',' + this.$t('error.startSimulationFailed'));
}
});
},

View File

@ -201,6 +201,7 @@ 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},
{ 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') }
]
@ -396,6 +397,7 @@ export default {
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
},
deviceSelect(selected) {
console.log(selected, '===========');
//
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
if (this.field === 'leftSection') {