rt-sim-training-client/src/jmap/shape/Signal/index.js

522 lines
16 KiB
JavaScript
Raw Normal View History

2019-07-15 10:06:07 +08:00
/*
* 信号机
*/
<<<<<<< HEAD
2019-07-18 10:05:16 +08:00
import ESigPost from './ESigPost';
import ESigLmap from './ESigLmap';
2019-07-23 18:21:49 +08:00
import ESigAuto from './ESigAuto';
import ESigRoute from './ESigRoute';
=======
2019-07-23 18:06:13 +08:00
import SigPost from './SigPost';
import SigLamp from './SigLamp';
import SigAuto from './SigAuto';
import SigRoute from './SigRoute';
>>>>>>> b938022cbffc1b6cf6ee66a34bfe23ec12025e77
2019-07-18 10:05:16 +08:00
import ESigButton from './ESigButton';
2019-07-23 18:06:13 +08:00
import Text from 'zrender/src/graphic/Text';
2019-07-16 16:29:31 +08:00
import Group from 'zrender/src/container/Group';
2019-07-15 10:06:07 +08:00
2019-07-16 16:29:31 +08:00
class Signal extends Group {
constructor({ _code, _type, zlevel, model, state }, style) {
2019-07-16 12:01:43 +08:00
super();
2019-07-16 16:29:31 +08:00
this._code = _code;
this._type = _type;
2019-07-15 10:06:07 +08:00
this.model = model;
2019-07-16 16:29:31 +08:00
this.state = state;
this.style = style;
this.count = parseInt(model.lampPositionType);
this.lamps = new Array(this.count);
2019-07-22 13:39:03 +08:00
this.zlevel = zlevel;
this.z = 1;
2019-07-16 16:29:31 +08:00
this.create();
2019-07-22 15:43:42 +08:00
this.transformRotation(this);
2019-07-18 18:24:40 +08:00
this.setState(state);
2019-07-15 10:06:07 +08:00
}
2019-07-16 16:29:31 +08:00
create() {
const model = this.model;
const style = this.style;
2019-07-16 16:29:31 +08:00
const drict = this.model.directionType == '01' ? -1 : 1; // 朝向 左:右
2019-07-18 18:24:40 +08:00
const posit = this.model.positionType == '01' ? -1 : 1; // 位置 上:下
2019-07-15 10:06:07 +08:00
2019-07-16 16:29:31 +08:00
// 信号机高柱矮柱
2019-07-23 18:06:13 +08:00
this.sigPost = new SigPost({
2019-07-15 10:06:07 +08:00
zlevel: this.zlevel,
<<<<<<< HEAD
2019-07-22 13:39:03 +08:00
z: this.z,
style: style,
2019-07-16 16:29:31 +08:00
drict: drict,
type: model.lampPostType,
x: model.position.x,
2019-07-23 18:21:49 +08:00
y: model.position.y + posit * (style.Signal.signalDistance + style.Section.sectionWidth + style.Signal.lamp.signalR)
=======
2019-07-23 18:06:13 +08:00
z: this.z + 1,
shape: {
x: model.position.x,
y: model.position.y + posit * (style.Signal.signalDistance + style.Section.sectionWidth + style.Signal.Lamp.signalR),
h: style.Signal.Lamp.signalR * 2,
w: style.Signal.Lamp.signalR,
isDwarf: model.lampPositionType == '02',
forward: model.directionType == '01'
},
style: {
stroke: style.Signal.Post.signalLampStandardColor,
lineWidth: style.Signal.Post.signalLampStandardWidth
}
>>>>>>> b938022cbffc1b6cf6ee66a34bfe23ec12025e77
2019-07-15 10:06:07 +08:00
});
2019-07-23 18:06:13 +08:00
const endPoint = {
x: model.position.x + drict * (style.Signal.Lamp.signalR * 2),
y: model.position.y + posit * (style.Signal.signalDistance + style.Section.sectionWidth + style.Signal.Lamp.signalR)
};
2019-07-16 16:29:31 +08:00
// 信号灯
this.lamps = [];
for (let i = 0; i < this.count; i++) {
2019-07-23 18:06:13 +08:00
const lamp = new SigLamp({
2019-07-15 10:06:07 +08:00
zlevel: this.zlevel,
2019-07-22 13:39:03 +08:00
z: this.z,
<<<<<<< HEAD
style: style,
2019-07-16 16:29:31 +08:00
index: i + 1,
drict: drict,
2019-07-23 18:21:49 +08:00
x: endPoint.x + i * drict * style.Signal.lamp.signalR * 2,
2019-07-18 18:24:40 +08:00
y: endPoint.y,
originX: model.position.x,
originY: model.position.y
=======
2019-07-23 18:06:13 +08:00
shape: {
x: endPoint.x + i * drict * (style.Signal.Lamp.signalR * 2 + style.Signal.Lamp.signalBorderWidth),
y: endPoint.y,
r: style.Signal.Lamp.signalR,
signalStopWidth: style.Signal.Lamp.signalStopWidth,
isStop: false
},
style: {
stroke: style.Signal.Lamp.signalBorderColor,
lineWidth: style.Signal.Lamp.signalBorderWidth,
fill: style.Signal.Lamp.signalLampGrayColor
}
>>>>>>> b938022cbffc1b6cf6ee66a34bfe23ec12025e77
2019-07-15 10:06:07 +08:00
});
2019-07-16 16:29:31 +08:00
this.lamps.push(lamp);
2019-07-15 10:06:07 +08:00
}
2019-07-16 18:37:49 +08:00
// 信号机名称
2019-07-19 09:23:56 +08:00
const sigNameX = model.position.x + model.namePosition.x;
<<<<<<< HEAD
2019-07-23 18:21:49 +08:00
const sigNameY = model.position.y + posit * (style.Signal.signalDistance + style.Section.sectionWidth + style.Signal.lamp.signalR * 2 + model.namePosition.y);
2019-07-19 09:23:56 +08:00
this.sigName = new ESigName({
2019-07-16 18:37:49 +08:00
zlevel: this.zlevel,
2019-07-22 13:39:03 +08:00
z: this.z,
2019-07-22 15:43:42 +08:00
silent: false,
style: style,
2019-07-19 09:23:56 +08:00
x: sigNameX,
y: sigNameY,
text: model.name,
2019-07-23 18:21:49 +08:00
textFont: `bold ${style.Signal.text.signalTextFontSize} px ${style.textFontFormat}`,
textFill: style.Signal.text.signalTextGreen,
2019-07-16 18:37:49 +08:00
textAlign: 'middle',
textVerticalAlign: posit == 1 ? 'top' : 'bottom'
});
// 自动进路
2019-07-23 18:21:49 +08:00
const sigRouteH = style.Signal.route.signalRouteDirection ? this.count * style.Signal.lamp.signalR * 2 : -style.Signal.lamp.signalR * 2;
const sigRouteX = endPoint.x + (style.Signal.route.signalRouteOffset.x + sigRouteH) * drict;
const sigRouteY = endPoint.y + (style.Signal.route.signalRouteOffset.y);
this.sigRoute = new ESigRoute({
=======
2019-07-23 18:06:13 +08:00
const sigNameY = model.position.y + posit * (style.Signal.signalDistance + style.Section.sectionWidth + style.Signal.Lamp.signalR * 2 + model.namePosition.y);
this.sigName = new Text({
2019-07-16 18:37:49 +08:00
zlevel: this.zlevel,
2019-07-22 13:39:03 +08:00
z: this.z,
2019-07-22 15:43:42 +08:00
silent: false,
2019-07-23 18:06:13 +08:00
style: {
x: sigNameX,
y: sigNameY,
text: model.name,
textFont: `bold ${style.Signal.Text.signalTextFontSize} px ${style.textFontFormat}`,
textFill: style.Signal.Text.signalTextGreen,
textAlign: 'middle',
textPosition: model.textPosition || 'inside',
textVerticalAlign: posit == 1 ? 'top' : 'bottom'
}
2019-07-16 18:37:49 +08:00
});
// 自动进路
2019-07-23 18:06:13 +08:00
const sigRouteH = style.Signal.Route.signalRouteDirection ? this.count * style.Signal.Lamp.signalR * 2 : -style.Signal.Lamp.signalR * 2;
const sigRouteX = endPoint.x + (style.Signal.Route.signalRouteOffset.x + sigRouteH) * drict;
const sigRouteY = endPoint.y + (style.Signal.Route.signalRouteOffset.y);
this.sigRoute = new SigRoute({
>>>>>>> b938022cbffc1b6cf6ee66a34bfe23ec12025e77
2019-07-16 18:37:49 +08:00
zlevel: this.zlevel,
2019-07-22 13:39:03 +08:00
z: this.z,
2019-07-23 18:06:13 +08:00
shape: {
x: sigRouteX,
y: sigRouteY,
forward: model.directionType == '01'
},
style: {
fill: style.Signal.Route.signalRouteColor
}
2019-07-16 18:37:49 +08:00
});
// 自动通过
<<<<<<< HEAD
2019-07-23 18:21:49 +08:00
const sigAutoH = style.Signal.auto.signalAutoDirection ? this.count * style.Signal.lamp.signalR * 2 : -style.Signal.lamp.signalR * 2;
const sigAutoX = endPoint.x + (style.Signal.auto.signalAutoOffset.x + sigAutoH) * drict;
const sigAutoY = endPoint.y + (style.Signal.auto.signalAutoOffset.y);
this.sigAuto = new ESigAuto({
2019-07-16 18:37:49 +08:00
zlevel: this.zlevel,
2019-07-22 13:39:03 +08:00
z: this.z,
style: style,
2019-07-16 18:37:49 +08:00
count: this.count,
drict: drict,
2019-07-23 18:21:49 +08:00
x: sigAutoX,
y: sigAutoY,
width: style.Signal.signalSigPassWidth,
2019-07-23 18:21:49 +08:00
fill: style.Signal.lamp.signalLampGreenColor,
2019-07-17 18:18:28 +08:00
lineWidth: 0.6,
stroke: style.sidelineColor
2019-07-16 18:37:49 +08:00
});
// 延迟解锁
2019-07-23 18:21:49 +08:00
const sigDelayH = style.Signal.delay.signalDelayDirection ? this.count * style.Signal.lamp.signalR * 2 : -style.Signal.lamp.signalR * 2;
const sigDelayX = endPoint.x + (style.Signal.delay.signalDelayOffset.x + sigDelayH) * drict;
const sigDelayY = endPoint.y - (style.Signal.delay.signalDelayOffset.y) * posit;
2019-07-19 09:23:56 +08:00
this.sigDelay = new ESigDelay({
2019-07-16 18:37:49 +08:00
zlevel: this.zlevel,
2019-07-22 13:39:03 +08:00
z: this.z,
style: style,
2019-07-18 18:24:40 +08:00
x: sigDelayX,
y: sigDelayY,
2019-07-17 09:12:05 +08:00
text: this.state.delayCount || '0',
2019-07-23 18:21:49 +08:00
textFont: `bold ${style.Signal.delay.signalDelayTextFontSize} px ${style.textFontFormat}`,
textFill: style.Signal.delay.signalDelayTextColor,
2019-07-16 18:37:49 +08:00
textAlign: drict > 0 ? 'right' : 'left',
textVerticalAlign: 'middle'
=======
2019-07-23 18:06:13 +08:00
const sigAutoH = style.Signal.Auto.signalAutoDirection ? this.count * style.Signal.Lamp.signalR * 2 : -style.Signal.Lamp.signalR * 2;
const sigAutoX = endPoint.x + (style.Signal.Auto.signalAutoOffset.x + sigAutoH) * drict;
const sigAutoY = endPoint.y + (style.Signal.Auto.signalAutoOffset.y);
this.sigAuto = new SigAuto({
2019-07-16 18:37:49 +08:00
zlevel: this.zlevel,
2019-07-22 13:39:03 +08:00
z: this.z,
2019-07-23 18:06:13 +08:00
shape: {
x: sigAutoX,
y: sigAutoY,
r: style.Signal.Lamp.signalR,
forward: model.directionType == '01'
},
style: {
fill: style.Signal.Auto.signalAutoColor
}
2019-07-16 18:37:49 +08:00
});
// 延迟解锁
2019-07-23 18:06:13 +08:00
const sigDelayH = style.Signal.Delay.signalDelayDirection ? this.count * style.Signal.Lamp.signalR * 2 : -style.Signal.Lamp.signalR * 2;
const sigDelayX = endPoint.x + (style.Signal.Delay.signalDelayOffset.x + sigDelayH) * drict;
const sigDelayY = endPoint.y - (style.Signal.Delay.signalDelayOffset.y) * posit;
this.sigDelay = new Text({
2019-07-16 18:37:49 +08:00
zlevel: this.zlevel,
2019-07-22 13:39:03 +08:00
z: this.z,
2019-07-23 18:06:13 +08:00
silent: false,
style: {
x: sigDelayX,
y: sigDelayY,
text: this.state.delayCount || '0',
textFont: `bold ${style.Signal.Delay.signalDelayTextFontSize} px ${style.textFontFormat}`,
textFill: style.Signal.Delay.signalDelayTextColor,
textAlign: drict > 0 ? 'right' : 'left',
textPosition: model.textPosition || 'inside',
textVerticalAlign: 'middle'
}
>>>>>>> b938022cbffc1b6cf6ee66a34bfe23ec12025e77
2019-07-16 18:37:49 +08:00
});
2019-07-15 10:06:07 +08:00
// 信号灯按钮
2019-07-16 16:29:31 +08:00
this.sigButton = new ESigButton({
2019-07-15 10:06:07 +08:00
zlevel: this.zlevel,
2019-07-22 13:39:03 +08:00
z: this.z,
style: style,
2019-07-16 16:29:31 +08:00
posit: posit,
show: model.buttonShow,
x: model.buttonPosition.x,
<<<<<<< HEAD
2019-07-23 18:21:49 +08:00
y: model.buttonPosition.y - posit * (style.Signal.button.signalButtonDistance + style.Signal.lamp.signalR * 2)
=======
2019-07-23 18:06:13 +08:00
y: model.buttonPosition.y - posit * (style.Signal.Button.signalButtonDistance + style.Signal.Lamp.signalR * 2)
>>>>>>> b938022cbffc1b6cf6ee66a34bfe23ec12025e77
2019-07-16 16:29:31 +08:00
});
2019-07-15 10:06:07 +08:00
2019-07-16 18:37:49 +08:00
this.add(this.sigPost);
2019-07-16 16:29:31 +08:00
this.lamps.forEach(lamp => { this.add(lamp); });
2019-07-16 18:37:49 +08:00
this.add(this.sigName);
<<<<<<< HEAD
2019-07-23 18:21:49 +08:00
this.add(this.sigAuto);
=======
>>>>>>> b938022cbffc1b6cf6ee66a34bfe23ec12025e77
this.add(this.sigRoute);
2019-07-23 18:06:13 +08:00
this.add(this.sigAuto);
2019-07-16 18:37:49 +08:00
this.add(this.sigDelay);
2019-07-23 18:06:13 +08:00
this.add(this.sigButton);
2019-07-15 10:06:07 +08:00
}
2019-07-22 15:43:42 +08:00
// 整体旋转信号灯
transformRotation(device) {
if (this.model.rotate) {
device.eachChild(item => {
if (item instanceof Group) {
this.transformRotation(item);
} else {
item.origin = [this.model.position.x, this.model.position.y];
item.rotation = -Math.PI / 180 * Number(this.model.rotate);
item.dirty();
}
});
}
}
2019-07-16 18:37:49 +08:00
// 关闭
close() {
if (this.count === 1) {
if (this.model.useType === '05') {
/** 单灯 调车信号机*/
<<<<<<< HEAD
2019-07-23 18:21:49 +08:00
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.signalLampBlueColor);
=======
2019-07-23 18:06:13 +08:00
this.lamps[0] && this.lamps[0].setStyle('fill', this.style.Signal.Lamp.signalLampBlueColor);
>>>>>>> b938022cbffc1b6cf6ee66a34bfe23ec12025e77
2019-07-16 18:37:49 +08:00
} else {
/** 单灯 出站信号机 */
/** 单灯 阻挡信号机*/
/** 单灯 阻挡兼调车信号 */
/** 单灯 列兼调信号机 */
<<<<<<< HEAD
2019-07-23 18:21:49 +08:00
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.signalLampRedColor);
=======
2019-07-23 18:06:13 +08:00
this.lamps[0] && this.lamps[0].setStyle('fill', this.style.Signal.Lamp.signalLampRedColor);
>>>>>>> b938022cbffc1b6cf6ee66a34bfe23ec12025e77
2019-07-16 18:37:49 +08:00
}
}
}
// 开放
open() {
if (this.count === 1) {
/** 单灯 出站信号机*/
/** 单灯 阻隔信号机*/
<<<<<<< HEAD
2019-07-23 18:21:49 +08:00
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.signalLampGreenColor);
=======
2019-07-23 18:06:13 +08:00
this.lamps[0] && this.lamps[0].setStyle('fill', this.style.Signal.Lamp.signalLampGreenColor);
>>>>>>> b938022cbffc1b6cf6ee66a34bfe23ec12025e77
2019-07-16 18:37:49 +08:00
}
}
// 列车进路
trainRoute() {
if (this.count === 1) {
/** 单灯 列兼调信号*/
<<<<<<< HEAD
2019-07-23 18:21:49 +08:00
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.signalLampYellowColor);
=======
2019-07-23 18:06:13 +08:00
this.lamps[0] && this.lamps[0].setStyle('fill', this.style.Signal.Lamp.signalLampYellowColor);
>>>>>>> b938022cbffc1b6cf6ee66a34bfe23ec12025e77
2019-07-16 18:37:49 +08:00
}
}
// 调车进路
shuntRoute() {
if (this.count === 1) {
/** 单灯 列兼调信号*/
/** 单灯 阻挡兼调车信号*/
<<<<<<< HEAD
2019-07-23 18:21:49 +08:00
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.signalLampWhiteColor);
=======
2019-07-23 18:06:13 +08:00
this.lamps[0] && this.lamps[0].setStyle('fill', this.style.Signal.Lamp.signalLampWhiteColor);
>>>>>>> b938022cbffc1b6cf6ee66a34bfe23ec12025e77
2019-07-16 18:37:49 +08:00
}
}
// 引导
guid() {
}
// 封锁
block() {
<<<<<<< HEAD
2019-07-23 18:21:49 +08:00
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.signalLampRedColor);
2019-07-22 13:39:03 +08:00
this.sigName.setColor(this.style.Signal.sectionBlockTextColor);
=======
2019-07-23 18:06:13 +08:00
this.lamps[0] && this.lamps[0].setStyle('fill', this.style.Signal.Lamp.signalLampRedColor);
this.sigName.setStyle('textFill', this.style.Signal.Text.signalTextRed);
>>>>>>> b938022cbffc1b6cf6ee66a34bfe23ec12025e77
2019-07-16 18:37:49 +08:00
}
// 功能封锁
functionBlock() {
}
// 信号保护区段监视状态显示
signalblock() {
}
// 故障
fault() {
}
// 物理点灯
logicalLight() {
2019-07-23 18:06:13 +08:00
this.lamps.forEach(lamp => { lamp.setShape('isStop', false); });
2019-07-16 18:37:49 +08:00
}
// 逻辑点灯
physicsLight() {
2019-07-23 18:06:13 +08:00
this.lamps.forEach(lamp => { lamp.setShape('isStop', true); });
2019-07-16 18:37:49 +08:00
}
// 设置自动进路模式状态类型
setAutoRouteOpen() {
if (this.model.linkageAutoRouteShow) {
2019-07-23 18:21:49 +08:00
this.sigAuto.show();
2019-07-16 18:37:49 +08:00
} else {
2019-07-23 18:21:49 +08:00
this.sigAuto.hide();
2019-07-16 18:37:49 +08:00
}
this.recover();
<<<<<<< HEAD
2019-07-23 18:21:49 +08:00
this.sigAuto.setColor(this.style.Signal.auto.signalAutoRoute);
=======
2019-07-23 18:06:13 +08:00
this.sigAuto.setStyle('fill', this.style.Signal.signalAutoRoute);
>>>>>>> b938022cbffc1b6cf6ee66a34bfe23ec12025e77
2019-07-16 18:37:49 +08:00
}
// 信号机进路自动触发模式状态类型
setAutoAccessOpen() {
if (this.model.atsAutoTriggerShow) {
2019-07-23 18:21:49 +08:00
this.sigAuto.show();
2019-07-16 18:37:49 +08:00
} else {
2019-07-23 18:21:49 +08:00
this.sigAuto.hide();
2019-07-16 18:37:49 +08:00
}
this.recover();
<<<<<<< HEAD
2019-07-23 18:21:49 +08:00
this.sigAuto.setColor(this.style.Signal.auto.signalAutoTrigger);
=======
2019-07-23 18:06:13 +08:00
this.sigAuto.setStyle('fill', this.style.Signal.signalAutoTrigger);
>>>>>>> b938022cbffc1b6cf6ee66a34bfe23ec12025e77
2019-07-16 18:37:49 +08:00
}
// 设置自动信号模式状态类型
2019-07-23 18:06:13 +08:00
setAutonalOpen() {
this.sigRoute.show();
2019-07-16 18:37:49 +08:00
}
// 隐藏自动信号和自动进路
setAutoClose() {
<<<<<<< HEAD
2019-07-23 18:21:49 +08:00
this.sigAuto.hide();
this.sigAuto.setColor(this.style.backgroundColor);
=======
>>>>>>> b938022cbffc1b6cf6ee66a34bfe23ec12025e77
this.sigRoute.hide();
2019-07-23 18:06:13 +08:00
this.sigAuto.hide();
2019-07-16 18:37:49 +08:00
}
// 自动信号和自动进路开始动画
setAutoFlicker() {
<<<<<<< HEAD
2019-07-23 18:21:49 +08:00
this.sigAuto.arrowsAnimation();
=======
2019-07-23 18:06:13 +08:00
const style = this.model.style;
const fill = this.sigAuto.style.Signal.fill;
this.sigAuto.animate(true)
.when(1000, { fill: style.backgroundColor, stroke: style.style.backgroundColor })
.when(2000, { fill: fill, stroke: style.style.Signal.sidelineColor })
.when(3000, { fill: style.style.backgroundColor, stroke: style.style.backgroundColor })
.when(4000, { fill: fill, stroke: style.style.Signal.sidelineColor })
.start();
>>>>>>> b938022cbffc1b6cf6ee66a34bfe23ec12025e77
2019-07-16 18:37:49 +08:00
}
// 设置延时解锁
setDelayUnlock() {
this.sigDelay.show();
}
// 恢复状态
recover() {
this.sigDelay.hide();
<<<<<<< HEAD
2019-07-23 18:21:49 +08:00
this.sigAuto.animationRecover();
this.sigName.setColor(this.style.Signal.text.signalTextGreen);
=======
2019-07-23 18:06:13 +08:00
this.sigAuto.stopAnimation(false);
this.sigName.setStyle('textFill', this.style.Signal.Text.signalTextGreen);
>>>>>>> b938022cbffc1b6cf6ee66a34bfe23ec12025e77
2019-07-16 18:37:49 +08:00
}
2019-07-15 15:25:49 +08:00
setState(state) {
2019-07-16 18:37:49 +08:00
this.recover();
/** 设置状态 (点灯类型)*/
switch (state.status) {
case '01': this.close(); break; // 关闭
case '02': this.open(); break; // 开放
case '03': this.guid(); break; // 引导
case '04': this.block(); break; // 封锁
case '05': this.fault(); break; // 故障
case '06': this.block(); break; // 功能封锁
case '07': this.signalblock(); break; // 信号保护区段检测
}
/** 进路性质类型*/
switch (state.natureType) {
case '01': this.trainRoute(); break; // 列车进路
case '02': this.shuntRoute(); break; // 调车进路
}
/** 设置点灯类型*/
switch (state.lightType) {
case '01': this.logicalLight(); break; // 设置逻辑点灯
case '02': this.physicsLight(); break; // 设置物理点灯
}
/** 设置自动类型*/
switch (state.autoType) {
case '01': this.setAutoClose(); break; // 隐藏 隐藏自动信号和自动进路
2019-07-23 18:06:13 +08:00
case '02': this.setAutonalOpen(); break; // 显示 设置自动信号模式状态类型
2019-07-16 18:37:49 +08:00
case '03': this.setAutoRouteOpen(); break; // 显示 设置自动进路模式状态类型
case '04': this.setAutoAccessOpen(); break; // 显示 信号机进路自动触发模式状态类型
}
/** 延时解锁*/
state.delayType = '02';
switch (state.delayType) {
case '01': break; // 未延时解锁
case '02': break; // 人工闭塞延时解锁
case '03': break; // 自动闭塞延时解锁
}
/** 信号机进路办理,先停止动画,再判断当前颜色是否闪烁*/
if (state.routeSetting && (state.autoType == '03' || state.autoType == '04')) {
this.setAutoFlicker();
}
}
getShapeTipPoint(val) {
if (val === '1' || val === '2') {
// return this.sigButton.getShapeTipPoint(val);
} else {
// return this.siglamp.getShapeTipPoint(val);
}
2019-07-15 10:06:07 +08:00
}
}
2019-07-16 16:29:31 +08:00
export default Signal;