From 25dc683c81c9f5d7eb659b8f3a4dbfc59b7a17a6 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 6 May 2022 16:36:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=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/shape/graph/SaidLamp/index.js | 24 +++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/jmapNew/shape/graph/SaidLamp/index.js b/src/jmapNew/shape/graph/SaidLamp/index.js index f209cde8d..67536b211 100644 --- a/src/jmapNew/shape/graph/SaidLamp/index.js +++ b/src/jmapNew/shape/graph/SaidLamp/index.js @@ -252,16 +252,20 @@ export default class SaidLamp extends Group { if (signalButtons.includes(model._type)) { if (model.runModel == 'S') { // 闭塞 console.log(model.runModel, model.runStatus, model.aspect, model.blockStatus, model._type, '88888888'); - // blockStatus:false * 指示灯(F)的时候为黄色,true为绿色 - // 指示灯(O)为红色 - if (model.blockStatus != undefined) { - if (model.aspect == 'O') { - this.control && this.control.setControlColor(this.deviceStyle.occupiedColor); - } else if (model.aspect == 'F') { - if (model.blockStatus) { - this.control && this.control.setControlColor(this.deviceStyle.blockStatusColor); - } else { - this.control && this.control.setControlColor(this.deviceStyle.noBlockStatusColor); + if (model.runStatus == 'NO') { + this.control && this.control.setControlColor(this.deviceStyle.fill); + } else { + // blockStatus:false * 指示灯(F)的时候为黄色,true为绿色 + // 指示灯(O)为红色 + if (model.blockStatus != undefined) { + if (model.aspect == 'O') { + this.control && this.control.setControlColor(this.deviceStyle.occupiedColor); + } else if (model.aspect == 'F') { + if (model.blockStatus) { + this.control && this.control.setControlColor(this.deviceStyle.blockStatusColor); + } else { + this.control && this.control.setControlColor(this.deviceStyle.noBlockStatusColor); + } } } } From d91c6cbbfd6740c4908ad516dc4875c4e27c1593 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 6 May 2022 16:55:50 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=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/shape/graph/SaidLamp/index.js | 86 +++++++++-------------- 1 file changed, 32 insertions(+), 54 deletions(-) diff --git a/src/jmapNew/shape/graph/SaidLamp/index.js b/src/jmapNew/shape/graph/SaidLamp/index.js index 67536b211..a34d64477 100644 --- a/src/jmapNew/shape/graph/SaidLamp/index.js +++ b/src/jmapNew/shape/graph/SaidLamp/index.js @@ -209,52 +209,31 @@ export default class SaidLamp extends Group { this.control && this.control.setControlColor(this.deviceStyle.lamp.offColor); } else if (datieType.includes(model._type)) { if (model.aspect) { - // if (model.runStatus == 'S') { // 闭塞 - // // blockStatus:false * 指示灯(F)的时候为黄色,true为绿色 - // // 指示灯(O)为红色 - // if (model.blockStatus != undefined) { - // if (model.aspect == 'O') { - // this.control && this.control.setControlColor(this.deviceStyle.occupiedColor); - // } else if (model.aspect == 'F') { - // if (model.blockStatus) { - // this.control && this.control.setControlColor(this.deviceStyle.blockStatusColor); - // } else { - // this.control && this.control.setControlColor(this.deviceStyle.noBlockStatusColor); - // } - // } - // } - // } - // // 接车 - // if (model._type == deviceType.PickArrow) { // 接车灯 - // if (model.runStatus == 'R' || model.runStatus == 'A') { // 接车 - // // 接车状态:发车灯灭,接车灯默认是黄色,占用时红色 - // if (model.aspect == 'O') { - // this.control && this.control.setControlColor(this.deviceStyle.occupiedColor); - // } else if (model.aspect == 'F') { - // this.control && this.control.setControlColor(this.deviceStyle.noOccupiedColor); - // } - // } else if (model.runStatus == 'D') { // 发车 - // this.control && this.control.setControlColor(this.deviceStyle.fill); - // } - // } else if (model._type == deviceType.DepartArrow) { // 发车灯 - // if (model.runStatus == 'D' || model.runStatus == 'A') { // 发车 - // // 发车状态:接车灯灭,发车灯默认是绿色,占用时红色 - // if (model.aspect == 'O') { - // this.control && this.control.setControlColor(this.deviceStyle.occupiedColor); - // } else if (model.aspect == 'F') { - // this.control && this.control.setControlColor(this.deviceStyle.noOccupiedColor); - // } - // } else if (model.runStatus == 'R') { // 接车 - // this.control && this.control.setControlColor(this.deviceStyle.fill); - // } - // } const signalButtons = [deviceType.PickArrow, deviceType.DepartArrow]; if (signalButtons.includes(model._type)) { - if (model.runModel == 'S') { // 闭塞 - console.log(model.runModel, model.runStatus, model.aspect, model.blockStatus, model._type, '88888888'); - if (model.runStatus == 'NO') { - this.control && this.control.setControlColor(this.deviceStyle.fill); - } else { + // if (model.runModel == 'S') { // 闭塞 + // console.log(model.runModel, model.runStatus, model.aspect, model.blockStatus, model._type, '88888888'); + // if (model.runStatus == 'NO') { + // this.control && this.control.setControlColor(this.deviceStyle.fill); + // } else { + // // blockStatus:false * 指示灯(F)的时候为黄色,true为绿色 + // // 指示灯(O)为红色 + // if (model.blockStatus != undefined) { + // if (model.aspect == 'O') { + // this.control && this.control.setControlColor(this.deviceStyle.occupiedColor); + // } else if (model.aspect == 'F') { + // if (model.blockStatus) { + // this.control && this.control.setControlColor(this.deviceStyle.blockStatusColor); + // } else { + // this.control && this.control.setControlColor(this.deviceStyle.noBlockStatusColor); + // } + // } + // } + // } + // } else { + console.log(model.runModel, model.runStatus, model.aspect, model.blockStatus, model._type, '88888888'); + if (model.runStatus == 'A' || (model.runStatus == 'R' && model._type == deviceType.PickArrow ) || (model.runStatus == 'D' && model._type == deviceType.DepartArrow)) { + if (model.runModel == 'S') { // blockStatus:false * 指示灯(F)的时候为黄色,true为绿色 // 指示灯(O)为红色 if (model.blockStatus != undefined) { @@ -268,23 +247,22 @@ export default class SaidLamp extends Group { } } } - } - } else { - console.log(model.runStatus, model.aspect, model._type, '666666666'); - if (model.runStatus == 'A' || (model.runStatus == 'R' && model._type == deviceType.PickArrow ) || (model.runStatus == 'D' && model._type == deviceType.DepartArrow)) { - // 发车状态:接车灯灭,发车灯默认是绿色,占用时红色 - // 接车状态:发车灯灭,接车灯默认是黄色,占用时红色 + } else { + // 发车状态:接车灯灭,发车灯默认是绿色,占用时红色 + // 接车状态:发车灯灭,接车灯默认是黄色,占用时红色 if (model.aspect == 'O') { this.control && this.control.setControlColor(this.deviceStyle.occupiedColor); } else if (model.aspect == 'F') { this.control && this.control.setControlColor(this.deviceStyle.noOccupiedColor); } } - // 发车状态----接车灯灭 接车状态-----发车灯灭 - if (model.runStatus == 'NO' || (model.runStatus == 'R' && model._type == deviceType.DepartArrow) || (model.runStatus == 'D' && model._type == deviceType.PickArrow)) { - this.control && this.control.setControlColor(this.deviceStyle.fill); - } + } + // 发车状态----接车灯灭 接车状态-----发车灯灭 + if (model.runStatus == 'NO' || (model.runStatus == 'R' && model._type == deviceType.DepartArrow) || (model.runStatus == 'D' && model._type == deviceType.PickArrow)) { + this.control && this.control.setControlColor(this.deviceStyle.fill); + } + // } } else { switch (model.aspect) {