From 2d4c5f8cf89722d7125acd08170452bb86725cec Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 12 Aug 2022 13:23:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E9=93=81=E7=BA=BF=E8=B7=AF:1.?= =?UTF-8?q?=E8=B0=83=E8=BD=A6=E8=BF=9B=E8=B7=AF=E7=9A=84=E6=80=BB=E4=BA=BA?= =?UTF-8?q?=E8=A7=A3=20=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9=202.=E4=BF=A1?= =?UTF-8?q?=E5=8F=B7=E6=9C=BA=E5=92=8C=E4=BF=A1=E5=8F=B7=E6=9C=BA=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E5=AE=BD=E5=BA=A6=E8=B0=83=E6=95=B4=203.=E9=BC=A0?= =?UTF-8?q?=E6=A0=87=E5=85=89=E6=A0=87=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/datie_02.js | 3 +- src/jmapNew/shape/graph/Signal/index.js | 12 +++---- src/jmapNew/shape/graph/SignalButton/index.js | 32 ++++++++++--------- .../theme/datie_02/menus/menuButton.vue | 14 ++++++-- 4 files changed, 37 insertions(+), 24 deletions(-) diff --git a/src/jmapNew/config/skinCode/datie_02.js b/src/jmapNew/config/skinCode/datie_02.js index 25d9e8c10..6a39a103f 100644 --- a/src/jmapNew/config/skinCode/datie_02.js +++ b/src/jmapNew/config/skinCode/datie_02.js @@ -209,7 +209,7 @@ class SkinCode extends defaultStyle { borderWidth: 2, // 信号灯边框线宽度 borderColor: 'rgb(85,120,182)', // 信号灯边框线颜色 darkColor:'rgb(85,120,182)', // - radiusR: 7, // 信号灯半径 + radiusR: 5, // 信号灯半径 grayColor: '#7F7F7F', // 信号灯灰色 redColor: '#FF0000', // 信号灯红色 greenColor: '#00FF00', // 信号灯绿色 @@ -264,6 +264,7 @@ class SkinCode extends defaultStyle { }; this[deviceType.SignalButton] = { + width:12, guideColor: 'rgb(80,80,255)', trainColor:'rgb(0,128,0)', strokeColor:'rgb(128,128,128)' diff --git a/src/jmapNew/shape/graph/Signal/index.js b/src/jmapNew/shape/graph/Signal/index.js index 4bf15d7e4..0a3d22227 100644 --- a/src/jmapNew/shape/graph/Signal/index.js +++ b/src/jmapNew/shape/graph/Signal/index.js @@ -953,12 +953,12 @@ class Signal extends Group { showRemainTime(number) { this.remainTimeName.show(); this.remainTimeName && this.remainTimeName.setStyle({ text: number }); - this.model.signalButtonList && this.model.signalButtonList.length && this.model.signalButtonList.forEach(item => { - const button = store.getters['map/getDeviceByCode'](item); - if (button.type === 'PICK') { - button && button.instance && button.instance.startAnimate(); - } - }); + // this.model.signalButtonList && this.model.signalButtonList.length && this.model.signalButtonList.forEach(item => { + // const button = store.getters['map/getDeviceByCode'](item); + // if (button.type === 'PICK') { + // button && button.instance && button.instance.startAnimate(); + // } + // }); if (this.model.type === 'SHUNTING') { if (!this.style.Signal.dtTextNearSignalOffset) { this.sigName && this.sigName.setAnimationStart(this.style.Signal.text.defaultColor); diff --git a/src/jmapNew/shape/graph/SignalButton/index.js b/src/jmapNew/shape/graph/SignalButton/index.js index f12fa5c2b..07548aa5f 100644 --- a/src/jmapNew/shape/graph/SignalButton/index.js +++ b/src/jmapNew/shape/graph/SignalButton/index.js @@ -93,14 +93,15 @@ export default class SignalButton extends Group { .add(circle2) .add(circle3); } else { + const width = this.style.SignalButton && this.style.SignalButton.width ? this.style.SignalButton.width : 14; this.rectButton = new Rect({ zlevel: this.zlevel, z: this.z, shape: { x: computedPosition.x, y: computedPosition.y, - width: 14, - height: 14 + width:width, + height: width }, style: { lineDash: null, @@ -109,9 +110,9 @@ export default class SignalButton extends Group { fill: fillColor } }); - if (this.style.SignalButton && this.style.SignalButton.strokeColor){ - this.rectButton.setStyle("stroke",this.style.SignalButton.strokeColor) - } + if (this.style.SignalButton && this.style.SignalButton.strokeColor) { + this.rectButton.setStyle('stroke', this.style.SignalButton.strokeColor); + } this.add(this.rectButton); } this.leftLine = new Line({ @@ -252,19 +253,19 @@ export default class SignalButton extends Group { if (this.model.type === 'FLEXIBLE' || this.model.type === 'SHUNT_TERMINAL') { color = '#808080'; } else if (this.model.type === 'GUIDE') { - if (this.style.SignalButton && this.style.SignalButton.guideColor){ - color = this.style.SignalButton.guideColor; - }else{ - color = '#5050E1'; - } + if (this.style.SignalButton && this.style.SignalButton.guideColor) { + color = this.style.SignalButton.guideColor; + } else { + color = '#5050E1'; + } } else if (list.includes(this.model.type)) { color = '#ccc'; } else { - if (this.style.SignalButton && this.style.SignalButton.trainColor){ - color = this.style.SignalButton.trainColor; - }else{ - color = '#008000'; - } + if (this.style.SignalButton && this.style.SignalButton.trainColor) { + color = this.style.SignalButton.trainColor; + } else { + color = '#008000'; + } } return color; } // @@ -315,6 +316,7 @@ export default class SignalButton extends Group { this.arcShapeDock2 && this.arcShapeDock2.hide(); } else { if (model.hasSelected) { + debugger; if (this.style.SignalButton && this.style.SignalButton.selectColor) { this.rectButton && this.rectButton.setStyle({fill:this.style.SignalButton.selectColor}); } else { diff --git a/src/jmapNew/theme/datie_02/menus/menuButton.vue b/src/jmapNew/theme/datie_02/menus/menuButton.vue index dbdbf1299..437b17368 100644 --- a/src/jmapNew/theme/datie_02/menus/menuButton.vue +++ b/src/jmapNew/theme/datie_02/menus/menuButton.vue @@ -1,5 +1,5 @@