西安二号线调整

This commit is contained in:
fan 2020-04-14 15:45:13 +08:00
parent c8a500c5dd
commit 61c2260d93
19 changed files with 619 additions and 578 deletions

View File

@ -346,94 +346,6 @@ class SkinCode extends defaultStyle {
lamp: 1, // 灯数量 lamp: 1, // 灯数量
lampSpace: 60 // 灯间距 lampSpace: 60 // 灯间距
}, },
unmanned: { // 无人折返标识
width: 25, // 无人折返宽度
defaultColor: '#9F9C9C', // 默认颜色
activeColor: '#FFFFFF' // 激活颜色
},
lampFilament:{ // 信号机灯丝警告
width: 12,
defaultColor: '#9F9C9C', // 默认颜色
warningColor: '#FFFF00' // 告警颜色
},
controlSwitch: { // LCW/ATS控制开关
width: 25,
defaultColor: '#FFFFFF', // 默认颜色
lcwColor: '#FFFF00', // LCW控制颜色
faultColor: '#FF0000' // 故障颜色
},
foldbackMode: { // 折返模式组
insideDistance: 2, // 折返模块边框内部距离
outsideDistance: 10, // 折返模块边框之间距离
rectWidth: 20, // 折返模块宽度
lineWidth: 3, // 折返模块线宽
fillColor: 'rgba(0,0,0,0)', // 填充色
strokeColor: '#FFFFFF' // 线颜色
},
axle: {
lineLength: 14,
lineWidth: 2,
distance: 5,
radiusR: 3,
strokeColor: '#9F9C9C',
fillColor: '#9F9C9C',
resetStrokeColor: '#FFFF00',
resetFillColor: '#FFFF00'
},
controlMode: {
fontSize: 12, // 字体大小
distance: 30, // 模式间距
routeMode: {
defaultText: 'AU', // 默认状态 启动自动进路模式
defaultColor: '#00FF00', // 默认状态 启动自动进路模式
artificialRouteText: 'MU', // 人工进路模式
artificialRouteColor: '#FF0000' // 人工进路模式
},
stationControlMode: {
defaultText: 'CC', // 中央控制车站
defaultColor: '#FFFFFF', // 中央控制车站
localControlText: 'LC', // 本地控制车站
localControlColor: '#FFFF00', // 本地控制车站
emergencyControlText: 'EL', // 本地紧急越权控制
emergencyControlColor: '#FF0000' // 本地紧急越权控制
},
stationCommunication: {
defaultText: 'CL', // 现场建立通信
defaultColor: '#00FF00', // 现场建立通信
disconnectText: 'DL', // 现场连接断开
disconnectColor: '#FF0000'
},
verifyBypass: {
defaultText: 'VA', // 默认 验证生效
defaultColor: '#00FF00', // 默认 验证生效
invalidText: 'BV', // 验证旁路检查(无检验起效)
invalidColor: '#FF0000' // 验证旁路检查(无检验起效)
}
},
deviceStatus: {
fontSize: 12, // 字体大小
distance: 30, // 模式间距
psd: {
text: 'PSD',
defaultColor: '#FFF'
},
mfa: {
text: 'MFA',
defaultColor: '#FFF'
},
mfb: {
text: 'MFB',
defaultColor: '#FFF'
},
pfa: {
text: 'PFA',
defaultColor: '#FFF'
},
pfb: {
text: 'PFB',
defaultColor: '#FFF'
}
},
StationControl:{ StationControl:{
text: { text: {
distance: 2, // 灯和文字之间的距离 distance: 2, // 灯和文字之间的距离
@ -588,7 +500,102 @@ class SkinCode extends defaultStyle {
lineWidth: 1, // 车次窗线宽 lineWidth: 1, // 车次窗线宽
trainWindowSmooth: 0 // 车次窗矩形圆滑程度 trainWindowSmooth: 0 // 车次窗矩形圆滑程度
}; };
this[deviceType.NoOneReturn] = {
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
showShape: 'Unmanned', // 显示形状 svg 的Unmanneds
width: 25, // 无人折返宽度
defaultColor: '#9F9C9C', // 默认颜色
activeColor: '#FFFFFF' // 激活颜色
};
this[deviceType.Axle] = {
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
lineLength: 14,
lineWidth: 2,
distance: 5,
radiusR: 3,
strokeColor: '#9F9C9C',
fillColor: '#9F9C9C',
resetStrokeColor: '#FFFF00',
resetFillColor: '#FFFF00'
};
this[deviceType.FaultStatusGroup] = { // 故障状态
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
fontSize: 12, // 字体大小
distance: 30, // 模式间距
psd: {
text: 'PSD',
defaultColor: '#FFF'
},
mfa: {
text: 'MFA',
defaultColor: '#FFF'
},
mfb: {
text: 'MFB',
defaultColor: '#FFF'
},
pfa: {
text: 'PFA',
defaultColor: '#FFF'
},
pfb: {
text: 'PFB',
defaultColor: '#FFF'
}
};
this[deviceType.ReturnModeGroup] = {
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
insideDistance: 2, // 折返模块边框内部距离
outsideDistance: 10, // 折返模块边框之间距离
rectWidth: 20, // 折返模块宽度
lineWidth: 3, // 折返模块线宽
fillColor: 'rgba(0,0,0,0)', // 填充色
strokeColor: '#FFFFFF' // 线颜色
};
this[deviceType.ModeStatusGroup] = { // 车站状态模式
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
fontSize: 12, // 字体大小
distance: 30, // 模式间距
routeMode: {
defaultText: 'AU', // 默认状态 启动自动进路模式
defaultColor: '#00FF00', // 默认状态 启动自动进路模式
artificialRouteText: 'MU', // 人工进路模式
artificialRouteColor: '#FF0000' // 人工进路模式
},
stationControlMode: {
defaultText: 'CC', // 中央控制车站
defaultColor: '#FFFFFF', // 中央控制车站
localControlText: 'LC', // 本地控制车站
localControlColor: '#FFFF00', // 本地控制车站
emergencyControlText: 'EL', // 本地紧急越权控制
emergencyControlColor: '#FF0000' // 本地紧急越权控制
},
stationCommunication: {
defaultText: 'CL', // 现场建立通信
defaultColor: '#00FF00', // 现场建立通信
disconnectText: 'DL', // 现场连接断开
disconnectColor: '#FF0000'
},
verifyBypass: {
defaultText: 'VA', // 默认 验证生效
defaultColor: '#00FF00', // 默认 验证生效
invalidText: 'BV', // 验证旁路检查(无检验起效)
invalidColor: '#FF0000' // 验证旁路检查(无检验起效)
}
};
this[deviceType.ControlSwitch] = { // 控制开关
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
width: 25,
defaultColor: '#FFFFFF', // 默认颜色
lcwColor: '#FFFF00', // LCW控制颜色
faultColor: '#FF0000' // 故障颜色
};
this[deviceType.LampFilament] = { // 灯丝告警
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
width: 12,
defaultColor: '#9F9C9C', // 默认颜色
warningColor: '#FFFF00' // 告警颜色
};
this[deviceType.Train] = { this[deviceType.Train] = {
trainBody: { trainBody: {
trainBodyLineWidth: 1, // 车身line宽 trainBodyLineWidth: 1, // 车身line宽

View File

@ -200,5 +200,34 @@ deviceRender[deviceType.ZcCommunication] = {
_type: deviceType.ZcCommunication, _type: deviceType.ZcCommunication,
zlevel: 1 zlevel: 1
}; };
/** FaultStatusGroup 故障状态表示组(西安二号线) */
deviceRender[deviceType.FaultStatusGroup] = {
_type: deviceType.FaultStatusGroup,
zlevel: 1
};
/** ModeStatusGroup 车站状态模式表示组(西安二号线) */
deviceRender[deviceType.ModeStatusGroup] = {
_type: deviceType.ModeStatusGroup,
zlevel: 1
};
/** LampFilament 信号灯丝告警 */
deviceRender[deviceType.LampFilament] = {
_type: deviceType.LampFilament,
zlevel: 1
};
/** ReturnModeGroup 折返模式组(西安二号线) */
deviceRender[deviceType.ReturnModeGroup] = {
_type: deviceType.ReturnModeGroup,
zlevel: 1
};
/** ControlSwitch LCW/ATS控制开关 */
deviceRender[deviceType.ControlSwitch] = {
_type: deviceType.ControlSwitch,
zlevel: 1
};
/** Axle 计轴预复位 */
deviceRender[deviceType.Axle] = {
_type:deviceType.Axle,
zlevel: 1
};
export default deviceRender; export default deviceRender;

View File

@ -33,7 +33,13 @@ const deviceType = {
PowerSupply: 'PowerSupply', PowerSupply: 'PowerSupply',
NoOneReturn: 'NoOneReturn', NoOneReturn: 'NoOneReturn',
MaintenanceLamps: 'MaintenanceLamps', MaintenanceLamps: 'MaintenanceLamps',
ZcCommunication: 'ZcCommunication' ZcCommunication: 'ZcCommunication',
FaultStatusGroup: 'FaultStatusGroup',
ModeStatusGroup: 'ModeStatusGroup',
LampFilament: 'LampFilament',
ReturnModeGroup: 'ReturnModeGroup',
ControlSwitch: 'ControlSwitch',
Axle: 'Axle'
}; };
export default deviceType; export default deviceType;

View File

@ -18,54 +18,54 @@ export default class EAxle extends Group {
shape: { shape: {
x1: model.x, x1: model.x,
y1: model.y, y1: model.y,
x2: model.x + model.style.Station.axle.lineLength, x2: model.x + model.style.Axle.lineLength,
y2: model.y y2: model.y
}, },
style: { style: {
lineWidth: model.style.Station.axle.lineWidth, lineWidth: model.style.Axle.lineWidth,
stroke: model.style.Station.axle.strokeColor stroke: model.style.Axle.strokeColor
} }
}); });
this.arc1 = new Arc({ this.arc1 = new Arc({
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
shape: { shape: {
cx: model.x + model.style.Station.axle.distance, cx: model.x + model.style.Axle.distance,
cy: model.y, cy: model.y,
r: model.style.Station.axle.radiusR r: model.style.Axle.radiusR
}, },
style: { style: {
lineWidth: 0, lineWidth: 0,
fill: model.style.Station.axle.fillColor, fill: model.style.Axle.fillColor,
stroke: model.style.Station.axle.strokeColor stroke: model.style.Axle.strokeColor
} }
}); });
this.line2 = new Line({ this.line2 = new Line({
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
shape: { shape: {
x1: model.x + model.style.Station.axle.lineLength + model.style.Station.axle.distance, x1: model.x + model.style.Axle.lineLength + model.style.Axle.distance,
y1: model.y, y1: model.y,
x2: model.x + model.style.Station.axle.lineLength * 2 + model.style.Station.axle.distance, x2: model.x + model.style.Axle.lineLength * 2 + model.style.Axle.distance,
y2: model.y y2: model.y
}, },
style: { style: {
lineWidth: model.style.Station.axle.lineWidth, lineWidth: model.style.Axle.lineWidth,
stroke: model.style.Station.axle.strokeColor stroke: model.style.Axle.strokeColor
} }
}); });
this.arc2 = new Arc({ this.arc2 = new Arc({
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
shape: { shape: {
cx: model.x + model.style.Station.axle.lineLength * 2, cx: model.x + model.style.Axle.lineLength * 2,
cy: model.y, cy: model.y,
r: model.style.Station.axle.radiusR r: model.style.Axle.radiusR
}, },
style: { style: {
lineWidth: 0, lineWidth: 0,
fill: model.style.Station.axle.fillColor, fill: model.style.Axle.fillColor,
stroke: model.style.Station.axle.strokeColor stroke: model.style.Axle.strokeColor
} }
}); });
this.add(this.line1); this.add(this.line1);

View File

@ -18,10 +18,10 @@ export default class EDeviceStatus extends Group {
x: model.x, x: model.x,
y: model.y, y: model.y,
fontWeight: model.style.textStyle.fontWeight, fontWeight: model.style.textStyle.fontWeight,
fontSize: model.style.Station.deviceStatus.fontSize, fontSize: model.style.FaultStatusGroup.fontSize,
fontFamily: model.style.fontFamily, fontFamily: model.style.fontFamily,
text: model.style.Station.deviceStatus.psd.text, text: model.style.FaultStatusGroup.psd.text,
textFill: model.style.Station.deviceStatus.psd.defaultColor, textFill: model.style.FaultStatusGroup.psd.defaultColor,
textAlign: model.style.textStyle.textAlign, textAlign: model.style.textStyle.textAlign,
textVerticalAlign: model.style.textStyle.textVerticalAlign textVerticalAlign: model.style.textStyle.textVerticalAlign
} }
@ -30,13 +30,13 @@ export default class EDeviceStatus extends Group {
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
style: { style: {
x: model.x + model.style.Station.deviceStatus.distance, x: model.x + model.style.FaultStatusGroup.distance,
y: model.y, y: model.y,
fontWeight: model.style.textStyle.fontWeight, fontWeight: model.style.textStyle.fontWeight,
fontSize: model.style.Station.deviceStatus.fontSize, fontSize: model.style.FaultStatusGroup.fontSize,
fontFamily: model.style.fontFamily, fontFamily: model.style.fontFamily,
text: model.style.Station.deviceStatus.mfa.text, text: model.style.FaultStatusGroup.mfa.text,
textFill: model.style.Station.deviceStatus.mfa.defaultColor, textFill: model.style.FaultStatusGroup.mfa.defaultColor,
textAlign: model.style.textStyle.textAlign, textAlign: model.style.textStyle.textAlign,
textVerticalAlign: model.style.textStyle.textVerticalAlign textVerticalAlign: model.style.textStyle.textVerticalAlign
} }
@ -45,13 +45,13 @@ export default class EDeviceStatus extends Group {
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
style: { style: {
x: model.x + model.style.Station.deviceStatus.distance * 2, x: model.x + model.style.FaultStatusGroup.distance * 2,
y: model.y, y: model.y,
fontWeight: model.style.textStyle.fontWeight, fontWeight: model.style.textStyle.fontWeight,
fontSize: model.style.Station.deviceStatus.fontSize, fontSize: model.style.FaultStatusGroup.fontSize,
fontFamily: model.style.fontFamily, fontFamily: model.style.fontFamily,
text: model.style.Station.deviceStatus.mfb.text, text: model.style.FaultStatusGroup.mfb.text,
textFill: model.style.Station.deviceStatus.mfb.defaultColor, textFill: model.style.FaultStatusGroup.mfb.defaultColor,
textAlign: model.style.textStyle.textAlign, textAlign: model.style.textStyle.textAlign,
textVerticalAlign: model.style.textStyle.textVerticalAlign textVerticalAlign: model.style.textStyle.textVerticalAlign
} }
@ -60,13 +60,13 @@ export default class EDeviceStatus extends Group {
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
style: { style: {
x: model.x + model.style.Station.deviceStatus.distance * 3, x: model.x + model.style.FaultStatusGroup.distance * 3,
y: model.y, y: model.y,
fontWeight: model.style.textStyle.fontWeight, fontWeight: model.style.textStyle.fontWeight,
fontSize: model.style.Station.deviceStatus.fontSize, fontSize: model.style.FaultStatusGroup.fontSize,
fontFamily: model.style.fontFamily, fontFamily: model.style.fontFamily,
text: model.style.Station.deviceStatus.pfa.text, text: model.style.FaultStatusGroup.pfa.text,
textFill: model.style.Station.deviceStatus.pfa.defaultColor, textFill: model.style.FaultStatusGroup.pfa.defaultColor,
textAlign: model.style.textStyle.textAlign, textAlign: model.style.textStyle.textAlign,
textVerticalAlign: model.style.textStyle.textVerticalAlign textVerticalAlign: model.style.textStyle.textVerticalAlign
} }
@ -75,13 +75,13 @@ export default class EDeviceStatus extends Group {
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
style: { style: {
x: model.x + model.style.Station.deviceStatus.distance * 4, x: model.x + model.style.FaultStatusGroup.distance * 4,
y: model.y, y: model.y,
fontWeight: model.style.textStyle.fontWeight, fontWeight: model.style.textStyle.fontWeight,
fontSize: model.style.Station.deviceStatus.fontSize, fontSize: model.style.FaultStatusGroup.fontSize,
fontFamily: model.style.fontFamily, fontFamily: model.style.fontFamily,
text: model.style.Station.deviceStatus.pfb.text, text: model.style.FaultStatusGroup.pfb.text,
textFill: model.style.Station.deviceStatus.pfb.defaultColor, textFill: model.style.FaultStatusGroup.pfb.defaultColor,
textAlign: model.style.textStyle.textAlign, textAlign: model.style.textStyle.textAlign,
textVerticalAlign: model.style.textStyle.textVerticalAlign textVerticalAlign: model.style.textStyle.textVerticalAlign
} }

View File

@ -0,0 +1,127 @@
import Group from 'zrender/src/container/Group';
import Rect from 'zrender/src/graphic/shape/Rect';
import Line from 'zrender/src/graphic/shape/Line';
export default class EFoldbackMode extends Group {
constructor(model) {
super();
this.model = model;
this.zlevel = model.zlevel;
this._subType = model._subType;
this.z = model.z;
this.onmouseover = model.mouseover;
this.onmouseout = model.mouseout;
this.create(model);
}
create(model) {
const style = model.style;
this.lateralLinePriorityRect = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: model.x,
y: model.y,
width: model.width,
height:model.width
},
style: {
lineWidth: style.ReturnModeGroup.lineWidth,
stroke: style.ReturnModeGroup.strokeColor,
fill: style.ReturnModeGroup.fillColor
}
});
this.lateralLinePriority1 = new Line({
zlevel: model.zlevel,
z: model.z,
shape: {
x1: model.x + model.style.ReturnModeGroup.insideDistance,
y1: model.y + model.style.ReturnModeGroup.insideDistance,
x2: model.x + model.width - style.ReturnModeGroup.insideDistance,
y2: model.y + model.width - style.ReturnModeGroup.insideDistance
},
style: {
lineWidth: model.style.ReturnModeGroup.lineWidth,
stroke: model.style.ReturnModeGroup.strokeColor
}
});
this.lateralLinePriority2 = new Line({
zlevel: model.zlevel,
z: model.z,
shape: {
x1: model.x + model.width - style.ReturnModeGroup.insideDistance,
y1: model.y + style.ReturnModeGroup.insideDistance,
x2: model.x + style.ReturnModeGroup.insideDistance,
y2: model.y + model.width - style.ReturnModeGroup.insideDistance
},
style: {
lineWidth: style.ReturnModeGroup.lineWidth,
stroke: style.ReturnModeGroup.strokeColor
}
});
this.add(this.lateralLinePriorityRect);
this.add(this.lateralLinePriority1);
this.add(this.lateralLinePriority2);
this.linearFoldbackRect = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: model.x + model.width + style.ReturnModeGroup.outsideDistance,
y: model.y,
width: model.width,
height:model.width
},
style: {
lineWidth: style.ReturnModeGroup.lineWidth,
stroke: style.ReturnModeGroup.strokeColor,
fill: style.ReturnModeGroup.fillColor
}
});
this.linearFoldback = new Line({
zlevel: model.zlevel,
z: model.z,
shape: {
x1: model.x + model.width + style.ReturnModeGroup.outsideDistance + style.ReturnModeGroup.insideDistance,
y1: model.y + model.width / 2,
x2: model.x + model.width * 2 + style.ReturnModeGroup.outsideDistance - style.ReturnModeGroup.insideDistance,
y2: model.y + model.width / 2
},
style: {
lineWidth: style.ReturnModeGroup.lineWidth,
stroke: style.ReturnModeGroup.strokeColor
}
});
this.add(this.linearFoldbackRect);
this.add(this.linearFoldback);
this.lateralLineRect = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: model.x + model.width * 2 + style.ReturnModeGroup.outsideDistance * 2,
y: model.y,
width: model.width,
height:model.width
},
style: {
lineWidth: style.ReturnModeGroup.lineWidth,
stroke: style.ReturnModeGroup.strokeColor,
fill: style.ReturnModeGroup.fillColor
}
});
this.lateralLine = new Line({
zlevel: model.zlevel,
z: model.z,
shape: {
x1: model.x + model.width * 2 + style.ReturnModeGroup.outsideDistance * 2 + style.ReturnModeGroup.insideDistance,
y1: model.y + model.width - style.ReturnModeGroup.insideDistance,
x2: model.x + model.width * 3 + style.ReturnModeGroup.outsideDistance * 2 - style.ReturnModeGroup.insideDistance,
y2: model.y + style.ReturnModeGroup.insideDistance
},
style: {
lineWidth: style.ReturnModeGroup.lineWidth,
stroke: style.ReturnModeGroup.strokeColor
}
});
this.add(this.lateralLineRect);
this.add(this.lateralLine);
}
}

View File

@ -0,0 +1,80 @@
import Group from 'zrender/src/container/Group';
import Text from 'zrender/src/graphic/Text';
export default class EDeviceStatus extends Group {
constructor(model) {
super();
this.model = model;
this.zlevel = model.zlevel;
this._subType = model._subType;
this.z = model.z;
this.create(model);
}
create(model) {
const style = this.model.style;
this.routeMode = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: model.x,
y: model.y,
fontWeight: style.textStyle.fontWeight,
fontSize: style.ModeStatusGroup.fontSize,
fontFamily: style.fontFamily,
text: style.ModeStatusGroup.routeMode.defaultText,
textFill: style.ModeStatusGroup.routeMode.defaultColor,
textAlign: style.textStyle.textAlign,
textVerticalAlign: style.textStyle.textVerticalAlign
}
});
this.stationControlMode = new Text({
zlevle: this.zlevle,
z: this.z,
style: {
x: model.x + style.ModeStatusGroup.distance,
y: model.y,
fontWeight: style.textStyle.fontWeight,
fontSize: style.ModeStatusGroup.fontSize,
fontFamily: style.fontFamily,
text: style.ModeStatusGroup.stationControlMode.defaultText,
textFill: style.ModeStatusGroup.stationControlMode.defaultColor,
textAlign: style.textStyle.textAlign,
textVerticalAlign: style.textStyle.textVerticalAlign
}
});
this.stationCommunication = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: model.x + style.ModeStatusGroup.distance * 2,
y: model.y,
fontWeight: style.textStyle.fontWeight,
fontSize: style.ModeStatusGroup.fontSize,
fontFamily: style.fontFamily,
text: style.ModeStatusGroup.stationCommunication.defaultText,
textFill: style.ModeStatusGroup.stationControlMode.defaultColor,
textAlign: style.textStyle.textAlign,
textVerticalAlign: style.textStyle.textVerticalAlign
}
});
this.verifyBypass = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: model.x + style.ModeStatusGroup.distance * 3,
y: model.y,
fontWeight: style.textStyle.fontWeight,
fontSize: style.ModeStatusGroup.fontSize,
fontFamily: style.fontFamily,
text: style.ModeStatusGroup.verifyBypass.defaultText,
textFill: style.ModeStatusGroup.verifyBypass.defaultColor,
textAlign: style.textStyle.textAlign,
textVerticalAlign: style.textStyle.textVerticalAlign
}
});
this.add(this.routeMode);
this.add(this.stationControlMode);
this.add(this.stationCommunication);
this.add(this.verifyBypass);
}
}

View File

@ -3,6 +3,13 @@ import EControl from '../element/EControl';
import EMouse from './EMouse'; import EMouse from './EMouse';
import {isShowThePrdType} from '../../utils/handlePath'; import {isShowThePrdType} from '../../utils/handlePath';
import deviceType from '../../constant/deviceType'; import deviceType from '../../constant/deviceType';
import ELampFilament from './ELampFilament';
import EControlSwitch from './EControlSwitch';
import EFoldbackMode from './EFoldbackMode';
import EDeviceStatus from './EDeviceStatus';
import EModeStatus from './EModeStatus';
import EUnmanned from './EUnmanned';
import EAxle from './EAxle';
export default class SaidLamp extends Group { export default class SaidLamp extends Group {
constructor(model, style) { constructor(model, style) {
@ -14,6 +21,7 @@ export default class SaidLamp extends Group {
this.model = model; this.model = model;
this.style = style; this.style = style;
this.deviceStyle = style[model._type]; this.deviceStyle = style[model._type];
if (!this.deviceStyle) { return; }
this.isShowShape = true; this.isShowShape = true;
if (isShowThePrdType(model.prdType, this.deviceStyle.displayCondition) || model.previewOrMapDraw) { if (isShowThePrdType(model.prdType, this.deviceStyle.displayCondition) || model.previewOrMapDraw) {
this.create(); this.create();
@ -27,35 +35,138 @@ export default class SaidLamp extends Group {
create() { create() {
const model = this.model; const model = this.model;
this.control = new EControl({ const lampDevice = ['LeuControl', 'IntersiteControl', 'CenterCommunication', 'AtsControl', 'LocalControl', 'ChainControl', 'Maintain', 'PowerSupply', 'MaintenanceLamps', 'ZcCommunication'];
zlevel: this.zlevel, if (lampDevice.includes(this._type)) {
z: this.z, this.control = new EControl({
arc: { zlevel: this.zlevel,
shape: { z: this.z,
cx: model.position.x, arc: {
cy: model.position.y, shape: {
r: this.deviceStyle.lamp.radiusR cx: model.position.x,
cy: model.position.y,
r: this.deviceStyle.lamp.radiusR
},
subType: 'Control',
lineWidth: 0,
fill: this.deviceStyle.lamp.controlColor
}, },
subType: 'Control', text: {
lineWidth: 0, position: [0, 0],
fill: this.deviceStyle.lamp.controlColor x: model.position.x,
}, y: model.position.y + this.deviceStyle.lamp.radiusR + this.deviceStyle.text.distance,
text: { fontWeight: this.deviceStyle.text.fontWeight,
position: [0, 0], 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);
} else if (this._type === 'LampFilament') {
this.control = new ELampFilament({
zlevel: this.zlevel,
z: this.z,
x: model.position.x, x: model.position.x,
y: model.position.y + this.deviceStyle.lamp.radiusR + this.deviceStyle.text.distance, y: model.position.y,
fontWeight: this.deviceStyle.text.fontWeight, _subType: 'LampFilament',
fontSize: this.deviceStyle.text.fontSize, width: this.deviceStyle.width,
fontFamily: this.style.fontFamily, fill: this.deviceStyle.defaultColor
text: model.name, });
textFill: '#fff', this.add(this.control);
textAlign: 'middle', } else if (this._type === 'ControlSwitch') {
textVerticalAlign: 'top' this.control = new EControlSwitch({
}, zlevel: this.zlevel,
style: this.style z: this.z,
}); x: model.position.x,
y: model.position.y,
this.add(this.control); _subType: 'ControlSwitch',
width: this.deviceStyle.width,
fill: this.deviceStyle.defaultColor
});
this.add(this.control);
} else if (this._type === 'FaultStatusGroup') {
this.control = new EDeviceStatus({
zlevel: this.zlevel,
z: this.z,
x: model.position.x,
y: model.position.y,
style: this.style
});
this.add(this.control);
} else if (this._type === 'ReturnModeGroup') {
this.control = new EFoldbackMode({
zlevel: this.zlevel,
z: this.z,
x: model.position.x,
y: model.position.y,
width: this.deviceStyle.rectWidth,
style: this.style
});
this.add(this.control);
} else if (this._type === 'ModeStatusGroup') {
this.control = new EModeStatus({
zlevel: this.zlevel,
z: this.z,
x: model.position.x,
y: model.position.y,
style: this.style
});
this.add(this.control);
} else if (this._type === 'Axle') {
this.control = new EAxle({
zlevel: this.zlevel,
z: this.z,
x: model.position.x,
y: model.position.y,
style: this.style
});
this.add(this.control);
} else if (this._type === 'NoOneReturn') {
if (this.deviceStyle.showShape === 'Unmanned') {
this.control = new EUnmanned({
zlevel: this.zlevel,
z: this.z,
x: model.unmannedPosition.x,
y: model.unmannedPosition.y,
_subType: 'Unmanned',
width: this.style.NoOneReturn.width,
fill: this.style.NoOneReturn.defaultColor
});
this.add(this.control);
} else {
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);
}
}
} }
// 设置状态 // 设置状态

View File

@ -1,127 +0,0 @@
import Group from 'zrender/src/container/Group';
import Rect from 'zrender/src/graphic/shape/Rect';
import Line from 'zrender/src/graphic/shape/Line';
export default class EFoldbackMode extends Group {
constructor(model) {
super();
this.model = model;
this.zlevel = model.zlevel;
this._subType = model._subType;
this.z = model.z;
this.onmouseover = model.mouseover;
this.onmouseout = model.mouseout;
this.create(model);
}
create(model) {
const style = model.style;
this.lateralLinePriorityRect = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: model.x,
y: model.y,
width: model.width,
height:model.width
},
style: {
lineWidth: style.Station.foldbackMode.lineWidth,
stroke: style.Station.foldbackMode.strokeColor,
fill: style.Station.foldbackMode.fillColor
}
});
this.lateralLinePriority1 = new Line({
zlevel: model.zlevel,
z: model.z,
shape: {
x1: model.x + model.style.Station.foldbackMode.insideDistance,
y1: model.y + model.style.Station.foldbackMode.insideDistance,
x2: model.x + model.width - style.Station.foldbackMode.insideDistance,
y2: model.y + model.width - style.Station.foldbackMode.insideDistance
},
style: {
lineWidth: model.style.Station.foldbackMode.lineWidth,
stroke: model.style.Station.foldbackMode.strokeColor
}
});
this.lateralLinePriority2 = new Line({
zlevel: model.zlevel,
z: model.z,
shape: {
x1: model.x + model.width - style.Station.foldbackMode.insideDistance,
y1: model.y + style.Station.foldbackMode.insideDistance,
x2: model.x + style.Station.foldbackMode.insideDistance,
y2: model.y + model.width - style.Station.foldbackMode.insideDistance
},
style: {
lineWidth: style.Station.foldbackMode.lineWidth,
stroke: style.Station.foldbackMode.strokeColor
}
});
this.add(this.lateralLinePriorityRect);
this.add(this.lateralLinePriority1);
this.add(this.lateralLinePriority2);
this.linearFoldbackRect = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: model.x + model.width + style.Station.foldbackMode.outsideDistance,
y: model.y,
width: model.width,
height:model.width
},
style: {
lineWidth: style.Station.foldbackMode.lineWidth,
stroke: style.Station.foldbackMode.strokeColor,
fill: style.Station.foldbackMode.fillColor
}
});
this.linearFoldback = new Line({
zlevel: model.zlevel,
z: model.z,
shape: {
x1: model.x + model.width + style.Station.foldbackMode.outsideDistance + style.Station.foldbackMode.insideDistance,
y1: model.y + model.width / 2,
x2: model.x + model.width * 2 + style.Station.foldbackMode.outsideDistance - style.Station.foldbackMode.insideDistance,
y2: model.y + model.width / 2
},
style: {
lineWidth: style.Station.foldbackMode.lineWidth,
stroke: style.Station.foldbackMode.strokeColor
}
});
this.add(this.linearFoldbackRect);
this.add(this.linearFoldback);
this.lateralLineRect = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: model.x + model.width * 2 + style.Station.foldbackMode.outsideDistance * 2,
y: model.y,
width: model.width,
height:model.width
},
style: {
lineWidth: style.Station.foldbackMode.lineWidth,
stroke: style.Station.foldbackMode.strokeColor,
fill: style.Station.foldbackMode.fillColor
}
});
this.lateralLine = new Line({
zlevel: model.zlevel,
z: model.z,
shape: {
x1: model.x + model.width * 2 + style.Station.foldbackMode.outsideDistance * 2 + style.Station.foldbackMode.insideDistance,
y1: model.y + model.width - style.Station.foldbackMode.insideDistance,
x2: model.x + model.width * 3 + style.Station.foldbackMode.outsideDistance * 2 - style.Station.foldbackMode.insideDistance,
y2: model.y + style.Station.foldbackMode.insideDistance
},
style: {
lineWidth: this.model.lineWidth,
stroke: this.model.fillColor
}
});
this.add(this.lateralLineRect);
this.add(this.lateralLine);
}
}

View File

@ -10,13 +10,7 @@ import EArrow from './EArrow';
import { arrow } from '../utils/ShapePoints'; import { arrow } from '../utils/ShapePoints';
import Rect from 'zrender/src/graphic/shape/Rect'; import Rect from 'zrender/src/graphic/shape/Rect';
import BoundingRect from 'zrender/src/core/BoundingRect'; import BoundingRect from 'zrender/src/core/BoundingRect';
import EUnmanned from './EUnmanned';
import ELampFilament from './ELampFilament';
import EControlSwitch from './EControlSwitch';
import EAxle from './EAxle';
// import {isShowThePrdType} from '../../utils/handlePath'; // import {isShowThePrdType} from '../../utils/handlePath';
import EFoldbackMode from './EFoldbackMode';
import EDeviceStatus from './EDeviceStatus';
import Text from 'zrender/src/graphic/Text'; import Text from 'zrender/src/graphic/Text';
export default class Station extends Group { export default class Station extends Group {
@ -32,7 +26,6 @@ export default class Station extends Group {
this.create(); this.create();
this.createTurnBack(); // 创建按图折返 this.createTurnBack(); // 创建按图折返
this.createControlMode(); this.createControlMode();
this.createTextControlMode();
this.setState(model); this.setState(model);
this.checkIsDrawMap(); this.checkIsDrawMap();
} }
@ -62,73 +55,6 @@ export default class Station extends Group {
this.stationText.setStyle('textBorderColor', model.nameFontColor); this.stationText.setStyle('textBorderColor', model.nameFontColor);
this.stationText.setStyle('textBorderWidth', 1); this.stationText.setStyle('textBorderWidth', 1);
} }
if (style.Station.unmanned && model.showUnmanned) {
this.unmanned = new EUnmanned({
zlevel: this.zlevel,
z: this.z,
x: model.unmannedPosition.x,
y: model.unmannedPosition.y,
_subType: 'Unmanned',
width: style.Station.unmanned.width,
fill: style.Station.unmanned.defaultColor
});
this.add(this.unmanned);
}
if (style.Station.lampFilament && model.showLampFilament) {
this.lampFilament = new ELampFilament({
zlevel: this.zlevel,
z: this.z,
x: model.lampFilamentPosition.x,
y: model.lampFilamentPosition.y,
_subType: 'LampFilament',
width: style.Station.lampFilament.width,
fill: style.Station.lampFilament.defaultColor
});
this.add(this.lampFilament);
}
if (style.Station.controlSwitch && model.showControlSwitch) {
this.controlSwitch = new EControlSwitch({
zlevel: this.zlevel,
z: this.z,
x: model.controlSwitchPosition.x,
y: model.controlSwitchPosition.y,
_subType: 'ControlSwitch',
width: style.Station.controlSwitch.width,
fill: style.Station.controlSwitch.defaultColor
});
this.add(this.controlSwitch);
}
if (style.Station.foldbackMode && model.showFoldbackMode) {
this.foldbackMode = new EFoldbackMode({
zlevel: this.zlevel,
z: this.z,
x: model.foldbackModePosition.x,
y: model.foldbackModePosition.y,
width: style.Station.foldbackMode.rectWidth,
style: style
});
this.add(this.foldbackMode);
}
if (style.Station.axle && model.showAxle) {
this.axle = new EAxle({
zlevel: this.zlevel,
z: this.z,
x: model.axlePosition.x,
y: model.axlePosition.y,
style: style
});
this.add(this.axle);
}
if (style.Station.deviceStatus && model.showDeviceStatus) {
this.deviceStatus = new EDeviceStatus({
zlevel: this.zlevel,
z: this.z,
x: model.deviceStatusPosition.x,
y: model.deviceStatusPosition.y,
style: style
});
this.add(this.deviceStatus);
}
const path = window.location.href; const path = window.location.href;
if (style.Station.kmPostShow || path.includes('/map/draw')) { if (style.Station.kmPostShow || path.includes('/map/draw')) {
// 公里标是否显示 // 公里标是否显示
@ -217,77 +143,6 @@ export default class Station extends Group {
this.turnBacks.forEach(lamp => { this.add(lamp); }); this.turnBacks.forEach(lamp => { this.add(lamp); });
} }
} }
// 创建文字控制模式组(西安二号线-(进路模式, 车站控制模式, 车站通信状态, 验证旁路))
createTextControlMode() {
const model = this.model;
const style = this.style;
if (model.visible && model.textControlMode && style.Station.controlMode) {
this.routeMode = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: model.textControlModePosition.x,
y: model.textControlModePosition.y,
fontWeight: style.textStyle.fontWeight,
fontSize: style.Station.controlMode.fontSize,
fontFamily: style.fontFamily,
text: style.Station.controlMode.routeMode.defaultText,
textFill: style.Station.controlMode.routeMode.defaultColor,
textAlign: style.textStyle.textAlign,
textVerticalAlign: style.textStyle.textVerticalAlign
}
});
this.stationControlMode = new Text({
zlevle: this.zlevle,
z: this.z,
style: {
x: model.textControlModePosition.x + style.Station.controlMode.distance,
y: model.textControlModePosition.y,
fontWeight: style.textStyle.fontWeight,
fontSize: style.Station.controlMode.fontSize,
fontFamily: style.fontFamily,
text: style.Station.controlMode.stationControlMode.defaultText,
textFill: style.Station.controlMode.stationControlMode.defaultColor,
textAlign: style.textStyle.textAlign,
textVerticalAlign: style.textStyle.textVerticalAlign
}
});
this.stationCommunication = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: model.textControlModePosition.x + style.Station.controlMode.distance * 2,
y: model.textControlModePosition.y,
fontWeight: style.textStyle.fontWeight,
fontSize: style.Station.controlMode.fontSize,
fontFamily: style.fontFamily,
text: style.Station.controlMode.stationCommunication.defaultText,
textFill: style.Station.controlMode.stationControlMode.defaultColor,
textAlign: style.textStyle.textAlign,
textVerticalAlign: style.textStyle.textVerticalAlign
}
});
this.verifyBypass = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: model.textControlModePosition.x + style.Station.controlMode.distance * 3,
y: model.textControlModePosition.y,
fontWeight: style.textStyle.fontWeight,
fontSize: style.Station.controlMode.fontSize,
fontFamily: style.fontFamily,
text: style.Station.controlMode.verifyBypass.defaultText,
textFill: style.Station.controlMode.verifyBypass.defaultColor,
textAlign: style.textStyle.textAlign,
textVerticalAlign: style.textStyle.textVerticalAlign
}
});
this.add(this.routeMode);
this.add(this.stationControlMode);
this.add(this.stationCommunication);
this.add(this.verifyBypass);
}
}
// 创建控制模式 // 创建控制模式
createControlMode() { createControlMode() {
const model = this.model; const model = this.model;

View File

@ -58,6 +58,12 @@ mapShape[deviceType.PowerSupply] = SaidLamp;
mapShape[deviceType.NoOneReturn] = SaidLamp; mapShape[deviceType.NoOneReturn] = SaidLamp;
mapShape[deviceType.MaintenanceLamps] = SaidLamp; mapShape[deviceType.MaintenanceLamps] = SaidLamp;
mapShape[deviceType.ZcCommunication] = SaidLamp; mapShape[deviceType.ZcCommunication] = SaidLamp;
mapShape[deviceType.ControlSwitch] = SaidLamp;
mapShape[deviceType.LampFilament] = SaidLamp;
mapShape[deviceType.ModeStatusGroup] = SaidLamp;
mapShape[deviceType.FaultStatusGroup] = SaidLamp;
mapShape[deviceType.ReturnModeGroup] = SaidLamp;
mapShape[deviceType.Axle] = SaidLamp;
function shapefactory(device, jmap) { function shapefactory(device, jmap) {
const type = device._type; const type = device._type;

View File

@ -171,6 +171,12 @@ export function parser(data, skinCode, showConfig) {
case 'ZcCommunication': case 'ZcCommunication':
mapDevice[elem.code] = createDevice(deviceType.ZcCommunication, elem, propConvert, showConfig); mapDevice[elem.code] = createDevice(deviceType.ZcCommunication, elem, propConvert, showConfig);
break; break;
case 'FaultStatusGroup':
mapDevice[elem.code] = createDevice(deviceType.FaultStatusGroup, elem, propConvert, showConfig);
break;
case 'Axle':
mapDevice[elem.code] = createDevice(deviceType.Axle, elem, propConvert, showConfig);
break;
} }
}, this); }, this);
@ -283,6 +289,12 @@ export function updateMapData(state, model) {
case deviceType.NoOneReturn: updateForList(model, state, 'indicatorLightList'); break; case deviceType.NoOneReturn: updateForList(model, state, 'indicatorLightList'); break;
case deviceType.MaintenanceLamps: updateForList(model, state, 'indicatorLightList'); break; case deviceType.MaintenanceLamps: updateForList(model, state, 'indicatorLightList'); break;
case deviceType.ZcCommunication: updateForList(model, state, 'indicatorLightList'); break; case deviceType.ZcCommunication: updateForList(model, state, 'indicatorLightList'); break;
case deviceType.FaultStatusGroup: updateForList(model, state, 'indicatorLightList'); break;
case deviceType.ModeStatusGroup: updateForList(model, state, 'indicatorLightList'); break;
case deviceType.LampFilament: updateForList(model, state, 'indicatorLightList'); break;
case deviceType.ReturnModeGroup: updateForList(model, state, 'indicatorLightList'); break;
case deviceType.ControlSwitch: updateForList(model, state, 'indicatorLightList'); break;
case deviceType.Axle: updateForList(model, state, 'indicatorLightList'); break;
} }
} }
} }

View File

@ -174,7 +174,7 @@ export default {
}; };
}, },
isHiddenAutomaticRoute() { isHiddenAutomaticRoute() {
return this.editModel.type == 'AutomaticRoute'; return this.editModel.type === 'AutomaticRoute';
}, },
isHiddenMapCycleButtonVO() { isHiddenMapCycleButtonVO() {
return this.editModel.type == 'AutoTurnBack'; return this.editModel.type == 'AutoTurnBack';

View File

@ -1,6 +1,6 @@
<template> <template>
<el-tabs v-model="activeName" class="card"> <el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" label="控制灯" name="first"> <el-tab-pane class="view-control" label="表示状态" name="first">
<div style="height: calc(100% - 46px);"> <div style="height: calc(100% - 46px);">
<el-scrollbar wrap-class="scrollbar-wrapper"> <el-scrollbar wrap-class="scrollbar-wrapper">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" /> <config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
@ -64,7 +64,26 @@ export default {
noOneReturnList: [], noOneReturnList: [],
maintenanceLampList: [], maintenanceLampList: [],
zcCommunicationList: [], zcCommunicationList: [],
controlLampTypeList: ['LeuControl', 'IntersiteControl', 'CenterCommunication', 'AtsControl', 'LocalControl', 'ChainControl', 'Maintain', 'PowerSupply', 'NoOneReturn', 'MaintenanceLamps', 'ZcCommunication'], controlLampTypeList: [
'LeuControl',
'IntersiteControl',
'CenterCommunication',
'AtsControl',
'LocalControl',
'ChainControl',
'Maintain',
'PowerSupply',
'NoOneReturn',
'MaintenanceLamps',
'ZcCommunication',
'FaultStatusGroup',
'ModeStatusGroup',
'LampFilament',
'ReturnModeGroup',
'ControlSwitch',
'Axle'
],
noNameTypeList: ['FaultStatusGroup', 'ModeStatusGroup', 'LampFilament', 'ReturnModeGroup', 'ControlSwitch', 'Axle'],
typeList: [ typeList: [
{ name: 'LEU通信', value: 'LeuControl' }, { name: 'LEU通信', value: 'LeuControl' },
{ name: '站间通信', value: 'IntersiteControl' }, { name: '站间通信', value: 'IntersiteControl' },
@ -76,7 +95,13 @@ export default {
{ name: '电源', value: 'PowerSupply'}, { name: '电源', value: 'PowerSupply'},
{ name: '无人折返', value: 'NoOneReturn'}, { name: '无人折返', value: 'NoOneReturn'},
{ name: '全站维修点灯', value: 'MaintenanceLamps'}, { name: '全站维修点灯', value: 'MaintenanceLamps'},
{ name: 'ZC通信', value: 'ZcCommunication'} { name: 'ZC通信', value: 'ZcCommunication'},
{ name: '故障状态组', value: 'FaultStatusGroup'},
{ name: '模式状态组', value: 'ModeStatusGroup'},
{ name: '信号灯丝告警', value: 'LampFilament'},
{ name: '折返模式组', value: 'ReturnModeGroup'},
{ name: 'LCW/ATS控制开关', value: 'ControlSwitch'},
{ name: '计轴预复位', value: 'Axle'}
], ],
editModel: { editModel: {
code: '', code: '',
@ -86,7 +111,8 @@ export default {
position: { position: {
x: 0, x: 0,
y: 0 y: 0
} },
deviceStationCode: ''
}, },
addModel: { addModel: {
code: '', code: '',
@ -96,7 +122,8 @@ export default {
position: { position: {
x: 0, x: 0,
y: 0 y: 0
} },
deviceStationCode: ''
}, },
rules: { rules: {
code: [ code: [
@ -113,6 +140,9 @@ export default {
], ],
stationCode: [ stationCode: [
{ required: true, message: this.$t('rules.pleaseSelectStationCode'), trigger: 'change'} { required: true, message: this.$t('rules.pleaseSelectStationCode'), trigger: 'change'}
],
deviceStationCode: [
{ required: true, message: '请选择所属车站', trigger: 'change'}
] ]
} }
}; };
@ -135,12 +165,13 @@ export default {
item: [ item: [
{ prop:'type', label: this.$t('map.saidLampType'), type: 'select', optionLabel: 'name', optionValue: 'value', options: this.typeList, change: true, deviceChange: this.typeChange }, { prop:'type', label: this.$t('map.saidLampType'), type: 'select', optionLabel: 'name', optionValue: 'value', options: this.typeList, change: true, deviceChange: this.typeChange },
{ prop: 'code', label: `${this.$t('map.code')}`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.selectLists, change: true, deviceChange: this.deviceChange }, { 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: this.$t('map.saidLampName'), type: 'input' }, { prop: 'name', label: this.$t('map.saidLampName'), type: 'input', isHidden: this.noNameTypeList.includes(this.editModel.type) },
{ prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '140px', children: [ { prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '140px', children: [
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' }, { 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: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
] }, ] },
{ prop:'stationCode', label: `${this.$t('map.ownedCiStation')}:`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList} { prop:'stationCode', label: `${this.$t('map.ownedCiStation')}:`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList},
{ prop: 'deviceStationCode', label: '所属车站', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, isHidden: this.editModel.type !== 'ModeStatusGroup'}
] ]
} }
} }
@ -152,12 +183,13 @@ export default {
labelWidth: '150px', labelWidth: '150px',
items: [ items: [
{ prop:'type', label: this.$t('map.saidLampType'), type: 'select', optionLabel: 'name', optionValue: 'value', options: this.typeList, change: true, deviceChange: this.typeChange }, { prop:'type', label: this.$t('map.saidLampType'), type: 'select', optionLabel: 'name', optionValue: 'value', options: this.typeList, change: true, deviceChange: this.typeChange },
{ prop: 'name', label: this.$t('map.saidLampName'), type: 'input' }, { prop: 'name', label: this.$t('map.saidLampName'), type: 'input', isHidden: this.noNameTypeList.includes(this.editModel.type) },
{ prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '140px', children: [ { prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '140px', children: [
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, { prop: 'position.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: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
] }, ] },
{ prop:'stationCode', label: `${this.$t('map.ownedCiStation')}`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList} { prop:'stationCode', label: `${this.$t('map.ownedCiStation')}`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList},
{ prop: 'deviceStationCode', label: '所属车站', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, isHidden: this.addModel.type !== 'ModeStatusGroup'}
] ]
}; };
return form; return form;
@ -211,6 +243,12 @@ export default {
this.maintainList = []; this.maintainList = [];
this.powerSupplyList = []; this.powerSupplyList = [];
this.noOneReturnList = []; this.noOneReturnList = [];
this.faultStatusGroupList = [];
this.modeStatusGroupList = [];
this.lampFilamentList = [];
this.returnModeGroupList = [];
this.controlSwitchList = [];
this.AxleList = [];
indicatorLightList.forEach(item => { indicatorLightList.forEach(item => {
switch (item._type) { switch (item._type) {
case 'AtsControl': case 'AtsControl':
@ -246,6 +284,24 @@ export default {
case 'ZcCommunication': case 'ZcCommunication':
this.zcCommunicationList.push(item); this.zcCommunicationList.push(item);
break; break;
case 'FaultStatusGroup':
this.faultStatusGroupList.push(item);
break;
case 'ModeStatusGroup':
this.modeStatusGroupList.push(item);
break;
case 'LampFilament':
this.lampFilamentList.push(item);
break;
case 'ReturnModeGroup':
this.returnModeGroupList.push(item);
break;
case 'ControlSwitch':
this.controlSwitchList.push(item);
break;
case 'Axle':
this.AxleList.push(item);
break;
} }
}); });
}, },
@ -284,6 +340,24 @@ export default {
case 'ZcCommunication': case 'ZcCommunication':
this.selectLists = this.zcCommunicationList; this.selectLists = this.zcCommunicationList;
break; break;
case 'FaultStatusGroup':
this.selectLists = this.faultStatusGroupList;
break;
case 'ModeStatusGroup':
this.selectLists = this.modeStatusGroupList;
break;
case 'LampFilament':
this.selectLists = this.lampFilamentList;
break;
case 'ReturnModeGroup':
this.selectLists = this.returnModeGroupList;
break;
case 'ControlSwitch':
this.selectLists = this.controlSwitchList;
break;
case 'Axle':
this.selectLists = this.AxleList;
break;
} }
}, },
changeStation(code) { // changeStation(code) { //
@ -328,7 +402,8 @@ export default {
x: this.addModel.position.x, x: this.addModel.position.x,
y: this.addModel.position.y y: this.addModel.position.y
}, },
stationCode: this.addModel.stationCode // stationCode: this.addModel.stationCode, //
deviceStationCode: this.addModel.deviceStationCode
}; };
models.push(model); models.push(model);
this.$emit('updateMapModel', models); this.$emit('updateMapModel', models);

View File

@ -272,7 +272,7 @@ export default {
}, },
handleSelectControlPage(device) { handleSelectControlPage(device) {
const controlLampTypeList = ['AtsControl', 'CenterCommunication', 'ChainControl', 'IntersiteControl', 'LeuControl', 'LocalControl', 'Maintain', const controlLampTypeList = ['AtsControl', 'CenterCommunication', 'ChainControl', 'IntersiteControl', 'LeuControl', 'LocalControl', 'Maintain',
'PowerSupply', 'NoOneReturn', 'MaintenanceLamps', 'ZcCommunication']; 'PowerSupply', 'NoOneReturn', 'MaintenanceLamps', 'ZcCommunication', 'FaultStatusGroup', 'ModeStatusGroup', 'LampFilament', 'ReturnModeGroup', 'ControlSwitch', 'Axle'];
const type = device._type; const type = device._type;
if (this.stationType) { if (this.stationType) {
this.enabledTab = 'Station'; this.enabledTab = 'Station';

View File

@ -147,21 +147,7 @@ export default {
createControlMode:false, createControlMode:false,
createTurnBack:false, createTurnBack:false,
turnBackPoint: {x: 0, y: 0}, // turnBackPoint: {x: 0, y: 0}, //
controlModePoint: { x: 0, y: 0 }, // controlModePoint: { x: 0, y: 0 } //
textControlMode: false, //
textControlModePosition: { x: 0, y: 0},
showUnmanned: false, //
unmannedPosition: {x: 0, y: 0},
showLampFilament: false, //
lampFilamentPosition: {x: 0, y: 0},
showControlSwitch: false, // LCW/ATS
controlSwitchPosition: {x: 0, y: 0},
showFoldbackMode: false, //
foldbackModePosition: {x: 0, y: 0},
showAxle: false, //
axlePosition: {x: 0, y: 0},
showDeviceStatus: false,
deviceStatusPosition: {x: 0, y: 0}
}, },
addModel: { addModel: {
modelList: [], modelList: [],
@ -233,46 +219,11 @@ export default {
{ prop: 'controlModePoint.x', firstLevel: 'controlModePoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px'}, { prop: 'controlModePoint.x', firstLevel: 'controlModePoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px'},
{ prop: 'controlModePoint.y', firstLevel: 'controlModePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px'} { prop: 'controlModePoint.y', firstLevel: 'controlModePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px'}
] }, ] },
{ prop: 'textControlMode', label: '状态模式:', type: 'checkbox', change: true, deviceChange: this.changeTextControlMode},
{ prop: 'textControlModePosition', label: '状态模式坐标:', type: 'coordinate', width: '120px', isHidden: !this.editModel.textControlMode, children: [
{prop: 'textControlModePosition.x', firstLevel: 'textControlModePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px'},
{prop: 'textControlModePosition.y', firstLevel: 'textControlModePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px'}
] },
{ prop: 'createTurnBack', label: '按图折返:', type: 'checkbox' }, { prop: 'createTurnBack', label: '按图折返:', type: 'checkbox' },
{ 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: 'showUnmanned', label: '无人折返:', type: 'checkbox', change: true, deviceChange: this.changeShowUnmanned},
{ prop: 'unmannedPosition', label: '无人折返坐标:', type: 'coordinate', width: '120px', isHidden: !this.editModel.showUnmanned, children: [
{prop: 'unmannedPosition.x', firstLevel: 'unmannedPosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px'},
{prop: 'unmannedPosition.y', firstLevel: 'unmannedPosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px'}
]},
{ prop: 'showLampFilament', label: '信号灯丝告警:', type: 'checkbox', change: true, deviceChange: this.changeShowLampFilament},
{ prop: 'lampFilamentPosition', label: '信号灯丝告警坐标:', type: 'coordinate', width: '120px', isHidden: !this.editModel.showLampFilament, children: [
{prop: 'lampFilamentPosition.x', firstLevel: 'lampFilamentPosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px'},
{prop: 'lampFilamentPosition.y', firstLevel: 'lampFilamentPosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px'}
]},
{ prop: 'showControlSwitch', label: 'LCW/ATS开关:', type: 'checkbox', change: true, deviceChange: this.changeShowControlSwitch},
{ prop: 'controlSwitchPosition', label: '开关坐标:', type: 'coordinate', width: '120px', isHidden: !this.editModel.showControlSwitch, children: [
{prop: 'controlSwitchPosition.x', firstLevel: 'controlSwitchPosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px'},
{prop: 'controlSwitchPosition.y', firstLevel: 'controlSwitchPosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px'}
]},
{ prop: 'showFoldbackMode', label: '折返模式:', type: 'checkbox', change: true, deviceChange: this.changeShowFoldbackMode},
{ prop: 'foldbackModePosition', label: '折返模式坐标:', type: 'coordinate', width: '120px', isHidden: !this.editModel.showFoldbackMode, children: [
{prop: 'foldbackModePosition.x', firstLevel: 'foldbackModePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px'},
{prop: 'foldbackModePosition.y', firstLevel: 'foldbackModePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px'}
]},
{ prop: 'showAxle', label: '计轴预复位:', type: 'checkbox', change: true, deviceChange: this.changeShowAxle},
{ prop: 'axlePosition', label: '计轴预复位坐标:', type: 'coordinate', width: '120px', isHidden: !this.editModel.showAxle, children: [
{prop: 'axlePosition.x', firstLevel: 'axlePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px'},
{prop: 'axlePosition.y', firstLevel: 'axlePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px'}
]},
{ prop: 'showDeviceStatus', label: '设备状态:', type: 'checkbox', change: true, deviceChange: this.changeShowDeviceStatus},
{ prop: 'deviceStatusPosition', label: '设备状态坐标:', type: 'coordinate', width: '120px', isHidden: !this.editModel.showDeviceStatus, children: [
{prop: 'deviceStatusPosition.x', firstLevel: 'deviceStatusPosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px'},
{prop: 'deviceStatusPosition.y', firstLevel: 'deviceStatusPosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px'}
]}
] ]
}, },
map: { map: {
@ -374,97 +325,6 @@ export default {
}; };
} }
}, },
changeTextControlMode(data) {
if (data) {
this.editModel.textControlModePosition = {
x: this.editModel.position.x - 40,
y: this.editModel.position.y + 60
};
} else {
this.editModel.textControlModePosition = {
x: 0,
y: 0
};
}
},
changeShowUnmanned(data) {
if (data) {
this.editModel.unmannedPosition = {
x: this.editModel.position.x,
y: this.editModel.position.y + 60
};
} else {
this.editModel.unmannedPosition = {
x: 0,
y: 0
};
}
},
changeShowLampFilament(data) {
if (data) {
this.editModel.lampFilamentPosition = {
x: this.editModel.position.x,
y: this.editModel.position.y + 60
};
} else {
this.editModel.lampFilamentPosition = {
x: 0,
y: 0
};
}
},
changeShowControlSwitch(data) {
if (data) {
this.editModel.controlSwitchPosition = {
x: this.editModel.position.x,
y: this.editModel.position.y + 60
};
} else {
this.editModel.controlSwitchPosition = {
x: 0,
y: 0
};
}
},
changeShowFoldbackMode(data) {
if (data) {
this.editModel.foldbackModePosition = {
x: this.editModel.position.x,
y: this.editModel.position.y + 60
};
} else {
this.editModel.foldbackModePosition = {
x: 0,
y: 0
};
}
},
changeShowAxle(data) {
if (data) {
this.editModel.axlePosition = {
x: this.editModel.position.x,
y: this.editModel.position.y + 60
};
} else {
this.editModel.axlePosition = {
x: 0,
y: 0
};
}
},
changeShowDeviceStatus(data) {
if (data) {
this.editModel.deviceStatusPosition = {
x: this.editModel.position.x - 60,
y: this.editModel.position.y + 90
};
} else {
this.editModel.deviceStatusPosition = {
x: 0,
y: 0
};
}
},
// //
changeChargeStation(data) { changeChargeStation(data) {
if (data.length > 0) { if (data.length > 0) {