From 50c0f3abaf29581a4333587ea9ecd74e01c7d8ab Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 6 May 2022 10:32:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AD=E5=A1=9E=E7=8A=B6=E6=80=81=20?= =?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/config/skinCode/datie_02.js | 4 +++ src/jmapNew/map.js | 16 +++++++++++- src/jmapNew/shape/graph/SaidLamp/index.js | 26 +++++++++++++++++++ .../theme/datie_02/menus/menuButton.vue | 10 +++---- 4 files changed, 50 insertions(+), 6 deletions(-) diff --git a/src/jmapNew/config/skinCode/datie_02.js b/src/jmapNew/config/skinCode/datie_02.js index f6f6971de..663dfa8c9 100644 --- a/src/jmapNew/config/skinCode/datie_02.js +++ b/src/jmapNew/config/skinCode/datie_02.js @@ -963,6 +963,8 @@ class SkinCode extends defaultStyle { defaultColor: '#ccc', occupiedColor:'#f00', noOccupiedColor:'#00ff00', + blockStatusColor:'#00ff00', + noBlockStatusColor:'#ffff00', }; this[deviceType.PickArrow] = { triangleLength: 15, @@ -976,6 +978,8 @@ class SkinCode extends defaultStyle { defaultColor: '#ccc', occupiedColor:'#f00', noOccupiedColor:'#ffff00', + blockStatusColor:'#00ff00', + noBlockStatusColor:'#ffff00', }; this[deviceType.Occlusion] = { text: { diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index 5ea1d72ea..d54087174 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -481,7 +481,15 @@ class Jlmap { const selectButtonList = signalButtonList.filter(elem=>{ return elem.labelEnum === directionData.labelEnum && elem.stationCode == directionData.stationCode; }); - const selectMap = {'ASSIST':'mainAssistStatus', 'PICK_ASSIST':'receiveAssistStatus', 'DEPART_ASSIST':'deliverAssistStatus', 'CHANGE_DIRECTION':'changeDirectionStatus'}; + const selectMap = {'ASSIST':'mainAssistStatus', + 'PICK_ASSIST':'receiveAssistStatus', + 'DEPART_ASSIST':'deliverAssistStatus', + 'CHANGE_DIRECTION':'changeDirectionStatus', + // 闭塞按钮 + 'OCCLUSION':'blockStatus', + // 复原按钮 + 'RECOVERY':'restoreStatus' + }; // { value: 'ASSIST', label: '总辅助按钮' }, // { value: 'PICK_ASSIST', label: '接辅助按钮' }, // { value: 'DEPART_ASSIST', label: '发辅助按钮' }, @@ -509,6 +517,9 @@ class Jlmap { if (elem.receiveAspect != undefined) { model.aspect = elem.receiveAspect; } + if (elem.blockStatus != undefined ) { + model.blockStatus = elem.blockStatus; + } this.$painter.update(model); } break; @@ -520,6 +531,9 @@ class Jlmap { if (elem.deliverAspect != undefined) { model.aspect = elem.deliverAspect; } + if (elem.blockStatus != undefined ) { + model.blockStatus = elem.blockStatus; + } this.$painter.update(model); } break; diff --git a/src/jmapNew/shape/graph/SaidLamp/index.js b/src/jmapNew/shape/graph/SaidLamp/index.js index 2bdbc6f3b..6035a5f4c 100644 --- a/src/jmapNew/shape/graph/SaidLamp/index.js +++ b/src/jmapNew/shape/graph/SaidLamp/index.js @@ -220,6 +220,20 @@ export default class SaidLamp extends Group { } } else if (model.runStatus == 'D') { // 发车 this.control && this.control.setControlColor(this.deviceStyle.fill); + } else 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); + } + } + } } } else if (model._type == deviceType.DepartArrow) { // 发车灯 if (model.runStatus == 'D') { // 发车 @@ -231,6 +245,18 @@ export default class SaidLamp extends Group { } } else if (model.runStatus == 'R') { // 接车 this.control && this.control.setControlColor(this.deviceStyle.fill); + } else if (model.runStatus == 'S') { // 闭塞 + 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 { switch (model.aspect) { diff --git a/src/jmapNew/theme/datie_02/menus/menuButton.vue b/src/jmapNew/theme/datie_02/menus/menuButton.vue index 6bb4ced9c..495f6140b 100644 --- a/src/jmapNew/theme/datie_02/menus/menuButton.vue +++ b/src/jmapNew/theme/datie_02/menus/menuButton.vue @@ -643,7 +643,7 @@ export default { this.clearOperate(); } } else if (!buttonOperation) { - const signalButtonList = ['ASSIST', 'CHANGE_DIRECTION', 'PICK_ASSIST', 'DEPART_ASSIST']; + const signalButtonList = ['ASSIST', 'CHANGE_DIRECTION', 'PICK_ASSIST', 'DEPART_ASSIST', 'OCCLUSION', 'RECOVERY']; if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) && model.type === 'GUIDE' ) { this.handleGuideSignal(model); } else if (model._type === 'SignalButton' && signalButtonList.includes(model.type)) { @@ -712,8 +712,8 @@ export default { stationCode:model.stationCode } }, - // 阻塞 - '':{ + // 闭塞按钮 + 'OCCLUSION':{ operation:this.CTCCommand.assistPressBlock.menu.operation, nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_BLOCK, param:{ @@ -721,8 +721,8 @@ export default { stationCode:model.stationCode } }, - // 复原 - '':{ + // 复原按钮 + 'RECOVERY':{ operation:this.CTCCommand.assistPressRestore.menu.operation, nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_RESTORE, param:{