From b6f4fc611fa1116ee9822c7a222405e728644a5f Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Tue, 19 Jul 2022 17:14:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E9=93=81=E7=BA=BF=E8=B7=AFIII?= =?UTF-8?q?=E5=9E=8B=20=20=E9=81=93=E5=B2=94=20=E6=8C=A4=E5=B2=94=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4=20=E9=81=93?= =?UTF-8?q?=E5=B2=94=E5=90=8D=E7=A7=B0=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/datie_tky.js | 11 ++--- src/jmapNew/shape/graph/Switch/index.js | 53 ++++++++++++++---------- 2 files changed, 37 insertions(+), 27 deletions(-) diff --git a/src/jmapNew/config/skinCode/datie_tky.js b/src/jmapNew/config/skinCode/datie_tky.js index 26b5bfc35..06b368547 100644 --- a/src/jmapNew/config/skinCode/datie_tky.js +++ b/src/jmapNew/config/skinCode/datie_tky.js @@ -340,13 +340,13 @@ class SkinCode extends defaultStyle { position: 0, // 区段名称位置 1 上面 -1 下面 0 对称 offset: {x: 5, y: -10}, // 道岔名称与区段距离 fontSize: 11, // 字体大小 - fontColor: '#fff', // 道岔名称颜色 + fontColor: '#FFFF00', // 道岔名称颜色 fontWeight: 'normal', // 字体粗细 borderColor: '#FE0000', // 道岔边框颜色 - lossColor: '#C00808', // 道岔失去颜色 + lossColor: '#FFFF00', // 道岔失去颜色 - locateColor: '#00FF00', // 道岔定位颜色 ok - inversionColor: '#FFFF00', // 道岔反位颜色 ok + locateColor: '#808080', // 道岔定位颜色 ok + inversionColor: '#808080', // 道岔反位颜色 ok monolockLocationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色) monolockInversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色) @@ -362,7 +362,8 @@ class SkinCode extends defaultStyle { specialCircle:true, // 大铁线路III型 定反位 实心小圆圈 graphInversionColor: '#FFFF00', // 反位颜色 graphLocalColor: '#00FF00', // 定位颜色 - lossActionColor:'#fff' // 失表颜色 + lossActionColor:'#fff', // 失表颜色 + forkActionColor:'#f00'// 挤岔颜色 }, rectLock: { // 矩形封锁框图形 rectWidth: 18, // 矩形框 宽高 diff --git a/src/jmapNew/shape/graph/Switch/index.js b/src/jmapNew/shape/graph/Switch/index.js index ddc7e7ba9..f266b4881 100644 --- a/src/jmapNew/shape/graph/Switch/index.js +++ b/src/jmapNew/shape/graph/Switch/index.js @@ -500,30 +500,37 @@ export default class Switch extends Group { if (this.style.Switch.jointImg.fork) { this.recover(); this.shapeModelB.show(); - this.shapeModelB.animateStyle(item => { - item.animateStyle(true) - .when(0, { stroke: this.style.backgroundColor }) - .when(1000, { stroke: 'red' }) - .when(2000, { stroke: this.style.backgroundColor }) - .start(); - }); this.shapeModelC.show(); // 宁波线路挤叉特殊显示 - this.shapeModelC.animateStyle(item => { - item.animateStyle(true) - .when(0, { stroke: this.style.backgroundColor }) - .when(1000, { stroke: 'red' }) - .when(2000, { stroke: this.style.backgroundColor }) - .start(); - }); this.shapeModelA.show(); - this.shapeModelA.animateStyle(item => { - item.animateStyle(true) - .when(0, { stroke: this.style.backgroundColor }) - .when(1000, { stroke: 'red' }) - .when(2000, { stroke: this.style.backgroundColor }) - .start(); - }); - this.setTextColor('red'); + if (this.style.Switch.core.specialCircle) { + this.specialCircle.show(); + this.specialCircle.setColor(this.style.Switch.core.forkActionColor); + // 大铁线路III型 定反位 实心小圆圈 + this.specialCircle && this.specialCircle.animate(); + } else { + this.shapeModelB.animateStyle(item => { + item.animateStyle(true) + .when(0, { stroke: this.style.backgroundColor }) + .when(1000, { stroke: 'red' }) + .when(2000, { stroke: this.style.backgroundColor }) + .start(); + }); + this.shapeModelC.animateStyle(item => { + item.animateStyle(true) + .when(0, { stroke: this.style.backgroundColor }) + .when(1000, { stroke: 'red' }) + .when(2000, { stroke: this.style.backgroundColor }) + .start(); + }); + this.shapeModelA.animateStyle(item => { + item.animateStyle(true) + .when(0, { stroke: this.style.backgroundColor }) + .when(1000, { stroke: 'red' }) + .when(2000, { stroke: this.style.backgroundColor }) + .start(); + }); + this.setTextColor('red'); + } } else { this.setLossAction(fault); // 若不是具有特殊的挤岔,则显示状态和失表一样 } @@ -757,6 +764,8 @@ export default class Switch extends Group { // model.pos == 'NO' || model.pos == 'EX'; // N-定位 R-反位 NO-无(失表) EX-挤叉 + // model.pos = 'EX'; + if (model.pos == 'N') { this.switchPosition = 'normal'; this.setLocationAction(model); /** 定位*/