Merge remote-tracking branch 'origin/dev' into test
This commit is contained in:
commit
99532acc8a
@ -257,6 +257,15 @@ class SkinCode extends defaultStyle {
|
|||||||
mouseOverStyle: {
|
mouseOverStyle: {
|
||||||
borderLineColor: '#FFFFFF',
|
borderLineColor: '#FFFFFF',
|
||||||
borderLineDash: [3, 3]
|
borderLineDash: [3, 3]
|
||||||
|
},
|
||||||
|
text: {
|
||||||
|
fontSize: 11, // 字体大小
|
||||||
|
fontWeight: 'normal', // 字体粗细
|
||||||
|
distance: 5 // 灯跟文字距离
|
||||||
|
},
|
||||||
|
lamp: {
|
||||||
|
radiusR: 6, // 控制灯大小
|
||||||
|
lampColor: '#5A5D5A' // 功能按钮颜色
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -258,6 +258,15 @@ class SkinCode extends defaultStyle {
|
|||||||
position: 1, // 运行等级方向
|
position: 1, // 运行等级方向
|
||||||
offset: {x: -8, y: 30}, // 运行等级偏移量
|
offset: {x: -8, y: 30}, // 运行等级偏移量
|
||||||
textColor: '#FFF000' // 停站等级字体颜色
|
textColor: '#FFF000' // 停站等级字体颜色
|
||||||
|
},
|
||||||
|
text: {
|
||||||
|
fontSize: 11, // 字体大小
|
||||||
|
fontWeight: 'normal', // 字体粗细
|
||||||
|
distance: 5 // 灯跟文字距离
|
||||||
|
},
|
||||||
|
lamp: {
|
||||||
|
radiusR: 6, // 控制灯大小
|
||||||
|
lampColor: '#5A5D5A' // 功能按钮颜色
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -263,6 +263,15 @@ class SkinCode extends defaultStyle {
|
|||||||
position: 1, // 运行等级方向
|
position: 1, // 运行等级方向
|
||||||
offset: {x: -8, y: 15}, // 运行等级偏移量
|
offset: {x: -8, y: 15}, // 运行等级偏移量
|
||||||
textColor: '#FFF000' // 停站等级字体颜色
|
textColor: '#FFF000' // 停站等级字体颜色
|
||||||
|
},
|
||||||
|
text: {
|
||||||
|
fontSize: 11, // 字体大小
|
||||||
|
fontWeight: 'normal', // 字体粗细
|
||||||
|
distance: 5 // 灯跟文字距离
|
||||||
|
},
|
||||||
|
lamp: {
|
||||||
|
radiusR: 6, // 控制灯大小
|
||||||
|
lampColor: '#5A5D5A' // 功能按钮颜色
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -295,7 +304,8 @@ class SkinCode extends defaultStyle {
|
|||||||
},
|
},
|
||||||
lamp: {
|
lamp: {
|
||||||
radiusR: 6, // 控制灯大小
|
radiusR: 6, // 控制灯大小
|
||||||
controlColor: '#FFFF00' // 控制灯颜色
|
controlColor: '#FFFF00', // 控制灯颜色
|
||||||
|
guideColor: '#5A5D5A' // 引导总锁灯颜色
|
||||||
},
|
},
|
||||||
turnBack: { // 按图折返
|
turnBack: { // 按图折返
|
||||||
lamp: 1, // 灯数量
|
lamp: 1, // 灯数量
|
||||||
@ -413,7 +423,43 @@ class SkinCode extends defaultStyle {
|
|||||||
this[deviceType.Line] = {
|
this[deviceType.Line] = {
|
||||||
lineColor: '#FFFFFF' // 线条颜色
|
lineColor: '#FFFFFF' // 线条颜色
|
||||||
};
|
};
|
||||||
|
this[deviceType.Automactic] = {
|
||||||
|
// 是否显示
|
||||||
|
visible: true,
|
||||||
|
text: {
|
||||||
|
fontSize: 11, // 字体大小
|
||||||
|
fontWeight: 'normal', // 字体粗细
|
||||||
|
distance: 5 // 灯跟文字距离
|
||||||
|
},
|
||||||
|
subtitleText: {
|
||||||
|
fontSize: 11, // 字体大小
|
||||||
|
fontWeight: 'normal', // 字体粗细
|
||||||
|
distance: 17 // 等于副标题距离
|
||||||
|
},
|
||||||
|
lamp: {
|
||||||
|
lineDash: null, // 灯的包围框
|
||||||
|
stroke: '#FFFFFF', // 框的颜色
|
||||||
|
fill: 'rgba(0,0,0,0)', // 填充色
|
||||||
|
radiusR: 6, // 控制灯大小
|
||||||
|
controlColor: '#b5b3b3' // 控制灯颜色 (灰色)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
this[deviceType.AutomaticRoute] = {
|
||||||
|
// 是否显示
|
||||||
|
visible: true,
|
||||||
|
text: {
|
||||||
|
fontSize: 11, // 字体大小
|
||||||
|
fontWeight: 'normal', // 字体粗细
|
||||||
|
distance: 5 // 灯跟文字距离
|
||||||
|
},
|
||||||
|
lamp: {
|
||||||
|
lineDash: null, // 灯的包围框
|
||||||
|
stroke: '#FFFFFF', // 框的颜色
|
||||||
|
fill: 'rgba(0,0,0,0)', // 填充色
|
||||||
|
radiusR: 6, // 控制灯大小
|
||||||
|
controlColor: '#b5b3b3' // 控制灯颜色 (灰色)
|
||||||
|
}
|
||||||
|
};
|
||||||
this[deviceType.TrainWindow] = {
|
this[deviceType.TrainWindow] = {
|
||||||
lineColor: '#4DD43F', // 车次窗颜色
|
lineColor: '#4DD43F', // 车次窗颜色
|
||||||
lineDash: null, // 车次窗虚线间隔
|
lineDash: null, // 车次窗虚线间隔
|
||||||
|
@ -241,6 +241,15 @@ class SkinCode extends defaultStyle {
|
|||||||
position: 1, // 运行等级方向
|
position: 1, // 运行等级方向
|
||||||
offset: {x: -8, y: 6}, // 运行等级偏移量
|
offset: {x: -8, y: 6}, // 运行等级偏移量
|
||||||
textColor: '#FFFFFF' // 停站等级字体颜色
|
textColor: '#FFFFFF' // 停站等级字体颜色
|
||||||
|
},
|
||||||
|
text: {
|
||||||
|
fontSize: 11, // 字体大小
|
||||||
|
fontWeight: 'normal', // 字体粗细
|
||||||
|
distance: 5 // 灯跟文字距离
|
||||||
|
},
|
||||||
|
lamp: {
|
||||||
|
radiusR: 6, // 控制灯大小
|
||||||
|
lampColor: '#5A5D5A' // 功能按钮颜色
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -246,6 +246,15 @@ class SkinCode extends defaultStyle {
|
|||||||
position: 1, // 运行等级方向
|
position: 1, // 运行等级方向
|
||||||
offset: { x: -8, y: 6 }, // 运行等级偏移量
|
offset: { x: -8, y: 6 }, // 运行等级偏移量
|
||||||
textColor: '#FFFFFF' // 停站等级字体颜色
|
textColor: '#FFFFFF' // 停站等级字体颜色
|
||||||
|
},
|
||||||
|
text: {
|
||||||
|
fontSize: 11, // 字体大小
|
||||||
|
fontWeight: 'normal', // 字体粗细
|
||||||
|
distance: 5 // 灯跟文字距离
|
||||||
|
},
|
||||||
|
lamp: {
|
||||||
|
radiusR: 6, // 控制灯大小
|
||||||
|
lampColor: '#5A5D5A' // 功能按钮颜色
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ class SkinCode extends defaultStyle {
|
|||||||
faultLockColor: 'white', // 区段故障锁定颜色
|
faultLockColor: 'white', // 区段故障锁定颜色
|
||||||
undefinedColor: '#0071C1', // 区段未定义颜色
|
undefinedColor: '#0071C1', // 区段未定义颜色
|
||||||
protectionLockedColor: '#FFFFFF', // 保护区段锁闭
|
protectionLockedColor: '#FFFFFF', // 保护区段锁闭
|
||||||
blockColor: 'pink', // 区段封锁颜色
|
blockColor: '#d659d6', // 区段封锁颜色(淡紫色)
|
||||||
atcExcisionColor: '#A0522D', // 区段atc切除颜色
|
atcExcisionColor: '#A0522D', // 区段atc切除颜色
|
||||||
atsExcisionColor: '#A0522D', // 区段ats切除颜色
|
atsExcisionColor: '#A0522D', // 区段ats切除颜色
|
||||||
timeReleaseColor: '#3F3F3F', // 区段延时释放颜色
|
timeReleaseColor: '#3F3F3F', // 区段延时释放颜色
|
||||||
@ -134,7 +134,8 @@ class SkinCode extends defaultStyle {
|
|||||||
color: 'white' // 区段边界符颜色
|
color: 'white' // 区段边界符颜色
|
||||||
},
|
},
|
||||||
block: {
|
block: {
|
||||||
special: false // 区段特殊显示
|
special: false, // 区段特殊显示
|
||||||
|
blockGlint: true, // 区段封锁闪烁显示
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -202,6 +203,31 @@ class SkinCode extends defaultStyle {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this[deviceType.MapCycleButtonVO] = {
|
||||||
|
// 是否显示
|
||||||
|
visible: true,
|
||||||
|
text: {
|
||||||
|
fontSize: 11, // 字体大小
|
||||||
|
fontWeight: 'normal', // 字体粗细
|
||||||
|
distance: 5 // 灯跟文字距离
|
||||||
|
},
|
||||||
|
subtitleText: {
|
||||||
|
fontSize: 11, // 字体大小
|
||||||
|
fontWeight: 'normal', // 字体粗细
|
||||||
|
distance: 17 // 等于副标题距离
|
||||||
|
},
|
||||||
|
lamp: {
|
||||||
|
lineDash: null, // 灯的包围框
|
||||||
|
stroke: '#FFFFFF', // 框的颜色
|
||||||
|
fill: 'rgba(0,0,0,0)', // 填充色
|
||||||
|
radiusR: 6, // 控制灯大小
|
||||||
|
controlColor: '#b5b3b3' // 控制灯颜色 (灰色)
|
||||||
|
},
|
||||||
|
OutFrame: {
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
this[deviceType.StationStand] = {
|
this[deviceType.StationStand] = {
|
||||||
common: { // 通用属性
|
common: { // 通用属性
|
||||||
textFontSize: 10, // 站台默认字体大小
|
textFontSize: 10, // 站台默认字体大小
|
||||||
@ -258,6 +284,15 @@ class SkinCode extends defaultStyle {
|
|||||||
position: -1, // 运行等级方向
|
position: -1, // 运行等级方向
|
||||||
offset: { x: -8, y: 4 }, // 运行等级偏移量
|
offset: { x: -8, y: 4 }, // 运行等级偏移量
|
||||||
textColor: '#FFF000' // 停站等级字体颜色
|
textColor: '#FFF000' // 停站等级字体颜色
|
||||||
|
},
|
||||||
|
text: {
|
||||||
|
fontSize: 11, // 字体大小
|
||||||
|
fontWeight: 'normal', // 字体粗细
|
||||||
|
distance: 5 // 灯跟文字距离
|
||||||
|
},
|
||||||
|
lamp: {
|
||||||
|
radiusR: 6, // 控制灯大小
|
||||||
|
lampColor: '#5A5D5A' // 功能按钮颜色
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -298,7 +333,7 @@ class SkinCode extends defaultStyle {
|
|||||||
},
|
},
|
||||||
StationControl: {
|
StationControl: {
|
||||||
text: {
|
text: {
|
||||||
distance: 2, // 灯和文字之间的距离
|
distance: 12, // 灯和文字之间的距离
|
||||||
fontSize: 12, // 字体大小
|
fontSize: 12, // 字体大小
|
||||||
fontFormat: 'consolas', // 字体格式
|
fontFormat: 'consolas', // 字体格式
|
||||||
fontColor: '#ffffff', // 字体颜色
|
fontColor: '#ffffff', // 字体颜色
|
||||||
@ -316,7 +351,7 @@ class SkinCode extends defaultStyle {
|
|||||||
lamp: {
|
lamp: {
|
||||||
count: 4, // 控制模式的个数
|
count: 4, // 控制模式的个数
|
||||||
offset: { x: 20, y: 0 }, // 偏移量
|
offset: { x: 20, y: 0 }, // 偏移量
|
||||||
radiusR: 4, // 控制模式灯的半径
|
radiusR: 5, // 控制模式灯的半径
|
||||||
distance: 46, // 控制模式之间灯之间的距离
|
distance: 46, // 控制模式之间灯之间的距离
|
||||||
grayColor: '#C0C0C0', // 控制模式灰色
|
grayColor: '#C0C0C0', // 控制模式灰色
|
||||||
greenColor: 'green', // 控制模式绿色
|
greenColor: 'green', // 控制模式绿色
|
||||||
@ -326,7 +361,9 @@ class SkinCode extends defaultStyle {
|
|||||||
centerControlShow: true, // 中控显示
|
centerControlShow: true, // 中控显示
|
||||||
substationControlShow: true, // 站控按钮显示
|
substationControlShow: true, // 站控按钮显示
|
||||||
interconnectedControlShow: false, // 联锁控显示
|
interconnectedControlShow: false, // 联锁控显示
|
||||||
centerControlButtonShow: true // 中控显示
|
centerControlButtonShow: true, // 中控显示
|
||||||
|
stroke: '#FFFFFF', // 框的颜色
|
||||||
|
fill: 'rgba(0,0,0,0)', // 填充色
|
||||||
},
|
},
|
||||||
arrow: {
|
arrow: {
|
||||||
show: false // 控制模式箭头显隐
|
show: false // 控制模式箭头显隐
|
||||||
@ -359,7 +396,9 @@ class SkinCode extends defaultStyle {
|
|||||||
locationColor: '#FF0000', // 道岔单锁'定位'颜色 (红色)
|
locationColor: '#FF0000', // 道岔单锁'定位'颜色 (红色)
|
||||||
inversionColor: '#FF0000', // 道岔单锁'反位'颜色 (红色)
|
inversionColor: '#FF0000', // 道岔单锁'反位'颜色 (红色)
|
||||||
rectShow: false, // 道岔单锁 矩形框是否显示
|
rectShow: false, // 道岔单锁 矩形框是否显示
|
||||||
rectWidth: 18, // 矩形框 宽高
|
arcShow: true, // 道岔单锁 圆形显示
|
||||||
|
arcBorderColor: 'green', // 圆形单锁框边框颜色
|
||||||
|
rectWidth: 22, // 矩形框 宽高
|
||||||
rectBorderColor: '#fff' // 矩形边框颜色
|
rectBorderColor: '#fff' // 矩形边框颜色
|
||||||
},
|
},
|
||||||
block: { // 道岔封锁配置
|
block: { // 道岔封锁配置
|
||||||
|
@ -116,4 +116,22 @@ deviceRender[deviceType.CheckBox] = {
|
|||||||
zlevel: 1
|
zlevel: 1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** Automactic渲染配置 自动折返*/
|
||||||
|
deviceRender[deviceType.MapCycleButtonVO] = {
|
||||||
|
_type: deviceType.MapCycleButtonVO,
|
||||||
|
zlevel: 1
|
||||||
|
};
|
||||||
|
|
||||||
|
/** OutFrame渲染配置 自动折返包围矩形*/
|
||||||
|
deviceRender[deviceType.OutFrame] = {
|
||||||
|
_type: deviceType.OutFrame,
|
||||||
|
zlevel: 1
|
||||||
|
};
|
||||||
|
|
||||||
|
/** AutomacticRoute渲染配置 自动进路*/
|
||||||
|
deviceRender[deviceType.AutomaticRoute] = {
|
||||||
|
_type: deviceType.AutomaticRoute,
|
||||||
|
zlevel: 1
|
||||||
|
};
|
||||||
|
|
||||||
export default deviceRender;
|
export default deviceRender;
|
||||||
|
@ -10,6 +10,8 @@ const deviceType = {
|
|||||||
StationStand: 'StationStand',
|
StationStand: 'StationStand',
|
||||||
Esp: 'Esp',
|
Esp: 'Esp',
|
||||||
Psd: 'Psd',
|
Psd: 'Psd',
|
||||||
|
MapCycleButtonVO: 'MapCycleButtonVO',
|
||||||
|
OutFrame: 'OutFrame',
|
||||||
StationControl: 'StationControl',
|
StationControl: 'StationControl',
|
||||||
StationCounter: 'StationCounter',
|
StationCounter: 'StationCounter',
|
||||||
StationDelayUnlock: 'StationDelayUnlock',
|
StationDelayUnlock: 'StationDelayUnlock',
|
||||||
@ -17,7 +19,8 @@ const deviceType = {
|
|||||||
TrainWindow: 'TrainWindow',
|
TrainWindow: 'TrainWindow',
|
||||||
Line: 'Line',
|
Line: 'Line',
|
||||||
Text: 'Text',
|
Text: 'Text',
|
||||||
CheckBox: 'CheckBox'
|
CheckBox: 'CheckBox',
|
||||||
|
AutomaticRoute:'AutomaticRoute'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default deviceType;
|
export default deviceType;
|
||||||
|
@ -95,16 +95,25 @@ class Status {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
handleZcControl(device) {
|
handleZcControl(device) {
|
||||||
this.statusObj = {
|
this.statusObj = { };
|
||||||
};
|
}
|
||||||
|
handleLcControl(device) {
|
||||||
|
this.statusObj = { };
|
||||||
}
|
}
|
||||||
handleTrainWindow(device) {
|
handleTrainWindow(device) {
|
||||||
this.statusObj = {
|
this.statusObj = { };
|
||||||
};
|
|
||||||
}
|
}
|
||||||
handleLine(device) {
|
handleLine(device) {
|
||||||
this.statusObj = {
|
this.statusObj = { };
|
||||||
};
|
}
|
||||||
|
handleLimitControl(device) {
|
||||||
|
this.statusObj = { };
|
||||||
|
}
|
||||||
|
handleMapCycleButtonVO(device) {
|
||||||
|
this.statusObj = { };
|
||||||
|
}
|
||||||
|
handleOutFrame(device) {
|
||||||
|
this.statusObj = { };
|
||||||
}
|
}
|
||||||
getStatus() {
|
getStatus() {
|
||||||
return this.statusObj;
|
return this.statusObj;
|
||||||
|
53
src/jmapNew/shape/Automactic/EMouse.js
Normal file
53
src/jmapNew/shape/Automactic/EMouse.js
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import Text from 'zrender/src/graphic/Text';
|
||||||
|
|
||||||
|
export default class EMouse extends Group {
|
||||||
|
constructor(device) {
|
||||||
|
super();
|
||||||
|
this.device = device;
|
||||||
|
this.create();
|
||||||
|
}
|
||||||
|
create() {
|
||||||
|
this.text = new Text({
|
||||||
|
zlevel: this.device.zlevel,
|
||||||
|
z: this.device.z+1,
|
||||||
|
position: [0, 0],
|
||||||
|
style: {
|
||||||
|
x: this.device.model.position.x,
|
||||||
|
y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance-30,
|
||||||
|
fontWeight: 'normal',
|
||||||
|
fontSize: this.device.style.LcControl.mouseOverStyle.fontSize,
|
||||||
|
fontFamily: this.device.style.LcControl.mouseOverStyle.fontFamily,
|
||||||
|
text: this.device.model.name,
|
||||||
|
textFill: this.device.style.LcControl.mouseOverStyle.fontColor,
|
||||||
|
textAlign: this.device.style.LcControl.mouseOverStyle.textAlign,
|
||||||
|
textVerticalAlign: this.device.style.LcControl.mouseOverStyle.textVerticalAlign
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.add(this.text);
|
||||||
|
this.text.hide();
|
||||||
|
}
|
||||||
|
mouseover(e) {
|
||||||
|
if (e.target && e.target._subType == 'Text') {
|
||||||
|
this.text.show();
|
||||||
|
} else {
|
||||||
|
this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor);
|
||||||
|
this.device.control.setTextColor(this.device.style.LcControl.mouseOverStyle.textColor);
|
||||||
|
this.device.control.setTextBorder(true);
|
||||||
|
this.device.control.setArcBorder(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mouseout(e) {
|
||||||
|
if (!this.device.model.down) {
|
||||||
|
if (e.target && e.target._subType == 'Text') {
|
||||||
|
this.text.hide();
|
||||||
|
} else {
|
||||||
|
this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor);
|
||||||
|
this.device.control.setTextColor('#FFFFFF');
|
||||||
|
this.device.control.setTextBorder(false);
|
||||||
|
this.device.control.setArcBorder(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
132
src/jmapNew/shape/Automactic/index.js
Normal file
132
src/jmapNew/shape/Automactic/index.js
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
/*
|
||||||
|
* 自动折返 控制器
|
||||||
|
*/
|
||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import Arc from 'zrender/src/graphic/shape/Arc';
|
||||||
|
import Text from 'zrender/src/graphic/Text';
|
||||||
|
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||||
|
import EMouse from './EMouse';
|
||||||
|
|
||||||
|
export default class Automactic extends Group {
|
||||||
|
constructor(model, style) {
|
||||||
|
super();
|
||||||
|
this.z = 20;
|
||||||
|
this._code = model.code;
|
||||||
|
this._type = model._type;
|
||||||
|
this.zlevel = model.zlevel;
|
||||||
|
this.model = model;
|
||||||
|
this.style = style;
|
||||||
|
this.create();
|
||||||
|
this.createMouseEvent();
|
||||||
|
this.setState(model);
|
||||||
|
}
|
||||||
|
|
||||||
|
create() {
|
||||||
|
const model = this.model;
|
||||||
|
this.control = new Arc({
|
||||||
|
_subType: 'Control',
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
shape: {
|
||||||
|
cx: model.position.x,
|
||||||
|
cy: model.position.y,
|
||||||
|
r: this.style.MapCycleButtonVO.lamp.radiusR
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
lineWidth: 0,
|
||||||
|
fill: this.style.MapCycleButtonVO.lamp.controlColor
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.text = new Text({
|
||||||
|
_subType: 'Text',
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
position: [0, 0],
|
||||||
|
style: {
|
||||||
|
x: model.position.x,
|
||||||
|
y: model.position.y + this.style.MapCycleButtonVO.lamp.radiusR + this.style.MapCycleButtonVO.text.distance,
|
||||||
|
fontWeight: this.style.MapCycleButtonVO.text.fontWeight,
|
||||||
|
fontSize: this.style.MapCycleButtonVO.text.fontSize,
|
||||||
|
fontFamily: this.style.fontFamily,
|
||||||
|
text: model.name,
|
||||||
|
textFill: '#fff',
|
||||||
|
textAlign: 'middle',
|
||||||
|
textVerticalAlign: 'top'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (this.model.subtitleName) {
|
||||||
|
this.subtitleText = new Text({
|
||||||
|
_subType: 'Text',
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
position: [0, 0],
|
||||||
|
style: {
|
||||||
|
x: model.position.x,
|
||||||
|
y: model.position.y + this.style.MapCycleButtonVO.lamp.radiusR + this.style.MapCycleButtonVO.subtitleText.distance,
|
||||||
|
fontWeight: this.style.MapCycleButtonVO.subtitleText.fontWeight,
|
||||||
|
fontSize: this.style.MapCycleButtonVO.subtitleText.fontSize,
|
||||||
|
fontFamily: this.style.fontFamily,
|
||||||
|
text: model.subtitleName,
|
||||||
|
textFill: '#fff',
|
||||||
|
textAlign: 'middle',
|
||||||
|
textVerticalAlign: 'top'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.add(this.subtitleText);
|
||||||
|
}
|
||||||
|
const arcRect = this.getArcBoundingRect();
|
||||||
|
this.arcBorder = new Rect({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
silent: true,
|
||||||
|
shape: arcRect,
|
||||||
|
style: {
|
||||||
|
lineDash: this.style.MapCycleButtonVO.lamp.lineDash,
|
||||||
|
stroke: this.style.MapCycleButtonVO.lamp.stroke,
|
||||||
|
fill: this.style.MapCycleButtonVO.lamp.fill
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.add(this.control);
|
||||||
|
this.add(this.text);
|
||||||
|
this.add(this.arcBorder);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置状态
|
||||||
|
setState(model) {
|
||||||
|
}
|
||||||
|
|
||||||
|
createMouseEvent() {
|
||||||
|
if (this.style.LcControl.mouseOverStyle) {
|
||||||
|
this.mouseEvent = new EMouse(this);
|
||||||
|
this.add(this.mouseEvent);
|
||||||
|
this.on('mouseout', (e) => { this.mouseEvent.mouseout(e); });
|
||||||
|
this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getArcBoundingRect() {
|
||||||
|
const rect = this.control.getBoundingRect().clone();
|
||||||
|
const scale = this.control.scale[0];
|
||||||
|
const offsetX = this.control.position[0];
|
||||||
|
const offsetY = this.control.position[1];
|
||||||
|
rect.x = rect.x * scale + offsetX - 2;
|
||||||
|
rect.y = rect.y * scale + offsetY - 2;
|
||||||
|
rect.width = rect.width * scale + 4;
|
||||||
|
rect.height = rect.height * scale + 4;
|
||||||
|
return rect;
|
||||||
|
}
|
||||||
|
|
||||||
|
getShapeTipPoint() {
|
||||||
|
if (this.control) {
|
||||||
|
var distance = 2;
|
||||||
|
var rect = this.control.getBoundingRect();
|
||||||
|
return {
|
||||||
|
x: rect.x + rect.width / 2,
|
||||||
|
y: rect.y - distance
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
53
src/jmapNew/shape/AutomacticRoute/EMouse.js
Normal file
53
src/jmapNew/shape/AutomacticRoute/EMouse.js
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import Text from 'zrender/src/graphic/Text';
|
||||||
|
|
||||||
|
export default class EMouse extends Group {
|
||||||
|
constructor(device) {
|
||||||
|
super();
|
||||||
|
this.device = device;
|
||||||
|
this.create();
|
||||||
|
}
|
||||||
|
create() {
|
||||||
|
this.text = new Text({
|
||||||
|
zlevel: this.device.zlevel,
|
||||||
|
z: this.device.z+1,
|
||||||
|
position: [0, 0],
|
||||||
|
style: {
|
||||||
|
x: this.device.model.position.x,
|
||||||
|
y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance-30,
|
||||||
|
fontWeight: 'normal',
|
||||||
|
fontSize: this.device.style.LcControl.mouseOverStyle.fontSize,
|
||||||
|
fontFamily: this.device.style.LcControl.mouseOverStyle.fontFamily,
|
||||||
|
text: this.device.model.name,
|
||||||
|
textFill: this.device.style.LcControl.mouseOverStyle.fontColor,
|
||||||
|
textAlign: this.device.style.LcControl.mouseOverStyle.textAlign,
|
||||||
|
textVerticalAlign: this.device.style.LcControl.mouseOverStyle.textVerticalAlign
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.add(this.text);
|
||||||
|
this.text.hide();
|
||||||
|
}
|
||||||
|
mouseover(e) {
|
||||||
|
if (e.target && e.target._subType == 'Text') {
|
||||||
|
this.text.show();
|
||||||
|
} else {
|
||||||
|
this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor);
|
||||||
|
this.device.control.setTextColor(this.device.style.LcControl.mouseOverStyle.textColor);
|
||||||
|
this.device.control.setTextBorder(true);
|
||||||
|
this.device.control.setArcBorder(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mouseout(e) {
|
||||||
|
if (!this.device.model.down) {
|
||||||
|
if (e.target && e.target._subType == 'Text') {
|
||||||
|
this.text.hide();
|
||||||
|
} else {
|
||||||
|
this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor);
|
||||||
|
this.device.control.setTextColor('#FFFFFF');
|
||||||
|
this.device.control.setTextBorder(false);
|
||||||
|
this.device.control.setArcBorder(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
105
src/jmapNew/shape/AutomacticRoute/index.js
Normal file
105
src/jmapNew/shape/AutomacticRoute/index.js
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
/*
|
||||||
|
* 自动折返 控制器
|
||||||
|
*/
|
||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import Arc from 'zrender/src/graphic/shape/Arc';
|
||||||
|
import Text from 'zrender/src/graphic/Text';
|
||||||
|
import EMouse from './EMouse';
|
||||||
|
|
||||||
|
export default class LcControl extends Group {
|
||||||
|
constructor(model, style) {
|
||||||
|
super();
|
||||||
|
this.z = 20;
|
||||||
|
this._code = model.code;
|
||||||
|
this._type = model._type;
|
||||||
|
this.zlevel = model.zlevel;
|
||||||
|
this.model = model;
|
||||||
|
this.style = style;
|
||||||
|
this.create();
|
||||||
|
this.createMouseEvent();
|
||||||
|
this.setState(model);
|
||||||
|
}
|
||||||
|
|
||||||
|
create() {
|
||||||
|
const model = this.model;
|
||||||
|
this.control = new Arc({
|
||||||
|
_subType: 'Control',
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
shape: {
|
||||||
|
cx: model.position.x,
|
||||||
|
cy: model.position.y,
|
||||||
|
r: this.style.AutomaticRoute.lamp.radiusR
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
lineWidth: 0,
|
||||||
|
fill: this.style.AutomaticRoute.lamp.controlColor
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.text = new Text({
|
||||||
|
_subType: 'Text',
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
position: [0, 0],
|
||||||
|
style: {
|
||||||
|
x: model.position.x,
|
||||||
|
y: model.position.y + this.style.AutomaticRoute.lamp.radiusR + this.style.AutomaticRoute.text.distance,
|
||||||
|
fontWeight: this.style.AutomaticRoute.text.fontWeight,
|
||||||
|
fontSize: this.style.AutomaticRoute.text.fontSize,
|
||||||
|
fontFamily: this.style.fontFamily,
|
||||||
|
text: model.name,
|
||||||
|
textFill: '#fff',
|
||||||
|
textAlign: 'middle',
|
||||||
|
textVerticalAlign: 'top'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (this.model.subtitleName) {
|
||||||
|
this.subtitleText = new Text({
|
||||||
|
_subType: 'Text',
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
position: [0, 0],
|
||||||
|
style: {
|
||||||
|
x: model.position.x,
|
||||||
|
y: model.position.y + this.style.AutomaticRoute.lamp.radiusR + this.style.AutomaticRoute.subtitleText.distance,
|
||||||
|
fontWeight: this.style.AutomaticRoute.subtitleText.fontWeight,
|
||||||
|
fontSize: this.style.AutomaticRoute.subtitleText.fontSize,
|
||||||
|
fontFamily: this.style.fontFamily,
|
||||||
|
text: model.subtitleName,
|
||||||
|
textFill: '#fff',
|
||||||
|
textAlign: 'middle',
|
||||||
|
textVerticalAlign: 'top'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.add(this.subtitleText);
|
||||||
|
}
|
||||||
|
this.add(this.control);
|
||||||
|
this.add(this.text);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置状态
|
||||||
|
setState(model) {
|
||||||
|
}
|
||||||
|
|
||||||
|
createMouseEvent() {
|
||||||
|
if (this.style.LcControl.mouseOverStyle) {
|
||||||
|
this.mouseEvent = new EMouse(this);
|
||||||
|
this.add(this.mouseEvent);
|
||||||
|
this.on('mouseout', (e) => { this.mouseEvent.mouseout(e); });
|
||||||
|
this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
getShapeTipPoint() {
|
||||||
|
if (this.control) {
|
||||||
|
var distance = 2;
|
||||||
|
var rect = this.control.getBoundingRect();
|
||||||
|
return {
|
||||||
|
x: rect.x + rect.width / 2,
|
||||||
|
y: rect.y - distance
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
41
src/jmapNew/shape/OutFrame/index.js
Normal file
41
src/jmapNew/shape/OutFrame/index.js
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||||
|
|
||||||
|
export default class OutFrame extends Group {
|
||||||
|
constructor(model, style) {
|
||||||
|
super();
|
||||||
|
this.model = model;
|
||||||
|
this._type = model._type;
|
||||||
|
this._code = model.code;
|
||||||
|
this.style = style;
|
||||||
|
this.zlevel = model.zlevel;
|
||||||
|
this.z = 0;
|
||||||
|
this.create();
|
||||||
|
this.setState(model);
|
||||||
|
}
|
||||||
|
|
||||||
|
create() {
|
||||||
|
const model = this.model;
|
||||||
|
this.box = new Rect({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
shape: {
|
||||||
|
x: model.position.x - model.width / 2,
|
||||||
|
y: model.position.y - model.height / 2,
|
||||||
|
width: model.width,
|
||||||
|
height: model.height
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
lineDash: null,
|
||||||
|
stroke: '#fff',
|
||||||
|
lineWidth: 1,
|
||||||
|
fill: 'rgb(135,206,250,0)'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.add(this.box);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置状态
|
||||||
|
setState(model) {
|
||||||
|
}
|
||||||
|
}
|
@ -654,6 +654,12 @@ export default class Section extends Group {
|
|||||||
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (this.style.Section.block.blockGlint) {
|
||||||
|
this.section && this.section.animateStyle(true, [
|
||||||
|
{ time: 1000, styles: { stroke: this.style.backgroundColor } },
|
||||||
|
{ time: 2000, styles: { stroke: this.style.Section.line.blockColor } }
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 故障锁定状态 05*/
|
/** 故障锁定状态 05*/
|
||||||
@ -794,7 +800,6 @@ export default class Section extends Group {
|
|||||||
/** 空闲锁闭或者叫进路锁闭 */
|
/** 空闲锁闭或者叫进路锁闭 */
|
||||||
model.routeLock && this.routeLock();
|
model.routeLock && this.routeLock();
|
||||||
/** 轨道封锁 */
|
/** 轨道封锁 */
|
||||||
// model.blockade = 1;
|
|
||||||
model.blockade && this.block();
|
model.blockade && this.block();
|
||||||
/** 非CBTC车占用 */
|
/** 非CBTC车占用 */
|
||||||
model.nctOccupied && this.unCommunicationOccupied();
|
model.nctOccupied && this.unCommunicationOccupied();
|
||||||
@ -803,7 +808,6 @@ export default class Section extends Group {
|
|||||||
/** 区段切除*/
|
/** 区段切除*/
|
||||||
model.cutOff && this.sectionCutOff();
|
model.cutOff && this.sectionCutOff();
|
||||||
/** 是否限速*/
|
/** 是否限速*/
|
||||||
// model.speedUpLimit = 1;
|
|
||||||
model.speedUpLimit && this.setSpeedUpperLimit();
|
model.speedUpLimit && this.setSpeedUpperLimit();
|
||||||
/** 道岔区段更新岔心颜色 */
|
/** 道岔区段更新岔心颜色 */
|
||||||
if (model.type === '03' && model.switch) {
|
if (model.type === '03' && model.switch) {
|
||||||
|
@ -36,7 +36,7 @@ export default class ESingleControl extends Group {
|
|||||||
r: model.style.Station.StationControl.lamp.radiusR
|
r: model.style.Station.StationControl.lamp.radiusR
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
lineWidth: 0.5,
|
lineWidth: 0,
|
||||||
fill: model.style.Station.StationControl.lamp.grayColor,
|
fill: model.style.Station.StationControl.lamp.grayColor,
|
||||||
stroke: model.style.Station.StationControl.lamp.grayColor
|
stroke: model.style.Station.StationControl.lamp.grayColor
|
||||||
}
|
}
|
||||||
@ -70,4 +70,16 @@ export default class ESingleControl extends Group {
|
|||||||
this.control.setStyle('fill', color);
|
this.control.setStyle('fill', color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getArcBoundingRect() {
|
||||||
|
const rect = this.control.getBoundingRect().clone();
|
||||||
|
const scale = this.control.scale[0];
|
||||||
|
const offsetX = this.control.position[0];
|
||||||
|
const offsetY = this.control.position[1];
|
||||||
|
rect.x = rect.x * scale + offsetX - 2;
|
||||||
|
rect.y = rect.y * scale + offsetY - 2;
|
||||||
|
rect.width = rect.width * scale + 4;
|
||||||
|
rect.height = rect.height * scale + 4;
|
||||||
|
return rect;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import EMouse from './EMouse';
|
|||||||
import ESingleControl from './ESingleControl';
|
import ESingleControl from './ESingleControl';
|
||||||
import EArrow from './EArrow';
|
import EArrow from './EArrow';
|
||||||
import { arrow } from '../utils/ShapePoints';
|
import { arrow } from '../utils/ShapePoints';
|
||||||
|
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||||
|
|
||||||
export default class Station extends Group {
|
export default class Station extends Group {
|
||||||
@ -21,6 +22,7 @@ export default class Station extends Group {
|
|||||||
this.style = style;
|
this.style = style;
|
||||||
this.create();
|
this.create();
|
||||||
this.createTurnBack(); // 创建按图折返
|
this.createTurnBack(); // 创建按图折返
|
||||||
|
this.createGuideTotalLock(); // 创建引导总锁
|
||||||
this.createControlMode();
|
this.createControlMode();
|
||||||
this.setState(model);
|
this.setState(model);
|
||||||
this.checkIsDrawMap();
|
this.checkIsDrawMap();
|
||||||
@ -103,6 +105,39 @@ export default class Station extends Group {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
createGuideTotalLock() { // 创建引导总锁
|
||||||
|
const model = this.model;
|
||||||
|
const style = this.style;
|
||||||
|
if (model.guideTotalLock) {
|
||||||
|
this.guideLamp = new EControl({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
arc: {
|
||||||
|
shape: {
|
||||||
|
cx: model.guideTotalLockPoint.x,
|
||||||
|
cy: model.guideTotalLockPoint.y,
|
||||||
|
r: style.Station.lamp.radiusR
|
||||||
|
},
|
||||||
|
lineWidth: 0,
|
||||||
|
fill: style.Station.lamp.guideColor
|
||||||
|
},
|
||||||
|
text: {
|
||||||
|
position: [0, 0],
|
||||||
|
x: model.guideTotalLockPoint.x,
|
||||||
|
y: model.guideTotalLockPoint.y + style.Station.lamp.radiusR + style.Station.StationControl.text.distance,
|
||||||
|
fontWeight: style.Station.text.fontWeight,
|
||||||
|
fontSize: style.Station.text.fontSize,
|
||||||
|
fontFamily: style.fontFamily,
|
||||||
|
text: '引导总锁',
|
||||||
|
textFill: '#fff',
|
||||||
|
textAlign: 'middle',
|
||||||
|
textVerticalAlign: 'top'
|
||||||
|
},
|
||||||
|
style: this.style
|
||||||
|
});
|
||||||
|
this.add(this.guideLamp);
|
||||||
|
}
|
||||||
|
}
|
||||||
createTurnBack() { // 创建按图折返
|
createTurnBack() { // 创建按图折返
|
||||||
const model = this.model;
|
const model = this.model;
|
||||||
const style = this.style;
|
const style = this.style;
|
||||||
@ -208,7 +243,6 @@ export default class Station extends Group {
|
|||||||
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.lamp.offset.x,
|
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.lamp.offset.x,
|
||||||
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y
|
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y
|
||||||
},
|
},
|
||||||
// context: model.lskContent || '联锁控',
|
|
||||||
context: this.style.Station.StationControl.text.interconnectedControlText || '联锁控',
|
context: this.style.Station.StationControl.text.interconnectedControlText || '联锁控',
|
||||||
pop: false
|
pop: false
|
||||||
});
|
});
|
||||||
@ -247,6 +281,19 @@ export default class Station extends Group {
|
|||||||
pop: false
|
pop: false
|
||||||
});
|
});
|
||||||
this.add(this.centerControlButton);
|
this.add(this.centerControlButton);
|
||||||
|
const arcRect = this.centerControlButton.getArcBoundingRect();
|
||||||
|
this.arcBorder = new Rect({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
silent: true,
|
||||||
|
shape: arcRect,
|
||||||
|
style: {
|
||||||
|
lineDash: null,
|
||||||
|
stroke: this.style.Station.StationControl.lamp.stroke,
|
||||||
|
fill: this.style.Station.StationControl.lamp.fill
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.add(this.arcBorder);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -26,75 +26,75 @@ export default class StationControl extends Group {
|
|||||||
create() {
|
create() {
|
||||||
const model = this.model;
|
const model = this.model;
|
||||||
// 紧急站控
|
// 紧急站控
|
||||||
if (this.style.StationControl.lamp.emergencyControlShow) {
|
if (this.style.Station.StationControl.lamp.emergencyControlShow) {
|
||||||
this.emergencyControl = new ESingleControl({
|
this.emergencyControl = new ESingleControl({
|
||||||
_subType: 'emergency',
|
_subType: 'emergency',
|
||||||
style: this.style,
|
style: this.style,
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
point: {
|
point: {
|
||||||
x: model.position.x - this.style.StationControl.lamp.distance * 3 / 2 + this.style.StationControl.lamp.offset.x,
|
x: model.position.x - this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.lamp.offset.x,
|
||||||
y: model.position.y + this.style.StationControl.lamp.offset.y
|
y: model.position.y + this.style.Station.StationControl.lamp.offset.y
|
||||||
},
|
},
|
||||||
context: this.style.StationControl.text.emergencyControlText,
|
context: this.style.Station.StationControl.text.emergencyControlText,
|
||||||
// model.jjzkContent,
|
// model.jjzkContent,
|
||||||
pop: false
|
pop: false
|
||||||
});
|
});
|
||||||
this.add(this.emergencyControl);
|
this.add(this.emergencyControl);
|
||||||
}
|
}
|
||||||
// 中控按钮
|
// 中控按钮
|
||||||
if (this.style.StationControl.lamp.centerControlShow) {
|
if (this.style.Station.StationControl.lamp.centerControlShow) {
|
||||||
this.centerControl = new ESingleControl({
|
this.centerControl = new ESingleControl({
|
||||||
_subType: 'center',
|
_subType: 'center',
|
||||||
style: this.style,
|
style: this.style,
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
point: {
|
point: {
|
||||||
x: model.position.x - this.style.StationControl.lamp.distance / 2 + this.style.StationControl.lamp.offset.x,
|
x: model.position.x - this.style.Station.StationControl.lamp.distance / 2 + this.style.Station.StationControl.lamp.offset.x,
|
||||||
y: model.position.y + this.style.StationControl.lamp.offset.y
|
y: model.position.y + this.style.Station.StationControl.lamp.offset.y
|
||||||
},
|
},
|
||||||
context: this.style.StationControl.text.centerControlText,
|
context: this.style.Station.StationControl.text.centerControlText,
|
||||||
// model.zokContent,
|
// model.zokContent,
|
||||||
pop: false
|
pop: false
|
||||||
});
|
});
|
||||||
this.add(this.centerControl);
|
this.add(this.centerControl);
|
||||||
}
|
}
|
||||||
// 站控按钮
|
// 站控按钮
|
||||||
if (this.style.StationControl.lamp.substationControlShow) {
|
if (this.style.Station.StationControl.lamp.substationControlShow) {
|
||||||
this.substationControl = new ESingleControl({
|
this.substationControl = new ESingleControl({
|
||||||
_subType: 'substation',
|
_subType: 'substation',
|
||||||
style: this.style,
|
style: this.style,
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
point: {
|
point: {
|
||||||
x: model.position.x + this.style.StationControl.lamp.distance / 2 + this.style.StationControl.lamp.offset.x,
|
x: model.position.x + this.style.Station.StationControl.lamp.distance / 2 + this.style.Station.StationControl.lamp.offset.x,
|
||||||
y: model.position.y + this.style.StationControl.lamp.offset.y
|
y: model.position.y + this.style.Station.StationControl.lamp.offset.y
|
||||||
},
|
},
|
||||||
context: this.style.StationControl.text.substationControlText,
|
context: this.style.Station.StationControl.text.substationControlText,
|
||||||
// model.zakContent
|
// model.zakContent
|
||||||
pop: false
|
pop: false
|
||||||
});
|
});
|
||||||
this.add(this.substationControl);
|
this.add(this.substationControl);
|
||||||
}
|
}
|
||||||
// 联锁控
|
// 联锁控
|
||||||
if (this.style.StationControl.lamp.interconnectedControlShow) {
|
if (this.style.Station.StationControl.lamp.interconnectedControlShow) {
|
||||||
this.interconnectedControl = new ESingleControl({
|
this.interconnectedControl = new ESingleControl({
|
||||||
_subType: 'interconnected',
|
_subType: 'interconnected',
|
||||||
style: this.style,
|
style: this.style,
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
point: {
|
point: {
|
||||||
x: model.position.x + this.style.StationControl.lamp.distance * 3 / 2 + this.style.StationControl.lamp.offset.x,
|
x: model.position.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.lamp.offset.x,
|
||||||
y: model.position.y + this.style.StationControl.lamp.offset.y
|
y: model.position.y + this.style.Station.StationControl.lamp.offset.y
|
||||||
},
|
},
|
||||||
context: this.style.StationControl.text.interconnectedControlText || '联锁控',
|
context: this.style.Station.StationControl.text.interconnectedControlText || '联锁控',
|
||||||
pop: false
|
pop: false
|
||||||
});
|
});
|
||||||
this.add(this.interconnectedControl);
|
this.add(this.interconnectedControl);
|
||||||
}
|
}
|
||||||
// 箭头
|
// 箭头
|
||||||
if (this.style.StationControl.arrow.show) {
|
if (this.style.Station.StationControl.arrow.show) {
|
||||||
const point = arrow(this.model.position.x, this.model.position.y + this.style.StationControl.lamp.radiusR / 2, this.style.StationControl.lamp.distance / 6, this.style.StationControl.lamp.radiusR * 0.8);
|
const point = arrow(this.model.position.x, this.model.position.y + this.style.Station.StationControl.lamp.radiusR / 2, this.style.Station.StationControl.lamp.distance / 6, this.style.Station.StationControl.lamp.radiusR * 0.8);
|
||||||
this.arrowsControl = new EArrow({
|
this.arrowsControl = new EArrow({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
@ -102,9 +102,9 @@ export default class StationControl extends Group {
|
|||||||
count: this.count,
|
count: this.count,
|
||||||
drict: 1,
|
drict: 1,
|
||||||
point: point,
|
point: point,
|
||||||
x: model.position.x + this.style.StationControl.lamp.offset.x,
|
x: model.position.x + this.style.Station.StationControl.lamp.offset.x,
|
||||||
y: model.position.y + this.style.StationControl.lamp.radiusR / 2 + this.style.StationControl.lamp.offset.y,
|
y: model.position.y + this.style.Station.StationControl.lamp.radiusR / 2 + this.style.Station.StationControl.lamp.offset.y,
|
||||||
fill: this.style.StationControl.lamp.grayColor,
|
fill: this.style.Station.StationControl.lamp.grayColor,
|
||||||
lineWidth: 1,
|
lineWidth: 1,
|
||||||
stroke: this.style.sidelineColor
|
stroke: this.style.sidelineColor
|
||||||
});
|
});
|
||||||
@ -116,28 +116,40 @@ export default class StationControl extends Group {
|
|||||||
setState(model) {
|
setState(model) {
|
||||||
// switch (model.status) {
|
// switch (model.status) {
|
||||||
// case '00': // 无状态
|
// case '00': // 无状态
|
||||||
// this.emergencyControl && this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor);
|
// this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
// this.substationControl && this.substationControl.setColor(this.style.StationControl.lamp.grayColor);
|
// this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
// this.centerControl && this.centerControl.setColor(this.style.StationControl.lamp.grayColor);
|
// this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
// break;
|
// break;
|
||||||
// case '01': // 中控
|
// case '01': // 中控
|
||||||
// this.emergencyControl && this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor);
|
// this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
// this.substationControl && this.substationControl.setColor(this.style.StationControl.lamp.grayColor);
|
// this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
// this.centerControl && this.centerControl.setColor(this.style.StationControl.lamp.greenColor);
|
// this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.greenColor);
|
||||||
// break;
|
// break;
|
||||||
// case '02': // 站控
|
// case '02': // 站控
|
||||||
// this.emergencyControl && this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor);
|
// this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
// this.substationControl && this.substationControl.setColor(this.style.StationControl.lamp.yellowColor);
|
// this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.yellowColor);
|
||||||
// this.centerControl && this.centerControl.setColor(this.style.StationControl.lamp.grayColor);
|
// this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
// break;
|
// break;
|
||||||
// case '03': // 紧急站控
|
// case '03': // 紧急站控
|
||||||
// this.emergencyControl && this.emergencyControl.setColor(this.style.StationControl.lamp.redColor);
|
// this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.redColor);
|
||||||
// this.substationControl && this.substationControl.setColor(this.style.StationControl.lamp.grayColor);
|
// this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
// this.centerControl && this.centerControl.setColor(this.style.StationControl.lamp.grayColor);
|
// this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
// break;
|
// break;
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getArcBoundingRect(view) {
|
||||||
|
const rect = view.getBoundingRect().clone();
|
||||||
|
const scale = view.scale[0];
|
||||||
|
const offsetX = view.position[0];
|
||||||
|
const offsetY = view.position[1];
|
||||||
|
rect.x = rect.x * scale + offsetX - 2;
|
||||||
|
rect.y = rect.y * scale + offsetY - 2;
|
||||||
|
rect.width = rect.width * scale + 4;
|
||||||
|
rect.height = rect.height * scale + 4;
|
||||||
|
return rect;
|
||||||
|
}
|
||||||
|
|
||||||
/** 按钮是否按下*/
|
/** 按钮是否按下*/
|
||||||
isPop(e) {
|
isPop(e) {
|
||||||
for (var i = 0; i < this.childCount(); i++) {
|
for (var i = 0; i < this.childCount(); i++) {
|
||||||
|
@ -11,6 +11,7 @@ import EJump from './EJump';
|
|||||||
import EHighlight from '../element/EHighlight';
|
import EHighlight from '../element/EHighlight';
|
||||||
import ETrainStop from './ETrainStop';
|
import ETrainStop from './ETrainStop';
|
||||||
import ETrainDepart from './ETrainDepart';
|
import ETrainDepart from './ETrainDepart';
|
||||||
|
import EControl from '../element/EControl';
|
||||||
|
|
||||||
class StationStand extends Group {
|
class StationStand extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, style) {
|
||||||
@ -24,6 +25,7 @@ class StationStand extends Group {
|
|||||||
this.doors = new Group();
|
this.doors = new Group();
|
||||||
this.create();
|
this.create();
|
||||||
this.createMouseEvent();
|
this.createMouseEvent();
|
||||||
|
this.createFunctionButton();
|
||||||
this.setVisible(model.visible);
|
this.setVisible(model.visible);
|
||||||
this.setState(model);
|
this.setState(model);
|
||||||
this.checkIsDrawMap();
|
this.checkIsDrawMap();
|
||||||
@ -205,7 +207,126 @@ class StationStand extends Group {
|
|||||||
this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); });
|
this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
createFunctionButton() { //
|
||||||
|
const model = this.model;
|
||||||
|
const style = this.style;
|
||||||
|
if (model.stopJumpLamp) {
|
||||||
|
this.stopJumpLampButton = new EControl({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
arc: {
|
||||||
|
shape: {
|
||||||
|
cx: model.stopJumpLampPoint.x,
|
||||||
|
cy: model.stopJumpLampPoint.y,
|
||||||
|
r: style.Station.lamp.radiusR
|
||||||
|
},
|
||||||
|
lineWidth: 0,
|
||||||
|
fill: style.StationStand.lamp.lampColor
|
||||||
|
},
|
||||||
|
text: {
|
||||||
|
position: [0, 0],
|
||||||
|
x: model.stopJumpLampPoint.x,
|
||||||
|
y: model.stopJumpLampPoint.y + style.StationStand.lamp.radiusR + style.StationStand.text.distance,
|
||||||
|
fontWeight: style.StationStand.text.fontWeight,
|
||||||
|
fontSize: style.StationStand.text.fontSize,
|
||||||
|
fontFamily: style.fontFamily,
|
||||||
|
text: '跳停',
|
||||||
|
textFill: '#fff',
|
||||||
|
textAlign: 'middle',
|
||||||
|
textVerticalAlign: 'top'
|
||||||
|
},
|
||||||
|
style: this.style
|
||||||
|
});
|
||||||
|
this.add(this.stopJumpLampButton);
|
||||||
|
}
|
||||||
|
if (model.cancelStopJumpLamp) {
|
||||||
|
this.cancelStopJumpLampButton = new EControl({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
arc: {
|
||||||
|
shape: {
|
||||||
|
cx: model.cancelStopJumpLampPoint.x,
|
||||||
|
cy: model.cancelStopJumpLampPoint.y,
|
||||||
|
r: style.Station.lamp.radiusR
|
||||||
|
},
|
||||||
|
lineWidth: 0,
|
||||||
|
fill: style.StationStand.lamp.lampColor
|
||||||
|
},
|
||||||
|
text: {
|
||||||
|
position: [0, 0],
|
||||||
|
x: model.cancelStopJumpLampPoint.x,
|
||||||
|
y: model.cancelStopJumpLampPoint.y + style.StationStand.lamp.radiusR + style.StationStand.text.distance,
|
||||||
|
fontWeight: style.StationStand.text.fontWeight,
|
||||||
|
fontSize: style.StationStand.text.fontSize,
|
||||||
|
fontFamily: style.fontFamily,
|
||||||
|
text: '取消跳停',
|
||||||
|
textFill: '#fff',
|
||||||
|
textAlign: 'middle',
|
||||||
|
textVerticalAlign: 'top'
|
||||||
|
},
|
||||||
|
style: this.style
|
||||||
|
});
|
||||||
|
this.add(this.cancelStopJumpLampButton);
|
||||||
|
}
|
||||||
|
if (model.upDetainLamp) {
|
||||||
|
this.upDetainLampButton = new EControl({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
arc: {
|
||||||
|
shape: {
|
||||||
|
cx: model.upDetainLampPoint.x,
|
||||||
|
cy: model.upDetainLampPoint.y,
|
||||||
|
r: style.Station.lamp.radiusR
|
||||||
|
},
|
||||||
|
lineWidth: 0,
|
||||||
|
fill: style.StationStand.lamp.lampColor
|
||||||
|
},
|
||||||
|
text: {
|
||||||
|
position: [0, 0],
|
||||||
|
x: model.upDetainLampPoint.x,
|
||||||
|
y: model.upDetainLampPoint.y + style.StationStand.lamp.radiusR + style.StationStand.text.distance,
|
||||||
|
fontWeight: style.StationStand.text.fontWeight,
|
||||||
|
fontSize: style.StationStand.text.fontSize,
|
||||||
|
fontFamily: style.fontFamily,
|
||||||
|
text: '上行扣车',
|
||||||
|
textFill: '#fff',
|
||||||
|
textAlign: 'middle',
|
||||||
|
textVerticalAlign: 'top'
|
||||||
|
},
|
||||||
|
style: this.style
|
||||||
|
});
|
||||||
|
this.add(this.upDetainLampButton);
|
||||||
|
}
|
||||||
|
if (model.downDetainLamp) {
|
||||||
|
this.downDetainLampButton = new EControl({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
arc: {
|
||||||
|
shape: {
|
||||||
|
cx: model.downDetainLampPoint.x,
|
||||||
|
cy: model.downDetainLampPoint.y,
|
||||||
|
r: style.Station.lamp.radiusR
|
||||||
|
},
|
||||||
|
lineWidth: 0,
|
||||||
|
fill: style.StationStand.lamp.lampColor
|
||||||
|
},
|
||||||
|
text: {
|
||||||
|
position: [0, 0],
|
||||||
|
x: model.downDetainLampPoint.x,
|
||||||
|
y: model.downDetainLampPoint.y + style.StationStand.lamp.radiusR + style.StationStand.text.distance,
|
||||||
|
fontWeight: style.StationStand.text.fontWeight,
|
||||||
|
fontSize: style.StationStand.text.fontSize,
|
||||||
|
fontFamily: style.fontFamily,
|
||||||
|
text: '上行扣车',
|
||||||
|
textFill: '#fff',
|
||||||
|
textAlign: 'middle',
|
||||||
|
textVerticalAlign: 'top'
|
||||||
|
},
|
||||||
|
style: this.style
|
||||||
|
});
|
||||||
|
this.add(this.downDetainLampButton);
|
||||||
|
}
|
||||||
|
}
|
||||||
setVisible(visible) {
|
setVisible(visible) {
|
||||||
if (visible) {
|
if (visible) {
|
||||||
this.eachChild(elem => { elem.show(); });
|
this.eachChild(elem => { elem.show(); });
|
||||||
|
20
src/jmapNew/shape/Switch/ELockArc.js
Normal file
20
src/jmapNew/shape/Switch/ELockArc.js
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import Circle from 'zrender/src/graphic/shape/Circle';
|
||||||
|
|
||||||
|
/** 名称元素*/
|
||||||
|
export default function ELockRect(model) {
|
||||||
|
const TextName = new Circle({
|
||||||
|
zlevel: model.zlevel,
|
||||||
|
z: model.z + 2,
|
||||||
|
shape: {
|
||||||
|
cx: model.x,
|
||||||
|
cy: model.y,
|
||||||
|
r: 5
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
lineWidth: model.lineWidth,
|
||||||
|
stroke: model.stroke,
|
||||||
|
fill: model.fill
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return TextName;
|
||||||
|
}
|
@ -24,16 +24,17 @@ class ESwName extends Group {
|
|||||||
fontSize: style.Switch.text.fontSize,
|
fontSize: style.Switch.text.fontSize,
|
||||||
fontFamily: style.fontFamily,
|
fontFamily: style.fontFamily,
|
||||||
text: model.name,
|
text: model.name,
|
||||||
textAlign: model.triangle.drictx === 1 ? 'left' : 'right',
|
// textAlign: model.triangle.drictx === 1 ? 'left' : 'right',
|
||||||
|
textAlign: 'center',
|
||||||
textVerticalAlign: 'middle',
|
textVerticalAlign: 'middle',
|
||||||
textFill: style.Switch.text.fontColor
|
textFill: style.Switch.text.fontColor
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const rect = this.nameText.getBoundingRect();
|
const rect = this.nameText.getBoundingRect();
|
||||||
let textWidth = rect.width * 0.8;
|
let textWidth = rect.width;
|
||||||
if (style.Switch.monolock.nameBorderShow) {
|
if (style.Switch.monolock.nameBorderShow) {
|
||||||
textWidth = rect.width * 0.8 + 8;
|
textWidth = rect.width;
|
||||||
}
|
}
|
||||||
if (model.triangle.drictx !== 1) {
|
if (model.triangle.drictx !== 1) {
|
||||||
rect.x += rect.width;
|
rect.x += rect.width;
|
||||||
|
@ -9,12 +9,13 @@ import ESwCore from './ESwCore.js';
|
|||||||
import ESwLocal from './ESwLocal.js';
|
import ESwLocal from './ESwLocal.js';
|
||||||
import ESwLnversion from './ESwLnversion';
|
import ESwLnversion from './ESwLnversion';
|
||||||
import ELockRect from './ELockRect';
|
import ELockRect from './ELockRect';
|
||||||
|
import ELockArc from './ELockArc';
|
||||||
import EMouse from './EMouse';
|
import EMouse from './EMouse';
|
||||||
import EHighlight from '../element/EHighlight';
|
import EHighlight from '../element/EHighlight';
|
||||||
import ERhomboid from './ERhomboid';
|
import ERhomboid from './ERhomboid';
|
||||||
import ETriangle from './ETriangle';
|
import ETriangle from './ETriangle';
|
||||||
import store from '@/store';
|
import store from '@/store';
|
||||||
import Vue from 'vue';
|
// import Vue from 'vue';
|
||||||
|
|
||||||
export default class Switch extends Group {
|
export default class Switch extends Group {
|
||||||
constructor(model, style) {
|
constructor(model, style) {
|
||||||
@ -200,8 +201,20 @@ export default class Switch extends Group {
|
|||||||
stroke: this.style.Switch.monolock.rectBorderColor,
|
stroke: this.style.Switch.monolock.rectBorderColor,
|
||||||
fill: this.style.transparentColor
|
fill: this.style.transparentColor
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.lockArc = new ELockArc({ // 锁定矩形
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z + 6,
|
||||||
|
x: this.model.intersection.x,
|
||||||
|
y: this.model.intersection.y,
|
||||||
|
lineWidth: 1.2,
|
||||||
|
stroke: this.style.Switch.monolock.arcBorderColor,
|
||||||
|
fill: this.style.transparentColor
|
||||||
|
});
|
||||||
|
this.add(this.lockArc);
|
||||||
this.add(this.lockRect);
|
this.add(this.lockRect);
|
||||||
this.lockRect.hide();
|
this.lockRect.hide();
|
||||||
|
this.lockArc.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 名称动画*/
|
/** 名称动画*/
|
||||||
@ -251,6 +264,7 @@ export default class Switch extends Group {
|
|||||||
/** 恢复状态*/
|
/** 恢复状态*/
|
||||||
recover() {
|
recover() {
|
||||||
this.lockRect.hide(); // 矩形包围框
|
this.lockRect.hide(); // 矩形包围框
|
||||||
|
this.lockArc.hide(); // 圆形单锁框
|
||||||
this.setSwitchCoreColor(this.style.backgroundColor);
|
this.setSwitchCoreColor(this.style.backgroundColor);
|
||||||
this.name.getNameText().stopAnimation(false);
|
this.name.getNameText().stopAnimation(false);
|
||||||
this.swCore.stopAnimation(false);
|
this.swCore.stopAnimation(false);
|
||||||
@ -330,6 +344,9 @@ export default class Switch extends Group {
|
|||||||
if (this.style.Switch.monolock.nameBorderShow) { // 单锁显示名称包围框
|
if (this.style.Switch.monolock.nameBorderShow) { // 单锁显示名称包围框
|
||||||
this.setHasTextBorder(1);
|
this.setHasTextBorder(1);
|
||||||
}
|
}
|
||||||
|
if (this.style.Switch.monolock.arcShow) { // 圆形单锁是否显示
|
||||||
|
this.lockArc.show();
|
||||||
|
}
|
||||||
if (this.model.normalPosition) {
|
if (this.model.normalPosition) {
|
||||||
this.setTextColor(this.style.Switch.monolock.locationColor); // 定位 设置道岔名称颜色
|
this.setTextColor(this.style.Switch.monolock.locationColor); // 定位 设置道岔名称颜色
|
||||||
} else if (this.model.reversePosition) {
|
} else if (this.model.reversePosition) {
|
||||||
|
@ -15,7 +15,10 @@ import TrainWindow from './TrainWindow/index.js';
|
|||||||
import Train from './Train/index.js';
|
import Train from './Train/index.js';
|
||||||
import Line from './Line/index.js';
|
import Line from './Line/index.js';
|
||||||
import Text2 from './Text/index.js';
|
import Text2 from './Text/index.js';
|
||||||
|
import MapCycleButtonVO from './Automactic/index.js';
|
||||||
|
import OutFrame from './OutFrame/index.js';
|
||||||
import CheckBox from './checkBox/checkBox.js';
|
import CheckBox from './checkBox/checkBox.js';
|
||||||
|
import AutomaticRoute from './AutomacticRoute/index.js';
|
||||||
|
|
||||||
/** 图库*/
|
/** 图库*/
|
||||||
const mapShape = {};
|
const mapShape = {};
|
||||||
@ -35,7 +38,10 @@ mapShape[deviceType.TrainWindow] = TrainWindow;
|
|||||||
mapShape[deviceType.Train] = Train;
|
mapShape[deviceType.Train] = Train;
|
||||||
mapShape[deviceType.Line] = Line;
|
mapShape[deviceType.Line] = Line;
|
||||||
mapShape[deviceType.Text] = Text2;
|
mapShape[deviceType.Text] = Text2;
|
||||||
|
mapShape[deviceType.MapCycleButtonVO] = MapCycleButtonVO;
|
||||||
|
mapShape[deviceType.OutFrame] = OutFrame;
|
||||||
mapShape[deviceType.CheckBox] = CheckBox;
|
mapShape[deviceType.CheckBox] = CheckBox;
|
||||||
|
mapShape[deviceType.AutomaticRoute] = AutomaticRoute;
|
||||||
|
|
||||||
function shapefactory(device, jmap) {
|
function shapefactory(device, jmap) {
|
||||||
const type = device._type;
|
const type = device._type;
|
||||||
|
@ -183,7 +183,7 @@ export default {
|
|||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 信号关灯
|
// 信号关灯
|
||||||
@ -203,7 +203,7 @@ export default {
|
|||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 信号重开
|
// 信号重开
|
||||||
@ -223,7 +223,7 @@ export default {
|
|||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消进路
|
// 取消进路
|
||||||
@ -243,7 +243,7 @@ export default {
|
|||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 进路交人工控
|
// 进路交人工控
|
||||||
@ -263,7 +263,7 @@ export default {
|
|||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 进路交ATS自动控
|
// 进路交ATS自动控
|
||||||
@ -283,7 +283,7 @@ export default {
|
|||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 设置运行等级
|
// 设置运行等级
|
||||||
@ -304,7 +304,7 @@ export default {
|
|||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 停站时间
|
// 停站时间
|
||||||
@ -325,7 +325,7 @@ export default {
|
|||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 设置折返策略
|
// 设置折返策略
|
||||||
@ -346,7 +346,7 @@ export default {
|
|||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
@ -359,7 +359,7 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -122,12 +122,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
@ -139,11 +139,11 @@
|
|||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation,
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ export default {
|
|||||||
val: row.code
|
val: row.code
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,6 @@ export default {
|
|||||||
clickEvent(row, column, event) {
|
clickEvent(row, column, event) {
|
||||||
const operate = {
|
const operate = {
|
||||||
operation: OperationEvent.StationStand.setBackStrategy.choose.operation,
|
operation: OperationEvent.StationStand.setBackStrategy.choose.operation,
|
||||||
val: `${row.value}`,
|
|
||||||
};
|
};
|
||||||
this.strategy = row.value;
|
this.strategy = row.value;
|
||||||
this.isConfirm = true;
|
this.isConfirm = true;
|
||||||
|
@ -309,6 +309,7 @@ export default {
|
|||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// 提前发车
|
// 提前发车
|
||||||
earlyDeparture() {
|
earlyDeparture() {
|
||||||
const operate = {
|
const operate = {
|
||||||
|
@ -195,21 +195,21 @@ export default {
|
|||||||
// this.tempData.push({ item: '车站扣车', status: opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '未设置' });
|
// this.tempData.push({ item: '车站扣车', status: opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '未设置' });
|
||||||
// this.tempData.push({ item: '中心扣车', status: opts.holdStatus == '03' || opts.holdStatus == '04' ? '已设置' : '未设置' });
|
// this.tempData.push({ item: '中心扣车', status: opts.holdStatus == '03' || opts.holdStatus == '04' ? '已设置' : '未设置' });
|
||||||
// 中心扣车
|
// 中心扣车
|
||||||
this.treeData[1].children[0].value = opts.holdStatus == '03' || opts.holdStatus == '04' ? '已设置' : '未设置';
|
this.treeData[1].children[0].value = selected.centerHoldTrain ? '已设置' : '未设置';
|
||||||
// 车站扣车
|
// 车站扣车
|
||||||
this.treeData[1].children[1].value = opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '未设置';
|
this.treeData[1].children[1].value = selected.stationHoldTrain ? '已设置' : '未设置';
|
||||||
// this.tempData.push({ item: '停站时间', status: opts.parkingTime != -1 ? opts.parkingTime : '自动' });
|
// this.tempData.push({ item: '停站时间', status: opts.parkingTime != -1 ? opts.parkingTime : '自动' });
|
||||||
// 停站时间
|
// 停站时间
|
||||||
this.treeData[0].children[2].value = opts.parkingTime != -1 ? opts.parkingTime : '自动';
|
this.treeData[0].children[2].value = selected.parkingTime != -1 ? selected.parkingTime : '自动';
|
||||||
// 跳停
|
// 跳停
|
||||||
this.treeData[0].children[3].value = opts.jumpStopStatus != '01' ? '已设置' : '未设置';
|
this.treeData[0].children[3].value = selected.allSkip || selected.assignSkip ? '已设置' : '未设置';
|
||||||
if (!stationStand || !station) {
|
if (!stationStand || !station) {
|
||||||
this.tempData.push({ item: '运行等级', status: `自动` });
|
this.tempData.push({ item: '运行等级', status: `自动` });
|
||||||
} else {
|
} else {
|
||||||
this.tempData.push({ item: '运行等级', status: opts.intervalRunTime > 0 ? `至${station.name}${stationStand.name}:人工` : `至${station.name}${stationStand.name}:自动` });
|
this.tempData.push({ item: '运行等级', status: selected.runLevelTime > 0 ? `至${station.name}${stationStand.name}:人工` : `至${station.name}${stationStand.name}:自动` });
|
||||||
}
|
}
|
||||||
// this.tempData.push({ item: '跳停', status: opts.jumpStopStatus != '01' ? '已设置' : '未设置' });
|
// this.tempData.push({ item: '跳停', status: opts.jumpStopStatus != '01' ? '已设置' : '未设置' });
|
||||||
this.tempData.push({ item: '下行折返策略', status: this.strategyMap[opts.reentryStrategy] ? this.strategyMap[opts.reentryStrategy] : '默认' });
|
this.tempData.push({ item: '下行折返策略', status: this.strategyMap[selected.reentryStrategy] ? this.strategyMap[selected.reentryStrategy] : '默认' });
|
||||||
},
|
},
|
||||||
doShow(operate, selected, opts) {
|
doShow(operate, selected, opts) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
|
@ -270,6 +270,7 @@ export default {
|
|||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// 取消跳停
|
// 取消跳停
|
||||||
cancelJumpStop() {
|
cancelJumpStop() {
|
||||||
// let val = this.model.val1;
|
// let val = this.model.val1;
|
||||||
@ -319,7 +320,6 @@ export default {
|
|||||||
this.model.val2 = val;
|
this.model.val2 = val;
|
||||||
this.model.val1 = '';
|
this.model.val1 = '';
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: operation
|
operation: operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
@ -333,7 +333,6 @@ export default {
|
|||||||
? OperationEvent.StationStand.setJumpStop.selfStationStand.operation : OperationEvent.StationStand.cancelJumpStop.selfStationStand.operation;
|
? OperationEvent.StationStand.setJumpStop.selfStationStand.operation : OperationEvent.StationStand.cancelJumpStop.selfStationStand.operation;
|
||||||
this.model.val1 = val;
|
this.model.val1 = val;
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: operation
|
operation: operation
|
||||||
};
|
};
|
||||||
this.model.val2 = '';
|
this.model.val2 = '';
|
||||||
@ -348,9 +347,7 @@ export default {
|
|||||||
? OperationEvent.StationStand.setJumpStop.select.operation : OperationEvent.StationStand.cancelJumpStop.select.operation;
|
? OperationEvent.StationStand.setJumpStop.select.operation : OperationEvent.StationStand.cancelJumpStop.select.operation;
|
||||||
this.model.val1 = '';
|
this.model.val1 = '';
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
operation: operation
|
||||||
operation: operation,
|
|
||||||
val: val
|
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
@ -241,10 +241,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
timeSelectChange(time) {
|
timeSelectChange(time) {
|
||||||
let operate = {
|
const operate = {
|
||||||
operation: OperationEvent.StationStand.setRunLevel.choose.operation,
|
operation: OperationEvent.StationStand.setRunLevel.choose.operation,
|
||||||
val: time.toString(),
|
val: time.toString(),
|
||||||
}
|
};
|
||||||
|
|
||||||
this.time = time.toString();
|
this.time = time.toString();
|
||||||
this.isSelect = false;
|
this.isSelect = false;
|
||||||
@ -256,7 +256,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
levelSelectChange(row) {
|
levelSelectChange(row) {
|
||||||
let operate = {
|
const operate = {
|
||||||
operation: OperationEvent.StationStand.setRunLevel.chooseLevel.operation,
|
operation: OperationEvent.StationStand.setRunLevel.chooseLevel.operation,
|
||||||
val: row.level.toString(),
|
val: row.level.toString(),
|
||||||
}
|
}
|
||||||
@ -268,19 +268,19 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
checkChange(check) {
|
checkChange(check) {
|
||||||
let operate = {
|
const operate = {
|
||||||
operation: OperationEvent.StationStand.setRunLevel.check.operation,
|
operation: OperationEvent.StationStand.setRunLevel.check.operation,
|
||||||
val: check.toString(),
|
val: check.toString()
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -318,7 +318,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -219,7 +219,6 @@ export default {
|
|||||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME,
|
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME,
|
||||||
param: {
|
param: {
|
||||||
parkingTime: this.control == '01' ? -1 : 1,
|
parkingTime: this.control == '01' ? -1 : 1,
|
||||||
// runLevelTime: this.time,
|
|
||||||
parkingAlwaysValid: this.effective == '1'
|
parkingAlwaysValid: this.effective == '1'
|
||||||
}
|
}
|
||||||
// messages: [`停站时间: ${this.stationName} - ${this.standName}, 停站时间为${this.control == '01' ? '自动' : this.time + '秒'}, 有效次数为${this.effective == false ? '一次有效' : '一直有效'}`]
|
// messages: [`停站时间: ${this.stationName} - ${this.standName}, 停站时间为${this.control == '01' ? '自动' : this.time + '秒'}, 有效次数为${this.effective == false ? '一次有效' : '一直有效'}`]
|
||||||
|
@ -298,7 +298,7 @@
|
|||||||
|
|
||||||
this.setMessage('请点击“确认1”按钮,确认命令!');
|
this.setMessage('请点击“确认1”按钮,确认命令!');
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
|
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.setButtonEnable({ step: 1 });
|
this.setButtonEnable({ step: 1 });
|
||||||
@ -331,7 +331,7 @@
|
|||||||
|
|
||||||
this.setMessage('请点击“确认2”按钮,确认命令!');
|
this.setMessage('请点击“确认2”按钮,确认命令!');
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
|
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.timeCountCommand = -1;
|
this.timeCountCommand = -1;
|
||||||
@ -367,7 +367,7 @@
|
|||||||
|
|
||||||
this.setMessage('');
|
this.setMessage('');
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
|
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.timeCountCommand = -1;
|
this.timeCountCommand = -1;
|
||||||
this.timeCountConfirm = -1;
|
this.timeCountConfirm = -1;
|
||||||
this.setButtonEnable({ step: -1 });
|
this.setButtonEnable({ step: -1 });
|
||||||
@ -404,7 +404,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
|
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.setButtonEnable({ step: 0 });
|
this.setButtonEnable({ step: 0 });
|
||||||
@ -422,7 +422,7 @@
|
|||||||
operation: OperationEvent.Command.close.menu.operation,
|
operation: OperationEvent.Command.close.menu.operation,
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
|
@ -66,12 +66,8 @@ export default {
|
|||||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
||||||
return '道岔单锁';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
|
||||||
return '道岔封锁';
|
return '道岔封锁';
|
||||||
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
|
|
||||||
return '道岔转动';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
|
||||||
return '道岔强扳';
|
return '道岔强扳';
|
||||||
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
||||||
@ -115,15 +111,9 @@ export default {
|
|||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
||||||
/** 道岔单锁*/
|
|
||||||
this.lock();
|
|
||||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
|
||||||
/** 道岔封锁*/
|
/** 道岔封锁*/
|
||||||
this.block();
|
this.block();
|
||||||
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
|
|
||||||
/** 道岔转动*/
|
|
||||||
this.turnout(this.operation);
|
|
||||||
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
|
||||||
/** 道岔强扳*/
|
/** 道岔强扳*/
|
||||||
this.turnoutForce();
|
this.turnoutForce();
|
||||||
@ -135,16 +125,6 @@ export default {
|
|||||||
this.active();
|
this.active();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 道岔单锁
|
|
||||||
lock() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.lock.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
|
||||||
};
|
|
||||||
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 道岔封锁
|
// 道岔封锁
|
||||||
block() {
|
block() {
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -155,16 +135,6 @@ export default {
|
|||||||
|
|
||||||
this.sendCommand(operate);
|
this.sendCommand(operate);
|
||||||
},
|
},
|
||||||
// 道岔转动
|
|
||||||
turnout(operation) {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.turnout.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_TURN
|
|
||||||
};
|
|
||||||
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 道岔强扮
|
// 道岔强扮
|
||||||
turnoutForce() {
|
turnoutForce() {
|
||||||
const operate = {
|
const operate = {
|
||||||
|
@ -153,11 +153,17 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
|
debugger;
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
|
||||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
} else {
|
} else {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'$store.state.menuOperation.selectedCount': function(val) {
|
||||||
|
if (this.buttonOperation) {
|
||||||
|
this.operationHandler(this.buttonOperation, this.$store.state.menuOperation.selected._type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -204,10 +210,51 @@ export default {
|
|||||||
this.$refs.popMenu.close();
|
this.$refs.popMenu.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
operationHandler(buttonOperation, selectType) {
|
||||||
|
switch (buttonOperation) {
|
||||||
|
case OperationEvent.Signal.arrangementRoute.button.operation: {
|
||||||
|
// 进路建立
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case OperationEvent.Signal.cancelTrainRoute.button.operation: {
|
||||||
|
// 总取消
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case OperationEvent.Signal.humanTrainRoute.button.operation: {
|
||||||
|
// 总人解
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case OperationEvent.Signal.reopenSignal.button.operation: {
|
||||||
|
// 信号重开
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case OperationEvent.Signal.guide.button.operation: {
|
||||||
|
// 引导按钮
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'mbm_06': {
|
||||||
|
// 引导总锁
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case OperationEvent.Signal.guide.button.operation: {
|
||||||
|
// 自动进路
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case OperationEvent.Signal.guide.button.operation: {
|
||||||
|
// 区故解
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case OperationEvent.Signal.guide.button.operation: {
|
||||||
|
// 计轴复位
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
// 设置故障
|
// 设置故障
|
||||||
setStoppage() {
|
setStoppage() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
|
over: true,
|
||||||
code: `${this.selected.code}`,
|
code: `${this.selected.code}`,
|
||||||
operation: OperationEvent.Signal.stoppage.menu.operation,
|
operation: OperationEvent.Signal.stoppage.menu.operation,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
|
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
|
||||||
@ -232,6 +279,7 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
|
over: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
|
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
|
||||||
operation: OperationEvent.Signal.cancelStoppage.menu.operation,
|
operation: OperationEvent.Signal.cancelStoppage.menu.operation,
|
||||||
@ -255,10 +303,7 @@ export default {
|
|||||||
arrangementRoute() {
|
arrangementRoute() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
// send: true,
|
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
// type: MapDeviceType.Signal.type,
|
|
||||||
// label: MapDeviceType.Signal.label,
|
|
||||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation
|
operation: OperationEvent.Signal.arrangementRoute.menu.operation
|
||||||
// param: {
|
// param: {
|
||||||
// signalCode: `${this.selected.code}`
|
// signalCode: `${this.selected.code}`
|
||||||
@ -325,7 +370,7 @@ export default {
|
|||||||
// label: MapDeviceType.Signal.label,
|
// label: MapDeviceType.Signal.label,
|
||||||
// operation: OperationEvent.Signal.unlock.menu.operation
|
// operation: OperationEvent.Signal.unlock.menu.operation
|
||||||
// };
|
// };
|
||||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
// if (valid) {
|
// if (valid) {
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// this.$refs.routeCmdControl.doShow(operate, this.selected);
|
// this.$refs.routeCmdControl.doShow(operate, this.selected);
|
||||||
@ -370,10 +415,7 @@ export default {
|
|||||||
humanControl() {
|
humanControl() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
// send: true,
|
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
// type: MapDeviceType.Signal.type,
|
|
||||||
// label: MapDeviceType.Signal.label,
|
|
||||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||||
param: {
|
param: {
|
||||||
signalCode: `${this.selected.code}`
|
signalCode: `${this.selected.code}`
|
||||||
@ -396,16 +438,13 @@ export default {
|
|||||||
atsAutoControl() {
|
atsAutoControl() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
// send: true,
|
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
// type: MapDeviceType.Signal.type,
|
|
||||||
// label: MapDeviceType.Signal.label,
|
|
||||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||||
param: {
|
param: {
|
||||||
signalCode: `${this.selected.code}`
|
signalCode: `${this.selected.code}`
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
const routes = [];
|
const routes = [];
|
||||||
|
@ -55,72 +55,72 @@ export default {
|
|||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
Local: [
|
Local: [
|
||||||
{
|
// {
|
||||||
label: '设置扣车',
|
// label: '设置扣车',
|
||||||
handler: this.setDetainTrain,
|
// handler: this.setDetainTrain,
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
|
// cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
|
||||||
auth: { station: true, center: false }
|
// auth: { station: true, center: false }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '取消扣车',
|
// label: '取消扣车',
|
||||||
handler: this.cancelDetainTrain,
|
// handler: this.cancelDetainTrain,
|
||||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
|
// cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
|
||||||
auth: { station: true, center: true }
|
// auth: { station: true, center: true }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '设置跳停',
|
// label: '设置跳停',
|
||||||
handler: this.setJumpStop,
|
// handler: this.setJumpStop,
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP,
|
// cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP,
|
||||||
auth: { station: true, center: false }
|
// auth: { station: true, center: false }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '取消跳停',
|
// label: '取消跳停',
|
||||||
handler: this.cancelJumpStop,
|
// handler: this.cancelJumpStop,
|
||||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
|
// cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
|
||||||
auth: { station: true, center: true }
|
// auth: { station: true, center: true }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
type: 'separator'
|
// type: 'separator'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '提前发车',
|
// label: '提前发车',
|
||||||
handler: this.earlyDeparture,
|
// handler: this.earlyDeparture,
|
||||||
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART,
|
// cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART,
|
||||||
auth: { station: true, center: true }
|
// auth: { station: true, center: true }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '设置停站时间',
|
// label: '设置停站时间',
|
||||||
handler: this.setStopTime,
|
// handler: this.setStopTime,
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME,
|
// cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME,
|
||||||
auth: { station: true, center: true }
|
// auth: { station: true, center: true }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
type: 'separator'
|
// type: 'separator'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '站台详细信息',
|
// label: '站台详细信息',
|
||||||
handler: this.detail,
|
// handler: this.detail,
|
||||||
cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS,
|
// cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS,
|
||||||
auth: { station: true, center: true }
|
// auth: { station: true, center: true }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '运行时间控制',
|
// label: '运行时间控制',
|
||||||
handler: this.setRunLevel,
|
// handler: this.setRunLevel,
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME,
|
// cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME,
|
||||||
auth: { station: false, center: false }
|
// auth: { station: false, center: false }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '设置提前发车',
|
// label: '设置提前发车',
|
||||||
handler: this.earlyDeparture,
|
// handler: this.earlyDeparture,
|
||||||
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART,
|
// cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART,
|
||||||
auth: { station: false, center: false }
|
// auth: { station: false, center: false }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '人工折返策略设置',
|
// label: '人工折返策略设置',
|
||||||
handler: this.setBackStrategy,
|
// handler: this.setBackStrategy,
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY,
|
// cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY,
|
||||||
auth: { station: false, center: false }
|
// auth: { station: false, center: false }
|
||||||
}
|
// }
|
||||||
// {
|
// {
|
||||||
// label: '查询站台状态',
|
// label: '查询站台状态',
|
||||||
// handler: this.detail,
|
// handler: this.detail,
|
||||||
@ -462,7 +462,6 @@ export default {
|
|||||||
setBackStrategy() {
|
setBackStrategy() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
// send: true,
|
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
||||||
param:{
|
param:{
|
||||||
|
@ -55,15 +55,17 @@ export default {
|
|||||||
{
|
{
|
||||||
label: '轨道切除',
|
label: '轨道切除',
|
||||||
handler: this.split,
|
handler: this.split,
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF,
|
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||||
auth: { station: true, center: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '轨道激活',
|
label: '轨道激活',
|
||||||
handler: this.active,
|
handler: this.active,
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE,
|
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
||||||
auth: { station: true, center: true }
|
|
||||||
}
|
}
|
||||||
|
// {
|
||||||
|
// label: '查看站场设备状态',
|
||||||
|
// handler: this.undeveloped
|
||||||
|
// }
|
||||||
],
|
],
|
||||||
Center: [
|
Center: [
|
||||||
{
|
{
|
||||||
@ -125,6 +127,11 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'$store.state.menuOperation.selectedCount': function(val) {
|
||||||
|
if (this.buttonOperation && this.$store.state.menuOperation.selected._type == 'Switch') {
|
||||||
|
this.operationHandler(this.buttonOperation, this.$store.state.menuOperation.selected);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -167,6 +174,39 @@ export default {
|
|||||||
this.$refs.popMenu.close();
|
this.$refs.popMenu.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
operationHandler(buttonOperation, selectType) {
|
||||||
|
switch (buttonOperation) {
|
||||||
|
case OperationEvent.Switch.locate.button.operation: {
|
||||||
|
// 道岔总定
|
||||||
|
if (!selectType.normalPosition && selectType.reversePosition) {
|
||||||
|
this.locate(selectType);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case OperationEvent.Switch.reverse.button.operation: {
|
||||||
|
// 道岔总反
|
||||||
|
if (selectType.normalPosition && !selectType.reversePosition) {
|
||||||
|
this.reverse(selectType);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case OperationEvent.Switch.lock.button.operation: {
|
||||||
|
debugger;
|
||||||
|
// 道岔单锁
|
||||||
|
if (!selectType.singleLock) {
|
||||||
|
this.lock(selectType);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case OperationEvent.Switch.unlock.button.operation: {
|
||||||
|
// 道岔解锁
|
||||||
|
if (selectType.singleLock) {
|
||||||
|
this.unlock(selectType);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
// 设置故障
|
// 设置故障
|
||||||
setStoppage() {
|
setStoppage() {
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -214,109 +254,126 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 道岔单锁
|
// 道岔单锁
|
||||||
lock() {
|
lock(selectType) {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
over: true,
|
||||||
operation: OperationEvent.Switch.lock.menu.operation,
|
operation: OperationEvent.Switch.lock.menu.operation,
|
||||||
param: {
|
param: {
|
||||||
switchCode: `${this.selected.code}`
|
switchCode: selectType.code
|
||||||
}
|
},
|
||||||
|
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 道岔解封
|
// 道岔解封
|
||||||
unlock() {
|
unlock(selectType) {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
|
over: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
operation: OperationEvent.Switch.unlock.menu.operation,
|
||||||
param: {
|
param: {
|
||||||
switchCode: `${this.selected.code}`
|
switchCode: selectType.code
|
||||||
}
|
},
|
||||||
|
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchCmdControl.doShow(operate, this.selected);
|
// this.$refs.switchCmdControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 道岔封锁
|
// 道岔封锁
|
||||||
block() {
|
// block() {
|
||||||
const operate = {
|
// const operate = {
|
||||||
start: true,
|
// start: true,
|
||||||
code: this.selected.code,
|
// code: this.selected.code,
|
||||||
operation: OperationEvent.Switch.block.menu.operation,
|
// operation: OperationEvent.Switch.block.menu.operation,
|
||||||
param: {
|
// param: {
|
||||||
switchCode: `${this.selected.code}`
|
// switchCode: `${this.selected.code}`
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
// if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
// 道岔解封
|
// 道岔解封
|
||||||
unblock() {
|
// unblock() {
|
||||||
const operate = {
|
// const operate = {
|
||||||
start: true,
|
// start: true,
|
||||||
code: this.selected.code,
|
// code: this.selected.code,
|
||||||
operation: OperationEvent.Switch.unblock.menu.operation,
|
// operation: OperationEvent.Switch.unblock.menu.operation,
|
||||||
param: {
|
// param: {
|
||||||
switchCode: `${this.selected.code}`
|
// switchCode: `${this.selected.code}`
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
// if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchCmdControl.doShow(operate, this.selected);
|
// this.$refs.switchCmdControl.doShow(operate, this.selected);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
// 道岔强扳
|
// 道岔强扳
|
||||||
switchTurnoutForce() {
|
// switchTurnoutForce() {
|
||||||
|
// const operate = {
|
||||||
|
// start: true,
|
||||||
|
// code: this.selected.code,
|
||||||
|
// operation: OperationEvent.Switch.turnoutForce.menu.operation,
|
||||||
|
// param: {
|
||||||
|
// switchCode: `${this.selected.code}`
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
// if (valid) {
|
||||||
|
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
// 单操到定位
|
||||||
|
locate(selectType) {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
over: true,
|
||||||
operation: OperationEvent.Switch.turnoutForce.menu.operation,
|
operation: OperationEvent.Switch.locate.menu.operation,
|
||||||
param: {
|
param: {
|
||||||
switchCode: `${this.selected.code}`
|
switchCode: selectType.code
|
||||||
}
|
},
|
||||||
|
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 道岔转动
|
|
||||||
switchTurnout() {
|
// 单操到反位
|
||||||
|
reverse(selectType) {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
over: true,
|
||||||
operation: OperationEvent.Switch.turnout.menu.operation,
|
operation: OperationEvent.Switch.reverse.menu.operation,
|
||||||
param: {
|
param: {
|
||||||
switchCode: `${this.selected.code}`
|
switchCode: selectType.code
|
||||||
}
|
},
|
||||||
|
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||||
};
|
};
|
||||||
|
|
||||||
if (operate.operation) {
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 道岔故障解锁
|
// 道岔故障解锁
|
||||||
fault() {
|
fault() {
|
||||||
@ -390,22 +447,22 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 道岔计轴预复位
|
// 道岔计轴预复位
|
||||||
axlePreReset() {
|
// axlePreReset() {
|
||||||
const operate = {
|
// const operate = {
|
||||||
start: true,
|
// start: true,
|
||||||
code: this.selected.code,
|
// code: this.selected.code,
|
||||||
operation: OperationEvent.Switch.axlePreReset.menu.operation,
|
// operation: OperationEvent.Switch.axlePreReset.menu.operation,
|
||||||
param: {
|
// param: {
|
||||||
switchCode: `${this.selected.code}`
|
// switchCode: `${this.selected.code}`
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
// if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchCmdControl.doShow(operate, this.selected);
|
// this.$refs.switchCmdControl.doShow(operate, this.selected);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
// 设置临时限速
|
// 设置临时限速
|
||||||
setSpeed() {
|
setSpeed() {
|
||||||
const operate = {
|
const operate = {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<template v-show="isShowBar">
|
<template v-show="isShowBar">
|
||||||
<menu-bar ref="menuBar" :selected="selected" />
|
<menu-bar ref="menuBar" :selected="selected" />
|
||||||
</template>
|
</template>
|
||||||
<!-- <menu-request ref="menuRequest" /> -->
|
<menu-request ref="menuRequest" />
|
||||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||||
<menu-signal ref="menuSignal" :selected="selected" />
|
<menu-signal ref="menuSignal" :selected="selected" />
|
||||||
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
// import MenuRequest from './menuRequest';
|
import MenuRequest from './menuRequest';
|
||||||
import MenuCancel from './menuCancel';
|
import MenuCancel from './menuCancel';
|
||||||
import MenuSignal from './menuSignal';
|
import MenuSignal from './menuSignal';
|
||||||
import MenuStationStand from './menuStationStand';
|
import MenuStationStand from './menuStationStand';
|
||||||
@ -40,7 +40,7 @@ export default {
|
|||||||
name: 'Menus',
|
name: 'Menus',
|
||||||
components: {
|
components: {
|
||||||
MenuBar,
|
MenuBar,
|
||||||
// MenuRequest,
|
MenuRequest,
|
||||||
MenuCancel,
|
MenuCancel,
|
||||||
MenuSignal,
|
MenuSignal,
|
||||||
MenuSwitch,
|
MenuSwitch,
|
||||||
|
@ -95,13 +95,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let requestList=this.$store.state.menuOperation.requestList;
|
const requestList = this.$store.state.menuOperation.requestList;
|
||||||
if (requestList && requestList.length > 0) {
|
if (requestList && requestList.length > 0) {
|
||||||
this.commitEachCommand(requestList, 0);
|
this.commitEachCommand(requestList, 0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
commitEachCommand(requestList, index) {
|
commitEachCommand(requestList, index) {
|
||||||
let eachCmd=requestList[index];
|
const eachCmd = requestList[index];
|
||||||
const operate = {
|
const operate = {
|
||||||
over: true,
|
over: true,
|
||||||
operation: eachCmd.operation.code,
|
operation: eachCmd.operation.code,
|
||||||
@ -111,7 +111,7 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/spliceRequestList', {deviceCode:eachCmd.device.code, operateCode:eachCmd.operation.code});
|
this.$store.dispatch('menuOperation/spliceRequestList', {deviceCode:eachCmd.device.code, operateCode:eachCmd.operation.code});
|
||||||
let nextIndex=index++;
|
const nextIndex = index++;
|
||||||
if (nextIndex < requestList.length) {
|
if (nextIndex < requestList.length) {
|
||||||
this.commitEachCommand(requestList, nextIndex);
|
this.commitEachCommand(requestList, nextIndex);
|
||||||
}
|
}
|
||||||
|
@ -113,13 +113,13 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '开放自动进路',
|
label: '开放自动进路',
|
||||||
handler: this.atsAutoControl,
|
handler: this.singalPassModel,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '关闭自动进路',
|
label: '关闭自动进路',
|
||||||
handler: this.humanControl,
|
handler: this.singalCancelPassModel,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '终端信号封锁',
|
label: '终端信号封锁',
|
||||||
@ -307,19 +307,19 @@ export default {
|
|||||||
arrangementRoute() {
|
arrangementRoute() {
|
||||||
const step = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
over:true,
|
// over:true,
|
||||||
code: `${this.selected.code}`,
|
code: `${this.selected.code}`,
|
||||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||||
param: {
|
param: {
|
||||||
signalCode: `${this.selected.code}`
|
signalCode: `${this.selected.code}`
|
||||||
},
|
},
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true});
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true});
|
||||||
// this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.arrangementRoute.menu.operation, name: '始端/终端选择',cmdType:CMD.Signal.CMD_SIGNAL_SET_ROUTE}});
|
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.arrangementRoute.menu.operation, name: '始端/终端选择', cmdType:CMD.Signal.CMD_SIGNAL_SET_ROUTE}});
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(step);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
@ -329,18 +329,18 @@ export default {
|
|||||||
guide() {
|
guide() {
|
||||||
const step = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
over:true,
|
// over:true,
|
||||||
code: `${this.selected.code}`,
|
code: `${this.selected.code}`,
|
||||||
operation: OperationEvent.Signal.guide.menu.operation,
|
operation: OperationEvent.Signal.guide.menu.operation,
|
||||||
param: {
|
param: {
|
||||||
signalCode: `${this.selected.code}`
|
signalCode: `${this.selected.code}`
|
||||||
},
|
},
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
// cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
|
this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation: { code: OperationEvent.Signal.guide.menu.operation, name: '引导信号',cmdType:CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE}});
|
this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation: { code: OperationEvent.Signal.guide.menu.operation, name: '引导信号',cmdType:CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE}});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -348,19 +348,19 @@ export default {
|
|||||||
cancelTrainRoute() {
|
cancelTrainRoute() {
|
||||||
const step = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
over:true,
|
// over:true,
|
||||||
code: `${this.selected.code}`,
|
code: `${this.selected.code}`,
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||||
param: {
|
param: {
|
||||||
signalCode: `${this.selected.code}`
|
signalCode: `${this.selected.code}`
|
||||||
},
|
},
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||||
|
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation: { code: OperationEvent.Signal.cancelTrainRoute.menu.operation, name: '取消进路',cmdType:CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE}});
|
this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation: { code: OperationEvent.Signal.cancelTrainRoute.menu.operation, name: '取消进路',cmdType:CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE}});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -368,18 +368,18 @@ export default {
|
|||||||
lock() {
|
lock() {
|
||||||
const step = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
over:true,
|
// over:true,
|
||||||
code: `${this.selected.code}`,
|
code: `${this.selected.code}`,
|
||||||
operation: OperationEvent.Signal.lock.menu.operation,
|
operation: OperationEvent.Signal.lock.menu.operation,
|
||||||
param: {
|
param: {
|
||||||
signalCode: `${this.selected.code}`
|
signalCode: `${this.selected.code}`
|
||||||
},
|
},
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
// cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.lock.menu.operation, name: '终端信号机封锁',cmdType:CMD.Signal.CMD_SIGNAL_BLOCK}});
|
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.lock.menu.operation, name: '终端信号机封锁',cmdType:CMD.Signal.CMD_SIGNAL_BLOCK}});
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(step);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
@ -389,84 +389,52 @@ export default {
|
|||||||
unlock() {
|
unlock() {
|
||||||
const step = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
over:true,
|
// over:true,
|
||||||
code: `${this.selected.code}`,
|
code: `${this.selected.code}`,
|
||||||
operation: OperationEvent.Signal.unlock.menu.operation,
|
operation: OperationEvent.Signal.unlock.menu.operation,
|
||||||
param: {
|
param: {
|
||||||
signalCode: `${this.selected.code}`
|
signalCode: `${this.selected.code}`
|
||||||
},
|
},
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
// cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.unlock.menu.operation, name: '终端信号机解封',cmdType:CMD.Signal.CMD_SIGNAL_UNBLOCK}});
|
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.unlock.menu.operation, name: '终端信号机解封',cmdType:CMD.Signal.CMD_SIGNAL_UNBLOCK}});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 进路交人工控
|
// 设置通过模式
|
||||||
humanControl() {
|
singalPassModel() {
|
||||||
const routes = [];
|
const operate = {
|
||||||
this.routeList.forEach(elem => {
|
|
||||||
if (elem.startSignalCode === this.selected.code) {
|
|
||||||
// routes.push(elem);
|
|
||||||
if (elem.atsControl == '1') {
|
|
||||||
routes.push(elem.code);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if (routes.length <= 0) {
|
|
||||||
this.$refs.noticeInfo.doShow({}, ['所选的进路没有一个是人工的']);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
const step = {
|
|
||||||
start: true,
|
start: true,
|
||||||
over:true,
|
code: this.selected.code,
|
||||||
code: `${this.selected.code}`,
|
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
|
||||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
|
||||||
param: {
|
param: {
|
||||||
signalCode: `${this.selected.code}`,
|
signalCode: `${this.selected.code}`
|
||||||
routeCodeList:routes
|
}
|
||||||
},
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: '关闭自动进路',cmdType:CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING});
|
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.setAutoInterlock.menu.operation, name: '开放自动进路', cmdType:CMD.Signal.CMD_SIGNAL_SET_CI_AUTO}});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 进路交自动控
|
// 取消通过模式
|
||||||
atsAutoControl() {
|
singalCancelPassModel() {
|
||||||
const routes = [];
|
const operate = {
|
||||||
this.routeList.forEach(elem => {
|
|
||||||
if (elem.startSignalCode === this.selected.code) {
|
|
||||||
// routes.push(elem);
|
|
||||||
if (elem.atsControl == '0') {
|
|
||||||
routes.push(elem.code);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if (routes.length <= 0) {
|
|
||||||
this.$refs.noticeInfo.doShow({}, ['所选的进路没有一个是自动的']);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
const step = {
|
|
||||||
start: true,
|
start: true,
|
||||||
over:true,
|
code: this.selected.code,
|
||||||
code: `${this.selected.code}`,
|
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
|
||||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
|
||||||
param: {
|
param: {
|
||||||
signalCode: `${this.selected.code}`,
|
signalCode: `${this.selected.code}`
|
||||||
routeCodeList:routes
|
}
|
||||||
},
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.atsAutoControl.menu.operation, name: '开放自动进路',cmdType:CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING}});
|
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.cancelAutoInterlock.menu.operation, name: '关闭自动进路', cmdType:CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO}});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -114,10 +114,10 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch((error) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
|
@ -152,9 +152,9 @@ export default {
|
|||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) { this.doClose(); }
|
if (valid) { this.doClose(); }
|
||||||
}).catch(() => {
|
}).catch((error) => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -93,11 +93,7 @@ export default {
|
|||||||
selected: null,
|
selected: null,
|
||||||
tempData: [],
|
tempData: [],
|
||||||
stationName: '',
|
stationName: '',
|
||||||
signalName: '',
|
signalName: ''
|
||||||
// controlTypeMap: {
|
|
||||||
// '01': '自动',
|
|
||||||
// '02': '人工'
|
|
||||||
// }
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -245,10 +245,10 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch((error) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 进路交自动控
|
// 进路交自动控
|
||||||
@ -269,10 +269,10 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch((error) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
|
@ -377,6 +377,7 @@ export default {
|
|||||||
this.tripNumber = '';
|
this.tripNumber = '';
|
||||||
this.standName = '';
|
this.standName = '';
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
|
this.operation = operate.operation;
|
||||||
if (selected) {
|
if (selected) {
|
||||||
this.standName = selected.direction == '01' ? '下行' : '上行';
|
this.standName = selected.direction == '01' ? '下行' : '上行';
|
||||||
}
|
}
|
||||||
@ -387,13 +388,14 @@ export default {
|
|||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
debugger;
|
||||||
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation || this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation || this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
||||||
this.radio = selected.direction;
|
this.radio = selected.direction;
|
||||||
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
|
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||||
this.radio = Number(tempDate.parkingTime) === -1 ? '01' : '02';
|
this.effective = '01';
|
||||||
this.effective = tempDate.parkingValidStatus ? '01' : '02';
|
|
||||||
}
|
}
|
||||||
this.operation = operate.operation;
|
this.radio = '01';
|
||||||
|
this.disabledTime = true;
|
||||||
this.trainList = this.map.trainList; // 加载列车数据
|
this.trainList = this.map.trainList; // 加载列车数据
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
|
@ -91,6 +91,12 @@ export default {
|
|||||||
'03': '自动换端',
|
'03': '自动换端',
|
||||||
'04': '默认'
|
'04': '默认'
|
||||||
},
|
},
|
||||||
|
runLevelList: [
|
||||||
|
'自动',
|
||||||
|
'低速',
|
||||||
|
'常速',
|
||||||
|
'高速'
|
||||||
|
],
|
||||||
modelData: {
|
modelData: {
|
||||||
stopTime: '自动',
|
stopTime: '自动',
|
||||||
runLevel: '自动',
|
runLevel: '自动',
|
||||||
@ -141,12 +147,11 @@ export default {
|
|||||||
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.modelData = {
|
this.modelData = {
|
||||||
stopTime: opts.parkingTime != -1 ? opts.parkingTime : '自动',
|
stopTime: selected.parkingTime ? selected.parkingTime : '自动',
|
||||||
runLevel: opts.intervalRunTime > 0 ? '常速' : '自动',
|
runLevel: this.runLevelList[selected.runLevelTime],
|
||||||
detainCar: opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '无扣车',
|
detainCar: selected.stationHoldTrain || selected.centerHoldTrain ? '已设置' : '无扣车',
|
||||||
jumpStop: opts.jumpStopStatus != '01' ? '已设置' : '无跳停'
|
jumpStop: selected.allSkip || selected.assignSkip ? '已设置' : '无跳停'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
doShow(operate, selected, opts) {
|
doShow(operate, selected, opts) {
|
||||||
|
@ -166,8 +166,8 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(step);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch((error) => {
|
||||||
this.$refs.noticeInfo.doShow(step);
|
this.$refs.noticeInfo.doShow(step, [error.message]);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消故障
|
// 取消故障
|
||||||
@ -188,8 +188,8 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(step);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch((error) => {
|
||||||
this.$refs.noticeInfo.doShow(step);
|
this.$refs.noticeInfo.doShow(step, [error.message]);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 设置扣车
|
// 设置扣车
|
||||||
|
@ -263,10 +263,10 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch((error) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,168 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog class="ningbo-01__systerm confirm-control" :title="title" :visible.sync="show" width="360px"
|
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
|
||||||
<div class="context">
|
|
||||||
<template v-for="(message, index) in messages">
|
|
||||||
<span :key="index">{{message}}</span>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
|
||||||
import NoticeInfo from './childDialog/noticeInfo'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'ConfirmTrain',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
operate: {},
|
|
||||||
messages: '',
|
|
||||||
operation: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
|
||||||
return '添加列车识别号';
|
|
||||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
|
||||||
return '修改列车识别号';
|
|
||||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
|
||||||
return '删除列车识别号';
|
|
||||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
|
||||||
return '移动列车识别号';
|
|
||||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
|
||||||
return '交换列车识别号';
|
|
||||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
|
||||||
return '修改车组号'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
|
||||||
/** 添加列车识别号*/
|
|
||||||
return OperationEvent.Train.addTrainId.confirm.domId
|
|
||||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
|
||||||
/** 修改列车识别号*/
|
|
||||||
return OperationEvent.Train.editTrainId.confirm.domId
|
|
||||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
|
||||||
/** 删除列车识别号*/
|
|
||||||
return OperationEvent.Train.delTrainId.confirm.domId
|
|
||||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
|
||||||
/** 移动列车识别号*/
|
|
||||||
return OperationEvent.Train.moveTrainId.confirm.domId
|
|
||||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
|
||||||
/** 交换列车识别号*/
|
|
||||||
return OperationEvent.Train.switchTrainId.confirm.domId
|
|
||||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
|
||||||
/** 修改车组号*/
|
|
||||||
return OperationEvent.Train.editTrainNo.confirm.domId
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
})
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate) {
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.loading = false;
|
|
||||||
this.operate = operate || {};
|
|
||||||
this.messages = operate.messages;
|
|
||||||
this.operation = operate.operation;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
|
||||||
this.routeSetting();
|
|
||||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
|
||||||
this.routeSetting();
|
|
||||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
|
||||||
this.routeSetting();
|
|
||||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
|
||||||
this.routeSetting();
|
|
||||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
|
||||||
this.routeSetting();
|
|
||||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
|
||||||
this.routeSetting();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
//进路设置
|
|
||||||
routeSetting() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Train.addTrainId.confirm.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
})
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
let operate = {
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
.confirm-control .context {
|
|
||||||
padding-bottom: 40px !important;
|
|
||||||
border: 1px solid lightgray;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,438 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-cmd-control" :title="title" :visible.sync="show" width="800px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
|
||||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
|
||||||
<span class="base-label">命令信息</span>
|
|
||||||
<el-form label-position="center" size="mini">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="类型" label-width="40px">
|
|
||||||
<el-select v-model="operation" size="small" disabled>
|
|
||||||
<el-option
|
|
||||||
v-for="option in typeList"
|
|
||||||
:key="option.code"
|
|
||||||
:label="option.name"
|
|
||||||
:value="option.code"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="车站名称" label-width="80px">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="信号机名称" label-width="100px">
|
|
||||||
<el-input v-model="signalName" size="small" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<el-table
|
|
||||||
ref="tempData"
|
|
||||||
class="table"
|
|
||||||
:data="tempData"
|
|
||||||
border
|
|
||||||
style="width: 100%"
|
|
||||||
size="mini"
|
|
||||||
highlight-current-row
|
|
||||||
height="200"
|
|
||||||
>
|
|
||||||
<el-table-column prop="order" :width="50" label="序号" />
|
|
||||||
<el-table-column prop="date" :width="160" label="时间" />
|
|
||||||
<el-table-column prop="context" :width="180" label="执行过程" />
|
|
||||||
<el-table-column prop="result" label="执行结果" />
|
|
||||||
</el-table>
|
|
||||||
<span class="notice">{{ message }}</span>
|
|
||||||
<el-row class="button-group">
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
|
|
||||||
v-show="timeCountCommand>0"
|
|
||||||
>({{ timeCountCommand }})</span></el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
|
|
||||||
v-show="timeCountConfirm>0"
|
|
||||||
>({{ timeCountConfirm }})</span></el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdClose" @click="close">关闭</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-dialog>
|
|
||||||
<confirm-signal-unlock ref="confirmSignalUnlock" @setOperate="getOperate" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
|
||||||
import { now } from '@/utils/date';
|
|
||||||
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'RouteCmdControl',
|
|
||||||
components: {
|
|
||||||
ConfirmSignalUnlock
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
backOperate: '',
|
|
||||||
selected: '',
|
|
||||||
order: 0,
|
|
||||||
row: null,
|
|
||||||
timer: null,
|
|
||||||
operation: '',
|
|
||||||
cmdDisabled: [true, true, true],
|
|
||||||
stpDisabled: true,
|
|
||||||
tempData: [],
|
|
||||||
message: '',
|
|
||||||
timeCountCommand: -1,
|
|
||||||
timeCountConfirm: -1,
|
|
||||||
stationName: '',
|
|
||||||
signalName: ''
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
typeList() {
|
|
||||||
return [
|
|
||||||
{ code: OperationEvent.Signal.unlock.menu.operation, name: '信号解封' },
|
|
||||||
{ code: OperationEvent.Signal.guide.menu.operation, name: '办理引导进路' }
|
|
||||||
];
|
|
||||||
},
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCommand() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
|
||||||
/** 信号解封*/
|
|
||||||
return OperationEvent.Signal.unlock.order.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
|
||||||
/** 办理引导进路*/
|
|
||||||
return OperationEvent.Signal.guide.order.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
domIdConfirm1() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
|
||||||
/** 信号解封*/
|
|
||||||
return OperationEvent.Signal.unlock.confirm1.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
|
||||||
/** 办理引导进路*/
|
|
||||||
return OperationEvent.Signal.guide.confirm1.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
domIdConfirm2() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
|
||||||
/** 信号解封*/
|
|
||||||
return OperationEvent.Signal.unlock.confirm2.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
|
||||||
/** 办理引导进路*/
|
|
||||||
return OperationEvent.Signal.guide.confirm2.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
domIdStop() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
|
||||||
/** 信号解封*/
|
|
||||||
return OperationEvent.Signal.unlock.stop.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
|
||||||
/** 办理引导进路*/
|
|
||||||
return OperationEvent.Signal.guide.stop.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
domIdClose() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
return OperationEvent.Command.close.menu.domId;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
|
||||||
return '信号解封';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
|
||||||
return '办理引导进路';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
cmdDisabled: {
|
|
||||||
handler(val, oldVal) {
|
|
||||||
this.stpDisabled = true;
|
|
||||||
val.forEach((elem, index) => {
|
|
||||||
// 在确定1之前的操作才可以终止
|
|
||||||
if (elem == false && index >= 1 && index <= 2) {
|
|
||||||
this.stpDisabled = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
this.timer = setInterval(() => {
|
|
||||||
if (!this.$store.state.menuOperation.break) {
|
|
||||||
if (this.timeCountCommand > 0) {
|
|
||||||
this.timeCountCommand--;
|
|
||||||
} else if (this.timeCountCommand == 0) {
|
|
||||||
this.setButtonEnable({ step: 0 });
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
}
|
|
||||||
if (this.timeCountConfirm > 0) {
|
|
||||||
this.timeCountConfirm--;
|
|
||||||
} else if (this.timeCountConfirm == 0) {
|
|
||||||
this.setButtonEnable({ step: 0 });
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
|
||||||
clearInterval(this.timer);
|
|
||||||
this.timer = null;
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.signalName = '';
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
|
||||||
this.signalName = selected.name;
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.order = 0;
|
|
||||||
this.operation = operate.operation;
|
|
||||||
|
|
||||||
this.tempData = [];
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.cmdDisabled = [false, true, true];
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.stpDisabled = true;
|
|
||||||
this.setMessage('请点击“下达”按钮,下达命令!');
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
command() {
|
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
|
||||||
/** 第一步带弹框处理*/
|
|
||||||
this.commandHasPopUp();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
|
||||||
/** 第一步不带弹框处理*/
|
|
||||||
this.commandNoPopUp();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
commandHasPopUp() {
|
|
||||||
const operate = {
|
|
||||||
type: MapDeviceType.Signal.type
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
|
||||||
/** 信号解封*/
|
|
||||||
operate.operation = OperationEvent.Signal.unlock.order.operation;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.setMessage('请点击“确认1”按钮,确认命令!');
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
|
|
||||||
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) {
|
|
||||||
this.$refs.confirmSignalUnlock.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
commandNoPopUp() {
|
|
||||||
const operate = {
|
|
||||||
type: MapDeviceType.Signal.type
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
|
||||||
/** 办理引导进路*/
|
|
||||||
operate.operation = OperationEvent.Signal.guide.order.operation;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.setMessage('请点击“确认1”按钮,确认命令!');
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.setButtonEnable({ step: 1 });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行失败' });
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
|
|
||||||
});
|
|
||||||
},
|
|
||||||
confirm1() {
|
|
||||||
const operate = {
|
|
||||||
type: MapDeviceType.Signal.type
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
|
||||||
/** 信号解封*/
|
|
||||||
operate.operation = OperationEvent.Signal.unlock.confirm1.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
|
||||||
/** 办理引导进路*/
|
|
||||||
operate.operation = OperationEvent.Signal.guide.confirm1.operation;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.setMessage('请点击“确认2”按钮,确认命令!');
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.timeCountConfirm = 10;
|
|
||||||
this.setButtonEnable({ step: 2 });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行成功' });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行失败' });
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
|
|
||||||
});
|
|
||||||
},
|
|
||||||
confirm2() {
|
|
||||||
const operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Signal.type
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
|
||||||
/** 信号解封*/
|
|
||||||
operate.operation = OperationEvent.Signal.unlock.confirm2.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
|
||||||
/** 办理引导进路*/
|
|
||||||
operate.operation = OperationEvent.Signal.guide.confirm2.operation;
|
|
||||||
}
|
|
||||||
this.setMessage('');
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.setButtonEnable({ step: -1 });
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行成功' });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' });
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.setButtonEnable({ step: -1 });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
|
|
||||||
});
|
|
||||||
},
|
|
||||||
stop() {
|
|
||||||
const operate = {
|
|
||||||
type: MapDeviceType.Signal.type
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
|
||||||
/** 信号解封*/
|
|
||||||
operate.operation = OperationEvent.Signal.unlock.stop.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
|
||||||
/** 办理引导进路*/
|
|
||||||
operate.operation = OperationEvent.Signal.guide.stop.operation;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.setButtonEnable({ step: 0 });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行成功' });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' });
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
|
|
||||||
});
|
|
||||||
},
|
|
||||||
close() {
|
|
||||||
const operate = {
|
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Command.close.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getOperate(operate) {
|
|
||||||
/** 弹框返回值处理*/
|
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
|
||||||
/** 信号解封*/
|
|
||||||
this.backOperate = operate;
|
|
||||||
this.setButtonEnable(operate);
|
|
||||||
if (operate.success) {
|
|
||||||
this.timeCountCommand = 30;
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '确认成功' });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '取消成功' });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
setButtonEnable(param) {
|
|
||||||
this.cmdDisabled = [true, true, true];
|
|
||||||
if (param && param.step >= 0) {
|
|
||||||
this.cmdDisabled[param.step] = false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
setMessage(message) {
|
|
||||||
this.message = message;
|
|
||||||
},
|
|
||||||
writeRecord(param) {
|
|
||||||
this.tempData.push(param);
|
|
||||||
},
|
|
||||||
editRecord(param) {
|
|
||||||
this.tempData.forEach(elem => {
|
|
||||||
if (elem.order == param.order) {
|
|
||||||
for (var prop in param) {
|
|
||||||
elem[prop] = param[prop];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -135,7 +135,6 @@ export default {
|
|||||||
const operate = {
|
const operate = {
|
||||||
over: true,
|
over: true,
|
||||||
operation: OperationEvent.Signal.detail.menu.operation,
|
operation: OperationEvent.Signal.detail.menu.operation,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -230,6 +230,8 @@ export default {
|
|||||||
if (!item.disabled) {
|
if (!item.disabled) {
|
||||||
this.changeList.push(false);
|
this.changeList.push(false);
|
||||||
this.selection.splice(this.selection.indexOf(item.code), 1);
|
this.selection.splice(this.selection.indexOf(item.code), 1);
|
||||||
|
} else {
|
||||||
|
this.changeList = [];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.allSelect = false;
|
this.allSelect = false;
|
||||||
@ -287,7 +289,10 @@ export default {
|
|||||||
const operate = {
|
const operate = {
|
||||||
over: true,
|
over: true,
|
||||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
|
||||||
|
param:{
|
||||||
|
routeCodeList: this.selection
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.sendCommand(operate);
|
this.sendCommand(operate);
|
||||||
@ -297,7 +302,10 @@ export default {
|
|||||||
const operate = {
|
const operate = {
|
||||||
over: true,
|
over: true,
|
||||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
|
||||||
|
param:{
|
||||||
|
routeCodeList: this.selection
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.sendCommand(operate);
|
this.sendCommand(operate);
|
||||||
|
@ -155,11 +155,10 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
|
@ -1,337 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog v-dialogDrag :z-index="2000" class="ningbo-01__systerm alxe-effective" :title="title" :visible.sync="show" width="420px" :before-close="doClose" :modal="false" :close-on-click-modal="false">
|
|
||||||
<div style="padding: 10px 20px;border: 1px solid lightgray;">
|
|
||||||
<span class="base-label">准备</span>
|
|
||||||
<div style="margin-top: -10px">
|
|
||||||
<el-row type="flex" justify="left">
|
|
||||||
<el-col :span="18">区段设备</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row type="flex" justify="left">
|
|
||||||
<el-col :span="18">
|
|
||||||
<el-input v-model="model.sectionName" :type="type" size="mini" :disabled="true" />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4" :offset="1">
|
|
||||||
<el-button :id="domIdConfirm1" size="mini" :disabled="type==='password'" @click="commitOnce">确认</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="padding: 10px 20px;border: 1px solid lightgray;margin-top: 10px">
|
|
||||||
<span class="base-label">确认</span>
|
|
||||||
<div style="margin-top: -10px">
|
|
||||||
<el-row type="flex" justify="left">
|
|
||||||
<el-col :span="18">区段</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row type="flex" justify="left">
|
|
||||||
<el-col :span="18">
|
|
||||||
<el-select :id="domIdChoose2" v-model="model.confirmSectionName" filterable size="mini" :disabled="type==='text'" @change="sectionSelectChange">
|
|
||||||
<el-option v-for="(option,index) in randomSectionList" :key="index" :label="option.name" :value="option.name" />
|
|
||||||
</el-select>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4" :offset="1">
|
|
||||||
<el-button :id="domIdConfirm2" size="mini" :loading="loading" :disabled="type==='text'" @click="commit">确认</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<el-row type="flex" justify="left" style="margin-top:20px;margin-bottom: 10px;">
|
|
||||||
<el-col :span="6" :offset="1">操作倒计时</el-col>
|
|
||||||
<el-col :span="16">
|
|
||||||
<el-input v-model="model.time" size="mini" :readonly="true" />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :offset="1">状态</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :offset="1" :span="23">
|
|
||||||
<el-input v-model="model.status" type="textarea" :rows="2" placeholder />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row class="botton-group" style="margin-top:20px">
|
|
||||||
<el-col :span="4" :offset="10">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
<popup-alarm ref="popupAlarm" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
import PopupAlarm from './childDialog/popupAlarm';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'AlxeEffective',
|
|
||||||
components: {
|
|
||||||
NoticeInfo,
|
|
||||||
PopupAlarm
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
type: 'text',
|
|
||||||
timeout: 1000,
|
|
||||||
timenum: 30,
|
|
||||||
stepNum: 0,
|
|
||||||
task: null,
|
|
||||||
model: {
|
|
||||||
sectionName: '',
|
|
||||||
confirmSectionName: '',
|
|
||||||
status: '',
|
|
||||||
time: 0
|
|
||||||
},
|
|
||||||
selected: null,
|
|
||||||
operate: null,
|
|
||||||
operation: '',
|
|
||||||
randomSectionList: []
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters('map', ['stationList', 'sectionList']),
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdConfirm1() {
|
|
||||||
if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
return OperationEvent.Section.fault.confirm1.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
|
||||||
return OperationEvent.Section.unlock.confirm1.domId;
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
},
|
|
||||||
domIdConfirm2() {
|
|
||||||
if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
return OperationEvent.Section.fault.confirm2.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
|
||||||
return OperationEvent.Section.unlock.confirm2.domId;
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
},
|
|
||||||
domIdChoose2() {
|
|
||||||
if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
return OperationEvent.Section.fault.choose2.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
|
||||||
return OperationEvent.Section.unlock.choose2.domId;
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
return '区故解';
|
|
||||||
} else if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
|
||||||
return '解除封锁';
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'model.sectionName': function(name) {
|
|
||||||
const index = Math.floor(Math.random(1) * 5);
|
|
||||||
for (var i = 0; i < 5; i++) {
|
|
||||||
if (i == index) {
|
|
||||||
this.randomSectionList.push({ name });
|
|
||||||
} else {
|
|
||||||
const section = this.sectionList[
|
|
||||||
Math.floor(Math.random(1) * this.sectionList.length)
|
|
||||||
];
|
|
||||||
if (section.type != '02') {
|
|
||||||
if (
|
|
||||||
this.randomSectionList.findIndex(it => {
|
|
||||||
return it.name == section.name;
|
|
||||||
}) < 0
|
|
||||||
) {
|
|
||||||
this.randomSectionList.push({ name: section.name });
|
|
||||||
} else {
|
|
||||||
i--;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
i--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
stopTask() {
|
|
||||||
if (this.task) {
|
|
||||||
clearInterval(this.task);
|
|
||||||
this.task = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.stepNum < 3) {
|
|
||||||
this.$store.dispatch('training/backSteps', this.stepNum);
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.model.name = '';
|
|
||||||
this.model.time = '';
|
|
||||||
this.type = 'text';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
this.operate = operate || {};
|
|
||||||
this.operation = operate.operation;
|
|
||||||
this.status = '';
|
|
||||||
this.model.sectionName = '';
|
|
||||||
this.model.confirmSectionName = '';
|
|
||||||
if (selected) {
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
|
||||||
if (selected.isSwitchSection) {
|
|
||||||
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
|
||||||
if (section) {
|
|
||||||
this.model.sectionName = section.name;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
|
||||||
if (section) {
|
|
||||||
this.model.sectionName = section.name;
|
|
||||||
this.model.sectionName = `${section.name}-${selected.name}`;
|
|
||||||
} else {
|
|
||||||
this.model.sectionName = `${selected.name}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
|
||||||
const section = this.$store.getters['map/getDeviceByCode'](selected.switchSectionCode);
|
|
||||||
if (section) {
|
|
||||||
this.model.sectionName = section.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.stepNum = 0;
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.stopTask();
|
|
||||||
this.$nextTick(function() {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
waitSelectEvent() {
|
|
||||||
if (!this.$store.state.menuOperation.break) {
|
|
||||||
this.model.time -= 1;
|
|
||||||
if (this.model.time <= 0) {
|
|
||||||
this.stopTask();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
commitOnce() {
|
|
||||||
this.stepNum = 1;
|
|
||||||
const operate = {
|
|
||||||
operation: ''
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
operate.operation = OperationEvent.Section.fault.confirm1.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
|
||||||
operate.operation = OperationEvent.Section.unlock.confirm1.operation;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.type = 'password';
|
|
||||||
this.model.time = this.timenum;
|
|
||||||
this.task = setInterval(this.waitSelectEvent, this.timeout);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
sectionSelectChange() {
|
|
||||||
if (this.model.confirmSectionName === this.model.sectionName) {
|
|
||||||
this.stepNum = 2;
|
|
||||||
} else {
|
|
||||||
this.model.time = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
const operate = {
|
|
||||||
operation: ''
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
operate.operation = OperationEvent.Section.fault.choose2.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
|
||||||
operate.operation = OperationEvent.Section.unlock.choose2.operation;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', {
|
|
||||||
break: true
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: '',
|
|
||||||
cmdType: ''
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
operate.operation = OperationEvent.Section.fault.confirm2.operation;
|
|
||||||
operate.cmdType = CMD.Section.CMD_SECTION_FAULT_UNLOCK;
|
|
||||||
} else if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
|
||||||
operate.operation = OperationEvent.Section.unlock.confirm2.operation;
|
|
||||||
operate.cmdType = CMD.Section.CMD_SECTION_UNBLOCK;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.model.status = '';
|
|
||||||
if (this.model.sectionName == this.model.confirmSectionName) {
|
|
||||||
this.stepNum = 3;
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.type = 'text';
|
|
||||||
this.stopTask();
|
|
||||||
this.doClose();
|
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
// this.$refs.popupAlarm.doShow(Object.assign(this.operate, {val: operate.val}), [`区段 ${this.model.sectionName}报告恢复计轴有效`]);
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.model.status = '区段选择错误';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store
|
|
||||||
.dispatch('training/nextNew', operate)
|
|
||||||
.then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
||||||
.alxe-effective .context {
|
|
||||||
height: 80px !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -22,7 +22,7 @@
|
|||||||
<el-input v-model="sectionName" size="small" disabled />
|
<el-input v-model="sectionName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style="margin-top: 10px;">
|
<el-row style="margin-top: 10px;" v-if="isShow">
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-radio v-model="radio" label="1" :disabled="radio == 2" style="display: block; text-align: center;">
|
<el-radio v-model="radio" label="1" :disabled="radio == 2" style="display: block; text-align: center;">
|
||||||
激活</el-radio>
|
激活</el-radio>
|
||||||
@ -61,6 +61,7 @@ export default {
|
|||||||
loading: false,
|
loading: false,
|
||||||
selected: null,
|
selected: null,
|
||||||
operation: '',
|
operation: '',
|
||||||
|
isShow: false,
|
||||||
stationName: '',
|
stationName: '',
|
||||||
sectionName: '',
|
sectionName: '',
|
||||||
radio: ''
|
radio: ''
|
||||||
@ -113,11 +114,13 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.operation = operate.operation || '';
|
this.operation = operate.operation || '';
|
||||||
|
this.isShow = false;
|
||||||
if (this.operation == OperationEvent.Section.split.menu.operation) {
|
if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||||
this.radio = '2';
|
this.radio = '2';
|
||||||
|
this.isShow = true;
|
||||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||||
this.radio = '1';
|
this.radio = '1';
|
||||||
|
this.isShow = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
@ -147,10 +150,33 @@ export default {
|
|||||||
lock() {
|
lock() {
|
||||||
const operate = {
|
const operate = {
|
||||||
over: true,
|
over: true,
|
||||||
operation: OperationEvent.Section.lock.menu.operation,
|
operation: this.operation,
|
||||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.sendCommand(operate);
|
||||||
|
},
|
||||||
|
// 轨道区段切除
|
||||||
|
split() {
|
||||||
|
const operate = {
|
||||||
|
over: true,
|
||||||
|
operation: this.operation,
|
||||||
|
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||||
|
};
|
||||||
|
|
||||||
|
this.sendCommand(operate);
|
||||||
|
},
|
||||||
|
// 轨道区段激活
|
||||||
|
active() {
|
||||||
|
const operate = {
|
||||||
|
over: true,
|
||||||
|
operation: this.operation,
|
||||||
|
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||||
|
};
|
||||||
|
|
||||||
|
this.sendCommand(operate);
|
||||||
|
},
|
||||||
|
sendCommand(operate) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -163,46 +189,6 @@ export default {
|
|||||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 轨道区段切除
|
|
||||||
split() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Section.split.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 轨道区段激活
|
|
||||||
active() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Section.active.menu.operation,
|
|
||||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
|
318
src/jmapNew/theme/ningbo_01/menus/dialog/sectionUnLock.vue
Normal file
318
src/jmapNew/theme/ningbo_01/menus/dialog/sectionUnLock.vue
Normal file
@ -0,0 +1,318 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-dialogDrag
|
||||||
|
class="ningbo-01__systerm stand-detain-train"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="380px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<div class="content cotnent_body">
|
||||||
|
<span class="base-label" style="left: 2px;">操作</span>
|
||||||
|
<div style="overflow: hidden;">
|
||||||
|
<div>操作设备</div>
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-input :value="messageText1" placeholder="" size="mini" disabled />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="1">
|
||||||
|
<el-button :id="confirmId1" class="status_btn" :disabled="disabledConfirm1" @click="confirm1">确认
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="content cotnent_body">
|
||||||
|
<span class="base-label" style="left: 2px;">确认</span>
|
||||||
|
<div style="overflow: hidden;">
|
||||||
|
<div>操作设备</div>
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-select :id="domIdChoose" v-model="messageText2" filterable size="mini" :disabled="disabledConfirm2" @change="SelectChange">
|
||||||
|
<el-option v-for="option in sectionList" :key="option.code" :label="option.name" :value="option.name" />
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="1">
|
||||||
|
<el-button :id="confirmId2" class="status_btn" :disabled="disabledConfirm2" @click="confirm2">确认
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="body_cont">
|
||||||
|
<el-col :span="7">
|
||||||
|
<div class="text">操作倒计时</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="17">
|
||||||
|
<div style="border: 2px inset #E9E9E9; height: 30px; width: 100%;">
|
||||||
|
{{ timeCountConfirm == -1 ? '' : timeCountConfirm }}</div>
|
||||||
|
</el-col>
|
||||||
|
</div>
|
||||||
|
<div class="body_cont">
|
||||||
|
<div class="status_text">状态</div>
|
||||||
|
<div class="textarea_content" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-button :id="domIdConfirm" class="close_btn" type="primary" @click="commit">关闭</el-button>
|
||||||
|
<notice-info ref="noticeInfo" />
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'StandDetainTrain',
|
||||||
|
components: {
|
||||||
|
NoticeInfo
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogShow: false,
|
||||||
|
selected: null,
|
||||||
|
operation: null,
|
||||||
|
|
||||||
|
messageText1: '',
|
||||||
|
messageText2: '',
|
||||||
|
timeCountConfirm: -1,
|
||||||
|
disabledConfirm1: false,
|
||||||
|
disabledConfirm2: true
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('map', [
|
||||||
|
'sectionList'
|
||||||
|
]),
|
||||||
|
show() {
|
||||||
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
|
},
|
||||||
|
domIdChoose() {
|
||||||
|
return this.dialogShow ? OperationEvent.Section.unlock.choose.domId : '';
|
||||||
|
},
|
||||||
|
confirmId1() {
|
||||||
|
return this.dialogShow ? OperationEvent.Section.unlock.confirm1.domId : '';
|
||||||
|
},
|
||||||
|
confirmId2() {
|
||||||
|
return this.dialogShow ? OperationEvent.Section.unlock.confirm2.domId : '';
|
||||||
|
},
|
||||||
|
domIdConfirm() {
|
||||||
|
return this.dialogShow ? OperationEvent.Section.unlock.confirm.domId : '';
|
||||||
|
},
|
||||||
|
title() {
|
||||||
|
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
|
return '解除封锁';
|
||||||
|
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||||
|
return '区故解';
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$store.dispatch('training/tipReload');
|
||||||
|
});
|
||||||
|
this.timer = setInterval(() => {
|
||||||
|
if (this.timeCountConfirm > 0) {
|
||||||
|
this.timeCountConfirm--;
|
||||||
|
} else if (this.timeCountConfirm == 0) { // 关闭会话
|
||||||
|
this.timeCountConfirm = -1;
|
||||||
|
this.disabledConfirm2 = true;
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow(operate, selected) {
|
||||||
|
this.selected = selected;
|
||||||
|
if (!this.dialogShow) {
|
||||||
|
this.messageText1 = selected.name;
|
||||||
|
|
||||||
|
this.operation = operate.operation;
|
||||||
|
}
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(function () {
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.dialogShow = false;
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
this.mouseCancelState(this.selected);
|
||||||
|
},
|
||||||
|
|
||||||
|
SelectChange() {
|
||||||
|
const operate = {
|
||||||
|
operation: '',
|
||||||
|
val: this.messageText2
|
||||||
|
};
|
||||||
|
|
||||||
|
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Section.unlock.choose.operation;
|
||||||
|
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Section.fault.choose.operation;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
confirm1() {
|
||||||
|
const operate = {
|
||||||
|
operation: ''
|
||||||
|
};
|
||||||
|
|
||||||
|
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Section.unlock.confirm1.operation;
|
||||||
|
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Section.fault.confirm1.operation;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.messageText1 = '*****';
|
||||||
|
this.messageText2 = '';
|
||||||
|
this.disabledConfirm1 = true;
|
||||||
|
this.disabledConfirm2 = false;
|
||||||
|
this.timeCountConfirm = 60; // 倒计时
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
confirm2() {
|
||||||
|
const operate = {
|
||||||
|
operation: '',
|
||||||
|
cmdType: ''
|
||||||
|
};
|
||||||
|
|
||||||
|
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Section.unlock.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Section.CMD_SECTION_UNBLOCK
|
||||||
|
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Section.fault.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.messageText2 = '*****';
|
||||||
|
this.disabledConfirm2 = true;
|
||||||
|
this.timeCountConfirm = -1;
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
commit() {
|
||||||
|
const operate = {
|
||||||
|
over: true,
|
||||||
|
operation: '',
|
||||||
|
};
|
||||||
|
|
||||||
|
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Section.unlock.confirm.operation;
|
||||||
|
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Section.fault.confirm.operation;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.doClose();
|
||||||
|
}).catch((error) => {
|
||||||
|
this.doClose();
|
||||||
|
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.stand-detain-train {
|
||||||
|
|
||||||
|
.content {
|
||||||
|
width: 100%;
|
||||||
|
border: 1px solid lightgray;
|
||||||
|
padding: 18px 5px;
|
||||||
|
position: relative;
|
||||||
|
height: 80px !important;
|
||||||
|
|
||||||
|
.base-label {
|
||||||
|
position: absolute;
|
||||||
|
top: -8px;
|
||||||
|
left: 20px;
|
||||||
|
background-color: #F0F0F0;
|
||||||
|
padding: 0 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-button {
|
||||||
|
width: 100%;
|
||||||
|
line-height: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status_btn {
|
||||||
|
width: 110px;
|
||||||
|
margin: 15px auto 0;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.head_content {
|
||||||
|
height: 110px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cotnent_body {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
.text {
|
||||||
|
line-height: 30px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status_btn {
|
||||||
|
width: 80px;
|
||||||
|
margin: 0 auto
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.close_btn {
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 80px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.body_cont {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
padding: 0 3px;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.text {
|
||||||
|
line-height: 30px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status_text {
|
||||||
|
margin-bottom: 3px;
|
||||||
|
font-size: 14px;
|
||||||
|
padding-left: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.textarea_content {
|
||||||
|
height: 85px;
|
||||||
|
width: 100%;
|
||||||
|
border: 2px solid #E9E9E9;
|
||||||
|
box-shadow: 2px 2px #959595 inset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,897 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="ningbo-01__systerm section-cmd-speed"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="800px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<div style="padding: 10px 20px 2px; margin-bottom: 25px; border: 1px solid lightgray;">
|
|
||||||
<span class="base-label">会话管理</span>
|
|
||||||
<el-form label-position="center" size="mini" style="margin-top: -15px;">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="3">
|
|
||||||
<el-button type="primary" style="width: 110px; line-height: 26px;" @click="commit">查询会话状态
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="1">
|
|
||||||
<el-input v-model="dialogueStatus" size="mini" disabled />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="3" :offset="1">
|
|
||||||
<el-button
|
|
||||||
:id="openConversationId"
|
|
||||||
type="primary"
|
|
||||||
style="width: 110px; line-height: 26px;"
|
|
||||||
:disabled="!isOpenMessage"
|
|
||||||
@click="openMessage('open')"
|
|
||||||
>打开会话
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="3" :offset="1">
|
|
||||||
<el-button
|
|
||||||
:id="closeConversationId"
|
|
||||||
type="primary"
|
|
||||||
style="width: 110px; line-height: 26px;"
|
|
||||||
:disabled="isOpenMessage"
|
|
||||||
@click="openMessage('close')"
|
|
||||||
>关闭会话
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<div style="margin-bottom: 15px;">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="15">
|
|
||||||
<div style="padding: 12px 8px 8px; height: 170px; border: 1px solid lightgray;">
|
|
||||||
<div style="float: left; width: 20%; padding: 25px 8px 0;">
|
|
||||||
<div style="margin-bottom: 5px;">限速数值</div>
|
|
||||||
<el-select
|
|
||||||
:id="firstLimitSpeedId"
|
|
||||||
v-model="firstScetion.speed"
|
|
||||||
size="mini"
|
|
||||||
:disabled="spdDisabled"
|
|
||||||
placeholder=""
|
|
||||||
@change="changeSelect(firstScetion.speed, '1')"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in speedList"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
style="float: left; width: 29%; margin-left: 1%; border: 1px solid lightgray; padding:8px;"
|
|
||||||
>
|
|
||||||
<span class="base-label" style="left: 0px;">起点</span>
|
|
||||||
<div style="margin-bottom: 5px;">区间选择</div>
|
|
||||||
<el-select
|
|
||||||
:id="firstStartSectionId"
|
|
||||||
v-model="firstScetion.startSection"
|
|
||||||
size="mini"
|
|
||||||
:disabled="spdDisabled"
|
|
||||||
placeholder=""
|
|
||||||
@change="changeSelect(firstScetion.startSection, '2')"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in regionList"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
<div style="margin-bottom: 5px;margin-top: 5px;">公里标数值(m)</div>
|
|
||||||
<el-input
|
|
||||||
:id="firstStartvalueId"
|
|
||||||
v-model="firstScetion.startValue"
|
|
||||||
:min="0"
|
|
||||||
size="mini"
|
|
||||||
:disabled="spdDisabled"
|
|
||||||
@blur="changeSelect(firstScetion.startValue, '3')"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
style="float: left; width: 29%; margin-left: 1%; border: 1px solid lightgray; padding:8px;"
|
|
||||||
>
|
|
||||||
<span class="base-label" style="left: 0px;">终点</span>
|
|
||||||
<div style="margin-bottom: 5px;">区间选择</div>
|
|
||||||
<el-select
|
|
||||||
:id="firstEndSectionId"
|
|
||||||
v-model="firstScetion.endSection"
|
|
||||||
size="mini"
|
|
||||||
:disabled="spdDisabled"
|
|
||||||
placeholder=""
|
|
||||||
@change="changeSelect(firstScetion.endSection, '4')"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in regionList"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
<div style="margin-bottom: 5px; margin-top: 5px;">公里标数值(m)</div>
|
|
||||||
<el-input
|
|
||||||
:id="firstEndvalueId"
|
|
||||||
v-model="firstScetion.endValue"
|
|
||||||
:min="0"
|
|
||||||
size="mini"
|
|
||||||
:disabled="spdDisabled"
|
|
||||||
@blur="changeSelect(firstScetion.endValue, '5')"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div style="float: left; width: 20%; padding:8px;">
|
|
||||||
<el-button
|
|
||||||
:id="firstCheckId"
|
|
||||||
type="primary"
|
|
||||||
style="width: 90px; margin: 18px 0 20px; line-height: 26px;"
|
|
||||||
:disabled="spdDisabled"
|
|
||||||
@click="CheckEquipment"
|
|
||||||
>查看设备
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
:id="firstComfirmId"
|
|
||||||
type="primary"
|
|
||||||
style="width: 90px; margin: 0; line-height: 26px;"
|
|
||||||
:disabled="firstDisabled"
|
|
||||||
@click="Confirmed"
|
|
||||||
>首次确认
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="9">
|
|
||||||
<div style="padding: 8px; height: 170px; border: 1px solid lightgray; margin-left: 10px;">
|
|
||||||
<span class="base-label" style="left: 4px; background: #f0f0f0;">设备列表:</span>
|
|
||||||
<div style="height: 100%; margin-top: -14px; border: 2px inset #E9E9E9; overflow-y: auto">
|
|
||||||
<div v-for="(item,i) in equipmentText" :key="i">
|
|
||||||
{{ item.name }}: {{ item.text }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
<div style="margin-bottom: 15px;">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="15">
|
|
||||||
<div style="padding: 12px 8px 8px; height: 170px; border: 1px solid lightgray;">
|
|
||||||
<div style="float: left; width: 20%; padding: 25px 8px 0;">
|
|
||||||
<div style="margin-bottom: 5px;">限速数值</div>
|
|
||||||
<el-select
|
|
||||||
:id="secondLimitSpeedId"
|
|
||||||
v-model="secondScetion.speed"
|
|
||||||
size="mini"
|
|
||||||
:disabled="stpDisabled"
|
|
||||||
placeholder=""
|
|
||||||
@change="changeSelect(secondScetion.speed, '6')"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in speedList"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
style="float: left; width: 29%; margin-left: 1%; border: 1px solid lightgray; padding:8px;"
|
|
||||||
>
|
|
||||||
<span class="base-label" style="left: 0px;">起点</span>
|
|
||||||
<div style="margin-bottom: 5px;">区间选择</div>
|
|
||||||
<el-select
|
|
||||||
:id="secondStartSectionId"
|
|
||||||
v-model="secondScetion.startSection"
|
|
||||||
size="mini"
|
|
||||||
:disabled="stpDisabled"
|
|
||||||
placeholder=""
|
|
||||||
@change="changeSelect(secondScetion.startSection, '7')"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in regionList"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
<div style="margin-bottom: 5px;margin-top: 5px;">公里标数值(m)</div>
|
|
||||||
<el-select
|
|
||||||
:id="secondStartvalueId"
|
|
||||||
v-model="secondScetion.startValue"
|
|
||||||
size="mini"
|
|
||||||
:disabled="stpDisabled"
|
|
||||||
placeholder=""
|
|
||||||
@change="changeSelect(secondScetion.startValue, '8')"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in startSectionList"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
style="float: left; width: 29%; margin-left: 1%; border: 1px solid lightgray; padding:8px;"
|
|
||||||
>
|
|
||||||
<span class="base-label" style="left: 0px;">终点</span>
|
|
||||||
<div style="margin-bottom: 5px;">区间选择</div>
|
|
||||||
<el-select
|
|
||||||
:id="secondEndSectionId"
|
|
||||||
v-model="secondScetion.endSection"
|
|
||||||
size="mini"
|
|
||||||
:disabled="stpDisabled"
|
|
||||||
placeholder=""
|
|
||||||
@change="changeSelect(secondScetion.endSection, '9')"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in regionList"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
<div style="margin-bottom: 5px; margin-top: 5px;">公里标数值(m)</div>
|
|
||||||
<el-select
|
|
||||||
:id="secondEndvalueId"
|
|
||||||
v-model="secondScetion.endValue"
|
|
||||||
size="mini"
|
|
||||||
:disabled="stpDisabled"
|
|
||||||
placeholder=""
|
|
||||||
@change="changeSelect(secondScetion.endValue, '10')"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in endSectionList"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<div style="float: left; width: 20%; padding:8px;">
|
|
||||||
<el-button
|
|
||||||
:id="secondCheckId"
|
|
||||||
type="primary"
|
|
||||||
style="width: 90px; margin: 18px 0 20px; line-height: 26px;"
|
|
||||||
@click="CheckSecondEquipment"
|
|
||||||
>查看设备
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
:id="secondComfirmId"
|
|
||||||
type="primary"
|
|
||||||
style="width: 90px; margin: 0; line-height: 26px;"
|
|
||||||
:disabled="secondDisabled"
|
|
||||||
@click="confirm"
|
|
||||||
>确认发送
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="9">
|
|
||||||
<div style="padding: 8px; height: 170px; border: 1px solid lightgray; margin-left: 10px;">
|
|
||||||
<span class="base-label" style="left: 4px; background: #f0f0f0;">设备列表:</span>
|
|
||||||
<div style="height: 100%; margin-top: -14px; border: 2px inset #E9E9E9; overflow-y: auto">
|
|
||||||
<div v-for="(item,i) in equipmentText1" :key="i">
|
|
||||||
{{ item.name }}: {{ item.text }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="5">
|
|
||||||
<div style="float: left; height: 30px; line-height: 30px; margin-right:10px;">操作倒计时</div>
|
|
||||||
<div style="border: 2px inset #E9E9E9; height: 30px; width: 45px;float: left;">
|
|
||||||
{{ timeCountConfirm == -1 ? '' : timeCountConfirm }}</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="19">
|
|
||||||
<div style="float: left; height: 30px; line-height: 30px; margin-right:10px;">状态</div>
|
|
||||||
<div style="border: 2px inset #E9E9E9; height: 30px; width: calc(100% - 38px);float: left;">
|
|
||||||
{{ messageStatus }}</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row class="button-group">
|
|
||||||
<el-button :id="domIdClose" style="margin: 0px auto; display: block;" @click="close">关闭</el-button>
|
|
||||||
</el-row>
|
|
||||||
</el-dialog>
|
|
||||||
<confirm-tip ref="ConfirmTip" @close="closeMessage" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { OperationEvent } from '@/scripts/ConstDic';
|
|
||||||
// import { now } from '@/utils/date';
|
|
||||||
import ConfirmTip from './childDialog/confirmTip';
|
|
||||||
import { sendCommand } from '@/api/jmap/training';
|
|
||||||
import router from '@/router';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'SectionCmdSpeed',
|
|
||||||
components: {
|
|
||||||
ConfirmTip
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
selected: '',
|
|
||||||
order: 0,
|
|
||||||
code: '',
|
|
||||||
row: null,
|
|
||||||
timer: null,
|
|
||||||
type: '',
|
|
||||||
operation: '',
|
|
||||||
spdDisabled: true,
|
|
||||||
firstDisabled: true,
|
|
||||||
secondDisabled: true,
|
|
||||||
stpDisabled: true,
|
|
||||||
timeCountCommand: -1,
|
|
||||||
timeCountConfirm: -1,
|
|
||||||
equipmentText: [],
|
|
||||||
equipmentText1: [],
|
|
||||||
maxSpeed: 85,
|
|
||||||
speedSpace: 5,
|
|
||||||
stationName: '111',
|
|
||||||
name: '',
|
|
||||||
speed: '',
|
|
||||||
regionList: [],
|
|
||||||
startSectionList: [],
|
|
||||||
endSectionList: [],
|
|
||||||
sectionList: [
|
|
||||||
{
|
|
||||||
value: 'up',
|
|
||||||
name: '上行'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 'down',
|
|
||||||
name: '下行'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
messageStatus: '请先打开会话!',
|
|
||||||
dialogueStatus: '会话已关闭',
|
|
||||||
isOpenMessage: true,
|
|
||||||
codeText: '',
|
|
||||||
firstScetion: {
|
|
||||||
speed: '',
|
|
||||||
startSection: '',
|
|
||||||
endSection: '',
|
|
||||||
startValue: '',
|
|
||||||
endValue: ''
|
|
||||||
},
|
|
||||||
firstShow: false,
|
|
||||||
copyScetion: {
|
|
||||||
speed: '',
|
|
||||||
startSection: '',
|
|
||||||
endSection: '',
|
|
||||||
startValue: '',
|
|
||||||
endValue: ''
|
|
||||||
},
|
|
||||||
secondScetion: {
|
|
||||||
speed: '',
|
|
||||||
startSection: '',
|
|
||||||
endSection: '',
|
|
||||||
startValue: '',
|
|
||||||
endValue: ''
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
speedList() {
|
|
||||||
const list = [{ value: -1, name: '无限速' }];
|
|
||||||
for (var i = 5; i * this.speedSpace <= this.maxSpeed; i++) {
|
|
||||||
list.push({ value: String(i * this.speedSpace), name: String(i * this.speedSpace) });
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
return this.dialogShow ? '公里标输入临时限速' : '';
|
|
||||||
},
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
openConversationId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.openConversation.domId : '';
|
|
||||||
},
|
|
||||||
closeConversationId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.closeConversation.domId : '';
|
|
||||||
},
|
|
||||||
firstLimitSpeedId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstLimitSpeed.domId : '';
|
|
||||||
},
|
|
||||||
firstStartSectionId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstStartSection.domId : '';
|
|
||||||
},
|
|
||||||
firstStartvalueId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstStartvalue.domId : '';
|
|
||||||
},
|
|
||||||
firstEndSectionId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstEndSection.domId : '';
|
|
||||||
},
|
|
||||||
firstEndvalueId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstEndvalue.domId : '';
|
|
||||||
},
|
|
||||||
firstCheckId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstCheck.domId : '';
|
|
||||||
},
|
|
||||||
firstComfirmId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstComfirm.domId : '';
|
|
||||||
},
|
|
||||||
secondLimitSpeedId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondLimitSpeed.domId : '';
|
|
||||||
},
|
|
||||||
secondStartSectionId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondStartSection.domId : '';
|
|
||||||
},
|
|
||||||
secondStartvalueId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondStartvalue.domId : '';
|
|
||||||
},
|
|
||||||
secondEndSectionId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondEndSection.domId : '';
|
|
||||||
},
|
|
||||||
secondEndvalueId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondEndvalue.domId : '';
|
|
||||||
},
|
|
||||||
secondCheckId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondCheck.domId : '';
|
|
||||||
},
|
|
||||||
secondComfirmId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.confirmLimit.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdClose() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.domIdClose.domId : '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'timeCountCommand': function (val) {
|
|
||||||
if (val <= 0) {
|
|
||||||
this.dialogueStatus = `会话已关闭`;
|
|
||||||
// this.openMessage('close');
|
|
||||||
this.isOpenMessage = true;
|
|
||||||
this.spdDisabled = true;
|
|
||||||
this.firstDisabled = true;
|
|
||||||
this.secondDisabled = true;
|
|
||||||
this.messageStatus = '请先打开会话!';
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
if (this.speed) {
|
|
||||||
this.messageStatus = '会话关闭成功';
|
|
||||||
}
|
|
||||||
this.equipmentText = [];
|
|
||||||
this.equipmentText1 = [];
|
|
||||||
this.firstScetion = {
|
|
||||||
speed: '',
|
|
||||||
startSection: '',
|
|
||||||
endSection: '',
|
|
||||||
startValue: '',
|
|
||||||
endValue: ''
|
|
||||||
};
|
|
||||||
this.secondScetion = {
|
|
||||||
speed: '',
|
|
||||||
startSection: '',
|
|
||||||
endSection: '',
|
|
||||||
startValue: '',
|
|
||||||
endValue: ''
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
this.dialogueStatus = `会话打开,剩余时间${val}秒`;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
firstScetion: {
|
|
||||||
handler: function (val) {
|
|
||||||
if (val.speed && val.startSection && val.endSection && val.startValue != '' && val.endValue != '') {
|
|
||||||
this.firstShow = true;
|
|
||||||
} else {
|
|
||||||
this.firstShow = false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
this.regionList = this.$ConstSelect.RegionTypeList;
|
|
||||||
this.timer = setInterval(() => {
|
|
||||||
if (this.timeCountCommand > 0) {
|
|
||||||
this.timeCountCommand--;
|
|
||||||
} else if (this.timeCountCommand == 0) { // 关闭会话
|
|
||||||
this.isOpenMessage = true;
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
}
|
|
||||||
if (this.timeCountConfirm > 0) {
|
|
||||||
this.timeCountConfirm--;
|
|
||||||
} else if (this.timeCountConfirm == 0) { // 关闭会话
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
|
||||||
clearInterval(this.timer);
|
|
||||||
this.timer = null;
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected, tempData) {
|
|
||||||
this.selected = selected;
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.name = '';
|
|
||||||
if (selected) {
|
|
||||||
this.timeCountCommand = -1; // 倒计时
|
|
||||||
this.order = 0;
|
|
||||||
this.type = operate.type;
|
|
||||||
this.operation = operate.operation;
|
|
||||||
this.code = operate.code;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.secondScetion = {
|
|
||||||
speed: '',
|
|
||||||
startSection: '',
|
|
||||||
endSection: '',
|
|
||||||
startValue: '',
|
|
||||||
endValue: ''
|
|
||||||
};
|
|
||||||
this.firstScetion = {
|
|
||||||
speed: '',
|
|
||||||
startSection: '',
|
|
||||||
endSection: '',
|
|
||||||
startValue: '',
|
|
||||||
endValue: ''
|
|
||||||
};
|
|
||||||
this.speed = 0;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
openMessage(state) {
|
|
||||||
if (state == 'open') { // 打开会话
|
|
||||||
const operate = {
|
|
||||||
type: this.type,
|
|
||||||
operation: OperationEvent.Section.setLimitSpeed.openConversation.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.isOpenMessage = false;
|
|
||||||
this.spdDisabled = false;
|
|
||||||
this.messageStatus = '会话打开成功';
|
|
||||||
this.speed = 1;
|
|
||||||
this.timeCountCommand = 120;
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
} else { // 关闭会话
|
|
||||||
const operate = {
|
|
||||||
type: this.type,
|
|
||||||
operation: OperationEvent.Section.setLimitSpeed.closeConversation.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.isOpenMessage = true;
|
|
||||||
this.spdDisabled = true;
|
|
||||||
this.firstDisabled = true;
|
|
||||||
this.secondDisabled = true;
|
|
||||||
this.messageStatus = '请先打开会话!';
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.startSectionList = [];
|
|
||||||
this.endSectionList = [];
|
|
||||||
if (this.speed) {
|
|
||||||
this.messageStatus = '会话关闭成功';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
CheckEquipment() { // 第一次确认设备
|
|
||||||
if (this.firstShow) {
|
|
||||||
const value = `${this.firstScetion.speed}::${this.firstScetion.startSection}::${this.firstScetion.startValue}::${this.firstScetion.endSection}::${this.firstScetion.endValue}`;
|
|
||||||
const operate = {
|
|
||||||
send: true,
|
|
||||||
val: value,
|
|
||||||
type: this.type,
|
|
||||||
operation: OperationEvent.Section.setLimitSpeed.firstCheck.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.firstDisabled = false; // 运行首次发送
|
|
||||||
this.getEquipmentList(response.data);
|
|
||||||
this.copyScetion = {
|
|
||||||
speed: this.firstScetion.speed,
|
|
||||||
startSection: this.firstScetion.startSection,
|
|
||||||
endSection: this.firstScetion.endSection,
|
|
||||||
startValue: this.firstScetion.startValue,
|
|
||||||
endValue: this.firstScetion.endValue
|
|
||||||
};
|
|
||||||
this.startSectionList = [];
|
|
||||||
this.endSectionList = [];
|
|
||||||
for (let index = 0; index < 4; index++) {
|
|
||||||
const starData = {
|
|
||||||
value: Number(this.firstScetion.startValue) + index,
|
|
||||||
label: Number(this.firstScetion.startValue) + index
|
|
||||||
};
|
|
||||||
this.startSectionList.push(starData);
|
|
||||||
const endData = {
|
|
||||||
value: Number(this.firstScetion.endValue) + index,
|
|
||||||
label: Number(this.firstScetion.endValue) + index
|
|
||||||
};
|
|
||||||
this.endSectionList.push(endData);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getEquipmentList(list) {
|
|
||||||
this.equipmentText = [];
|
|
||||||
const stationStand = [];
|
|
||||||
const stationText = [];
|
|
||||||
this.codeText = '';
|
|
||||||
const arr = [];
|
|
||||||
list.forEach(ele => {
|
|
||||||
if (stationStand.indexOf(ele.stationCode) == -1) {
|
|
||||||
stationStand.push(ele.stationCode);
|
|
||||||
const text = this.getTextName(ele);
|
|
||||||
stationText.push(text);
|
|
||||||
} else {
|
|
||||||
const index = stationStand.indexOf(ele.stationCode);
|
|
||||||
const text = this.getTextName(ele);
|
|
||||||
stationText[index] += text;
|
|
||||||
}
|
|
||||||
arr.push(ele.code);
|
|
||||||
});
|
|
||||||
this.codeText = arr.join('::');
|
|
||||||
stationStand.forEach((item, index) => {
|
|
||||||
const stationStandName = this.$store.getters['map/getDeviceByCode'](item);
|
|
||||||
const data = {
|
|
||||||
text: stationText[index],
|
|
||||||
name: stationStandName.name
|
|
||||||
};
|
|
||||||
this.equipmentText.push(data);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getTextName(ele) {
|
|
||||||
if (ele.switchSectionType) {
|
|
||||||
switch (ele.switchSectionType) {
|
|
||||||
case '01':
|
|
||||||
return `${ele.name}(主), `;
|
|
||||||
case '02':
|
|
||||||
return `${ele.name}(定), `;
|
|
||||||
case '03':
|
|
||||||
return `${ele.name}(反), `;
|
|
||||||
}
|
|
||||||
} else if (ele.parentName) {
|
|
||||||
return `${ele.parentName}-${ele.name}, `;
|
|
||||||
} else {
|
|
||||||
return `${ele.name}, `;
|
|
||||||
}
|
|
||||||
|
|
||||||
return '';
|
|
||||||
},
|
|
||||||
CheckSecondEquipment() { // 二次查看设备
|
|
||||||
if (this.secondScetion.speed == this.copyScetion.speed && this.secondScetion.startSection == this.copyScetion.startSection && this.secondScetion.endSection == this.copyScetion.endSection && this.secondScetion.startValue == this.copyScetion.startValue && this.secondScetion.endValue == this.copyScetion.endValue) {
|
|
||||||
const operate = {
|
|
||||||
type: this.type,
|
|
||||||
operation: OperationEvent.Section.setLimitSpeed.secondCheck.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.equipmentText1 = this.equipmentText;
|
|
||||||
this.secondDisabled = false; // 第二次确认发送
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.firstScetion = {
|
|
||||||
speed: this.copyScetion.speed,
|
|
||||||
startSection: this.copyScetion.startSection,
|
|
||||||
endSection: this.copyScetion.endSection,
|
|
||||||
startValue: this.copyScetion.startValue,
|
|
||||||
endValue: this.copyScetion.endValue
|
|
||||||
};
|
|
||||||
this.firstDisabled = true;
|
|
||||||
this.secondScetion = {
|
|
||||||
speed: '',
|
|
||||||
startSection: '',
|
|
||||||
endSection: '',
|
|
||||||
startValue: '',
|
|
||||||
endValue: ''
|
|
||||||
};
|
|
||||||
this.spdDisabled = false;
|
|
||||||
this.equipmentText = [];
|
|
||||||
this.stpDisabled = true;
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
const operate = {
|
|
||||||
message: `两次值不一致`
|
|
||||||
};
|
|
||||||
this.$refs.ConfirmTip.doShow(operate);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
changeSelect(value, val) {
|
|
||||||
const operate = {
|
|
||||||
type: this.type,
|
|
||||||
operation: '',
|
|
||||||
val: value
|
|
||||||
};
|
|
||||||
|
|
||||||
switch (val) {
|
|
||||||
case '1':
|
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.firstLimitSpeed.operation;
|
|
||||||
break;
|
|
||||||
case '2':
|
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.firstStartSection.operation;
|
|
||||||
break;
|
|
||||||
case '3':
|
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.firstStartvalue.operation;
|
|
||||||
break;
|
|
||||||
case '4':
|
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.firstEndSection.operation;
|
|
||||||
break;
|
|
||||||
case '5':
|
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.firstEndvalue.operation;
|
|
||||||
break;
|
|
||||||
case '6':
|
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.secondLimitSpeed.operation;
|
|
||||||
break;
|
|
||||||
case '7':
|
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.secondStartSection.operation;
|
|
||||||
break;
|
|
||||||
case '8':
|
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.secondStartvalue.operation;
|
|
||||||
break;
|
|
||||||
case '9':
|
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.secondEndSection.operation;
|
|
||||||
break;
|
|
||||||
case '10':
|
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.secondEndvalue.operation;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
Confirmed() { // 第一次确认
|
|
||||||
const operate = {
|
|
||||||
type: this.type,
|
|
||||||
operation: OperationEvent.Section.setLimitSpeed.firstComfirm.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.spdDisabled = true;
|
|
||||||
this.stpDisabled = false;
|
|
||||||
this.firstDisabled = true;
|
|
||||||
this.messageStatus = '收到Confirm request消息';
|
|
||||||
this.timeCountConfirm = 60; // 倒计时
|
|
||||||
this.firstScetion = {
|
|
||||||
speed: '',
|
|
||||||
startSection: '',
|
|
||||||
endSection: '',
|
|
||||||
startValue: '***',
|
|
||||||
endValue: '***'
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
confirm() { // 第二次确认
|
|
||||||
// let value = `${this.secondScetion.speed}::${this.codeText}`;
|
|
||||||
const value = `${this.secondScetion.speed}::${this.secondScetion.startSection}::${this.secondScetion.startValue}::${this.secondScetion.endSection}::${this.secondScetion.endValue}`;
|
|
||||||
const operate = {
|
|
||||||
send: true,
|
|
||||||
val: value,
|
|
||||||
type: this.type,
|
|
||||||
code: this.code,
|
|
||||||
operation: OperationEvent.Section.confirmLimit.menu.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
const group = router.currentRoute.query.group;
|
|
||||||
const command = this.handleMenuConfirmLimit(operate);
|
|
||||||
sendCommand(group, command).then((response) => {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.stpDisabled = true;
|
|
||||||
this.messageStatus = '临时限速设置成功';
|
|
||||||
}).catch(error => {
|
|
||||||
const operate = {
|
|
||||||
message: error.message
|
|
||||||
};
|
|
||||||
this.$refs.ConfirmTip.doShow(operate);
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
const operate = {
|
|
||||||
message: error.message
|
|
||||||
};
|
|
||||||
this.$refs.ConfirmTip.doShow(operate);
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
close() { // 设置成功 关闭弹窗
|
|
||||||
const operate = {
|
|
||||||
type: this.type,
|
|
||||||
operation: OperationEvent.Section.setLimitSpeed.domIdClose.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
if (this.isOpenMessage) {
|
|
||||||
this.doClose();
|
|
||||||
} else {
|
|
||||||
const operate = {
|
|
||||||
message: `是否关闭会话,并关闭窗口`,
|
|
||||||
confirmId: OperationEvent.Section.setLimitSpeed.close.domId
|
|
||||||
};
|
|
||||||
this.$refs.ConfirmTip.doShow(operate);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
|
|
||||||
},
|
|
||||||
closeMessage() {
|
|
||||||
const operate = {
|
|
||||||
type: this.type,
|
|
||||||
operation: OperationEvent.Section.setLimitSpeed.close.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.ConfirmTip.doClose();
|
|
||||||
this.isOpenMessage = true;
|
|
||||||
this.spdDisabled = true;
|
|
||||||
this.firstDisabled = true;
|
|
||||||
this.secondDisabled = true;
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.startSectionList = [];
|
|
||||||
this.endSectionList = [];
|
|
||||||
this.doClose();
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 处理右键菜单 确认临时限速
|
|
||||||
handleMenuConfirmLimit(operate) {
|
|
||||||
return {
|
|
||||||
type: operate.type,
|
|
||||||
code: operate.code,
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Section.confirmLimit.event,
|
|
||||||
val: operate.val
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -160,7 +160,7 @@ export default {
|
|||||||
operate.operation = OperationEvent.StationStand.earlyDeparture.downSelect.operation;
|
operate.operation = OperationEvent.StationStand.earlyDeparture.downSelect.operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
|
@ -193,21 +193,25 @@ export default {
|
|||||||
// this.tempData.push({ item: '车站扣车', status: opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '未设置' });
|
// this.tempData.push({ item: '车站扣车', status: opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '未设置' });
|
||||||
// this.tempData.push({ item: '中心扣车', status: opts.holdStatus == '03' || opts.holdStatus == '04' ? '已设置' : '未设置' });
|
// this.tempData.push({ item: '中心扣车', status: opts.holdStatus == '03' || opts.holdStatus == '04' ? '已设置' : '未设置' });
|
||||||
// 中心扣车
|
// 中心扣车
|
||||||
this.treeData[1].children[0].value = opts.holdStatus == '03' || opts.holdStatus == '04' ? '已设置' : '未设置';
|
this.treeData[1].children[0].value = selected.centerHoldTrain ? '已设置' : '未设置';
|
||||||
// 车站扣车
|
// 车站扣车
|
||||||
this.treeData[1].children[1].value = opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '未设置';
|
this.treeData[1].children[1].value = selected.stationHoldTrain ? '已设置' : '未设置';
|
||||||
// this.tempData.push({ item: '停站时间', status: opts.parkingTime != -1 ? opts.parkingTime : '自动' });
|
// this.tempData.push({ item: '停站时间', status: opts.parkingTime != -1 ? opts.parkingTime : '自动' });
|
||||||
// 停站时间
|
// 停站时间
|
||||||
this.treeData[0].children[2].value = opts.parkingTime != -1 ? opts.parkingTime : '自动';
|
this.treeData[0].children[2].value = selected.parkingTime != -1 ? selected.parkingTime : '自动';
|
||||||
// 跳停
|
// 跳停
|
||||||
this.treeData[0].children[3].value = opts.jumpStopStatus != '01' ? '已设置' : '未设置';
|
this.treeData[0].children[3].value = selected.allSkip || selected.assignSkip ? '已设置' : '未设置';
|
||||||
if (!stationStand || !station) {
|
// if (selected.direction == '01') {
|
||||||
this.tempData.push({ item: '运行等级', status: `自动` });
|
// 待添加
|
||||||
} else {
|
// }
|
||||||
this.tempData.push({ item: '运行等级', status: opts.intervalRunTime > 0 ? `至${station.name}${stationStand.name}:人工` : `至${station.name}${stationStand.name}:自动` });
|
// if (!stationStand || !station) {
|
||||||
}
|
// this.tempData.push({ item: '运行等级', status: `自动` });
|
||||||
|
// } else {
|
||||||
|
// this.tempData.push({ item: '运行等级', status: selected.runLevelTime > 0 ? `至${station.name}${stationStand.name}:人工` : `至${station.name}${stationStand.name}:自动` });
|
||||||
|
// }
|
||||||
// this.tempData.push({ item: '跳停', status: opts.jumpStopStatus != '01' ? '已设置' : '未设置' });
|
// this.tempData.push({ item: '跳停', status: opts.jumpStopStatus != '01' ? '已设置' : '未设置' });
|
||||||
this.tempData.push({ item: '下行折返策略', status: this.strategyMap[opts.reentryStrategy] ? this.strategyMap[opts.reentryStrategy] : '默认' });
|
// 待添加
|
||||||
|
// this.tempData.push({ item: '下行折返策略', status: this.strategyMap[selected.reentryStrategy] ? this.strategyMap[selected.reentryStrategy] : '默认' });
|
||||||
},
|
},
|
||||||
doShow(operate, selected, opts) {
|
doShow(operate, selected, opts) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
|
@ -221,7 +221,6 @@ export default {
|
|||||||
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL;
|
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL;
|
||||||
operate.operation = OperationEvent.StationControl.requestStationControl.menu.operation;
|
operate.operation = OperationEvent.StationControl.requestStationControl.menu.operation;
|
||||||
}
|
}
|
||||||
console.log(operate);
|
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
@ -229,10 +228,10 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch((error) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1,322 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog v-dialogDrag :z-index="2000" class="ningbo-01__systerm alxe-effective" :title="title" :visible.sync="show" width="420px" :before-close="doClose" :modal="false" :close-on-click-modal="false">
|
|
||||||
<div style="padding: 10px 20px;border: 1px solid lightgray;">
|
|
||||||
<span class="base-label">准备</span>
|
|
||||||
<div style="margin-top: -10px">
|
|
||||||
<el-row type="flex" justify="left">
|
|
||||||
<el-col :span="18">操作设备</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row type="flex" justify="left">
|
|
||||||
<el-col :span="18">
|
|
||||||
<el-input v-model="model.switchName" :type="type" size="mini" :disabled="true" />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4" :offset="1">
|
|
||||||
<el-button :id="domIdConfirm1" size="mini" :disabled="type==='password'" @click="commitOnce">确认</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="padding: 10px 20px;border: 1px solid lightgray;margin-top: 10px">
|
|
||||||
<span class="base-label">确认</span>
|
|
||||||
<div style="margin-top: -10px">
|
|
||||||
<el-row type="flex" justify="left">
|
|
||||||
<el-col :span="18">操作设备</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row type="flex" justify="left">
|
|
||||||
<el-col :span="18">
|
|
||||||
<el-select :id="domIdChoose2" v-model="model.confirmSwitchName" filterable size="mini" :disabled="type==='text'" @change="sectionSelectChange">
|
|
||||||
<el-option v-for="(option,index) in randomSectionList" :key="index" :label="option.name" :value="option.name" />
|
|
||||||
</el-select>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4" :offset="1">
|
|
||||||
<el-button :id="domIdConfirm2" size="mini" :loading="loading" :disabled="type==='text'" @click="commit">确认</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<el-row type="flex" justify="left" style="margin-top:20px;margin-bottom: 10px;">
|
|
||||||
<el-col :span="6" :offset="1">操作倒计时</el-col>
|
|
||||||
<el-col :span="16">
|
|
||||||
<el-input v-model="model.time" size="mini" :readonly="true" />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :offset="1">状态</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :offset="1" :span="23">
|
|
||||||
<el-input v-model="model.status" type="textarea" :rows="2" placeholder />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row class="botton-group" style="margin-top:20px">
|
|
||||||
<el-col :span="4" :offset="10">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
<popup-alarm ref="popupAlarm" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
import PopupAlarm from './childDialog/popupAlarm';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'AlxeEffective',
|
|
||||||
components: {
|
|
||||||
NoticeInfo,
|
|
||||||
PopupAlarm
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
type: 'text',
|
|
||||||
timeout: 1000,
|
|
||||||
timenum: 30,
|
|
||||||
stepNum: 0,
|
|
||||||
task: null,
|
|
||||||
model: {
|
|
||||||
switchName: '',
|
|
||||||
confirmSwitchName: '',
|
|
||||||
status: '',
|
|
||||||
time: 0
|
|
||||||
},
|
|
||||||
selected: null,
|
|
||||||
operate: null,
|
|
||||||
operation: '',
|
|
||||||
randomSectionList: []
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters('map', ['stationList', 'switchList']),
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdConfirm1() {
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
|
||||||
return OperationEvent.Switch.unlock.confirm1.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
|
||||||
return OperationEvent.Switch.unblock.confirm1.domId;
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
},
|
|
||||||
domIdConfirm2() {
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
|
||||||
return OperationEvent.Switch.unlock.confirm2.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
|
||||||
return OperationEvent.Switch.unblock.confirm2.domId;
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
},
|
|
||||||
domIdChoose2() {
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
|
||||||
return OperationEvent.Switch.unlock.choose2.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
|
||||||
return OperationEvent.Switch.unblock.choose2.domId;
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
|
||||||
return '区故解';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
|
||||||
return '解除封锁';
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'model.switchName': function(name) {
|
|
||||||
const index = Math.floor(Math.random(1) * 5);
|
|
||||||
for (var i = 0; i < 5; i++) {
|
|
||||||
if (i == index) {
|
|
||||||
this.randomSectionList.push({ name });
|
|
||||||
} else {
|
|
||||||
const section = this.switchList[
|
|
||||||
Math.floor(Math.random(1) * this.switchList.length)
|
|
||||||
];
|
|
||||||
if (section.type != '02') {
|
|
||||||
if (
|
|
||||||
this.randomSectionList.findIndex(it => {
|
|
||||||
return it.name == section.name;
|
|
||||||
}) < 0
|
|
||||||
) {
|
|
||||||
this.randomSectionList.push({ name: section.name });
|
|
||||||
} else {
|
|
||||||
i--;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
i--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
stopTask() {
|
|
||||||
if (this.task) {
|
|
||||||
clearInterval(this.task);
|
|
||||||
this.task = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.stepNum < 3) {
|
|
||||||
this.$store.dispatch('training/backSteps', this.stepNum);
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.model.name = '';
|
|
||||||
this.model.time = '';
|
|
||||||
this.type = 'text';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
this.operate = operate || {};
|
|
||||||
this.operation = operate.operation;
|
|
||||||
this.status = '';
|
|
||||||
this.model.switchName = '';
|
|
||||||
this.model.confirmSwitchName = '';
|
|
||||||
if (selected) {
|
|
||||||
if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
|
||||||
const section = this.$store.getters['map/getDeviceByCode'](selected.code);
|
|
||||||
if (section) {
|
|
||||||
this.model.switchName = section.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.stepNum = 0;
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.stopTask();
|
|
||||||
this.$nextTick(function() {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
waitSelectEvent() {
|
|
||||||
if (!this.$store.state.menuOperation.break) {
|
|
||||||
this.model.time -= 1;
|
|
||||||
if (this.model.time <= 0) {
|
|
||||||
this.stopTask();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
commitOnce() {
|
|
||||||
this.stepNum = 1;
|
|
||||||
const operate = {
|
|
||||||
operation: ''
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
|
||||||
operate.operation = OperationEvent.Switch.unlock.confirm1.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
|
||||||
operate.operation = OperationEvent.Switch.unblock.confirm1.operation;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.type = 'password';
|
|
||||||
this.model.time = this.timenum;
|
|
||||||
this.task = setInterval(this.waitSelectEvent, this.timeout);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
sectionSelectChange() {
|
|
||||||
if (this.model.confirmSwitchName === this.model.switchName) {
|
|
||||||
this.stepNum = 2;
|
|
||||||
} else {
|
|
||||||
this.model.time = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
const operate = {
|
|
||||||
operation: ''
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
|
||||||
operate.operation = OperationEvent.Switch.unlock.choose2.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
|
||||||
operate.operation = OperationEvent.Switch.unblock.choose2.operation;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', {
|
|
||||||
break: true
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: '',
|
|
||||||
cmdType: ''
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
|
||||||
operate.operation = OperationEvent.Switch.unlock.confirm2.operation;
|
|
||||||
operate.cmdType = CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK; // 解锁
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
|
||||||
operate.operation = OperationEvent.Switch.unblock.confirm2.operation;
|
|
||||||
operate.cmdType = CMD.Switch.CMD_SWITCH_UNBLOCK; // 解封
|
|
||||||
}
|
|
||||||
|
|
||||||
this.model.status = '';
|
|
||||||
if (this.model.switchName == this.model.confirmSwitchName) {
|
|
||||||
this.stepNum = 3;
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.type = 'text';
|
|
||||||
this.stopTask();
|
|
||||||
this.doClose();
|
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
// this.$refs.popupAlarm.doShow(Object.assign(this.operate, {val: operate.val}), [`区段 ${this.model.switchName}报告恢复计轴有效`]);
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.model.status = '区段选择错误';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store
|
|
||||||
.dispatch('training/nextNew', operate)
|
|
||||||
.then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
||||||
.alxe-effective .context {
|
|
||||||
height: 80px !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
317
src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue
Normal file
317
src/jmapNew/theme/ningbo_01/menus/dialog/switchUnLock.vue
Normal file
@ -0,0 +1,317 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-dialogDrag
|
||||||
|
class="ningbo-01__systerm stand-detain-train"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="380px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<div class="content cotnent_body">
|
||||||
|
<span class="base-label" style="left: 2px;">操作</span>
|
||||||
|
<div style="overflow: hidden;">
|
||||||
|
<div>道岔</div>
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-input :value="messageText1" placeholder="" size="mini" disabled />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="1">
|
||||||
|
<el-button :id="confirmId1" class="status_btn" :disabled="disabledConfirm1" @click="confirm1">确认
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="content cotnent_body">
|
||||||
|
<span class="base-label" style="left: 2px;">确认</span>
|
||||||
|
<div style="overflow: hidden;">
|
||||||
|
<div>道岔</div>
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-select :id="domIdChoose" v-model="messageText2" filterable size="mini" :disabled="disabledConfirm2" @change="SelectChange">
|
||||||
|
<el-option v-for="option in switchList" :key="option.code" :label="option.name" :value="option.name" />
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="1">
|
||||||
|
<el-button :id="confirmId2" class="status_btn" :disabled="disabledConfirm2" @click="confirm2">确认
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="body_cont">
|
||||||
|
<el-col :span="7">
|
||||||
|
<div class="text">操作倒计时</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="17">
|
||||||
|
<div style="border: 2px inset #E9E9E9; height: 30px; width: 100%;">
|
||||||
|
{{ timeCountConfirm == -1 ? '' : timeCountConfirm }}</div>
|
||||||
|
</el-col>
|
||||||
|
</div>
|
||||||
|
<div class="body_cont">
|
||||||
|
<div class="status_text">状态</div>
|
||||||
|
<div class="textarea_content" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-button :id="domIdConfirm" class="close_btn" type="primary" @click="commit">关闭</el-button>
|
||||||
|
<notice-info ref="noticeInfo" />
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'StandDetainTrain',
|
||||||
|
components: {
|
||||||
|
NoticeInfo
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogShow: false,
|
||||||
|
selected: null,
|
||||||
|
operation: null,
|
||||||
|
|
||||||
|
messageText1: '',
|
||||||
|
messageText2: '',
|
||||||
|
timeCountConfirm: -1,
|
||||||
|
disabledConfirm1: false,
|
||||||
|
disabledConfirm2: true
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('map', [
|
||||||
|
'switchList'
|
||||||
|
]),
|
||||||
|
show() {
|
||||||
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
|
},
|
||||||
|
domIdChoose() {
|
||||||
|
return this.dialogShow ? OperationEvent.Switch.unlock.choose.domId : '';
|
||||||
|
},
|
||||||
|
confirmId1() {
|
||||||
|
return this.dialogShow ? OperationEvent.Switch.unlock.confirm1.domId : '';
|
||||||
|
},
|
||||||
|
confirmId2() {
|
||||||
|
return this.dialogShow ? OperationEvent.Switch.unlock.confirm2.domId : '';
|
||||||
|
},
|
||||||
|
domIdConfirm() {
|
||||||
|
return this.dialogShow ? OperationEvent.Switch.unlock.confirm.domId : '';
|
||||||
|
},
|
||||||
|
title() {
|
||||||
|
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
|
return '道岔单解'
|
||||||
|
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||||
|
return '解除封锁'
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$store.dispatch('training/tipReload');
|
||||||
|
});
|
||||||
|
this.timer = setInterval(() => {
|
||||||
|
if (this.timeCountConfirm > 0) {
|
||||||
|
this.timeCountConfirm--;
|
||||||
|
} else if (this.timeCountConfirm == 0) { // 关闭会话
|
||||||
|
this.timeCountConfirm = -1;
|
||||||
|
this.disabledConfirm2 = true;
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow(operate, selected) {
|
||||||
|
this.selected = selected;
|
||||||
|
if (!this.dialogShow) {
|
||||||
|
this.messageText1 = selected.name;
|
||||||
|
|
||||||
|
this.operation = operate.operation;
|
||||||
|
}
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(function () {
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.dialogShow = false;
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
this.mouseCancelState(this.selected);
|
||||||
|
},
|
||||||
|
|
||||||
|
SelectChange() {
|
||||||
|
const operate = {
|
||||||
|
operation: '',
|
||||||
|
val: this.messageText2
|
||||||
|
};
|
||||||
|
|
||||||
|
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Switch.unlock.choose.operation
|
||||||
|
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Switch.unblock.choose.operation
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
confirm1() {
|
||||||
|
const operate = {
|
||||||
|
operation: ''
|
||||||
|
};
|
||||||
|
|
||||||
|
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Switch.unlock.confirm1.operation
|
||||||
|
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Switch.unblock.confirm1.operation
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.messageText1 = '*****';
|
||||||
|
this.messageText2 = '';
|
||||||
|
this.disabledConfirm1 = true;
|
||||||
|
this.disabledConfirm2 = false;
|
||||||
|
this.timeCountConfirm = 60; // 倒计时
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
confirm2() {
|
||||||
|
const operate = {
|
||||||
|
operation: '',
|
||||||
|
cmdType: ''
|
||||||
|
};
|
||||||
|
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Switch.unlock.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK;
|
||||||
|
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Switch.unblock.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Switch.CMD_SWITCH_UNBLOCK;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.messageText2 = '*****';
|
||||||
|
this.disabledConfirm2 = true;
|
||||||
|
this.timeCountConfirm = -1;
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
commit() {
|
||||||
|
const operate = {
|
||||||
|
over: true,
|
||||||
|
operation: '',
|
||||||
|
};
|
||||||
|
|
||||||
|
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Switch.unlock.confirm.operation
|
||||||
|
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Switch.unblock.confirm.operation
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.doClose();
|
||||||
|
}).catch((error) => {
|
||||||
|
this.doClose();
|
||||||
|
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.stand-detain-train {
|
||||||
|
|
||||||
|
.content {
|
||||||
|
width: 100%;
|
||||||
|
border: 1px solid lightgray;
|
||||||
|
padding: 18px 5px;
|
||||||
|
position: relative;
|
||||||
|
height: 80px !important;
|
||||||
|
|
||||||
|
.base-label {
|
||||||
|
position: absolute;
|
||||||
|
top: -8px;
|
||||||
|
left: 20px;
|
||||||
|
background-color: #F0F0F0;
|
||||||
|
padding: 0 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-button {
|
||||||
|
width: 100%;
|
||||||
|
line-height: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status_btn {
|
||||||
|
width: 110px;
|
||||||
|
margin: 15px auto 0;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.head_content {
|
||||||
|
height: 110px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cotnent_body {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
.text {
|
||||||
|
line-height: 30px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status_btn {
|
||||||
|
width: 80px;
|
||||||
|
margin: 0 auto
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.close_btn {
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 80px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.body_cont {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
padding: 0 3px;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.text {
|
||||||
|
line-height: 30px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status_text {
|
||||||
|
margin-bottom: 3px;
|
||||||
|
font-size: 14px;
|
||||||
|
padding-left: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.textarea_content {
|
||||||
|
height: 85px;
|
||||||
|
width: 100%;
|
||||||
|
border: 2px solid #E9E9E9;
|
||||||
|
box-shadow: 2px 2px #959595 inset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,154 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="ningbo-01__systerm route-create"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="580px"
|
|
||||||
label-position="top"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
|
||||||
<el-form size="small" label-width="100px">
|
|
||||||
<el-form-item label="列车:" prop="trainCode">
|
|
||||||
<el-select v-model="trainCode" filterable placeholder="列车">
|
|
||||||
<el-option
|
|
||||||
v-for="item in trainList"
|
|
||||||
:key="item.code"
|
|
||||||
:label="item.groupNumber"
|
|
||||||
:value="item.code"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="列车方向:" prop="direction">
|
|
||||||
<el-select v-model="direction" filterable placeholder="列车方向">
|
|
||||||
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<el-row>
|
|
||||||
<el-col style="text-align: right;">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'RouteCreate',
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
trainList: [],
|
|
||||||
trainNoList: [],
|
|
||||||
directionList: [
|
|
||||||
{
|
|
||||||
value: '2',
|
|
||||||
label: '上行'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: '1',
|
|
||||||
label: '下行'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
trainCode: '',
|
|
||||||
tripNumber: '',
|
|
||||||
direction: '',
|
|
||||||
selected: null
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters('map', [
|
|
||||||
'map'
|
|
||||||
]),
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return OperationEvent.Section.newtrain.menu.domId;
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
return '设置列车';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
loadInitData(map) {
|
|
||||||
},
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.selected = selected;
|
|
||||||
|
|
||||||
/** 加载列车数据*/
|
|
||||||
this.loadInitData(this.map);
|
|
||||||
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.trainCode = '';
|
|
||||||
this.direction = '';
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
const operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Section.type,
|
|
||||||
operation: OperationEvent.Section.newtrain.menu.operation,
|
|
||||||
val: '' + this.direction + '::' + this.trainCode
|
|
||||||
};
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
type: MapDeviceType.Section.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -2,10 +2,8 @@
|
|||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<section-control ref="sectionControl" />
|
<section-control ref="sectionControl" />
|
||||||
<section-cmd-control ref="sectionCmdControl" />
|
<section-un-lock ref="sectionUnLock" />
|
||||||
<speed-limit-control ref="speedLimitControl" />
|
<speed-limit-control ref="speedLimitControl" />
|
||||||
<speed-cmd-control ref="speedCmdControl" />
|
|
||||||
<train-create ref="trainCreate" />
|
|
||||||
<alxe-effective ref="alxeEffective" />
|
<alxe-effective ref="alxeEffective" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
</div>
|
</div>
|
||||||
@ -14,10 +12,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import SectionControl from './dialog/sectionControl';
|
import SectionControl from './dialog/sectionControl';
|
||||||
import SectionCmdControl from './dialog/sectionCmdControl';
|
import SectionUnLock from './dialog/sectionUnLock';
|
||||||
import SpeedCmdControl from './dialog/speedCmdControl';
|
|
||||||
import SpeedLimitControl from './dialog/speedLimitControl';
|
import SpeedLimitControl from './dialog/speedLimitControl';
|
||||||
import TrainCreate from './dialog/trainCreate';
|
|
||||||
import AlxeEffective from './dialog/alxeEffective';
|
import AlxeEffective from './dialog/alxeEffective';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
@ -31,10 +27,8 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
PopMenu,
|
PopMenu,
|
||||||
SectionControl,
|
SectionControl,
|
||||||
SectionCmdControl,
|
SectionUnLock,
|
||||||
SpeedLimitControl,
|
SpeedLimitControl,
|
||||||
SpeedCmdControl,
|
|
||||||
TrainCreate,
|
|
||||||
AlxeEffective,
|
AlxeEffective,
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
@ -190,7 +184,7 @@ export default {
|
|||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
this.$refs.sectionUnLock.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -245,7 +239,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 区段解锁
|
// 区段封锁
|
||||||
lock() {
|
lock() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
@ -262,7 +256,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 区段封锁
|
// 区段解锁
|
||||||
unlock() {
|
unlock() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
@ -275,7 +269,7 @@ export default {
|
|||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
this.$refs.sectionUnLock.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
<route-lock ref="routeLock" />
|
<route-lock ref="routeLock" />
|
||||||
<route-un-lock ref="routeUnLock" />
|
<route-un-lock ref="routeUnLock" />
|
||||||
<route-control ref="routeControl" />
|
<route-control ref="routeControl" />
|
||||||
<route-cmd-control ref="routeCmdControl" />
|
|
||||||
<route-hand-control ref="routeHandControl" />
|
<route-hand-control ref="routeHandControl" />
|
||||||
<route-detail ref="routeDetail" />
|
<route-detail ref="routeDetail" />
|
||||||
<router-command ref="routerCommand" />
|
<router-command ref="routerCommand" />
|
||||||
@ -19,7 +18,6 @@ import RouteControl from './dialog/routeControl';
|
|||||||
import RouteSelection from './dialog/routeSelection';
|
import RouteSelection from './dialog/routeSelection';
|
||||||
import RouteLock from './dialog/routeLock';
|
import RouteLock from './dialog/routeLock';
|
||||||
import RouteUnLock from './dialog/routeUnLock';
|
import RouteUnLock from './dialog/routeUnLock';
|
||||||
import RouteCmdControl from './dialog/routeCmdControl';
|
|
||||||
import RouteHandControl from './dialog/routeHandControl';
|
import RouteHandControl from './dialog/routeHandControl';
|
||||||
import RouterCommand from './dialog/routerCommand';
|
import RouterCommand from './dialog/routerCommand';
|
||||||
import RouteDetail from './dialog/routeDetail';
|
import RouteDetail from './dialog/routeDetail';
|
||||||
@ -40,7 +38,6 @@ export default {
|
|||||||
RouteSelection,
|
RouteSelection,
|
||||||
RouteLock,
|
RouteLock,
|
||||||
RouteUnLock,
|
RouteUnLock,
|
||||||
RouteCmdControl,
|
|
||||||
RouteHandControl,
|
RouteHandControl,
|
||||||
RouteDetail,
|
RouteDetail,
|
||||||
RouterCommand,
|
RouterCommand,
|
||||||
|
@ -116,7 +116,6 @@ export default {
|
|||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
|
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
|
||||||
// cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL,
|
|
||||||
param: {
|
param: {
|
||||||
stationControlCode: this.selected.code
|
stationControlCode: this.selected.code
|
||||||
}
|
}
|
||||||
@ -133,7 +132,6 @@ export default {
|
|||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
|
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
|
||||||
// cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL,
|
|
||||||
param: {
|
param: {
|
||||||
stationControlCode: this.selected.code
|
stationControlCode: this.selected.code
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<!-- <section-control ref="sectionControl" /> -->
|
|
||||||
<switch-control ref="switchControl" />
|
<switch-control ref="switchControl" />
|
||||||
<switch-cmd-control ref="switchCmdControl" />
|
<switch-un-lock ref="switchUnLock" />
|
||||||
<!-- <speed-cmd-control ref="speedCmdControl" /> -->
|
|
||||||
<speed-limit-control ref="speedLimitControl" />
|
<speed-limit-control ref="speedLimitControl" />
|
||||||
<alxe-effective ref="alxeEffective" />
|
<alxe-effective ref="alxeEffective" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
@ -13,10 +11,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
// import SectionControl from './dialog/sectionControl';
|
|
||||||
import SwitchControl from './dialog/switchControl';
|
import SwitchControl from './dialog/switchControl';
|
||||||
import SwitchCmdControl from './dialog/switchCmdControl';
|
import SwitchUnLock from './dialog/switchUnLock';
|
||||||
// import SpeedCmdControl from './dialog/speedCmdControl';
|
|
||||||
import SpeedLimitControl from './dialog/speedLimitControl';
|
import SpeedLimitControl from './dialog/speedLimitControl';
|
||||||
import AlxeEffective from './dialog/alxeEffective';
|
import AlxeEffective from './dialog/alxeEffective';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
@ -31,11 +27,9 @@ export default {
|
|||||||
name: 'SwitchMenu',
|
name: 'SwitchMenu',
|
||||||
components: {
|
components: {
|
||||||
PopMenu,
|
PopMenu,
|
||||||
// SectionControl,
|
|
||||||
SwitchControl,
|
SwitchControl,
|
||||||
SwitchCmdControl,
|
SwitchUnLock,
|
||||||
SpeedLimitControl,
|
SpeedLimitControl,
|
||||||
// SpeedCmdControl,
|
|
||||||
AlxeEffective,
|
AlxeEffective,
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
@ -297,7 +291,7 @@ export default {
|
|||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchCmdControl.doShow(operate, this.selected);
|
this.$refs.switchUnLock.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -331,7 +325,7 @@ export default {
|
|||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchCmdControl.doShow(operate, this.selected);
|
this.$refs.switchUnLock.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -115,6 +115,18 @@ export function parser(data, skinCode) {
|
|||||||
mapDevice[elem.code] = createDevice(deviceType.Text, elem, propConvert);
|
mapDevice[elem.code] = createDevice(deviceType.Text, elem, propConvert);
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
|
zrUtil.each(data.cycleButtonList || [], elem => {
|
||||||
|
mapDevice[elem.code] = createDevice(deviceType.MapCycleButtonVO, elem, propConvert);
|
||||||
|
}, this);
|
||||||
|
|
||||||
|
zrUtil.each(data.AutomaticRouteButtonList || [], elem => {
|
||||||
|
mapDevice[elem.code] = createDevice(deviceType.AutomaticRoute, elem, propConvert);
|
||||||
|
}, this);
|
||||||
|
|
||||||
|
zrUtil.each(data.outFrameList || [], elem => {
|
||||||
|
mapDevice[elem.code] = createDevice(deviceType.OutFrame, elem, propConvert);
|
||||||
|
}, this);
|
||||||
|
|
||||||
zrUtil.each(data.trainWindowList || [], elem => {
|
zrUtil.each(data.trainWindowList || [], elem => {
|
||||||
mapDevice[elem.code] = createDevice(deviceType.TrainWindow, elem, propConvert);
|
mapDevice[elem.code] = createDevice(deviceType.TrainWindow, elem, propConvert);
|
||||||
if (elem.sectionCode) {
|
if (elem.sectionCode) {
|
||||||
@ -196,7 +208,7 @@ export function updateMapData(state, model) {
|
|||||||
case deviceType.StationCounter: updateForList(model, state, 'stationCounterList'); break;
|
case deviceType.StationCounter: updateForList(model, state, 'stationCounterList'); break;
|
||||||
case deviceType.ZcControl: updateForList(model, state, 'zcList'); break;
|
case deviceType.ZcControl: updateForList(model, state, 'zcList'); break;
|
||||||
case deviceType.StationDelayUnlock:updateForList(model, state, 'stationDelayUnlockList'); break;
|
case deviceType.StationDelayUnlock:updateForList(model, state, 'stationDelayUnlockList'); break;
|
||||||
case deviceType.LcControl: updateForList(model, state, 'lcControlList'); break;
|
case deviceType.LcControl: updateForList(model, state, 'lcList'); break;
|
||||||
case deviceType.LimitControl: updateForList(model, state, 'tempSpeedLimitList'); break;
|
case deviceType.LimitControl: updateForList(model, state, 'tempSpeedLimitList'); break;
|
||||||
case deviceType.Resource: updateForList(model, state, 'resourceList'); break;
|
case deviceType.Resource: updateForList(model, state, 'resourceList'); break;
|
||||||
case deviceType.Train: updateForList(model, state, 'trainList'); break;
|
case deviceType.Train: updateForList(model, state, 'trainList'); break;
|
||||||
@ -205,6 +217,9 @@ export function updateMapData(state, model) {
|
|||||||
case deviceType.Text: updateForList(model, state, 'textList'); break;
|
case deviceType.Text: updateForList(model, state, 'textList'); break;
|
||||||
case deviceType.Psd: updateForList(model, state, 'psdList'); break;
|
case deviceType.Psd: updateForList(model, state, 'psdList'); break;
|
||||||
case deviceType.Esp: updateForList(model, state, 'espList'); break;
|
case deviceType.Esp: updateForList(model, state, 'espList'); break;
|
||||||
|
case deviceType.MapCycleButtonVO: updateForList(model, state, 'cycleButtonList'); break;
|
||||||
|
case deviceType.OutFrame: updateForList(model, state, 'outFrameList'); break;
|
||||||
|
case deviceType.AutomaticRoute: updateForList(model, state, 'automaticRouteButtonList'); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,8 +94,8 @@ class MenuContextHandler {
|
|||||||
if (control) {
|
if (control) {
|
||||||
if (this.getPrdType() != '') {
|
if (this.getPrdType() != '') {
|
||||||
const type = State2SimulationMap[this.getPrdType()];
|
const type = State2SimulationMap[this.getPrdType()];
|
||||||
// const status = State2ControlMap[control.controlMode]; // 判断当前模式
|
const status = State2ControlMap[control.controlMode]; // 判断当前模式
|
||||||
const status = 'LocalStationControl';
|
// const status = 'LocalStationControl';
|
||||||
menu = [...menuList[type]];
|
menu = [...menuList[type]];
|
||||||
// 特殊处理站台的右键操作( 因为小站台不允许有操作 )
|
// 特殊处理站台的右键操作( 因为小站台不允许有操作 )
|
||||||
if (selected._type == 'StationStand') {
|
if (selected._type == 'StationStand') {
|
||||||
|
@ -286,6 +286,10 @@ export const OperationEvent = {
|
|||||||
stop: {
|
stop: {
|
||||||
operation: '1045',
|
operation: '1045',
|
||||||
domId: '_Tips-Switch-Unlock-Stop'
|
domId: '_Tips-Switch-Unlock-Stop'
|
||||||
|
},
|
||||||
|
choose: {
|
||||||
|
operation: '1046',
|
||||||
|
domId: '_Tips-Switch-Unlock-Choose'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 道岔封闭
|
// 道岔封闭
|
||||||
@ -324,6 +328,10 @@ export const OperationEvent = {
|
|||||||
stop: {
|
stop: {
|
||||||
operation: '1065',
|
operation: '1065',
|
||||||
domId: '_Tips-Switch-Unblock-Stop'
|
domId: '_Tips-Switch-Unblock-Stop'
|
||||||
|
},
|
||||||
|
choose: {
|
||||||
|
operation: '1066',
|
||||||
|
domId: '_Tips-Switch-Unblock-Choose'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 转动
|
// 转动
|
||||||
@ -959,6 +967,10 @@ export const OperationEvent = {
|
|||||||
stop: {
|
stop: {
|
||||||
operation: '4027',
|
operation: '4027',
|
||||||
domId: '_Tips-Section-Fault-Stop'
|
domId: '_Tips-Section-Fault-Stop'
|
||||||
|
},
|
||||||
|
choose: {
|
||||||
|
operation: '4028',
|
||||||
|
domId: '_Tips-Section-Fault-Choose'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 封锁
|
// 封锁
|
||||||
@ -993,6 +1005,10 @@ export const OperationEvent = {
|
|||||||
stop: {
|
stop: {
|
||||||
operation: '4045',
|
operation: '4045',
|
||||||
domId: '_Tips-Section-Unlock-Stop'
|
domId: '_Tips-Section-Unlock-Stop'
|
||||||
|
},
|
||||||
|
choose: {
|
||||||
|
operation: '4046',
|
||||||
|
domId: '_Tips-Section-Unlock-Choose'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 切除
|
// 切除
|
||||||
|
@ -101,8 +101,8 @@ export const translate = {
|
|||||||
{ key: 'overlapSwitchCode', tHeader: '延续保护道岔ID', formatter: (val) => { return val || ''; } },
|
{ key: 'overlapSwitchCode', tHeader: '延续保护道岔ID', formatter: (val) => { return val || ''; } },
|
||||||
{ key: 'overlapSwitchLocateType', tHeader: '延续保护道岔位置类型', formatter: (val) => { return val || ''; } },
|
{ key: 'overlapSwitchLocateType', tHeader: '延续保护道岔位置类型', formatter: (val) => { return val || ''; } },
|
||||||
{ key: 'turnBackSectionCode', tHeader: '折返轨ID', formatter: (val) => { return val || ''; } },
|
{ key: 'turnBackSectionCode', tHeader: '折返轨ID', formatter: (val) => { return val || ''; } },
|
||||||
{ key: 'arc', tHeader: '是否自动追踪/联锁自动触发', formatter: (val) => { return val || false; } },
|
{ key: 'ciControl', tHeader: '是否自动追踪/联锁自动触发', formatter: (val) => { return val || false; } },
|
||||||
{ key: 'flt', tHeader: '是否车队/联锁自动进路', formatter: (val) => { return val || false; } },
|
{ key: 'setFleetMode', tHeader: '是否车队/联锁自动进路', formatter: (val) => { return val || false; } },
|
||||||
{ key: 'delayReleaseTime', tHeader: '延时解锁时间', formatter: (val) => { return val || 0; } }
|
{ key: 'delayReleaseTime', tHeader: '延时解锁时间', formatter: (val) => { return val || 0; } }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -316,6 +316,27 @@ const map = {
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
cycleButtonList: (state) => {
|
||||||
|
if (state.map) {
|
||||||
|
return state.map.cycleButtonList || [];
|
||||||
|
} else {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
outFrameList: (state) => {
|
||||||
|
if (state.map) {
|
||||||
|
return state.map.outFrameList || [];
|
||||||
|
} else {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
automaticRouteButtonList: (state) => {
|
||||||
|
if (state.map) {
|
||||||
|
return state.map.automaticRouteButtonList || [];
|
||||||
|
} else {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
},
|
||||||
resourceList: (state) => {
|
resourceList: (state) => {
|
||||||
if (state.map) {
|
if (state.map) {
|
||||||
return state.map.resourceList;
|
return state.map.resourceList;
|
||||||
|
@ -2,7 +2,7 @@ import store from '@/store';
|
|||||||
import { Notification } from 'element-ui';
|
import { Notification } from 'element-ui';
|
||||||
|
|
||||||
function handle(state, data) {
|
function handle(state, data) {
|
||||||
// console.log(data, 'socket订阅');
|
console.log(data, 'socket订阅');
|
||||||
const msg = data.body;
|
const msg = data.body;
|
||||||
const path = window.location.href;
|
const path = window.location.href;
|
||||||
switch (data.type) {
|
switch (data.type) {
|
||||||
|
@ -38,6 +38,9 @@ export function loadMapDataById(mapId) {
|
|||||||
export function loadNewMapDataByGroup(group) {
|
export function loadNewMapDataByGroup(group) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
getNewMapDataByGroup(group).then(resp => {
|
getNewMapDataByGroup(group).then(resp => {
|
||||||
|
// resp.data.graphDataNew && resp.data.graphDataNew.trainList && resp.data.graphDataNew.trainList.forEach(item => {
|
||||||
|
// item.code = item.groupNumber;
|
||||||
|
// });
|
||||||
const mapData = resp.data.graphDataNew;
|
const mapData = resp.data.graphDataNew;
|
||||||
store.dispatch('map/setMapData', mapData).then(() => {
|
store.dispatch('map/setMapData', mapData).then(() => {
|
||||||
store.dispatch('map/clearJlmapTrainView').then(() => {
|
store.dispatch('map/clearJlmapTrainView').then(() => {
|
||||||
|
@ -10,14 +10,14 @@
|
|||||||
<el-option v-for="item in stationList" :key="item.code" :label="item.name" :value="item.code" />
|
<el-option v-for="item in stationList" :key="item.code" :label="item.name" :value="item.code" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('map.routeArc') + ':'" prop="arc">
|
<el-form-item :label="$t('map.routeArc') + ':'" prop="ciControl">
|
||||||
<el-radio-group v-model="addModel.arc">
|
<el-radio-group v-model="addModel.ciControl">
|
||||||
<el-radio :label="true">{{ $t('map.are') }}</el-radio>
|
<el-radio :label="true">{{ $t('map.are') }}</el-radio>
|
||||||
<el-radio :label="false">{{ $t('map.deny') }}</el-radio>
|
<el-radio :label="false">{{ $t('map.deny') }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('map.routeFlt') + ':'" prop="flt">
|
<el-form-item :label="$t('map.routeFlt') + ':'" prop="setFleetMode">
|
||||||
<el-radio-group v-model="addModel.flt">
|
<el-radio-group v-model="addModel.setFleetMode">
|
||||||
<el-radio :label="true">{{ $t('map.are') }}</el-radio>
|
<el-radio :label="true">{{ $t('map.are') }}</el-radio>
|
||||||
<el-radio :label="false">{{ $t('map.deny') }}</el-radio>
|
<el-radio :label="false">{{ $t('map.deny') }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
@ -313,8 +313,8 @@ export default {
|
|||||||
code: '',
|
code: '',
|
||||||
name: '', // 名字
|
name: '', // 名字
|
||||||
stationCode: '', // 所属站台
|
stationCode: '', // 所属站台
|
||||||
arc: false, // 是否自动追踪/联锁自动触发
|
ciControl: false, // 是否自动追踪/联锁自动触发
|
||||||
flt: false, // 是否车队/联锁自动进路
|
setFleetMode: false, // 是否车队/联锁自动进路
|
||||||
delayReleaseTime: '', // 延时解锁时间
|
delayReleaseTime: '', // 延时解锁时间
|
||||||
turnBack: false, // 是否折返进路
|
turnBack: false, // 是否折返进路
|
||||||
startSignalCode: '', // 始端信号机
|
startSignalCode: '', // 始端信号机
|
||||||
|
@ -10,14 +10,14 @@
|
|||||||
<el-option v-for="item in interBlockStationList" :key="item.code" :label="item.name" :value="item.code" />
|
<el-option v-for="item in interBlockStationList" :key="item.code" :label="item.name" :value="item.code" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('map.routeArc') + ':'" prop="arc">
|
<el-form-item :label="$t('map.routeArc') + ':'" prop="ciControl">
|
||||||
<el-radio-group v-model="addModel.arc">
|
<el-radio-group v-model="addModel.ciControl">
|
||||||
<el-radio :label="true">{{ $t('map.are') }}</el-radio>
|
<el-radio :label="true">{{ $t('map.are') }}</el-radio>
|
||||||
<el-radio :label="false">{{ $t('map.deny') }}</el-radio>
|
<el-radio :label="false">{{ $t('map.deny') }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('map.routeFlt') + ':'" prop="flt">
|
<el-form-item :label="$t('map.routeFlt') + ':'" prop="setFleetMode">
|
||||||
<el-radio-group v-model="addModel.flt">
|
<el-radio-group v-model="addModel.setFleetMode">
|
||||||
<el-radio :label="true">{{ $t('map.are') }}</el-radio>
|
<el-radio :label="true">{{ $t('map.are') }}</el-radio>
|
||||||
<el-radio :label="false">{{ $t('map.deny') }}</el-radio>
|
<el-radio :label="false">{{ $t('map.deny') }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
@ -250,8 +250,8 @@ export default {
|
|||||||
code: '',
|
code: '',
|
||||||
name: '', // 名字
|
name: '', // 名字
|
||||||
stationCode: '', // 所属站台
|
stationCode: '', // 所属站台
|
||||||
arc: false, // 是否自动追踪/联锁自动触发
|
ciControl: false, // 是否自动追踪/联锁自动触发
|
||||||
flt: false, // 是否车队/联锁自动进路
|
setFleetMode: false, // 是否车队/联锁自动进路
|
||||||
lockFirst:false, // 是否先锁闭——办理过程直接先锁闭区段
|
lockFirst:false, // 是否先锁闭——办理过程直接先锁闭区段
|
||||||
delayReleaseTime: '', // 延时解锁时间
|
delayReleaseTime: '', // 延时解锁时间
|
||||||
turnBack: false, // 是否折返进路
|
turnBack: false, // 是否折返进路
|
||||||
|
274
src/views/newMap/newMapdraft/mapoperate/automaticControl.vue
Normal file
274
src/views/newMap/newMapdraft/mapoperate/automaticControl.vue
Normal file
@ -0,0 +1,274 @@
|
|||||||
|
<template>
|
||||||
|
<el-tabs v-model="activeName" class="card" @tab-click="handleClick">
|
||||||
|
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||||
|
<div style="height: calc(100% - 46px);">
|
||||||
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||||
|
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
|
</el-scrollbar>
|
||||||
|
</div>
|
||||||
|
<div class="button_box">
|
||||||
|
<el-button-group class="map-draft-group">
|
||||||
|
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
|
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||||
|
<div style="height: calc(100% - 46px);">
|
||||||
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||||
|
<config-data ref="make" :form="formMake" :form-model="addModel" :rules="createRules" />
|
||||||
|
</el-scrollbar>
|
||||||
|
</div>
|
||||||
|
<div class="button_box">
|
||||||
|
<el-button-group class="map-draft-group">
|
||||||
|
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import { getUID } from '@/jmapNew/utils/Uid';
|
||||||
|
import ConfigList from './config/list';
|
||||||
|
import ConfigData from './config/data';
|
||||||
|
import { deepAssign } from '@/utils/index';
|
||||||
|
import { getAutoReentryList} from '@/api/jmap/mapdraft';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'MapCycleButtonVO',
|
||||||
|
components: {
|
||||||
|
ConfigList,
|
||||||
|
ConfigData
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
selected: {
|
||||||
|
type: Object,
|
||||||
|
default: function () {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeName: 'first',
|
||||||
|
autoList: [],
|
||||||
|
editModel: {
|
||||||
|
code: '',
|
||||||
|
name: '',
|
||||||
|
subtitleName: '', //副标题
|
||||||
|
cycleCode: '', // 关联自动折返code
|
||||||
|
position: {
|
||||||
|
x: 0,
|
||||||
|
y: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
addModel: {
|
||||||
|
code: '',
|
||||||
|
name: '',
|
||||||
|
subtitleName: '', // 副标题
|
||||||
|
cycleCode: '', // 关联自动折返code
|
||||||
|
position: {
|
||||||
|
x: 0,
|
||||||
|
y: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
code: [
|
||||||
|
{ required: true, message: this.$t('rules.pleaseSelectEncoding'), trigger: 'change' }
|
||||||
|
],
|
||||||
|
name: [
|
||||||
|
{ required: true, message: this.$t('rules.pleaseEnterStatusSignal'), trigger: 'blur' }
|
||||||
|
],
|
||||||
|
cycleCode:[
|
||||||
|
{ required: true, message: this.$t('rules.selectConcentrateStation'), trigger: 'change' }
|
||||||
|
],
|
||||||
|
'position.x': [
|
||||||
|
{ required: true, message: this.$t('rules.trainPositionX'), trigger: 'blur' }
|
||||||
|
],
|
||||||
|
'position.y': [
|
||||||
|
{ required: true, message: this.$t('rules.trainPositionY'), trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('map', [
|
||||||
|
'cycleButtonList'
|
||||||
|
]),
|
||||||
|
form() {
|
||||||
|
const form = {
|
||||||
|
labelWidth: '150px',
|
||||||
|
items: {
|
||||||
|
code: {
|
||||||
|
name: '',
|
||||||
|
item: []
|
||||||
|
},
|
||||||
|
draw: {
|
||||||
|
name: this.$t('map.drawData'),
|
||||||
|
item: [
|
||||||
|
{ prop: 'code', label: `${this.$t('map.code')}`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.cycleButtonList, change: true, deviceChange: this.deviceChange },
|
||||||
|
{ prop: 'name', label: '标题名称:', type: 'input' },
|
||||||
|
{ prop: 'subtitleName', label: '副标题名称:', type: 'input' },
|
||||||
|
{ prop: 'position', label: '坐标:', type: 'coordinate', width: '140px', children: [
|
||||||
|
{ 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:'cycleCode', label: '自动折返进路code:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.autoList },
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return form;
|
||||||
|
},
|
||||||
|
formMake() {
|
||||||
|
const form = {
|
||||||
|
labelWidth: '150px',
|
||||||
|
items: [
|
||||||
|
{ prop:'cycleCode', label: '自动折返进路:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.autoList },
|
||||||
|
{ prop: 'name', label: '自动折返名称:', type: 'input' },
|
||||||
|
{ prop: 'subtitleName', label: '副标题名称:', type: 'input' },
|
||||||
|
{ prop: 'position', label: '坐标:', 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' }
|
||||||
|
] },
|
||||||
|
|
||||||
|
]
|
||||||
|
};
|
||||||
|
return form;
|
||||||
|
},
|
||||||
|
createRules: function () {
|
||||||
|
return {
|
||||||
|
cycleCode: [
|
||||||
|
{ required: true, message: '请选择自动折返进路', trigger: 'change' }
|
||||||
|
],
|
||||||
|
name: [
|
||||||
|
{ required: true, message: '请输入名称', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
'position.x': [
|
||||||
|
{ required: true, message: this.$t('rules.trainPositionX'), trigger: 'blur' }
|
||||||
|
],
|
||||||
|
'position.y': [
|
||||||
|
{ required: true, message: this.$t('rules.trainPositionY'), trigger: 'blur' }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
selected(val, oldVal) {
|
||||||
|
this.deviceSelect(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getAutoMaticList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
deviceChange(code) {
|
||||||
|
this.$emit('setCenter', code);
|
||||||
|
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||||
|
},
|
||||||
|
handleClick() {
|
||||||
|
this.getAutoMaticList();
|
||||||
|
},
|
||||||
|
deviceSelect(selected) {
|
||||||
|
this.$refs.dataform.resetFields();
|
||||||
|
this.$refs.make.resetFields();
|
||||||
|
if (selected && selected._type.toUpperCase() === 'MapCycleButtonVO'.toUpperCase()) {
|
||||||
|
this.activeName = 'first';
|
||||||
|
this.editModel = deepAssign(this.editModel, selected);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getAutoMaticList() {
|
||||||
|
const params = {
|
||||||
|
pageSize: 9999,
|
||||||
|
pageNum: 1
|
||||||
|
};
|
||||||
|
const resp = await getAutoReentryList(this.$route.params.mapId, params);
|
||||||
|
this.autoList = resp.data.list;
|
||||||
|
},
|
||||||
|
// 创建对象
|
||||||
|
create() {
|
||||||
|
this.$refs.make.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const uid = getUID('MapCycleButtonVO', this.cycleButtonList);
|
||||||
|
let models = [];
|
||||||
|
const model = {
|
||||||
|
_type: 'MapCycleButtonVO',
|
||||||
|
code: uid,
|
||||||
|
name: this.addModel.name,
|
||||||
|
subtitleName: this.addModel.subtitleName,
|
||||||
|
position: {
|
||||||
|
x: this.addModel.position.x,
|
||||||
|
y: this.addModel.position.y
|
||||||
|
},
|
||||||
|
cycleCode:this.addModel.cycleCode
|
||||||
|
};
|
||||||
|
models.push(model);
|
||||||
|
this.$emit('updateMapModel', models);
|
||||||
|
this.$refs.make.resetForm();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 修改对象
|
||||||
|
edit() {
|
||||||
|
this.$refs['dataform'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const data = Object.assign({_type: 'MapCycleButtonVO'}, this.editModel);
|
||||||
|
let models = [data];
|
||||||
|
this.$emit('updateMapModel', models);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 删除对象
|
||||||
|
deleteObj() {
|
||||||
|
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||||
|
if (selected && selected._type.toUpperCase() === 'MapCycleButtonVO'.toUpperCase()) {
|
||||||
|
const _that = this;
|
||||||
|
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||||
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
|
cancelButtonText: this.$t('tip.cancel'),
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||||
|
_that.deviceSelect();
|
||||||
|
}).catch(() => {
|
||||||
|
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
@import "src/styles/mixin.scss";
|
||||||
|
.view-control{
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.coordinate {
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
text-align: right;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #606266;
|
||||||
|
line-height: 40px;
|
||||||
|
padding: 0 12px 0 0;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
line-height: 28px;
|
||||||
|
width: 160px;
|
||||||
|
font-weight: bold;
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.map-draft-group {
|
||||||
|
color: #3E44BE;
|
||||||
|
}
|
||||||
|
</style>
|
274
src/views/newMap/newMapdraft/mapoperate/automaticRoute.vue
Normal file
274
src/views/newMap/newMapdraft/mapoperate/automaticRoute.vue
Normal file
@ -0,0 +1,274 @@
|
|||||||
|
<template>
|
||||||
|
<el-tabs v-model="activeName" class="card" @tab-click="handleClick">
|
||||||
|
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||||
|
<div style="height: calc(100% - 46px);">
|
||||||
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||||
|
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
|
</el-scrollbar>
|
||||||
|
</div>
|
||||||
|
<div class="button_box">
|
||||||
|
<el-button-group class="map-draft-group">
|
||||||
|
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
|
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||||
|
<div style="height: calc(100% - 46px);">
|
||||||
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||||
|
<config-data ref="make" :form="formMake" :form-model="addModel" :rules="createRules" />
|
||||||
|
</el-scrollbar>
|
||||||
|
</div>
|
||||||
|
<div class="button_box">
|
||||||
|
<el-button-group class="map-draft-group">
|
||||||
|
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import { getUID } from '@/jmapNew/utils/Uid';
|
||||||
|
import ConfigList from './config/list';
|
||||||
|
import ConfigData from './config/data';
|
||||||
|
import { deepAssign } from '@/utils/index';
|
||||||
|
import { getRouteNewList} from '@/api/jmap/mapdraft';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'AutoMaticRoute',
|
||||||
|
components: {
|
||||||
|
ConfigList,
|
||||||
|
ConfigData
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
selected: {
|
||||||
|
type: Object,
|
||||||
|
default: function () {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeName: 'first',
|
||||||
|
autoList: [],
|
||||||
|
editModel: {
|
||||||
|
code: '',
|
||||||
|
name: '',
|
||||||
|
automaticRouteCode: '', // 关联自动进路code
|
||||||
|
position: {
|
||||||
|
x: 0,
|
||||||
|
y: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
addModel: {
|
||||||
|
code: '',
|
||||||
|
name: '',
|
||||||
|
automaticRouteCode: '', // 关联自动进路code
|
||||||
|
position: {
|
||||||
|
x: 0,
|
||||||
|
y: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
code: [
|
||||||
|
{ required: true, message: this.$t('rules.pleaseSelectEncoding'), trigger: 'change' }
|
||||||
|
],
|
||||||
|
name: [
|
||||||
|
{ required: true, message: this.$t('rules.pleaseEnterStatusSignal'), trigger: 'blur' }
|
||||||
|
],
|
||||||
|
automaticRouteCode:[
|
||||||
|
{ required: true, message: this.$t('rules.selectConcentrateStation'), trigger: 'change' }
|
||||||
|
],
|
||||||
|
'position.x': [
|
||||||
|
{ required: true, message: this.$t('rules.trainPositionX'), trigger: 'blur' }
|
||||||
|
],
|
||||||
|
'position.y': [
|
||||||
|
{ required: true, message: this.$t('rules.trainPositionY'), trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('map', [
|
||||||
|
'automaticRouteButtonList'
|
||||||
|
]),
|
||||||
|
form() {
|
||||||
|
const form = {
|
||||||
|
labelWidth: '150px',
|
||||||
|
items: {
|
||||||
|
code: {
|
||||||
|
name: '',
|
||||||
|
item: []
|
||||||
|
},
|
||||||
|
draw: {
|
||||||
|
name: this.$t('map.drawData'),
|
||||||
|
item: [
|
||||||
|
{ prop: 'code', label: `${this.$t('map.code')}`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.automaticRouteButtonList, change: true, deviceChange: this.deviceChange },
|
||||||
|
{ prop: 'name', label: '标题名称:', type: 'input' },
|
||||||
|
{ prop: 'position', label: '坐标:', type: 'coordinate', width: '140px', children: [
|
||||||
|
{ 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:'automaticRouteCode', label: '自动进路code:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.autoList },
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return form;
|
||||||
|
},
|
||||||
|
formMake() {
|
||||||
|
const form = {
|
||||||
|
labelWidth: '150px',
|
||||||
|
items: [
|
||||||
|
{ prop:'automaticRouteCode', label: '自动进路:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.autoList },
|
||||||
|
{ prop: 'name', label: '自动进路名称:', type: 'input' },
|
||||||
|
{ prop: 'position', label: '坐标:', 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' }
|
||||||
|
] }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
return form;
|
||||||
|
},
|
||||||
|
createRules: function () {
|
||||||
|
return {
|
||||||
|
automaticRouteCode: [
|
||||||
|
{ required: true, message: '请选择自动进路', trigger: 'change' }
|
||||||
|
],
|
||||||
|
name: [
|
||||||
|
{ required: true, message: '请输入名称', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
'position.x': [
|
||||||
|
{ required: true, message: this.$t('rules.trainPositionX'), trigger: 'blur' }
|
||||||
|
],
|
||||||
|
'position.y': [
|
||||||
|
{ required: true, message: this.$t('rules.trainPositionY'), trigger: 'blur' }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
selected(val, oldVal) {
|
||||||
|
this.deviceSelect(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getAutoMaticList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
deviceChange(code) {
|
||||||
|
this.$emit('setCenter', code);
|
||||||
|
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||||
|
},
|
||||||
|
handleClick() {
|
||||||
|
this.getAutoMaticList();
|
||||||
|
},
|
||||||
|
deviceSelect(selected) {
|
||||||
|
this.$refs.dataform.resetFields();
|
||||||
|
this.$refs.make.resetFields();
|
||||||
|
if (selected && selected._type.toUpperCase() === 'AutomaticRoute'.toUpperCase()) {
|
||||||
|
this.activeName = 'first';
|
||||||
|
this.editModel = deepAssign(this.editModel, selected);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getAutoMaticList() {
|
||||||
|
const params = {
|
||||||
|
pageSize: 9999,
|
||||||
|
pageNum: 1
|
||||||
|
};
|
||||||
|
const resp = await getRouteNewList(this.$route.params.mapId, params);
|
||||||
|
this.autoList = [];
|
||||||
|
resp.data && resp.data.list && resp.data.list.forEach(elem => {
|
||||||
|
if (elem.flt) {
|
||||||
|
this.autoList.push(elem);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 创建对象
|
||||||
|
create() {
|
||||||
|
this.$refs.make.validate((valid) => {
|
||||||
|
console.log(valid, this.addModel, this.editModel);
|
||||||
|
if (valid) {
|
||||||
|
const uid = getUID('AutomaticRoute', this.automaticRouteButtonList);
|
||||||
|
let models = [];
|
||||||
|
const model = {
|
||||||
|
_type: 'AutomaticRoute',
|
||||||
|
code: uid,
|
||||||
|
name: this.addModel.name,
|
||||||
|
position: {
|
||||||
|
x: this.addModel.position.x,
|
||||||
|
y: this.addModel.position.y
|
||||||
|
},
|
||||||
|
automaticRouteCode:this.addModel.automaticRouteCode
|
||||||
|
};
|
||||||
|
models.push(model, '=-----');
|
||||||
|
this.$emit('updateMapModel', models);
|
||||||
|
this.$refs.make.resetForm();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 修改对象
|
||||||
|
edit() {
|
||||||
|
this.$refs['dataform'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const data = Object.assign({_type: 'AutomaticRoute'}, this.editModel);
|
||||||
|
let models = [data];
|
||||||
|
this.$emit('updateMapModel', models);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 删除对象
|
||||||
|
deleteObj() {
|
||||||
|
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||||
|
if (selected && selected._type.toUpperCase() === 'AutomacticRoute'.toUpperCase()) {
|
||||||
|
const _that = this;
|
||||||
|
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||||
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
|
cancelButtonText: this.$t('tip.cancel'),
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||||
|
_that.deviceSelect();
|
||||||
|
}).catch(() => {
|
||||||
|
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
@import "src/styles/mixin.scss";
|
||||||
|
.view-control{
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.coordinate {
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
text-align: right;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #606266;
|
||||||
|
line-height: 40px;
|
||||||
|
padding: 0 12px 0 0;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
line-height: 28px;
|
||||||
|
width: 160px;
|
||||||
|
font-weight: bold;
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.map-draft-group {
|
||||||
|
color: #3E44BE;
|
||||||
|
}
|
||||||
|
</style>
|
@ -92,6 +92,22 @@
|
|||||||
@setCenter="setCenter"
|
@setCenter="setCenter"
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="自动折返" class="tab_pane_box" name="MapCycleButtonVO">
|
||||||
|
<automatic-control-draft
|
||||||
|
ref="MapCycleButtonVO"
|
||||||
|
:selected="selected"
|
||||||
|
@updateMapModel="updateMapModel"
|
||||||
|
@setCenter="setCenter"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="自动进路" class="tab_pane_box" name="AutomacticRoute">
|
||||||
|
<automatic-route
|
||||||
|
ref="AutomacticRoute"
|
||||||
|
:selected="selected"
|
||||||
|
@updateMapModel="updateMapModel"
|
||||||
|
@setCenter="setCenter"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
<el-tab-pane :label="$t('map.train')" class="tab_pane_box" name="Train">
|
<el-tab-pane :label="$t('map.train')" class="tab_pane_box" name="Train">
|
||||||
<train-draft
|
<train-draft
|
||||||
ref="Train"
|
ref="Train"
|
||||||
@ -132,6 +148,14 @@
|
|||||||
@setCenter="setCenter"
|
@setCenter="setCenter"
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="矩形框" class="tab_pane_box" name="OutFrame">
|
||||||
|
<out-frame-draft
|
||||||
|
ref="OutFrame"
|
||||||
|
:selected="selected"
|
||||||
|
@updateMapModel="updateMapModel"
|
||||||
|
@setCenter="setCenter"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
<el-tab-pane :label="$t('map.image')" class="tab_pane_box" name="Resource">
|
<el-tab-pane :label="$t('map.image')" class="tab_pane_box" name="Resource">
|
||||||
<Image-control-draft
|
<Image-control-draft
|
||||||
ref="Resource"
|
ref="Resource"
|
||||||
@ -167,6 +191,9 @@ import LineDraft from './line';
|
|||||||
import TextDraft from './text';
|
import TextDraft from './text';
|
||||||
import TrainWindowDraft from './trainwindow';
|
import TrainWindowDraft from './trainwindow';
|
||||||
import ZcControlDraft from './zcControl';
|
import ZcControlDraft from './zcControl';
|
||||||
|
import AutomaticControlDraft from './automaticControl';
|
||||||
|
import OutFrameDraft from './outFrameControl';
|
||||||
|
import AutomaticRoute from './automaticRoute';
|
||||||
import LimitControlDraft from './limitControl';
|
import LimitControlDraft from './limitControl';
|
||||||
import LcControlDraft from './lcControl';
|
import LcControlDraft from './lcControl';
|
||||||
import ImageControlDraft from './ImageControl';
|
import ImageControlDraft from './ImageControl';
|
||||||
@ -191,10 +218,13 @@ export default {
|
|||||||
LineDraft,
|
LineDraft,
|
||||||
TextDraft,
|
TextDraft,
|
||||||
ZcControlDraft,
|
ZcControlDraft,
|
||||||
|
AutomaticControlDraft,
|
||||||
|
OutFrameDraft,
|
||||||
LimitControlDraft,
|
LimitControlDraft,
|
||||||
LcControlDraft,
|
LcControlDraft,
|
||||||
ImageControlDraft,
|
ImageControlDraft,
|
||||||
CheckboxDraft
|
CheckboxDraft,
|
||||||
|
AutomaticRoute
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
|
319
src/views/newMap/newMapdraft/mapoperate/outFrameControl.vue
Normal file
319
src/views/newMap/newMapdraft/mapoperate/outFrameControl.vue
Normal file
@ -0,0 +1,319 @@
|
|||||||
|
<template>
|
||||||
|
<el-tabs v-model="activeName" class="card">
|
||||||
|
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||||
|
<div style="height: calc(100% - 46px);">
|
||||||
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||||
|
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
|
</el-scrollbar>
|
||||||
|
</div>
|
||||||
|
<el-button-group class="map-draft-group">
|
||||||
|
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
|
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||||
|
<div style="height: calc(100% - 46px);">
|
||||||
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||||
|
<config-list ref="make" :form="makeForm" :form-model="addModel" :rules="rules" />
|
||||||
|
<!-- <el-form ref="make" label-width="120px" :model="addModel" size="mini" :rules="makeRules">
|
||||||
|
<el-form-item :label="$t('map.lineType')" prop="type">
|
||||||
|
<el-select v-model="addModel.type" filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in LineTypeList"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('map.lineWidth')" prop="width">
|
||||||
|
<el-input-number v-model="addModel.width" :min="1" />px
|
||||||
|
</el-form-item>
|
||||||
|
<div class="coordinate">
|
||||||
|
<span class="title">{{ $t('map.linePoint') }}</span>
|
||||||
|
<div class="point-section">
|
||||||
|
<template v-for="(point, index) in addModel.points">
|
||||||
|
<div :key="index" style="overflow: hidden;">
|
||||||
|
<el-form-item
|
||||||
|
label=""
|
||||||
|
:prop="'points[' + index + '].x'"
|
||||||
|
style="display: table; float: left;"
|
||||||
|
label-width="0px"
|
||||||
|
>
|
||||||
|
<el-input-number v-model="point.x" />
|
||||||
|
</el-form-item>
|
||||||
|
<span style="display: table; margin-left: 8px; float: left; line-height: 28px;">
|
||||||
|
, </span>
|
||||||
|
<el-form-item
|
||||||
|
label=""
|
||||||
|
:prop="'points[' + index + '].y'"
|
||||||
|
style="display: table; float: left; margin-right: 5px;"
|
||||||
|
label-width="10px"
|
||||||
|
>
|
||||||
|
<el-input-number v-model="point.y" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-button
|
||||||
|
icon="el-icon-plus"
|
||||||
|
circle
|
||||||
|
class="point-button"
|
||||||
|
@click="addPoint(addModel.points, index)"
|
||||||
|
/>
|
||||||
|
<el-button
|
||||||
|
icon="el-icon-minus"
|
||||||
|
:disabled="index == 0 || index == addModel.points.length - 1"
|
||||||
|
circle
|
||||||
|
class="point-button"
|
||||||
|
@click="delPoint(addModel.points, index)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-form> -->
|
||||||
|
</el-scrollbar>
|
||||||
|
</div>
|
||||||
|
<el-button-group class="map-draft-group">
|
||||||
|
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import { getUID } from '@/jmapNew/utils/Uid';
|
||||||
|
import ConfigList from './config/list';
|
||||||
|
import { deepAssign } from '@/utils/index';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'StationStandDraft',
|
||||||
|
components: {
|
||||||
|
ConfigList
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
selected: {
|
||||||
|
type: Object,
|
||||||
|
default: function () {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeName: 'first',
|
||||||
|
LineTypeList: [],
|
||||||
|
editModel: {
|
||||||
|
code: '',
|
||||||
|
width: 1,
|
||||||
|
height: 1,
|
||||||
|
position: {
|
||||||
|
x: 0,
|
||||||
|
y: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
addModel: {
|
||||||
|
code: '',
|
||||||
|
width: 200,
|
||||||
|
height: 100,
|
||||||
|
position: {
|
||||||
|
x: 0,
|
||||||
|
y: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
code: [
|
||||||
|
{ required: true, message: this.$t('rules.pleaseSelectLine'), trigger: 'blur' }
|
||||||
|
],
|
||||||
|
type: [
|
||||||
|
{ required: true, message: this.$t('rules.pleaseSelectLineType'), trigger: 'blur' }
|
||||||
|
],
|
||||||
|
width: [
|
||||||
|
{ required: true, message: this.$t('rules.pleaseSelectLineWidth'), trigger: 'blur' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
makeRules: {
|
||||||
|
code: [
|
||||||
|
{ required: true, message: this.$t('rules.pleaseSelectLine'), trigger: 'blur' }
|
||||||
|
],
|
||||||
|
type: [
|
||||||
|
{ required: true, message: this.$t('rules.pleaseSelectLineType'), trigger: 'blur' }
|
||||||
|
],
|
||||||
|
width: [
|
||||||
|
{ required: true, message: this.$t('rules.pleaseSelectLineWidth'), trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('map', [
|
||||||
|
'outFrameList'
|
||||||
|
]),
|
||||||
|
form() {
|
||||||
|
const form = {
|
||||||
|
labelWidth: '120px',
|
||||||
|
items: {
|
||||||
|
draw: {
|
||||||
|
name: this.$t('map.drawData'),
|
||||||
|
item: [
|
||||||
|
{ prop: 'code', label: this.$t('map.lineCoding'), type: 'select', optionLabel: 'code', optionValue: 'code', options: this.outFrameList, change: true, deviceChange: this.deviceChange },
|
||||||
|
{ prop: 'width', label: '宽度:', type: 'number', min: 1, placeholder: 'px' },
|
||||||
|
{ prop: 'height', label: '高度:', type: 'number', min: 1, placeholder: 'px' },
|
||||||
|
{ prop: 'position', label: '坐标:', type: 'coordinate', width: '140px', children: [
|
||||||
|
{ 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' }
|
||||||
|
] },
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return form;
|
||||||
|
},
|
||||||
|
makeForm() {
|
||||||
|
return {
|
||||||
|
labelWidth: '120px',
|
||||||
|
items: {
|
||||||
|
draw: {
|
||||||
|
name: this.$t('map.drawData'),
|
||||||
|
item: [
|
||||||
|
{ prop: 'width', label: '宽度:', type: 'number', min: 1, placeholder: 'px' },
|
||||||
|
{ prop: 'height', label: '高度:', type: 'number', min: 1, placeholder: 'px' },
|
||||||
|
{ prop: 'position', label: '坐标:', type: 'coordinate', width: '110px', children: [
|
||||||
|
{ 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' }
|
||||||
|
] },
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
isPointsShow() {
|
||||||
|
return this.editModel.points.length > 0;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
selected(val, oldVal) {
|
||||||
|
this.deviceSelect(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$Dictionary.lineType().then(list => {
|
||||||
|
this.LineTypeList = list;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
deviceChange(code) {
|
||||||
|
this.$emit('setCenter', code);
|
||||||
|
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||||
|
},
|
||||||
|
deviceSelect(selected) {
|
||||||
|
this.$refs.form.resetFields();
|
||||||
|
this.$refs.make.resetFields();
|
||||||
|
if (selected && selected._type.toUpperCase() === 'OutFrame'.toUpperCase()) {
|
||||||
|
this.activeName = 'first';
|
||||||
|
this.editModel = deepAssign(this.editModel, selected);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
addPoint(index) {
|
||||||
|
const data = { x: 0, y: 0 };
|
||||||
|
this.editModel.points.splice(index + 1, 0, data);
|
||||||
|
},
|
||||||
|
delPoint(index) {
|
||||||
|
this.editModel.points.splice(index + 1, 0);
|
||||||
|
},
|
||||||
|
create() {
|
||||||
|
this.$refs['make'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const model = {
|
||||||
|
_type: 'OutFrame',
|
||||||
|
code: getUID('OutFrame', this.outFrameList),
|
||||||
|
width: this.addModel.width,
|
||||||
|
height: this.addModel.height,
|
||||||
|
position: this.addModel.position
|
||||||
|
};
|
||||||
|
this.$emit('updateMapModel', model);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 修改对象
|
||||||
|
edit() {
|
||||||
|
this.$refs['form'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const data = Object.assign({_type: 'OutFrame'}, this.editModel);
|
||||||
|
this.$emit('updateMapModel', data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 删除对象
|
||||||
|
deleteObj() {
|
||||||
|
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||||
|
if (selected && selected._type.toUpperCase() === 'OutFrame'.toUpperCase()) {
|
||||||
|
const _that = this;
|
||||||
|
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||||
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
|
cancelButtonText: this.$t('tip.cancel'),
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||||
|
_that.deviceSelect();
|
||||||
|
}).catch(() => {
|
||||||
|
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
@import "src/styles/mixin.scss";
|
||||||
|
.view-control{
|
||||||
|
height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
.card {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.coordinate {
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
text-align: right;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #606266;
|
||||||
|
line-height: 40px;
|
||||||
|
padding: 0 12px 0 0;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
line-height: 28px;
|
||||||
|
width: 120px;
|
||||||
|
font-weight: bold;
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.point-section {
|
||||||
|
float: left;
|
||||||
|
width: calc(100% - 120px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.point-button {
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
float: left;
|
||||||
|
|
||||||
|
/deep/ {
|
||||||
|
.el-icon-plus,
|
||||||
|
.el-icon-minus {
|
||||||
|
transform: translateY(-5px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-input-number--mini {
|
||||||
|
width: 110px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -397,7 +397,6 @@ export default {
|
|||||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||||
},
|
},
|
||||||
deviceSelect(selected) {
|
deviceSelect(selected) {
|
||||||
console.log(selected, '===========');
|
|
||||||
// 判断是否激活选择站台
|
// 判断是否激活选择站台
|
||||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||||
if (this.field === 'leftSection') {
|
if (this.field === 'leftSection') {
|
||||||
|
@ -125,6 +125,8 @@ export default {
|
|||||||
// controlled:false,
|
// controlled:false,
|
||||||
createControlMode:false,
|
createControlMode:false,
|
||||||
createTurnBack:false,
|
createTurnBack:false,
|
||||||
|
guideTotalLock: false,
|
||||||
|
guideTotalLockPoint: {x: 0, y: 0},
|
||||||
turnBackPoint: {x: 0, y: 0}, // 按图折返坐标
|
turnBackPoint: {x: 0, y: 0}, // 按图折返坐标
|
||||||
controlModePoint: { x: 0, y: 0 } // 控制模式坐标
|
controlModePoint: { x: 0, y: 0 } // 控制模式坐标
|
||||||
},
|
},
|
||||||
@ -198,6 +200,11 @@ export default {
|
|||||||
{ prop: 'turnBackPoint', label: '按图折返坐标:', type: 'coordinate', width: '120px', isHidden: !this.isPointsShow, children: [
|
{ prop: 'turnBackPoint', label: '按图折返坐标:', type: 'coordinate', width: '120px', isHidden: !this.isPointsShow, children: [
|
||||||
{ prop: 'turnBackPoint.x', firstLevel: 'turnBackPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
{ prop: 'turnBackPoint.x', firstLevel: 'turnBackPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||||
{ prop: 'turnBackPoint.y', firstLevel: 'turnBackPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
{ prop: 'turnBackPoint.y', firstLevel: 'turnBackPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||||
|
] },
|
||||||
|
{ prop: 'guideTotalLock', label: '引导总锁:', type: 'checkbox'},
|
||||||
|
{ prop: 'guideTotalLockPoint', label: '引导总锁坐标:', type: 'coordinate', width: '120px', isHidden: !this.isGuidePointsShow, children: [
|
||||||
|
{ prop: 'guideTotalLockPoint.x', firstLevel: 'guideTotalLockPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||||
|
{ prop: 'guideTotalLockPoint.y', firstLevel: 'guideTotalLockPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||||
] }
|
] }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -247,6 +254,9 @@ export default {
|
|||||||
isPointsShow() {
|
isPointsShow() {
|
||||||
return this.editModel.createTurnBack;
|
return this.editModel.createTurnBack;
|
||||||
},
|
},
|
||||||
|
isGuidePointsShow() {
|
||||||
|
return this.editModel.guideTotalLock;
|
||||||
|
},
|
||||||
isZcCode() {
|
isZcCode() {
|
||||||
return this.editModel.centralized;
|
return this.editModel.centralized;
|
||||||
}
|
}
|
||||||
@ -394,6 +404,8 @@ export default {
|
|||||||
// controlled: false,
|
// controlled: false,
|
||||||
chargeStationCodeList:[],
|
chargeStationCodeList:[],
|
||||||
createControlMode: item.control,
|
createControlMode: item.control,
|
||||||
|
guideTotalLock: false,
|
||||||
|
guideTotalLockPoint: {x: 0, y: 0},
|
||||||
createTurnBack: false,
|
createTurnBack: false,
|
||||||
turnBackPoint: {x: 0, y: 0} // 按图折返坐标
|
turnBackPoint: {x: 0, y: 0} // 按图折返坐标
|
||||||
};
|
};
|
||||||
|
@ -74,7 +74,15 @@ export default {
|
|||||||
inside: false, // 内外站台显示
|
inside: false, // 内外站台显示
|
||||||
right: true,
|
right: true,
|
||||||
standTrackCode: '',
|
standTrackCode: '',
|
||||||
small: false
|
small: false,
|
||||||
|
stopJumpLamp: false, // 跳停功能按钮
|
||||||
|
stopJumpLampPoint: {x: 0, y: 0}, // 跳停功能按钮坐标
|
||||||
|
cancelStopJumpLamp: false, // 取消跳停功能按钮
|
||||||
|
cancelStopJumpLampPoint: {x: 0, y: 0}, // 取消跳停功能按钮坐标
|
||||||
|
upDetainLamp: false, // 上行扣车功能按钮
|
||||||
|
upDetainLampPoint: {x: 0, y: 0}, // 上行扣车功能按钮坐标
|
||||||
|
downDetainLamp: false, // 下行扣车功能按钮
|
||||||
|
downDetainLampPoint: {x: 0, y: 0} // 下行扣车功能按钮坐标
|
||||||
// direction: '' // 上下行方向
|
// direction: '' // 上下行方向
|
||||||
},
|
},
|
||||||
field: '',
|
field: '',
|
||||||
@ -90,7 +98,15 @@ export default {
|
|||||||
stationstandDirection: '02', // 屏蔽门方向
|
stationstandDirection: '02', // 屏蔽门方向
|
||||||
right: true,
|
right: true,
|
||||||
inside: false, // 内外站台
|
inside: false, // 内外站台
|
||||||
small: false
|
small: false,
|
||||||
|
stopJumpLamp: false, // 跳停功能按钮
|
||||||
|
stopJumpLampPoint: {x: 0, y: 0}, // 跳停功能按钮坐标
|
||||||
|
cancelStopJumpLamp: false, // 取消跳停功能按钮
|
||||||
|
cancelStopJumpLampPoint: {x: 0, y: 0}, // 取消跳停功能按钮坐标
|
||||||
|
upDetainLamp: false, // 上行扣车功能按钮
|
||||||
|
upDetainLampPoint: {x: 0, y: 0}, // 上行扣车功能按钮坐标
|
||||||
|
downDetainLamp: false, // 下行扣车功能按钮
|
||||||
|
downDetainLampPoint: {x: 0, y: 0} // 下行扣车功能按钮坐标
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -125,7 +141,27 @@ export default {
|
|||||||
{ prop: 'standTrackCode', label: '站台轨:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList, hover: this.hover, buttonType: 'editSectionSelectCode', buttonShowType: this.isButtonTypeES },
|
{ prop: 'standTrackCode', label: '站台轨:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList, hover: this.hover, buttonType: 'editSectionSelectCode', buttonShowType: this.isButtonTypeES },
|
||||||
{ prop: 'right', label: '行驶方向:', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isRightList },
|
{ prop: 'right', label: '行驶方向:', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isRightList },
|
||||||
{ prop: 'small', label: '是否小型站台:', type: 'checkbox', disabled: true },
|
{ prop: 'small', label: '是否小型站台:', type: 'checkbox', disabled: true },
|
||||||
{ prop: 'inside', label: '是否内站台:', type: 'checkbox' }
|
{ prop: 'inside', label: '是否内站台:', type: 'checkbox' },
|
||||||
|
{ prop: 'stopJumpLamp', label: '跳停按钮:', type: 'checkbox'},
|
||||||
|
{ prop: 'stopJumpLampPoint', label: '跳停按钮坐标:', type: 'coordinate', width: '120px', isHidden: !this.isStopJumpPointsShow, children: [
|
||||||
|
{ prop: 'stopJumpLampPoint.x', firstLevel: 'stopJumpLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||||
|
{ prop: 'stopJumpLampPoint.y', firstLevel: 'stopJumpLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||||
|
] },
|
||||||
|
{ prop: 'cancelStopJumpLamp', label: '取消跳停按钮:', type: 'checkbox'},
|
||||||
|
{ prop: 'cancelStopJumpLampPoint', label: '取消跳停按钮坐标:', type: 'coordinate', width: '120px', isHidden: !this.isCancelStopJumpPointsShow, children: [
|
||||||
|
{ prop: 'cancelStopJumpLampPoint.x', firstLevel: 'cancelStopJumpLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||||
|
{ prop: 'cancelStopJumpLampPoint.y', firstLevel: 'cancelStopJumpLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||||
|
] },
|
||||||
|
{ prop: 'upDetainLamp', label: '上行扣车按钮:', type: 'checkbox'},
|
||||||
|
{ prop: 'upDetainLampPoint', label: '上行扣车按钮坐标:', type: 'coordinate', width: '120px', isHidden: !this.isUpDetainPointsShow, children: [
|
||||||
|
{ prop: 'upDetainLampPoint.x', firstLevel: 'upDetainLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||||
|
{ prop: 'upDetainLampPoint.y', firstLevel: 'upDetainLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||||
|
] },
|
||||||
|
{ prop: 'downDetainLamp', label: '下行扣车按钮:', type: 'checkbox'},
|
||||||
|
{ prop: 'downDetainLampPoint', label: '下行扣车坐标:', type: 'coordinate', width: '120px', isHidden: !this.isDownDetainPointsShow, children: [
|
||||||
|
{ prop: 'downDetainLampPoint.x', firstLevel: 'downDetainLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||||
|
{ prop: 'downDetainLampPoint.y', firstLevel: 'downDetainLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||||
|
] }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
map: {
|
map: {
|
||||||
@ -188,7 +224,27 @@ export default {
|
|||||||
{ prop: 'standTrackCode', label: '站台轨:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList, hover: this.hover, buttonType: 'sectionSelectCode', buttonShowType: this.isButtonTypeS },
|
{ prop: 'standTrackCode', label: '站台轨:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList, hover: this.hover, buttonType: 'sectionSelectCode', buttonShowType: this.isButtonTypeS },
|
||||||
{ prop: 'right', label: '行驶方向:', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isRightList },
|
{ prop: 'right', label: '行驶方向:', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isRightList },
|
||||||
{ prop: 'small', label: '是否小型站台:', type: 'checkbox' },
|
{ prop: 'small', label: '是否小型站台:', type: 'checkbox' },
|
||||||
{ prop: 'inside', label: '是否内站台:', type: 'checkbox' }
|
{ prop: 'inside', label: '是否内站台:', type: 'checkbox' },
|
||||||
|
{ prop: 'stopJumpLamp', label: '跳停按钮:', type: 'checkbox'},
|
||||||
|
{ prop: 'stopJumpLampPoint', label: '跳停按钮坐标:', type: 'coordinate', width: '120px', isHidden: !this.isStopJumpPointsShow, children: [
|
||||||
|
{ prop: 'stopJumpLampPoint.x', firstLevel: 'stopJumpLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||||
|
{ prop: 'stopJumpLampPoint.y', firstLevel: 'stopJumpLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||||
|
] },
|
||||||
|
{ prop: 'cancelStopJumpLamp', label: '取消跳停按钮:', type: 'checkbox'},
|
||||||
|
{ prop: 'cancelStopJumpLampPoint', label: '取消跳停按钮坐标:', type: 'coordinate', width: '120px', isHidden: !this.isCancelStopJumpPointsShow, children: [
|
||||||
|
{ prop: 'cancelStopJumpLampPoint.x', firstLevel: 'cancelStopJumpLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||||
|
{ prop: 'cancelStopJumpLampPoint.y', firstLevel: 'cancelStopJumpLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||||
|
] },
|
||||||
|
{ prop: 'upDetainLamp', label: '上行扣车按钮:', type: 'checkbox'},
|
||||||
|
{ prop: 'upDetainLampPoint', label: '上行扣车按钮坐标:', type: 'coordinate', width: '120px', isHidden: !this.isUpDetainPointsShow, children: [
|
||||||
|
{ prop: 'upDetainLampPoint.x', firstLevel: 'upDetainLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||||
|
{ prop: 'upDetainLampPoint.y', firstLevel: 'upDetainLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||||
|
] },
|
||||||
|
{ prop: 'downDetainLamp', label: '下行扣车按钮:', type: 'checkbox'},
|
||||||
|
{ prop: 'downDetainLampPoint', label: '下行扣车坐标:', type: 'coordinate', width: '120px', isHidden: !this.isDownDetainPointsShow, children: [
|
||||||
|
{ prop: 'downDetainLampPoint.x', firstLevel: 'downDetainLampPoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||||
|
{ prop: 'downDetainLampPoint.y', firstLevel: 'downDetainLampPoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||||
|
] }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
door: {
|
door: {
|
||||||
@ -228,6 +284,18 @@ export default {
|
|||||||
isButtonTypeES() {
|
isButtonTypeES() {
|
||||||
return this.field === 'editSectionSelectCode';
|
return this.field === 'editSectionSelectCode';
|
||||||
},
|
},
|
||||||
|
isStopJumpPointsShow() {
|
||||||
|
return this.activeName === 'first' ? this.editModel.stopJumpLamp : this.addModel.stopJumpLamp;
|
||||||
|
},
|
||||||
|
isCancelStopJumpPointsShow() {
|
||||||
|
return this.activeName === 'first' ? this.editModel.cancelStopJumpLamp : this.addModel.cancelStopJumpLamp;
|
||||||
|
},
|
||||||
|
isUpDetainPointsShow() {
|
||||||
|
return this.activeName === 'first' ? this.editModel.upDetainLamp : this.addModel.upDetainLamp;
|
||||||
|
},
|
||||||
|
isDownDetainPointsShow() {
|
||||||
|
return this.activeName === 'first' ? this.editModel.downDetainLamp : this.addModel.downDetainLamp;
|
||||||
|
},
|
||||||
PhysicalSectionList() {
|
PhysicalSectionList() {
|
||||||
let list = [];
|
let list = [];
|
||||||
if (this.sectionList && this.sectionList.length) {
|
if (this.sectionList && this.sectionList.length) {
|
||||||
@ -309,7 +377,15 @@ export default {
|
|||||||
standTrackCode: this.addModel.standTrackCode,
|
standTrackCode: this.addModel.standTrackCode,
|
||||||
right: this.addModel.right,
|
right: this.addModel.right,
|
||||||
small: this.addModel.small,
|
small: this.addModel.small,
|
||||||
inside: this.addModel.inside
|
inside: this.addModel.inside,
|
||||||
|
stopJumpLamp: this.addModel.stopJumpLamp, // 跳停功能按钮
|
||||||
|
stopJumpLampPoint: this.addModel.stopJumpLampPoint, // 跳停功能按钮坐标
|
||||||
|
cancelStopJumpLamp: this.addModel.cancelStopJumpLamp, // 取消跳停功能按钮
|
||||||
|
cancelStopJumpLampPoint: this.addModel.cancelStopJumpLampPoint, // 取消跳停功能按钮坐标
|
||||||
|
upDetainLamp: this.addModel.upDetainLamp, // 上行扣车功能按钮
|
||||||
|
upDetainLampPoint: this.addModel.upDetainLampPoint, // 上行扣车功能按钮坐标
|
||||||
|
downDetainLamp: this.addModel.downDetainLamp, // 下行扣车功能按钮
|
||||||
|
downDetainLampPoint: this.addModel.downDetainLampPoint // 下行扣车功能按钮坐标
|
||||||
};
|
};
|
||||||
this.stationList.forEach(elem => {
|
this.stationList.forEach(elem => {
|
||||||
if (elem.code == this.addModel.stationCode) {
|
if (elem.code == this.addModel.stationCode) {
|
||||||
|
@ -163,6 +163,9 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
selected(val, oldVal) {
|
selected(val, oldVal) {
|
||||||
this.deviceSelect(val);
|
this.deviceSelect(val);
|
||||||
|
},
|
||||||
|
stationList() {
|
||||||
|
this.getConcertrateStation();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -195,17 +198,19 @@ export default {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.concertrateStation = this.stationList.filter(station=>{
|
this.concertrateStation = this.stationList.filter(station=>{
|
||||||
if (this.activeName == 'first') {
|
// if (this.activeName == 'first') {
|
||||||
return station.centralized && !( beConcentrateStation[station.code] && (beConcentrateStation[station.code] != this.editModel.code));
|
// return station.centralized && !( beConcentrateStation[station.code] && (beConcentrateStation[station.code] != this.editModel.code));
|
||||||
} else {
|
return station.centralized;
|
||||||
return station.centralized && !( beConcentrateStation[station.code]);
|
// } else {
|
||||||
}
|
// return station.centralized && !( beConcentrateStation[station.code]);
|
||||||
|
// }
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
create() {
|
create() {
|
||||||
this.$refs.make.validate((valid) => {
|
this.$refs.make.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const uid = getUID('ZcControl', this.zcList);
|
const uid = getUID('ZcControl', this.zcList);
|
||||||
|
let models = [];
|
||||||
const model = {
|
const model = {
|
||||||
_type: 'ZcControl',
|
_type: 'ZcControl',
|
||||||
code: uid,
|
code: uid,
|
||||||
@ -216,10 +221,12 @@ export default {
|
|||||||
},
|
},
|
||||||
concentrateStationList:this.addModel.concentrateStationList
|
concentrateStationList:this.addModel.concentrateStationList
|
||||||
};
|
};
|
||||||
|
models.push(model);
|
||||||
model.concentrateStationList.forEach(stationCode=>{
|
model.concentrateStationList.forEach(stationCode=>{
|
||||||
this.setStationStand(stationCode, model.code);
|
const arr = this.setStationStand(stationCode, model.code);
|
||||||
|
models = [...models, ...arr];
|
||||||
});
|
});
|
||||||
this.$emit('updateMapModel', model);
|
this.$emit('updateMapModel', models);
|
||||||
this.getConcertrateStation();
|
this.getConcertrateStation();
|
||||||
this.$refs.make.resetForm();
|
this.$refs.make.resetForm();
|
||||||
}
|
}
|
||||||
@ -230,20 +237,12 @@ export default {
|
|||||||
this.$refs['dataform'].validate((valid) => {
|
this.$refs['dataform'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const data = Object.assign({_type: 'ZcControl'}, this.editModel);
|
const data = Object.assign({_type: 'ZcControl'}, this.editModel);
|
||||||
this.$emit('updateMapModel', data);
|
let models = [data];
|
||||||
|
|
||||||
this.concertrateStation.forEach(station=>{
|
|
||||||
this.setStationStand(station.code, '');
|
|
||||||
data.concentrateStationList.forEach(stationCode=>{
|
data.concentrateStationList.forEach(stationCode=>{
|
||||||
switch (stationCode) {
|
const arr = this.setStationStand(stationCode, data.code);
|
||||||
case station.code: {
|
models = [...models, ...arr];
|
||||||
this.setStationStand(stationCode, this.editModel.code);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
this.$emit('updateMapModel', models);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -274,14 +273,19 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 设置车站所属ZC区域
|
||||||
setStationStand(stationCode, code) {
|
setStationStand(stationCode, code) {
|
||||||
|
const arr = [];
|
||||||
this.stationList.forEach(elem=>{
|
this.stationList.forEach(elem=>{
|
||||||
if (elem.code == stationCode) {
|
if (elem.code == stationCode) {
|
||||||
const station = Object.assign({}, elem);
|
const station = deepAssign({}, elem);
|
||||||
|
// const station = Object.assign({}, elem);
|
||||||
station.zcCode = code;
|
station.zcCode = code;
|
||||||
this.$emit('updateMapModel', station);
|
arr.push(station);
|
||||||
|
// this.$emit('updateMapModel', station);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
return arr; // 返回设置的车站list
|
||||||
}
|
}
|
||||||
// changeConcertrateStation(data) {
|
// changeConcertrateStation(data) {
|
||||||
// if (data.length > 0) {
|
// if (data.length > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user