Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
# Conflicts: # src/jmapNew/utils/parser.js
This commit is contained in:
commit
6d0849f5b3
@ -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' // 功能按钮颜色
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -284,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' // 功能按钮颜色
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -128,4 +128,10 @@ deviceRender[deviceType.OutFrame] = {
|
|||||||
zlevel: 1
|
zlevel: 1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** AutomacticRoute渲染配置 自动进路*/
|
||||||
|
deviceRender[deviceType.AutomaticRoute] = {
|
||||||
|
_type: deviceType.AutomaticRoute,
|
||||||
|
zlevel: 1
|
||||||
|
};
|
||||||
|
|
||||||
export default deviceRender;
|
export default deviceRender;
|
||||||
|
@ -19,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;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
@ -22,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();
|
||||||
@ -104,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;
|
||||||
|
@ -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(); });
|
||||||
|
@ -18,6 +18,7 @@ import Text2 from './Text/index.js';
|
|||||||
import MapCycleButtonVO from './Automactic/index.js';
|
import MapCycleButtonVO from './Automactic/index.js';
|
||||||
import OutFrame from './OutFrame/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 = {};
|
||||||
@ -40,6 +41,7 @@ mapShape[deviceType.Text] = Text2;
|
|||||||
mapShape[deviceType.MapCycleButtonVO] = MapCycleButtonVO;
|
mapShape[deviceType.MapCycleButtonVO] = MapCycleButtonVO;
|
||||||
mapShape[deviceType.OutFrame] = OutFrame;
|
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;
|
||||||
|
@ -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;
|
||||||
|
@ -52,6 +52,20 @@ export default {
|
|||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
Local: [
|
Local: [
|
||||||
|
{
|
||||||
|
label: '轨道切除',
|
||||||
|
handler: this.split,
|
||||||
|
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '轨道激活',
|
||||||
|
handler: this.active,
|
||||||
|
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
||||||
|
}
|
||||||
|
// {
|
||||||
|
// label: '查看站场设备状态',
|
||||||
|
// handler: this.undeveloped
|
||||||
|
// }
|
||||||
],
|
],
|
||||||
Center: [
|
Center: [
|
||||||
{
|
{
|
||||||
|
@ -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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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();
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
@ -119,6 +119,10 @@ export function parser(data, skinCode) {
|
|||||||
mapDevice[elem.code] = createDevice(deviceType.MapCycleButtonVO, elem, propConvert);
|
mapDevice[elem.code] = createDevice(deviceType.MapCycleButtonVO, elem, propConvert);
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
|
zrUtil.each(data.AutomaticRouteButtonList || [], elem => {
|
||||||
|
mapDevice[elem.code] = createDevice(deviceType.AutomaticRoute, elem, propConvert);
|
||||||
|
}, this);
|
||||||
|
|
||||||
zrUtil.each(data.outerFrameList || [], elem => {
|
zrUtil.each(data.outerFrameList || [], elem => {
|
||||||
mapDevice[elem.code] = createDevice(deviceType.OutFrame, elem, propConvert);
|
mapDevice[elem.code] = createDevice(deviceType.OutFrame, elem, propConvert);
|
||||||
}, this);
|
}, this);
|
||||||
@ -215,6 +219,7 @@ export function updateMapData(state, model) {
|
|||||||
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.MapCycleButtonVO: updateForList(model, state, 'cycleButtonList'); break;
|
||||||
case deviceType.OutFrame: updateForList(model, state, 'outerFrameList'); break;
|
case deviceType.OutFrame: updateForList(model, state, 'outerFrameList'); break;
|
||||||
|
case deviceType.AutomaticRoute: updateForList(model, state, 'automaticRouteButtonList'); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -330,6 +330,13 @@ const map = {
|
|||||||
return [];
|
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(() => {
|
||||||
|
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>
|
@ -100,6 +100,14 @@
|
|||||||
@setCenter="setCenter"
|
@setCenter="setCenter"
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</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"
|
||||||
@ -185,6 +193,7 @@ import TrainWindowDraft from './trainwindow';
|
|||||||
import ZcControlDraft from './zcControl';
|
import ZcControlDraft from './zcControl';
|
||||||
import AutomaticControlDraft from './automaticControl';
|
import AutomaticControlDraft from './automaticControl';
|
||||||
import OutFrameDraft from './outFrameControl';
|
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';
|
||||||
@ -214,7 +223,8 @@ export default {
|
|||||||
LimitControlDraft,
|
LimitControlDraft,
|
||||||
LcControlDraft,
|
LcControlDraft,
|
||||||
ImageControlDraft,
|
ImageControlDraft,
|
||||||
CheckboxDraft
|
CheckboxDraft,
|
||||||
|
AutomaticRoute
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user