From a89b4d5f1d868aa2dd2e0d5abcda65b3201393bd Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Tue, 17 Mar 2020 16:57:09 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AE=81=E6=B3=A2=E7=BA=BF?= =?UTF-8?q?=E8=B7=AF=E5=BC=95=E5=AF=BC=E4=BF=A1=E5=8F=B7=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/ningbo_01.js | 2 +- src/jmapNew/shape/Signal/index.js | 45 ++++++++++++++---------- 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index 24ceacb9e..b896d5250 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -161,7 +161,7 @@ class SkinCode extends defaultStyle { checkColor: '#00FF00' // 信号保护区段检查颜色 }, lamp: { - guidName: 'defult', // 默认引导类型 + guidName: 'ningbo_01', // 默认引导类型 borderVariable: true, // 信号灯边框可变 stopWidth: 2, // 禁止线宽度 borderWidth: 2, // 信号灯边框线宽度 diff --git a/src/jmapNew/shape/Signal/index.js b/src/jmapNew/shape/Signal/index.js index 39bd7a64d..49c57d2c1 100644 --- a/src/jmapNew/shape/Signal/index.js +++ b/src/jmapNew/shape/Signal/index.js @@ -56,13 +56,16 @@ class Signal extends Group { // 信号灯 const endPoint = this.sigPost.getLampPosition(model.lampPostType); this.lamps = []; + if (style.Signal.lamp.guidName == 'ningbo_01' && this.count == 1) { + this.count = 2; + } for (let i = 0; i < this.count; i++) { const lamp = new ESigLamp({ zlevel: this.zlevel, z: this.z, style: style, drict: drict, - x: endPoint.x + i * drict * style.Signal.lamp.radiusR * 2, + x: endPoint.x + i * drict * style.Signal.lamp.radiusR * 2.3, y: endPoint.y, originX: model.position.x, originY: model.position.y @@ -359,6 +362,9 @@ class Signal extends Group { // 引导 guid() { + if (this.style.Signal.lamp.guidName == 'ningbo_01' && this.count == 1) { + this.lamps[1].show(); + } if (this.count == 2 && !this.model.lightType && this.style.Signal.lamp.guidName != 'chengdu_03') { // 双灯 物理点灯 允许引导信号 if (this.lamps[0]) { this.lamps[0].setStop(false); @@ -474,6 +480,9 @@ class Signal extends Group { if (this.style.Signal.lamp.guidName == 'chengdu_03') { this.lamps[0].setStyle({ lineWidth: this.style.Signal.lamp.borderWidth }); } + if (this.style.Signal.lamp.guidName == 'ningbo_01' && this.count == 1) { + this.lamps[1].hide(); + } } setState(model) { @@ -485,23 +494,6 @@ class Signal extends Group { } else if (!model.isRouteActive && isShowThePrdType(model.prdType, '03') && this.style.Signal.lowButton.display) { this.setLowButtonRecover(); } - - /** 信号机进路按钮显示 */ - model.isRouteSignal && this.setLowButtonShow(); - /** 信号机封锁 */ - model.blockade && this.block(); - // 联锁自动进路通过 - // model.linkageAutoRouteShow = 1; - model.fleetMode && this.setAutoRouteOpen(); - /** 设置点灯类型*/ - if (model.lightType) { - this.logicalLight(); // 设置逻辑点灯 - } else { - this.physicsLight(); // 设置物理点灯 - } - /** 进路交人工控或自动控 */ - // model.atsControl = 0; - !model.atsControl && this.setArtificialRouteClose(); /** 设置灯的颜色 */ if (model.greenOpen) { if (this.lamps[0]) { @@ -525,6 +517,23 @@ class Signal extends Group { this.lamps[1].setColor(this.style.Signal.lamp.yellowColor); } } + /** 信号机进路按钮显示 */ + model.isRouteSignal && this.setLowButtonShow(); + /** 信号机封锁 */ + model.blockade && this.block(); + // 联锁自动进路通过 + // model.linkageAutoRouteShow = 1; + model.fleetMode && this.setAutoRouteOpen(); + /** 设置点灯类型*/ + if (model.lightType) { + this.logicalLight(); // 设置逻辑点灯 + } else { + this.physicsLight(); // 设置物理点灯 + } + model.guid = 1; + model.guid && this.guid(); // 引导信号显示 + /** 进路交人工控或自动控 */ + !model.atsControl && this.setArtificialRouteClose(); } getBoundingRect() {