哈尔滨一号线 自动触发进路 绘图代码调整
This commit is contained in:
parent
49bf6943aa
commit
96f6d5030b
@ -162,7 +162,7 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
auto: { // 人工进路显示状态
|
||||
signalFrontTriangle: true, // 信号灯前三角展示
|
||||
fleetModeTriangle: false, // 自动进路显示三角形非箭头
|
||||
fleetModeTriangle: false, // 自动进路显示箭头非三角形
|
||||
direction: false, // 自动通过方向
|
||||
offset: { x: -4, y: 0 }, // 自动通过偏移量
|
||||
width: 5, // 自动宽度
|
||||
|
@ -171,8 +171,11 @@ class SkinCode extends defaultStyle {
|
||||
width: 5, // 自动宽度
|
||||
autoRoute: '#00FF00', // 自动进路
|
||||
autoTrigger: '#FFFF00', // 自动触发
|
||||
autoTriggerType:'text', // 自动触发类型 text 为哈尔滨线路的类型(只更改信号机名称的颜色)
|
||||
autoRouteType:'text', // 自动进路类型 text 为哈尔滨线路的类型(只更改信号机名称的颜色)
|
||||
manualControl: '#FFFF00', // 人工控制
|
||||
outConflict: '#C00808' // 出车冲突
|
||||
|
||||
},
|
||||
delay: {
|
||||
direction: true, // 延时解锁方向
|
||||
|
@ -214,23 +214,26 @@ class Signal extends Group {
|
||||
drict: drict
|
||||
});
|
||||
|
||||
// 自动通过 →
|
||||
const sigAutoH = style.Signal.auto.direction ? this.count * style.Signal.lamp.radiusR * 2 : -style.Signal.lamp.radiusR * 2;
|
||||
const sigAutoX = endPoint.x + (style.Signal.auto.offset.x + sigAutoH) * drict;
|
||||
const sigAutoY = endPoint.y + (style.Signal.auto.offset.y);
|
||||
this.sigAuto = new ESigAuto({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
count: this.count,
|
||||
drict: drict,
|
||||
x: sigAutoX,
|
||||
y: sigAutoY,
|
||||
width: style.Signal.auto.width,
|
||||
fill: style.Signal.auto.autoRoute,
|
||||
lineWidth: 0.6,
|
||||
stroke: style.sidelineColor
|
||||
});
|
||||
// 自动通过 → 哈尔滨线路为信号机文字变为黄色,其他线路为加箭头
|
||||
if (style.Signal.auto.autoTriggerType != 'text') {
|
||||
const sigAutoH = style.Signal.auto.direction ? this.count * style.Signal.lamp.radiusR * 2 : -style.Signal.lamp.radiusR * 2;
|
||||
const sigAutoX = endPoint.x + (style.Signal.auto.offset.x + sigAutoH) * drict;
|
||||
const sigAutoY = endPoint.y + (style.Signal.auto.offset.y);
|
||||
this.sigAuto = new ESigAuto({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
count: this.count,
|
||||
drict: drict,
|
||||
x: sigAutoX,
|
||||
y: sigAutoY,
|
||||
width: style.Signal.auto.width,
|
||||
fill: style.Signal.auto.autoRoute,
|
||||
lineWidth: 0.6,
|
||||
stroke: style.sidelineColor
|
||||
});
|
||||
this.add(this.sigAuto);
|
||||
}
|
||||
|
||||
// 延迟解锁
|
||||
const sigDelayH = style.Signal.delay.direction ? this.count * style.Signal.lamp.radiusR * 2 : -style.Signal.lamp.radiusR * 2;
|
||||
@ -271,7 +274,6 @@ class Signal extends Group {
|
||||
this.add(this.sigName);
|
||||
|
||||
this.style.Signal.text.show && model.nameShow ? this.sigName.show() : this.sigName.hide();
|
||||
this.add(this.sigAuto);
|
||||
this.add(this.sigRoute);
|
||||
this.add(this.sigDelay);
|
||||
|
||||
@ -503,8 +505,10 @@ class Signal extends Group {
|
||||
this.sigRoute.show();
|
||||
this.sigRoute.setStyle({ fill: this.style.Signal.auto.autoRoute });
|
||||
} else {
|
||||
this.sigAuto.setColor(this.style.Signal.auto.autoRoute);
|
||||
this.sigAuto.show();
|
||||
if (this.style.Signal.auto.autoRouteType != 'text') {
|
||||
this.sigAuto.setColor(this.style.Signal.auto.autoRoute);
|
||||
this.sigAuto.show();
|
||||
}
|
||||
}
|
||||
if (this.style.Signal.lamp.guidName === 'doubleAndBase') {
|
||||
this.sigName.setColor(this.style.Signal.text.AutoRouteColor);
|
||||
@ -517,14 +521,22 @@ class Signal extends Group {
|
||||
|
||||
// 信号机进路自动触发模式状态类型
|
||||
setAutoTriggerOpen() {
|
||||
this.sigAuto.setColor(this.style.Signal.auto.autoTrigger);
|
||||
this.sigAuto.show();
|
||||
if (this.style.Signal.auto.autoTriggerType != 'text') {
|
||||
this.sigAuto.setColor(this.style.Signal.auto.autoTrigger);
|
||||
this.sigAuto.show();
|
||||
} else {
|
||||
this.sigName.setColor(this.style.Signal.auto.autoTrigger);
|
||||
}
|
||||
}
|
||||
|
||||
// 隐藏自动信号和自动进路
|
||||
setAutoClose() {
|
||||
this.sigAuto.hide();
|
||||
this.sigAuto.setColor(this.style.backgroundColor);
|
||||
if (this.style.Signal.auto.autoRouteType != 'text') {
|
||||
this.sigAuto.hide();
|
||||
this.sigAuto.setColor(this.style.backgroundColor);
|
||||
} else {
|
||||
this.sigName.setColor(this.style.Signal.text.defaultColor);
|
||||
}
|
||||
}
|
||||
|
||||
// 自动信号和自动进路开始动画
|
||||
@ -556,9 +568,11 @@ class Signal extends Group {
|
||||
}
|
||||
this.sigName.setStyle({ textBorderWidth: 0 });
|
||||
this.sigName.setColor(this.style.Signal.text.defaultColor);
|
||||
this.setAutoClose();
|
||||
this.sigDelay.hide();
|
||||
this.sigAuto.animationRecover();
|
||||
if (this.style.Signal.auto.autoTriggerType != 'text') {
|
||||
this.setAutoClose();
|
||||
this.sigAuto.animationRecover();
|
||||
}
|
||||
this.sigRoute.hide();
|
||||
this.sigBack && this.sigBack.hide();
|
||||
this.sigPost.setColor(this.style.Signal.post.standardColor); // 设置底座默认颜色
|
||||
|
@ -501,9 +501,9 @@ export default {
|
||||
},
|
||||
hideScheduling(running) {
|
||||
if (running) {
|
||||
this.$refs.scheduling.doClose();
|
||||
this.$refs.scheduling && this.$refs.scheduling.doClose();
|
||||
} else {
|
||||
this.$refs.schedulingView.doClose();
|
||||
this.$refs.schedulingView && this.$refs.schedulingView.doClose();
|
||||
}
|
||||
},
|
||||
showdriving() {
|
||||
|
@ -86,7 +86,7 @@ export default {
|
||||
draw: {
|
||||
name: this.$t('map.drawData'),
|
||||
item: [
|
||||
{ prop: 'code', label: '箭头编码', type: 'select', optionLabel: 'code', optionValue: 'code', options: this.lineList, deviceChange: this.deviceChange },
|
||||
{ prop: 'code', label: '箭头编码', type: 'select', optionLabel: 'code', optionValue: 'code', options: this.arrowList, deviceChange: this.deviceChange },
|
||||
{ prop: 'position', label: '坐标:', type: 'coordinate', width: '120px', 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' }
|
||||
|
Loading…
Reference in New Issue
Block a user