Merge branch 'dev' into test
This commit is contained in:
commit
3b645724cc
@ -610,5 +610,6 @@ export default {
|
||||
physicalSectionName: 'Physical section name',
|
||||
routePhysicalSectionData: 'Route physical section data',
|
||||
routeSideDefenseSwitch: 'Route side defense switch',
|
||||
switchID: 'Switch ID'
|
||||
switchID: 'Switch ID',
|
||||
lineColor: 'Line Color'
|
||||
};
|
||||
|
@ -605,5 +605,6 @@ export default {
|
||||
routeSideDefenseSwitch: '进路侧防道岔',
|
||||
switchID: '道岔ID',
|
||||
normalPosition: '定位',
|
||||
reversePosition: '反位'
|
||||
reversePosition: '反位',
|
||||
lineColor: '线条颜色'
|
||||
};
|
||||
|
@ -462,7 +462,6 @@ class SkinCode extends defaultStyle {
|
||||
textColor: '#000000'
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.ZcControl] = {
|
||||
// 是否显示
|
||||
visible: true,
|
||||
|
@ -405,7 +405,114 @@ class SkinCode extends defaultStyle {
|
||||
controlColor: '#FFFF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.PowerSupply] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.Maintain] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.NoOneReturn] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11,
|
||||
fontWeight: 'normal',
|
||||
distance: 5
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6,
|
||||
controlColor: '#FFFFFF'
|
||||
}
|
||||
};
|
||||
this[deviceType.AtsControl] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.ChainControl] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.IntersiteControl] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.CenterCommunication] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.LeuControl] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.LocalControl] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.ZcControl] = {
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
|
@ -87,6 +87,7 @@ class SkinCode extends defaultStyle {
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
line: {
|
||||
isActiveShow: true, // 哈尔滨点击元素显示
|
||||
width: 5, // 区段宽度
|
||||
beyondWidth: 1, // 区段宽超出宽度
|
||||
invadeColor: '#EF0C08', // 区段侵入颜色
|
||||
@ -140,7 +141,7 @@ class SkinCode extends defaultStyle {
|
||||
standardShow: true, // 灯柱显示
|
||||
standardLength: 4, // 高柱长度
|
||||
standardHeight: 5, // 灯柱高度
|
||||
standardColor: '#3149C3', // 灯柱颜色
|
||||
standardColor: '#FF0000', // 灯柱颜色
|
||||
standardWidth: 4 // 灯柱宽度
|
||||
},
|
||||
text: {
|
||||
@ -150,22 +151,22 @@ class SkinCode extends defaultStyle {
|
||||
fontSize: 11, // 信号机名称字体大小
|
||||
fontWeight: 'bold', // 信号机名称字体粗细
|
||||
defaultColor: '#FFFFFF', // 信号灯字体默认色
|
||||
blockColor: '#EF0C08', // 信号灯字体锁定颜色
|
||||
blockColor: '#ffffff', // 信号灯字体锁定颜色
|
||||
checkColor: '#00FF00', // 信号字体
|
||||
nameBorderShow: true // 信号机名字边框显示
|
||||
nameBorderShow: false // 信号机名字边框显示
|
||||
},
|
||||
lamp: {
|
||||
bgShow: true, // 是否被选中
|
||||
logicDisplayNone: true, // 逻辑点灯斜线不显示
|
||||
guidName: 'defult', // 默认引导类型
|
||||
guidName: 'haerbin_01', // 默认引导类型
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderWidth: 1, // 信号灯边框线宽度
|
||||
borderColor: '#3149C3', // 信号灯边框线颜色
|
||||
borderWidth: 0, // 信号灯边框线宽度
|
||||
borderColor: '#FF0000', // 信号灯边框线颜色 (虚拟信号机)
|
||||
radiusR: 4, // 信号灯半径
|
||||
blockColor: '#EF0C08', // 信号灯锁闭
|
||||
grayColor: '#7F7F7F', // 信号灯灰色
|
||||
redColor: '#FF0000', // 信号灯红色
|
||||
greenColor: '#00FF00', // 信号灯绿色
|
||||
greenColor: '#000080', // 信号灯绿色
|
||||
yellowColor: '#FFFF00', // 信号灯黄色
|
||||
whiteColor: '#FFFFFF', // 信号灯白色
|
||||
blueColor: '#0070C0' // 信号灯蓝色
|
||||
|
@ -145,5 +145,50 @@ deviceRender[deviceType.GuideLock] = {
|
||||
_type: deviceType.GuideLock,
|
||||
zlevel: 1
|
||||
};
|
||||
/** AtsControl ATS通信表示灯 */
|
||||
deviceRender[deviceType.AtsControl] = {
|
||||
_type: deviceType.AtsControl,
|
||||
zlevel: 1
|
||||
};
|
||||
/** CenterCommunication 中心通信表示灯 */
|
||||
deviceRender[deviceType.CenterCommunication] = {
|
||||
_type: deviceType.AtsControl,
|
||||
zlevel: 1
|
||||
};
|
||||
/** ChainControl 连锁主备状态表示灯 */
|
||||
deviceRender[deviceType.ChainControl] = {
|
||||
_type: deviceType.ChainControl,
|
||||
zlevel: 1
|
||||
};
|
||||
/** IntersiteControl 站间通信表示灯 */
|
||||
deviceRender[deviceType.IntersiteControl] = {
|
||||
_type: deviceType.IntersiteControl,
|
||||
zlevel: 1
|
||||
};
|
||||
/** LeuControl LEU通信表示灯 */
|
||||
deviceRender[deviceType.LeuControl] = {
|
||||
_type: deviceType.LeuControl,
|
||||
zlevel: 1
|
||||
};
|
||||
/** LocalControl 现地主备状态表示灯 */
|
||||
deviceRender[deviceType.LocalControl] = {
|
||||
_type: deviceType.LocalControl,
|
||||
zlevel: 1
|
||||
};
|
||||
/** Maintain 维护工作站表示灯 */
|
||||
deviceRender[deviceType.Maintain] = {
|
||||
_type: deviceType.Maintain,
|
||||
zlevel: 1
|
||||
};
|
||||
/** PowerSupply 电源状态表示灯 */
|
||||
deviceRender[deviceType.PowerSupply] = {
|
||||
_type: deviceType.PowerSupply,
|
||||
zlevel: 1
|
||||
};
|
||||
/** NoOneReturn 无人折返状态表示灯 */
|
||||
deviceRender[deviceType.NoOneReturn] = {
|
||||
_type: deviceType.NoOneReturn,
|
||||
zlevel: 1
|
||||
};
|
||||
|
||||
export default deviceRender;
|
||||
|
@ -22,7 +22,16 @@ const deviceType = {
|
||||
Line: 'Line',
|
||||
Text: 'Text',
|
||||
CheckBox: 'CheckBox',
|
||||
AutomaticRoute:'AutomaticRoute'
|
||||
AutomaticRoute:'AutomaticRoute',
|
||||
AtsControl: 'AtsControl',
|
||||
CenterCommunication: 'CenterCommunication',
|
||||
ChainControl: 'ChainControl',
|
||||
IntersiteControl: 'IntersiteControl',
|
||||
LeuControl: 'LeuControl',
|
||||
LocalControl: 'LocalControl',
|
||||
Maintain: 'Maintain',
|
||||
PowerSupply: 'PowerSupply',
|
||||
NoOneReturn: 'NoOneReturn'
|
||||
};
|
||||
|
||||
export default deviceType;
|
||||
|
@ -132,6 +132,9 @@ class Status {
|
||||
handleGuideLock(device) {
|
||||
this.statusObj = { };
|
||||
}
|
||||
handleResource(device) {
|
||||
this.statusObj = { };
|
||||
}
|
||||
getStatus() {
|
||||
return this.statusObj;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ export default class Line2 extends Group {
|
||||
for (let i = 0; i < (model.points.length - 1); i++) {
|
||||
this.add(new Line({
|
||||
zlevel: model.zlevel,
|
||||
z: model.isLogic ? this.z : this.z + 1,
|
||||
z: this.z,
|
||||
shape: {
|
||||
x1: model.points[i].x,
|
||||
y1: model.points[i].y,
|
||||
@ -37,7 +37,7 @@ export default class Line2 extends Group {
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.width,
|
||||
stroke: style.Line.lineColor
|
||||
stroke: model.lineColor || style.Line.lineColor
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
53
src/jmapNew/shape/SaidLamp/EMouse.js
Normal file
53
src/jmapNew/shape/SaidLamp/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.deviceStyle.lamp.radiusR + this.device.deviceStyle.text.distance - 30,
|
||||
fontWeight: 'normal',
|
||||
fontSize: this.device.deviceStyle.mouseOverStyle.fontSize,
|
||||
fontFamily: this.device.deviceStyle.mouseOverStyle.fontFamily,
|
||||
text: this.device.model.name,
|
||||
textFill: this.device.deviceStyle.mouseOverStyle.fontColor,
|
||||
textAlign: this.device.deviceStyle.mouseOverStyle.textAlign,
|
||||
textVerticalAlign: this.device.deviceStyle.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.deviceStyle.mouseOverStyle.arcColor);
|
||||
this.device.control.setTextColor(this.device.deviceStyle.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.deviceStyle.lamp.controlColor);
|
||||
this.device.control.setTextColor('#FFFFFF');
|
||||
this.device.control.setTextBorder(false);
|
||||
this.device.control.setArcBorder(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
103
src/jmapNew/shape/SaidLamp/index.js
Normal file
103
src/jmapNew/shape/SaidLamp/index.js
Normal file
@ -0,0 +1,103 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import EControl from '../element/EControl';
|
||||
import EMouse from './EMouse';
|
||||
import {isShowThePrdType} from '../../utils/handlePath';
|
||||
|
||||
export default class AtsControl 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.deviceStyle = style[model._type];
|
||||
this.isShowShape = true;
|
||||
if (isShowThePrdType(model.prdType, this.deviceStyle.displayCondition) || model.previewOrMapDraw) {
|
||||
this.create();
|
||||
this.createMouseEvent();
|
||||
this.setState(model);
|
||||
}
|
||||
if (model.previewOrMapDraw) {
|
||||
this.setShowMode();
|
||||
}
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
this.control = new EControl({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
arc: {
|
||||
shape: {
|
||||
cx: model.position.x,
|
||||
cy: model.position.y,
|
||||
r: this.deviceStyle.lamp.radiusR
|
||||
},
|
||||
subType: 'Control',
|
||||
lineWidth: 0,
|
||||
fill: this.deviceStyle.lamp.controlColor
|
||||
},
|
||||
text: {
|
||||
position: [0, 0],
|
||||
x: model.position.x,
|
||||
y: model.position.y + this.deviceStyle.lamp.radiusR + this.deviceStyle.text.distance,
|
||||
fontWeight: this.deviceStyle.text.fontWeight,
|
||||
fontSize: this.deviceStyle.text.fontSize,
|
||||
fontFamily: this.style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: '#fff',
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top'
|
||||
},
|
||||
style: this.style
|
||||
});
|
||||
|
||||
this.add(this.control);
|
||||
}
|
||||
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
}
|
||||
|
||||
createMouseEvent() {
|
||||
if (this.deviceStyle.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;
|
||||
}
|
||||
setShowMode() {
|
||||
const showMode = this.model.showMode;
|
||||
const showConditions = this.deviceStyle.displayCondition;
|
||||
if (showConditions === '01' || showMode === showConditions) {
|
||||
this.control && this.control.show();
|
||||
} else {
|
||||
this.control && this.control.hide();
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.control && this.control.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.control && this.control.hide();
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
}
|
@ -15,6 +15,12 @@ export default class ELines extends Group {
|
||||
create(model) {
|
||||
/** 创建区段*/
|
||||
if (model && model.points.length > 1) {
|
||||
let stroke;
|
||||
stroke = model.style.Section.line.spareColor;
|
||||
if (model.style.Section.line.isActiveShow) {
|
||||
stroke = '#2EBFBF';
|
||||
}
|
||||
|
||||
if (model.isCurve) {
|
||||
const shape = {};
|
||||
for (let i = 1; i < (model.points.length - 1); i++) {
|
||||
@ -30,12 +36,12 @@ export default class ELines extends Group {
|
||||
isLine: true,
|
||||
zlevel: this.zlevel,
|
||||
progressive: model.progressive,
|
||||
z: this.z + 1,
|
||||
z: this.z + 2,
|
||||
culling: true,
|
||||
shape: shape,
|
||||
style: {
|
||||
lineWidth: model.style.Section.line.width,
|
||||
stroke: model.style.Section.line.spareColor,
|
||||
stroke: stroke,
|
||||
fillOpacity: 0
|
||||
}
|
||||
});
|
||||
@ -55,7 +61,7 @@ export default class ELines extends Group {
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.style.Section.line.width,
|
||||
stroke: model.style.Section.line.spareColor
|
||||
stroke: stroke
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
// import Vue from 'vue';
|
||||
import store from '@/store';
|
||||
class EMouse extends Group {
|
||||
constructor(device, code) {
|
||||
@ -11,6 +10,7 @@ class EMouse extends Group {
|
||||
this.create();
|
||||
}
|
||||
create() {
|
||||
// 名称的包围框
|
||||
if (this.device.name) {
|
||||
const rect = this.device.name.getBoundingRect();
|
||||
if (!this.device.isSwitchSection) {
|
||||
@ -66,6 +66,7 @@ class EMouse extends Group {
|
||||
this.add(this.sectionTextShadow);
|
||||
this.sectionTextShadow.hide();
|
||||
}
|
||||
// 区段包围框
|
||||
if (this.device.section) {
|
||||
const rect = this.device.section.getBoundingRect();
|
||||
this.lineBorder = new Rect({
|
||||
|
@ -30,7 +30,6 @@ export default class Section extends Group {
|
||||
this.create();
|
||||
this.createMouseEvent();
|
||||
this.setState(model);
|
||||
this.checkIsDrawMap();
|
||||
}
|
||||
|
||||
create() {
|
||||
@ -52,16 +51,6 @@ export default class Section extends Group {
|
||||
// }
|
||||
}
|
||||
|
||||
createMouseEvent() {
|
||||
// 鼠标事件
|
||||
if (this.style.Section.mouseOverStyle) {
|
||||
this.mouseEvent = new EMouse(this, this.model.relSwitchCode);
|
||||
this.add(this.mouseEvent);
|
||||
this.on('mouseout', (e) => { this.mouseEvent.mouseout(e); });
|
||||
this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); });
|
||||
}
|
||||
}
|
||||
|
||||
/** 创建区段*/
|
||||
createSection() {
|
||||
const model = this.model;
|
||||
@ -69,7 +58,8 @@ export default class Section extends Group {
|
||||
// 创建区段
|
||||
this.section = new ELines({
|
||||
zlevel: this.zlevel,
|
||||
z: model.type == '02' ? this.z + 1 : this.z, // 逻辑区段层级降低一层
|
||||
// z: model.type == '02' ? this.z + 1 : this.z, // 逻辑区段层级降低一层
|
||||
z: this.z, // 逻辑区段层级降低一层
|
||||
isSwitchSection: model.switchSection,
|
||||
isCurve: model.curve,
|
||||
points: model.type == '04' ? [model.namePosition, model.namePosition] : model.points,
|
||||
@ -87,6 +77,19 @@ export default class Section extends Group {
|
||||
|
||||
this.add(this.section);
|
||||
this.add(this.sectionBlock);
|
||||
|
||||
if (this.style.Section.line.isActiveShow) { // 哈尔滨线路点击背景色
|
||||
this.lineBorder = new ELines({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z - 1, // 逻辑区段层级降低一层
|
||||
isSwitchSection: model.switchSection,
|
||||
isCurve: model.curve,
|
||||
points: model.type == '04' ? [model.namePosition, model.namePosition] : model.points,
|
||||
style: style
|
||||
});
|
||||
this.add(this.lineBorder);
|
||||
this.lineBorder.setStyle({ lineWidth: 0 });
|
||||
}
|
||||
}
|
||||
|
||||
// 折返箭头
|
||||
@ -571,18 +574,9 @@ export default class Section extends Group {
|
||||
});
|
||||
}
|
||||
|
||||
setModelTypeLevel() { // 给含有逻辑区段的 section 层级加一
|
||||
if (this.model.type == '01' && this.model.logicSectionCodeList && this.model.logicSectionCodeList.length > 0) {
|
||||
this.section.setZleve(this.z + 2);
|
||||
}
|
||||
}
|
||||
|
||||
/** 设置区段恢复默认状态*/
|
||||
recover() {
|
||||
if (this.section) {
|
||||
if (this.model.type == '01') {
|
||||
this.section.setZleve(this.z);
|
||||
}
|
||||
this.section.stopAnimation(true);
|
||||
this.sectionBlock && this.sectionBlock.hide(); // 因此特殊区段
|
||||
this.section.setStyle({
|
||||
@ -629,7 +623,6 @@ export default class Section extends Group {
|
||||
stroke: this.style.Section.line.communicationOccupiedColor,
|
||||
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
||||
});
|
||||
this.setModelTypeLevel();
|
||||
}
|
||||
}
|
||||
|
||||
@ -640,7 +633,6 @@ export default class Section extends Group {
|
||||
stroke: this.style.Section.line.unCommunicationOccupiedColor,
|
||||
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
||||
});
|
||||
this.setModelTypeLevel();
|
||||
}
|
||||
}
|
||||
|
||||
@ -651,7 +643,6 @@ export default class Section extends Group {
|
||||
stroke: this.style.Section.line.routeLockColor,
|
||||
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
||||
});
|
||||
this.setModelTypeLevel();
|
||||
}
|
||||
}
|
||||
|
||||
@ -671,7 +662,6 @@ export default class Section extends Group {
|
||||
{ time: 2000, styles: { stroke: this.style.Section.line.blockColor } }
|
||||
]);
|
||||
}
|
||||
this.setModelTypeLevel();
|
||||
}
|
||||
|
||||
/** 故障锁定状态 05*/
|
||||
@ -712,7 +702,6 @@ export default class Section extends Group {
|
||||
stroke: this.style.Section.line.protectiveLockColor,
|
||||
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
||||
});
|
||||
this.setModelTypeLevel();
|
||||
}
|
||||
}
|
||||
|
||||
@ -762,7 +751,6 @@ export default class Section extends Group {
|
||||
{ time: 1000, styles: { stroke: this.style.backgroundColor } },
|
||||
{ time: 2000, styles: { lineWidth: lineWidth } }
|
||||
]);
|
||||
this.setModelTypeLevel();
|
||||
}
|
||||
}
|
||||
|
||||
@ -813,16 +801,9 @@ export default class Section extends Group {
|
||||
sectionC && sectionC.instance && sectionC.instance.setState(sectionC, true);
|
||||
}
|
||||
}
|
||||
let numFlag = 0;
|
||||
model.logicSectionNum.forEach(item => {
|
||||
numFlag += item;
|
||||
});
|
||||
if (numFlag) {
|
||||
return;
|
||||
}
|
||||
// 顺序代表优先级
|
||||
/** 道岔保护区段锁闭 */
|
||||
{ model.overlapLock && this.protectiveLock(); }
|
||||
model.overlapLock && this.protectiveLock();
|
||||
/** 空闲锁闭或者叫进路锁闭 */
|
||||
model.routeLock && this.routeLock();
|
||||
/** 轨道封锁 */
|
||||
@ -870,12 +851,32 @@ export default class Section extends Group {
|
||||
}
|
||||
}
|
||||
|
||||
createMouseEvent() { // 鼠标事件
|
||||
if (this.style.Section.mouseOverStyle) { // 只有北京线路才会有鼠标事件
|
||||
this.mouseEvent = new EMouse(this, this.model.relSwitchCode);
|
||||
this.add(this.mouseEvent);
|
||||
this.on('mouseout', (e) => { this.mouseEvent.mouseout(e); });
|
||||
this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); });
|
||||
}
|
||||
const path = window.location.href;
|
||||
if (path.includes('/map/draw')) {
|
||||
this.on('mouseout', () => { !this.selectedType && !this.selected && this.section && this.section.setStyle({ stroke: this.style.Section.line.spareColor }); });
|
||||
this.on('mouseover', () => { !this.selectedType && this.section && this.section.setStyle({ stroke: '#fbfbfb' }); });
|
||||
}
|
||||
}
|
||||
|
||||
drawSelected(selected) {
|
||||
this.selected = selected;
|
||||
if (selected) {
|
||||
!this.selectedType && this.section && this.section.setStyle({ stroke: '#fbfbfb' });
|
||||
if (this.style.Section.line.isActiveShow) {
|
||||
this.lineBorder && this.lineBorder.setStyle({ lineWidth: this.style.Section.line.width + 3 });
|
||||
} else {
|
||||
!this.selectedType && this.section && this.section.setStyle({ stroke: '#fbfbfb' });
|
||||
}
|
||||
} else {
|
||||
!this.selectedType && this.section && this.section.setStyle({ stroke: this.style.Section.line.spareColor });
|
||||
this.lineBorder && this.lineBorder.setStyle({ lineWidth: 0 });
|
||||
// !this.selectedType && this.section && this.section.setStyle({ stroke: this.style.Section.line.spareColor });
|
||||
!this.selectedType && this.setState(this.model);
|
||||
}
|
||||
}
|
||||
drawBatchSelected(selected, type) {
|
||||
@ -890,14 +891,6 @@ export default class Section extends Group {
|
||||
this.selectedType = type;
|
||||
}
|
||||
|
||||
checkIsDrawMap() {
|
||||
const path = window.location.href;
|
||||
if (path.includes('/map/draw')) {
|
||||
this.on('mouseout', () => { !this.selectedType && !this.selected && this.section && this.section.setStyle({ stroke: this.style.Section.line.spareColor }); });
|
||||
this.on('mouseover', () => { !this.selectedType && this.section && this.section.setStyle({ stroke: '#fbfbfb' }); });
|
||||
}
|
||||
}
|
||||
|
||||
mouseout() {
|
||||
this.drawSelected(false);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ class ESigPost extends Group {
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
|
||||
// 竖杆
|
||||
this.ver = new Polyline({
|
||||
_subType: 'SignalLamp',
|
||||
_val: '3',
|
||||
@ -28,7 +28,7 @@ class ESigPost extends Group {
|
||||
stroke: style.Signal.post.standardColor
|
||||
}
|
||||
});
|
||||
|
||||
// 横杆
|
||||
this.hor = new Polyline({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
@ -53,6 +53,13 @@ class ESigPost extends Group {
|
||||
}
|
||||
}
|
||||
|
||||
setColor(color) {
|
||||
if (color) {
|
||||
this.ver && this.ver.setStyle({ stroke: color });
|
||||
this.hor && this.hor.setStyle({ stroke: color });
|
||||
}
|
||||
}
|
||||
|
||||
getLampPosition(type) {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
|
@ -42,7 +42,7 @@ class Signal extends Group {
|
||||
const drict = this.model.right ? 1 : -1; // 朝向 左:右
|
||||
const posit = this.model.positionType == '01' ? -1 : 1; // 位置 上:下
|
||||
|
||||
// 信号机高柱矮柱
|
||||
// 信号机高柱矮柱 (信号机底座)
|
||||
this.sigPost = new ESigPost({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
@ -56,7 +56,7 @@ class Signal extends Group {
|
||||
// 信号灯
|
||||
const endPoint = this.sigPost.getLampPosition(model.lampPostType);
|
||||
this.lamps = [];
|
||||
if (style.Signal.lamp.guidName == 'ningbo_01' && this.count == 1) {
|
||||
if ((style.Signal.lamp.guidName == 'ningbo_01' || style.Signal.lamp.guidName == 'haerbin_01') && this.count == 1) {
|
||||
this.count = 2;
|
||||
}
|
||||
for (let i = 0; i < this.count; i++) {
|
||||
@ -275,7 +275,7 @@ class Signal extends Group {
|
||||
}
|
||||
|
||||
/* count 1单灯 2双灯 lightType 01物理点灯 02逻辑点灯*/
|
||||
openPositive() {
|
||||
openPositive() { // 正向开放
|
||||
if (this.count == 2 && !this.model.lightType) {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
@ -305,26 +305,30 @@ class Signal extends Group {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
}
|
||||
this.virtualSignal && this.virtualSignal.setColor(this.style.Signal.lamp.greenColor);
|
||||
if (this.style.Signal.lamp.guidName == 'haerbin_01') { // 设置底座颜色
|
||||
this.sigPost.setColor('#00FF00');
|
||||
}
|
||||
}
|
||||
/* count 1单灯 2双灯 lightType 逻辑点灯 true,物理点灯 false */
|
||||
openLateral() {
|
||||
openLateral() { // 侧向开放
|
||||
if (this.count == 2 && !this.model.lightType) {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.backgroundColor);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(false);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
||||
this.lamps[1].setColor(this.style.backgroundColor);
|
||||
}
|
||||
} else if (this.count == 2 && this.model.lightType) {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.backgroundColor);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(true);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
||||
this.lamps[1].setColor(this.style.backgroundColor);
|
||||
}
|
||||
} else if (this.count == 1 && !this.model.lightType) {
|
||||
if (this.lamps[0]) {
|
||||
@ -342,6 +346,9 @@ class Signal extends Group {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
}
|
||||
if (this.style.Signal.lamp.guidName == 'haerbin_01') { // 设置底座颜色
|
||||
this.sigPost.setColor('#00FF00');
|
||||
}
|
||||
}
|
||||
// 列车进路
|
||||
trainRoute() {
|
||||
@ -362,9 +369,12 @@ class Signal extends Group {
|
||||
|
||||
// 引导
|
||||
guid() {
|
||||
if (this.style.Signal.lamp.guidName == 'ningbo_01') {
|
||||
if (this.style.Signal.lamp.guidName == 'ningbo_01' || this.style.Signal.lamp.guidName == 'haerbin_01') {
|
||||
this.lamps[1].show();
|
||||
}
|
||||
if (this.style.Signal.lamp.guidName == 'haerbin_01') { // 设置底座颜色
|
||||
this.sigPost.setColor('#00FF00');
|
||||
}
|
||||
if (this.count == 2 && !this.model.lightType && this.style.Signal.lamp.guidName != 'chengdu_03') { // 双灯 物理点灯 允许引导信号
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
@ -384,7 +394,9 @@ class Signal extends Group {
|
||||
block() {
|
||||
if (this.count == 1) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
// this.siglamp.setNameBorder(1)
|
||||
}
|
||||
if (this.style.Signal.lamp.guidName == 'haerbin_01') { // 设置底座颜色
|
||||
this.sigPost.setColor('#000080');
|
||||
}
|
||||
this.sigName.setColor(this.style.Signal.text.blockColor);
|
||||
if (this.style.Signal.text.nameBorderShow) {
|
||||
@ -482,6 +494,7 @@ class Signal extends Group {
|
||||
this.sigAuto.animationRecover();
|
||||
this.sigRoute.hide();
|
||||
this.sigName.setColor(this.style.Signal.text.defaultColor);
|
||||
this.sigPost.setColor(this.style.Signal.post.standardColor); // 设置底座默认颜色
|
||||
if (this.style.Signal.lamp.guidName == 'chengdu_03') {
|
||||
this.lamps[0].setStyle({ lineWidth: this.style.Signal.lamp.borderWidth });
|
||||
}
|
||||
@ -499,45 +512,34 @@ class Signal extends Group {
|
||||
} else if (!model.isRouteActive && isShowThePrdType(model.prdType, '03') && this.style.Signal.lowButton.display) {
|
||||
this.setLowButtonRecover();
|
||||
}
|
||||
/** 设置灯的颜色 */
|
||||
if (model.greenOpen) {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
} else if (model.redOpen) {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
} else if (model.yellowOpen) {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
}
|
||||
|
||||
/** 信号机进路按钮显示 */
|
||||
model.isRouteSignal && this.setLowButtonShow();
|
||||
/** 信号机封锁 */
|
||||
model.blockade && this.block();
|
||||
// model.linkageAutoRouteShow = 1;
|
||||
/** 设置点灯类型*/
|
||||
|
||||
/** 设置灯的颜色 */
|
||||
// model.redOpen = 0;
|
||||
// model.yellowOpen = 0;
|
||||
// model.greenOpen = 1;
|
||||
model.redOpen && model.yellowOpen && !model.greenOpen && this.guid(); // 引导信号显示
|
||||
model.redOpen && !model.yellowOpen && !model.greenOpen && this.close(); // 信号关闭
|
||||
model.greenOpen && !model.redOpen && !model.yellowOpen && this.openPositive(); // 信号正向开放
|
||||
model.yellowOpen && !model.redOpen && !model.greenOpen && this.openLateral(); // 信号侧向开放
|
||||
if (this.style.Signal.lamp.guidName == 'haerbin_01') { // 设置底座颜色
|
||||
model.yellowOpen && !model.redOpen && !model.greenOpen && this.openPositive(); // 信号侧向开放
|
||||
}
|
||||
|
||||
/** 进路交人工控或自动控 */
|
||||
!model.atsControl && this.setArtificialRouteClose();
|
||||
// 联锁自动进路通过
|
||||
model.fleetMode && this.setAutoRouteOpen();
|
||||
// 设置点灯类型 必须在最后设置不能放前面
|
||||
if (model.lightType) {
|
||||
this.logicalLight(); // 设置逻辑点灯
|
||||
} else {
|
||||
this.physicsLight(); // 设置物理点灯
|
||||
}
|
||||
model.guid && this.guid(); // 引导信号显示
|
||||
/** 进路交人工控或自动控 */
|
||||
!model.atsControl && this.setArtificialRouteClose();
|
||||
// 联锁自动进路通过
|
||||
model.fleetMode && this.setAutoRouteOpen();
|
||||
}
|
||||
|
||||
getBoundingRect() {
|
||||
|
@ -21,6 +21,7 @@ import AutoTurnBack from './Automactic/index.js';
|
||||
import OutFrame from './OutFrame/index.js';
|
||||
import CheckBox from './checkBox/checkBox.js';
|
||||
import AutomaticRoute from './AutomacticRoute/index.js';
|
||||
import AtsControl from './SaidLamp/index.js';
|
||||
|
||||
/** 图库*/
|
||||
const mapShape = {};
|
||||
@ -46,6 +47,15 @@ mapShape[deviceType.AxleReset] = AxleReset;
|
||||
mapShape[deviceType.GuideLock] = GuideLock;
|
||||
mapShape[deviceType.CheckBox] = CheckBox;
|
||||
mapShape[deviceType.AutomaticRoute] = AutomaticRoute;
|
||||
mapShape[deviceType.AtsControl] = AtsControl;
|
||||
mapShape[deviceType.CenterCommunication] = AtsControl;
|
||||
mapShape[deviceType.ChainControl] = AtsControl;
|
||||
mapShape[deviceType.IntersiteControl] = AtsControl;
|
||||
mapShape[deviceType.LeuControl] = AtsControl;
|
||||
mapShape[deviceType.LocalControl] = AtsControl;
|
||||
mapShape[deviceType.Maintain] = AtsControl;
|
||||
mapShape[deviceType.PowerSupply] = AtsControl;
|
||||
mapShape[deviceType.NoOneReturn] = AtsControl;
|
||||
|
||||
function shapefactory(device, jmap) {
|
||||
const type = device._type;
|
||||
|
@ -20,6 +20,7 @@ import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
@ -172,18 +173,8 @@ export default {
|
||||
// },
|
||||
// 故障解锁
|
||||
faultUnlock(selectType) {
|
||||
const operate = {
|
||||
start: true,
|
||||
operation: OperationEvent.Section.fault.menu.operation,
|
||||
param: {
|
||||
sectionCode: selectType.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
this.commitOperate(menuOperate.Section.fault, selectType, [selectType.code]).then((data)=>{
|
||||
this.$refs.sectionControl.doShow(data.operate, data.selected);
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
@ -196,104 +187,56 @@ export default {
|
||||
},
|
||||
// 切除
|
||||
split() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Section.split.menu.operation,
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
this.commitOperate(menuOperate.Section.split, this.selected, [this.selected.code]).then((data)=>{
|
||||
this.$refs.sectionControl.doShow(data.operate, data.selected);
|
||||
});
|
||||
},
|
||||
alxeEffective() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Section.alxeEffective.menu.operation,
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.alxeEffective.doShow(operate, this.selected);
|
||||
}
|
||||
this.commitOperate(menuOperate.Section.alxeEffective, this.selected, [this.selected.code]).then((data)=>{
|
||||
this.$refs.alxeEffective.doShow(data.operate, data.selected);
|
||||
});
|
||||
},
|
||||
// 激活
|
||||
active() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Section.active.menu.operation,
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
this.commitOperate(menuOperate.Section.active, this.selected, [this.selected.code]).then((data)=>{
|
||||
this.$refs.sectionControl.doShow(data.operate, data.selected);
|
||||
});
|
||||
},
|
||||
// 区段计轴预复位
|
||||
axlePreReset(selectType) {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Section.axlePreReset.menu.operation,
|
||||
param: {
|
||||
sectionCode: selectType.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
// this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
this.commitOperate(menuOperate.Section.axlePreReset, selectType, [selectType.code]).then((data)=>{
|
||||
this.$refs.sectionControl.doShow(data.operate, data.selected);
|
||||
});
|
||||
},
|
||||
// 区段计轴预复位
|
||||
// axlePreReset() {
|
||||
// const operate = {
|
||||
// start: true,
|
||||
// code: this.selected.code,
|
||||
// operation: OperationEvent.Section.axlePreReset.menu.operation,
|
||||
// param: {
|
||||
// sectionCode: `${this.selected.code}`
|
||||
// }
|
||||
// };
|
||||
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
||||
// }
|
||||
// this.commitOperate(menuOperate.Section.axlePreReset, this.selected, [this.selected.code]).then((data)=>{
|
||||
// this.$refs.sectionCmdControl.doShow(data.operate, data.selected);
|
||||
// });
|
||||
// },
|
||||
// 设置速度
|
||||
setSpeed() {
|
||||
const operate = {
|
||||
this.commitOperate(menuOperate.Section.setSpeed, this.selected, [this.selected.code]).then((data)=>{
|
||||
this.$refs.speedLimitControl.doShow(data.operate, data.selected);
|
||||
});
|
||||
},
|
||||
commitOperate(operate, selected, paramList) {
|
||||
const step = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Section.setSpeed.menu.operation,
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
operation: operate.operation,
|
||||
param:{}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
operate.param.forEach((each, index)=>{
|
||||
step.param[each] = paramList[index];
|
||||
});
|
||||
const obj = this;
|
||||
return new Promise(function(resolve, reject) {
|
||||
obj.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
obj.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
resolve({operate:step, selected:selected});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
75
src/jmapNew/theme/beijing_01/menus/utils/menuOperate.js
Normal file
75
src/jmapNew/theme/beijing_01/menus/utils/menuOperate.js
Normal file
@ -0,0 +1,75 @@
|
||||
import Vue from 'vue';
|
||||
import store from '@/store';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
// 控制禁用
|
||||
export const menuOperate = {
|
||||
Section:{
|
||||
active:{
|
||||
// 区段激活
|
||||
operation: OperationEvent.Section.active.menu.operation,
|
||||
param:['sectionCode'],
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
},
|
||||
alxeEffective:{
|
||||
// 确认计轴有效
|
||||
operation: OperationEvent.Section.alxeEffective.menu.operation,
|
||||
param:['sectionCode'],
|
||||
cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
|
||||
},
|
||||
split:{
|
||||
// 区段切除
|
||||
operation: OperationEvent.Section.split.menu.operation,
|
||||
param:['sectionCode'],
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
},
|
||||
setSpeed:{
|
||||
// 设置速度
|
||||
operation: OperationEvent.Section.setSpeed.menu.operation,
|
||||
param:['sectionCode'],
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
},
|
||||
axlePreReset:{
|
||||
// 区段计轴预复位
|
||||
operation: OperationEvent.Section.axlePreReset.menu.operation,
|
||||
param:['sectionCode'],
|
||||
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
|
||||
},
|
||||
fault:{
|
||||
// 区段故障解锁
|
||||
operation: OperationEvent.Section.fault.menu.operation,
|
||||
param:['sectionCode'],
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// export function commitOperate(menuoperate, paramList, selected, callback) {
|
||||
// return new Promise((resolve, reject) => {
|
||||
// try {
|
||||
// const operate = {
|
||||
// start: true,
|
||||
// operation: OperationEvent.Section.split.menu.operation,
|
||||
// param: {
|
||||
// sectionCode: `${this.selected.code}`
|
||||
// }
|
||||
// };
|
||||
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// resolve(true);
|
||||
// // callback({operate:operate, selected:selected});
|
||||
// // this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
// }
|
||||
// }).catch((error) => {
|
||||
// this.loading = false;
|
||||
// this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
// });
|
||||
// } catch (error) {
|
||||
// reject(error);
|
||||
// }
|
||||
// });
|
||||
|
||||
// }
|
@ -15,29 +15,29 @@
|
||||
<el-col :span="8" :offset="8"><div style="text-align: center">EUROPA - PLATFORM 2</div></el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-col :span="8"><div style="text-align: center;">Field Devices</div></el-col>
|
||||
<el-col :span="8"><div style="text-align: center;">Control Requests</div></el-col>
|
||||
<el-col :span="8"><div style="text-align: center;">Field Indications</div></el-col>
|
||||
<el-col :span="8"><div style="text-align: center;">现场设备</div></el-col>
|
||||
<el-col :span="8"><div style="text-align: center;">控制请求</div></el-col>
|
||||
<el-col :span="8"><div style="text-align: center;">现场指示</div></el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-col :span="8">
|
||||
<div style="border: 1px solid #6F3700; height: 50px; text-align: center;"><span style="line-height: 50px" @click="clickEvent('platform')">Platform</span></div>
|
||||
<div style="border: 1px solid #6F3700; height: 50px; text-align: center;"><span style="line-height: 50px" @click="clickEvent('platform')">站台</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div style="border-top: 1px solid #6F3700; border-bottom: 1px solid #6F3700; height: 50px; text-align: center">
|
||||
<span @click="clickEvent('inService')">IN SERVICE</span><br><span @click="clickEvent('adjustDwell')">Adjust Dwell</span>
|
||||
<span @click="clickEvent('inService')">在服</span><br><span @click="clickEvent('adjustDwell')">调整停留时间</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div style="border: 1px solid #6F3700; height: 50px; text-align: center;"><span style="line-height: 50px" @click="clickEvent('notCommunicating')">Not Communicating</span></div>
|
||||
<div style="border: 1px solid #6F3700; height: 50px; text-align: center;"><span style="line-height: 50px" @click="clickEvent('notCommunicating')">无通信</span></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div style="border: 1px solid #6F3700; border-top: 0; height: 50px; text-align: center;"><span style="line-height: 50px" @click="clickEvent('stoppingProfile')">Stopping Profile</span></div>
|
||||
<div style="border: 1px solid #6F3700; border-top: 0; height: 50px; text-align: center;"><span style="line-height: 50px" @click="clickEvent('stoppingProfile')">停战配置文件</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div style="border-bottom: 1px solid #6F3700; height: 50px; text-align: center;"><span @click="clickEvent('northbound')">Northbound</span><br><span @click="clickEvent('southbound')">Southbound</span></div>
|
||||
<div style="border-bottom: 1px solid #6F3700; height: 50px; text-align: center;"><span @click="clickEvent('northbound')">向北</span><br><span @click="clickEvent('southbound')">向南</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div style="border: 1px solid #6F3700; border-top: 0; height: 50px; text-align: center;" />
|
||||
|
@ -184,10 +184,6 @@ export default {
|
||||
return CMD.Switch.CMD_SWITCH_NORMAL_POSITION;
|
||||
case this.Switch.reverse.button.operation: // 道岔反位
|
||||
return CMD.Switch.CMD_SWITCH_REVERSE_POSITION;
|
||||
case this.MixinCommand.block.button.operation: // 封锁
|
||||
return {};
|
||||
case this.MixinCommand.unblock.button.operation: // 解封
|
||||
return {};
|
||||
case this.Signal.atsAutoControl.button.operation: // 自动控
|
||||
return CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING;
|
||||
case this.Signal.humanControl.button.operation: // 人工控
|
||||
@ -198,7 +194,7 @@ export default {
|
||||
return CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
|
||||
case this.Signal.arrangementRoute.button.operation: // 排列进路
|
||||
return CMD.Signal.CMD_SIGNAL_SET_ROUTE;
|
||||
case this.Signal.guide.button.operation: // 引导进路
|
||||
case this.Signal.guide.button.operation: // 办理引导
|
||||
return CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
|
||||
case this.Signal.reopenSignal.button.operation:
|
||||
return CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL;
|
||||
@ -330,7 +326,9 @@ export default {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL;
|
||||
operate.param = {signalCode: deviceList[0].code};
|
||||
this.deviceList = [];
|
||||
this.$store.dispatch('training/nextNew', newOperate).then(({ valid, response }) => {});
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
} else if (deviceList.length === 2) {
|
||||
this.routeList.forEach(item => {
|
||||
@ -338,7 +336,9 @@ export default {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_ROUTE;
|
||||
operate.param = {routeCode: item.code};
|
||||
this.deviceList = [];
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {});
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -418,6 +418,8 @@ export default {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
} else {
|
||||
const operate = {
|
||||
@ -433,6 +435,8 @@ export default {
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
} else if (deviceList.length === 2) {
|
||||
@ -446,7 +450,9 @@ export default {
|
||||
if (item.startSignalCode === deviceList[0].code && item.endSignalCode === deviceList[1].code) {
|
||||
operate.param = {routeCode: item.code};
|
||||
this.deviceList = [];
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {});
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -463,7 +469,8 @@ export default {
|
||||
operation: this.$store.state.menuOperation.buttonOperation
|
||||
};
|
||||
if (this.routeData[route.code].settingGuide) {
|
||||
operate.cmdType = CMD;
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE;
|
||||
operate.param = {signalCode: model.code};
|
||||
this.deviceList = [];
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {});
|
||||
} else {
|
||||
@ -558,7 +565,9 @@ export default {
|
||||
const operate = this.handelOperate(model);
|
||||
if (this.cmdTypeList.indexOf(model._type) >= 0) {
|
||||
this.deviceList = [];
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {});
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
} else {
|
||||
Handler.clear(); // 清空操作组
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
|
@ -215,7 +215,7 @@ export default {
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
@import "src/styles/mixin.scss";
|
||||
$width: 30px;
|
||||
$height: 60px;
|
||||
$height: 90px;
|
||||
$menuPadding: 10px;
|
||||
$menuItemHeight: 30px;
|
||||
$menuItemWidth: 190px;
|
||||
|
@ -76,6 +76,7 @@ export default {
|
||||
canCommand: true,
|
||||
operate: '',
|
||||
cmdType: '',
|
||||
switchRelevanceSectionList: [], // 道岔关联的区段列表
|
||||
param: {},
|
||||
tableStyle: {
|
||||
'border-bottom': 'none',
|
||||
@ -91,7 +92,12 @@ export default {
|
||||
{ name: '取消锁定', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK, operate: OperationEvent.Switch.unlock.menu.operation, show: false },
|
||||
{ name: '单锁道岔', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK, operate: OperationEvent.Switch.lock.menu.operation, show: false },
|
||||
{ name: '转换定位', cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION, operate: OperationEvent.Switch.locate.menu.operation, show: false },
|
||||
{ name: '转换反位', cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION, operate: OperationEvent.Switch.reverse.menu.operation, show: false }
|
||||
{ name: '转换反位', cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION, operate: OperationEvent.Switch.reverse.menu.operation, show: false },
|
||||
{ name: '封锁区段', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu.operation, show: false },
|
||||
{ name: '解封区段', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menu.operation, show: false },
|
||||
{ name: '轨区消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menu.operation, show: false },
|
||||
{ name: '轨区设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menu.operation, show: false },
|
||||
{ name: '强解区段', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menu.operation, show: false }
|
||||
],
|
||||
signalParamList: [
|
||||
{ name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.setAutoInterlock.menu.operation, show: false },
|
||||
@ -136,9 +142,6 @@ export default {
|
||||
switch (this.selected._type) {
|
||||
case 'Switch':
|
||||
this.handleSwicthMenu();
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
this.deviceHighLight(this.selected, true);
|
||||
this.oldDevice = this.selected;
|
||||
break;
|
||||
case 'Signal':
|
||||
if (this.oldClickObj && this.oldClickObj.code != this.selected.code) {
|
||||
@ -149,16 +152,13 @@ export default {
|
||||
break;
|
||||
case 'Section':
|
||||
this.handleSectionMenu();
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
this.deviceHighLight(this.selected, true);
|
||||
this.oldDevice = this.selected;
|
||||
break;
|
||||
case 'Station':
|
||||
this.handleStationMenu();
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
this.deviceHighLight(this.selected, true);
|
||||
this.oldDevice = this.selected;
|
||||
break;
|
||||
// case 'Station':
|
||||
// this.handleStationMenu();
|
||||
// this.deviceHighLight(this.oldDevice, false);
|
||||
// this.deviceHighLight(this.selected, true);
|
||||
// this.oldDevice = this.selected;
|
||||
// break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -204,6 +204,18 @@ export default {
|
||||
});
|
||||
},
|
||||
handleSwicthMenu() { // 转换底部道岔菜单栏
|
||||
// 获取道岔相关区段显示高亮
|
||||
const section = this.$store.getters['map/getDeviceByCode'](this.selected.sectionParentCode);
|
||||
const sectionA = this.$store.getters['map/getDeviceByCode'](this.selected.sectionACode); // 获取道岔相关的道岔计轴区段
|
||||
const sectionB = this.$store.getters['map/getDeviceByCode'](this.selected.sectionBCode);
|
||||
const sectionC = this.$store.getters['map/getDeviceByCode'](this.selected.sectionCCode);
|
||||
this.switchRelevanceSectionList = [sectionA, sectionB, sectionC];
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
this.switchRelevanceSectionList.forEach(model => {
|
||||
this.deviceHighLight(model, true);
|
||||
});
|
||||
this.oldDevice = section;
|
||||
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
this.swicthParamList.forEach((swicth, index) => {
|
||||
this.centralizedStationList[index] = swicth;
|
||||
@ -211,7 +223,9 @@ export default {
|
||||
this.tempData = [];
|
||||
this.tempData.push(this.selected);
|
||||
this.param = {
|
||||
switchCode: this.selected.code
|
||||
switchCode: this.selected.code,
|
||||
sectionCode: section.code,
|
||||
speedLimitValue: 5
|
||||
};
|
||||
},
|
||||
handleSingalMenu() {
|
||||
@ -261,6 +275,10 @@ export default {
|
||||
}
|
||||
},
|
||||
handleSectionMenu() {
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
this.deviceHighLight(this.selected, true);
|
||||
this.oldDevice = this.selected;
|
||||
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
this.sectionParamList.forEach((swicth, index) => {
|
||||
this.centralizedStationList[index] = swicth;
|
||||
@ -308,7 +326,7 @@ export default {
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.deviceHighLight(this.selected, false); // 当前选中
|
||||
this.deviceHighLight(this.oldDevice, false); // 当前选中
|
||||
this.operate = ''; // 清空指令
|
||||
this.cmdType = '';
|
||||
if (this.oldClickObj) {
|
||||
|
@ -12,7 +12,7 @@
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header" style="line-height: 44px;">
|
||||
{{message}}
|
||||
{{ message }}
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
@ -58,10 +58,10 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ?OperationEvent.Signal.humanTrainRoute.menu.domId : '';
|
||||
return this.dialogShow ? OperationEvent.Signal.cancelGuide.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operate == OperationEvent.Signal.humanTrainRoute.menu.operation) {
|
||||
if (this.operate == OperationEvent.Signal.cancelGuide.menu.operation) {
|
||||
return '人解进路';
|
||||
} else if (this.operate == OperationEvent.Signal.guide.menu.operation) {
|
||||
return '办理引导进路';
|
||||
@ -91,18 +91,18 @@ export default {
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
if (this.operate == OperationEvent.Signal.humanTrainRoute.menu.operation) {
|
||||
this.humanTrainRoute();
|
||||
if (this.operate == OperationEvent.Signal.cancelGuide.menu.operation) {
|
||||
this.cancelGuide();
|
||||
} else if (this.operate == OperationEvent.Signal.guide.menu.operation) {
|
||||
this.guide();
|
||||
}
|
||||
},
|
||||
// 人解进路 / 取消进路引导
|
||||
humanTrainRoute() {
|
||||
cancelGuide() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: this.operate,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
};
|
||||
|
||||
this.sendCommand(operate);
|
||||
|
@ -77,9 +77,9 @@ export default {
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
},
|
||||
{
|
||||
label: '人工解锁进路',
|
||||
label: '人工解锁进路', // 信号机引导取消
|
||||
handler: this.humanTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
},
|
||||
{
|
||||
label: '信号封锁',
|
||||
@ -492,12 +492,12 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 人工解锁进路
|
||||
// 人工解锁进路(信号机取消引导)
|
||||
humanTrainRoute() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
|
||||
operation: OperationEvent.Signal.cancelGuide.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
|
@ -135,6 +135,41 @@ export function parser(data, skinCode, showConfig) {
|
||||
mapDevice[elem.code] = createDevice(deviceType.OutFrame, elem, propConvert, showConfig);
|
||||
}, this);
|
||||
|
||||
zrUtil.each(data.atsControlList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(deviceType.AtsControl, elem, propConvert, showConfig);
|
||||
});
|
||||
|
||||
zrUtil.each(data.centerCommunicationList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(deviceType.CenterCommunication, elem, propConvert, showConfig);
|
||||
});
|
||||
|
||||
zrUtil.each(data.chainControlList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(deviceType.ChainControl, elem, propConvert, showConfig);
|
||||
});
|
||||
|
||||
zrUtil.each(data.intersiteControlList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(deviceType.IntersiteControl, elem, propConvert, showConfig);
|
||||
});
|
||||
|
||||
zrUtil.each(data.leuControlList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(deviceType.LeuControl, elem, propConvert, showConfig);
|
||||
});
|
||||
|
||||
zrUtil.each(data.localControlList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(deviceType.LocalControl, elem, propConvert, showConfig);
|
||||
});
|
||||
|
||||
zrUtil.each(data.maintainList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(deviceType.Maintain, elem, propConvert, showConfig);
|
||||
});
|
||||
|
||||
zrUtil.each(data.powerSupplyList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(deviceType.PowerSupply, elem, propConvert, showConfig);
|
||||
});
|
||||
|
||||
zrUtil.each(data.noOneReturnList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(deviceType.NoOneReturn, elem, propConvert, showConfig);
|
||||
});
|
||||
zrUtil.each(data.trainWindowList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(deviceType.TrainWindow, elem, propConvert, showConfig);
|
||||
if (elem.sectionCode) {
|
||||
@ -176,6 +211,7 @@ export function parser(data, skinCode, showConfig) {
|
||||
const section = mapDevice[cnodeSection.parentCode];
|
||||
if (section) {
|
||||
mapDevice[elem.code].sectionName = section.name;
|
||||
mapDevice[elem.code].sectionParentCode = section.code;
|
||||
section['relSwitchCode'] = elem.code;
|
||||
}
|
||||
|
||||
@ -230,6 +266,15 @@ export function updateMapData(state, model) {
|
||||
case deviceType.GuideLock: updateForList(model, state, 'totalGuideLockButtonVOList'); break;
|
||||
case deviceType.OutFrame: updateForList(model, state, 'outerFrameList'); break;
|
||||
case deviceType.AutomaticRoute: updateForList(model, state, 'automaticRouteButtonList'); break;
|
||||
case deviceType.AtsControl: updateForList(model, state, 'atsControlList'); break;
|
||||
case deviceType.CenterCommunication: updateForList(model, state, 'centerCommunicationList'); break;
|
||||
case deviceType.ChainControl: updateForList(model, state, 'chainControlList'); break;
|
||||
case deviceType.IntersiteControl: updateForList(model, state, 'intersiteControlList'); break;
|
||||
case deviceType.LeuControl: updateForList(model, state, 'leuControlList'); break;
|
||||
case deviceType.LocalControl: updateForList(model, state, 'localControlList'); break;
|
||||
case deviceType.Maintain: updateForList(model, state, 'maintainList'); break;
|
||||
case deviceType.PowerSupply: updateForList(model, state, 'powerSupplyList'); break;
|
||||
case deviceType.NoOneReturn: updateForList(model, state, 'noOneReturnList'); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -57,9 +57,10 @@ export default {
|
||||
},
|
||||
{
|
||||
name: 'global.caseShow',
|
||||
handle: this.goToCaseShow,
|
||||
// handle: this.goToCaseShow,
|
||||
isHelp:true,
|
||||
style:'padding-right:0px;'
|
||||
style:'padding-right:0px;',
|
||||
hidden:getSessionStorage('project').endsWith('hyd')
|
||||
},
|
||||
{
|
||||
name: 'global.scan',
|
||||
@ -105,7 +106,7 @@ export default {
|
||||
return getSessionStorage('project');
|
||||
},
|
||||
isShown() {
|
||||
return getSessionStorage('project') == 'login' || getSessionStorage('project') == 'design';
|
||||
return getSessionStorage('project') == 'login' || getSessionStorage('project') == 'design' || getSessionStorage('project').endsWith('gzb') || getSessionStorage('project').endsWith('xty');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -972,7 +972,8 @@ export const asyncRouter = [
|
||||
path: '/iscs',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'router.iscsSystem'
|
||||
i18n: 'router.iscsSystem',
|
||||
roles: [admin]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
|
@ -76,8 +76,10 @@ export default {
|
||||
CMD_SIGNAL_CLOSE_SIGNAL: {value:'Signal_Close_Signal', label: '信号关灯'},
|
||||
/** 信号重开 */
|
||||
CMD_SIGNAL_REOPEN_SIGNAL: {value:'Signal_Reopen_Signal', label: '信号重开'},
|
||||
/** 引导进路 */
|
||||
CMD_SIGNAL_ROUTE_GUIDE: {value:'Signal_Route_Guide', label: '引导进路'},
|
||||
/** 办理引导 */
|
||||
CMD_SIGNAL_ROUTE_GUIDE: {value:'Signal_Set_Guide', label: '办理引导'},
|
||||
/** 取消引导 */
|
||||
CMD_SIGNAL_CANCEL_GUIDE: {value:'Signal_Cancel_Guide', label: '取消引导'},
|
||||
/** 进路自排开 */
|
||||
CMD_SIGNAL_OPEN_AUTO_SETTING: {value:'Signal_Open_Auto_Setting', label: '进路自排开'},
|
||||
/** 进路自排关 */
|
||||
|
@ -892,7 +892,22 @@ export const OperationEvent = {
|
||||
operation: '317',
|
||||
domId: '_Tips-Signal-SingalPassModel-Menu'
|
||||
}
|
||||
}
|
||||
},
|
||||
// 取消信号机引导
|
||||
cancelGuide: {
|
||||
button: {
|
||||
operation: '3180',
|
||||
domId: '_Tips-Signal-cancelGuide-Mbm{TOP}'
|
||||
},
|
||||
menu: {
|
||||
operation: '318',
|
||||
domId: '_Tips-Signal-cancelGuide-Menu'
|
||||
},
|
||||
confirm: {
|
||||
operation: '3181',
|
||||
domId: '_Tips-Signal-cancelGuide-Confirm'
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
// 物理区段操作
|
||||
|
@ -361,6 +361,69 @@ const map = {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
atsControlList: (state) => {
|
||||
if (state.map) {
|
||||
return state.map.atsControlList || [];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
centerCommunicationList: (state) => {
|
||||
if (state.map) {
|
||||
return state.map.centerCommunicationList || [];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
chainControlList: (state) => {
|
||||
if (state.map) {
|
||||
return state.map.chainControlList || [];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
intersiteControlList: (state) => {
|
||||
if (state.map) {
|
||||
return state.map.intersiteControlList || [];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
leuControlList: (state) => {
|
||||
if (state.map) {
|
||||
return state.map.leuControlList || [];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
powerSupplyList: (state) => {
|
||||
if (state.map) {
|
||||
return state.map.powerSupplyList || [];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
maintainList: (state) => {
|
||||
if (state.map) {
|
||||
return state.map.maintainList || [];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
localControlList: (state) => {
|
||||
if (state.map) {
|
||||
return state.map.localControlList || [];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
noOneReturnList: (state) => {
|
||||
if (state.map) {
|
||||
return state.map.noOneReturnList || [];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
automaticRouteButtonList: (state) => {
|
||||
if (state.map) {
|
||||
return state.map.automaticRouteButtonList || [];
|
||||
|
332
src/views/newMap/newMapdraft/mapoperate/controlLamp.vue
Normal file
332
src/views/newMap/newMapdraft/mapoperate/controlLamp.vue
Normal file
@ -0,0 +1,332 @@
|
||||
<template>
|
||||
<el-tabs v-model="activeName" class="card">
|
||||
<el-tab-pane class="view-control" label="控制灯" 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';
|
||||
|
||||
export default {
|
||||
name: 'ControlLamp',
|
||||
components: {
|
||||
ConfigList,
|
||||
ConfigData
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: function () {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'first',
|
||||
autoList: [],
|
||||
typeList: [
|
||||
{ name: 'LEU通信', value: 'LeuControl' },
|
||||
{ name: '站间通信', value: 'IntersiteControl' },
|
||||
{ name: '中心通信', value: 'CenterCommunication'},
|
||||
{ name: 'ATS通信', value: 'AtsControl' },
|
||||
{ name: '现地主备状态', value: 'LocalControl' },
|
||||
{ name: '连锁主备状态', value: 'ChainControl' },
|
||||
{ name: '维护工作站', value: 'Maintain'},
|
||||
{ name: '电源', value: 'PowerSupply'},
|
||||
{ name: '无人折返', value: 'NoOneReturn'}
|
||||
],
|
||||
editModel: {
|
||||
code: '',
|
||||
type: '',
|
||||
name: '',
|
||||
stationCode: '', // 所属设备集中站
|
||||
position: {
|
||||
x: 0,
|
||||
y: 0
|
||||
}
|
||||
},
|
||||
addModel: {
|
||||
code: '',
|
||||
type: '',
|
||||
name: '',
|
||||
stationCode: '', // 所属设备集中站
|
||||
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' }
|
||||
],
|
||||
'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', [
|
||||
'stationList',
|
||||
'atsControlList',
|
||||
'centerCommunicationList',
|
||||
'chainControlList',
|
||||
'intersiteControlList',
|
||||
'leuControlList',
|
||||
'localControlList',
|
||||
'maintainList',
|
||||
'powerSupplyList',
|
||||
'noOneReturnList'
|
||||
]),
|
||||
form() {
|
||||
const form = {
|
||||
labelWidth: '150px',
|
||||
items: {
|
||||
code: {
|
||||
name: '',
|
||||
item: []
|
||||
},
|
||||
draw: {
|
||||
name: this.$t('map.drawData'),
|
||||
item: [
|
||||
{ prop:'type', label: '表示灯类型:', type: 'select', optionLabel: 'name', optionValue: 'value', options: this.typeList, disabled: true },
|
||||
{ prop: 'code', label: `${this.$t('map.code')}`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.selectLists, 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:'stationCode', label: '所属集中站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList}
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
return form;
|
||||
},
|
||||
formMake() {
|
||||
const form = {
|
||||
labelWidth: '150px',
|
||||
items: [
|
||||
{ prop:'type', label: '表示灯类型:', type: 'select', optionLabel: 'name', optionValue: 'value', options: this.typeList, change: true, deviceChange: this.typeChange },
|
||||
{ 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' }
|
||||
] },
|
||||
{ prop:'stationCode', label: '所属集中站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList}
|
||||
]
|
||||
};
|
||||
return form;
|
||||
},
|
||||
createRules: function () {
|
||||
return {
|
||||
type: [
|
||||
{ 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() {
|
||||
},
|
||||
methods: {
|
||||
typeChange(type) {
|
||||
this.$refs.dataform.resetFields();
|
||||
this.$refs.make.resetFields();
|
||||
this.addModel.type = type;
|
||||
this.handleTypes(type);
|
||||
},
|
||||
handleTypes(type) {
|
||||
switch (type) {
|
||||
case 'AtsControl':
|
||||
this.selectLists = this.atsControlList;
|
||||
break;
|
||||
case 'CenterCommunication':
|
||||
this.selectLists = this.centerCommunicationList;
|
||||
break;
|
||||
case 'ChainControl':
|
||||
this.selectLists = this.chainControlList;
|
||||
break;
|
||||
case 'IntersiteControl':
|
||||
this.selectLists = this.intersiteControlList;
|
||||
break;
|
||||
case 'LeuControl':
|
||||
this.selectLists = this.leuControlList;
|
||||
break;
|
||||
case 'LocalControl':
|
||||
this.selectLists = this.localControlList;
|
||||
break;
|
||||
case 'Maintain':
|
||||
this.selectLists = this.maintainList;
|
||||
break;
|
||||
case 'PowerSupply':
|
||||
this.selectLists = this.powerSupplyList;
|
||||
break;
|
||||
case 'NoOneReturn':
|
||||
this.selectLists = this.noOneReturnList;
|
||||
break;
|
||||
}
|
||||
},
|
||||
changeStation(code) { // 选择对应的所属设备集中站
|
||||
this.autoList.forEach(elem => {
|
||||
if (elem.code == code) {
|
||||
this.addModel.stationCode = elem.stationCode;
|
||||
}
|
||||
});
|
||||
},
|
||||
changeEditStation(code) { // 选择对应的所属设备集中站
|
||||
this.autoList.forEach(elem => {
|
||||
if (elem.code == code) {
|
||||
this.editModel.stationCode = elem.stationCode;
|
||||
}
|
||||
});
|
||||
},
|
||||
deviceChange(code) {
|
||||
this.$emit('setCenter', code);
|
||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
this.$refs.dataform.resetFields();
|
||||
this.$refs.make.resetFields();
|
||||
if (selected && selected._type.toUpperCase() === 'LeuControl'.toUpperCase() || selected._type.toUpperCase() === 'IntersiteControl'.toUpperCase() ||
|
||||
selected._type.toUpperCase() === 'CenterCommunication'.toUpperCase() || selected._type.toUpperCase() === 'AtsControl'.toUpperCase() ||
|
||||
selected._type.toUpperCase() === 'LocalControl'.toUpperCase() || selected._type.toUpperCase() === 'ChainControl'.toUpperCase() ||
|
||||
selected._type.toUpperCase() === 'Maintain'.toUpperCase() || selected._type.toUpperCase() === 'PowerSupply'.toUpperCase() || selected._type.toUpperCase() === 'NoOneReturn'.toUpperCase()) {
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
this.editModel.type = selected._type;
|
||||
}
|
||||
},
|
||||
// 创建对象
|
||||
create() {
|
||||
this.$refs.make.validate((valid) => {
|
||||
if (valid) {
|
||||
const uid = getUID(this.addModel.type, this.selectLists); // 根据类型写 uid 前缀命名
|
||||
const models = [];
|
||||
const model = {
|
||||
_type: this.addModel.type,
|
||||
code: uid,
|
||||
name: this.addModel.name,
|
||||
position: {
|
||||
x: this.addModel.position.x,
|
||||
y: this.addModel.position.y
|
||||
},
|
||||
stationCode: this.addModel.stationCode // 所属设备集中站
|
||||
};
|
||||
models.push(model);
|
||||
this.$emit('updateMapModel', models);
|
||||
this.$refs.make.resetForm();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 修改对象
|
||||
edit() {
|
||||
this.$refs['dataform'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: this.editModel.type}, this.editModel);
|
||||
this.$emit('updateMapModel', [data]);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除对象
|
||||
deleteObj() {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'LeuControl'.toUpperCase() || selected._type.toUpperCase() === 'IntersiteControl'.toUpperCase() ||
|
||||
selected._type.toUpperCase() === 'CenterCommunication'.toUpperCase() || selected._type.toUpperCase() === 'AtsControl'.toUpperCase() ||
|
||||
selected._type.toUpperCase() === 'LocalControl'.toUpperCase() || selected._type.toUpperCase() === 'ChainControl'.toUpperCase() ||
|
||||
selected._type.toUpperCase() === 'Maintain'.toUpperCase() || selected._type.toUpperCase() === 'PowerSupply'.toUpperCase() || selected._type.toUpperCase() === 'NoOneReturn'.toUpperCase()) {
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
this.$refs.dataform.resetFields();
|
||||
}).catch(() => {
|
||||
this.$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"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="表示灯" class="tab_pane_box" name="ControlLamp">
|
||||
<control-lamp
|
||||
ref="ControlLamp"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.train')" class="tab_pane_box" name="Train">
|
||||
<train-draft
|
||||
ref="Train"
|
||||
@ -180,6 +188,7 @@ import OutFrameDraft from './outFrameControl';
|
||||
import LcControlDraft from './lcControl';
|
||||
import ImageControlDraft from './ImageControl';
|
||||
import CheckboxDraft from './checkboxDraft';
|
||||
import ControlLamp from './controlLamp';
|
||||
|
||||
import { ViewMode } from '@/scripts/ConstDic';
|
||||
|
||||
@ -203,7 +212,8 @@ export default {
|
||||
OutFrameDraft,
|
||||
LcControlDraft,
|
||||
ImageControlDraft,
|
||||
CheckboxDraft
|
||||
CheckboxDraft,
|
||||
ControlLamp
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -303,6 +313,8 @@ export default {
|
||||
this.enabledTab = 'Section';
|
||||
} else if (type == 'AutomaticRoute' || type == 'AutoTurnBack' || type == 'AxleReset' || type == 'LimitControl' || type == 'GuideLock') {
|
||||
this.enabledTab = 'ControlDraft';
|
||||
} else if (type == 'AtsControl' || type == 'CenterCommunication' || type == 'ChainControl' || type == 'InteresiteControl' || type == 'LeuControl' || type == 'LocalControl' || type == 'Maintain' || type == 'PowerSupply' || type == 'NoOneReturn') {
|
||||
this.enabledTab = 'ControlLamp';
|
||||
} else {
|
||||
this.enabledTab = type;
|
||||
}
|
||||
|
@ -117,6 +117,7 @@ export default {
|
||||
code: '',
|
||||
type: '',
|
||||
width: 1,
|
||||
lineColor: '',
|
||||
showConditions: '01',
|
||||
points: []
|
||||
},
|
||||
@ -172,6 +173,7 @@ export default {
|
||||
item: [
|
||||
{ prop: 'code', label: this.$t('map.lineCoding'), type: 'select', optionLabel: 'code', optionValue: 'code', options: this.lineList, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'type', label: this.$t('map.lineType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.LineTypeList },
|
||||
{ prop: 'lineColor', label: this.$t('map.lineColor'), type: 'color' },
|
||||
{ prop: 'width', label: this.$t('map.lineWidth'), type: 'number', min: 1, placeholder: 'px' },
|
||||
{ prop: 'showConditions', label: this.$t('map.showConditions'), type: 'radio', optionLabel: 'label', optionValue:'value', radioList: this.showConditionsList},
|
||||
{ prop: 'points', label: this.$t('map.segmentCoordinates'), type: 'points', width: '100px', isHidden: !this.isPointsShow, addPoint: this.addPoint, delPoint: this.delPoint }
|
||||
@ -230,6 +232,7 @@ export default {
|
||||
code: getUID('Line', this.lineList),
|
||||
type: this.addModel.type,
|
||||
width: this.addModel.width,
|
||||
lineColor: '#FFFFFF',
|
||||
points: JSON.parse(pointArr)
|
||||
};
|
||||
this.$emit('updateMapModel', model);
|
||||
|
Loading…
Reference in New Issue
Block a user