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