From 041cabfe007f29f943e280d6a0bedec6f4373f3d Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 2 Jul 2021 14:02:12 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=A5=BF=E5=AE=89=E5=BB=B6=E7=BB=AD?= =?UTF-8?q?=E4=BF=9D=E6=8A=A4=E4=BF=A1=E5=8F=B7=E6=9C=BA=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E8=B0=83=E6=95=B4=20=E5=88=97=E8=BD=A6?= =?UTF-8?q?=E8=AF=A6=E6=83=85=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/xian_01.js | 3 ++- src/jmapNew/shape/graph/Signal/index.js | 7 ++++++- src/jmapNew/shape/graph/Train/EMouse.js | 22 ++++++++++++++++++++-- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/jmapNew/config/skinCode/xian_01.js b/src/jmapNew/config/skinCode/xian_01.js index 187b17f47..b80dda468 100644 --- a/src/jmapNew/config/skinCode/xian_01.js +++ b/src/jmapNew/config/skinCode/xian_01.js @@ -160,7 +160,8 @@ class SkinCode extends defaultStyle { yellowColor: '#FFFF00', // 信号灯黄色 whiteColor: '#FFFFFF', // 信号灯白色 blueColor: '#0070C0', // 信号灯蓝色 - faultType: 'flash' // 信号机故障类型(flash太阳) + faultType: 'flash', // 信号机故障类型(flash太阳) + overlapColor: '#0000ff' // 信号机延续保护颜色 }, route: { direction: false, // 自动进路方向 diff --git a/src/jmapNew/shape/graph/Signal/index.js b/src/jmapNew/shape/graph/Signal/index.js index 7f3bcdfc0..d92e17a0a 100644 --- a/src/jmapNew/shape/graph/Signal/index.js +++ b/src/jmapNew/shape/graph/Signal/index.js @@ -685,7 +685,11 @@ class Signal extends Group { } } } - + overlapLock() { + if (this.style.Signal.lamp.overlapColor) { + this.sigName && this.sigName.setStyle({ textFill: this.style.Signal.lamp.overlapColor }); + } + } // 封锁 block() { this.lamps[0].setColor(this.style.Signal.lamp.redColor); @@ -970,6 +974,7 @@ class Signal extends Group { } /** 信号机封锁 */ // 缺一个功能封锁 model.blockade && this.block(); // 因大铁处理信号按钮状态 封锁处理需在延时解锁时间之后处理 + model.overlapLock && this.overlapLock(); model.reblockade && this.reblock(); if (!path.includes('/map/draw')) { // 联锁自动进路通过 diff --git a/src/jmapNew/shape/graph/Train/EMouse.js b/src/jmapNew/shape/graph/Train/EMouse.js index 665f7fe4b..86be1a9b4 100644 --- a/src/jmapNew/shape/graph/Train/EMouse.js +++ b/src/jmapNew/shape/graph/Train/EMouse.js @@ -3,7 +3,6 @@ import Text from 'zrender/src/graphic/Text'; import LangStorage from '@/utils/lang'; import Rect from 'zrender/src/graphic/shape/Rect'; import store from '@/store/index'; -import Vue from 'vue'; class EMouse extends Group { constructor(device) { @@ -58,6 +57,25 @@ class EMouse extends Group { if (!store.state.map.mapConfig.upRight) { direction = this.device.model.right != 1; } + const physicalSection = store.getters['map/getDeviceByCode'](this.device.model.model.physicalCode); + let closeDoorTip = ''; + if (physicalSection.standTrack) { + const stationStand = store.state.map.map.stationStandList.find(item => item.standTrackCode === physicalSection.code); + if ((stationStand.right && this.device.model.right) || (!stationStand.right && !this.device.model.right)) { + if (stationStand.inside) { + closeDoorTip = '左开右关'; + } else { + closeDoorTip = '左关右开'; + } + } else { + if (stationStand.inside) { + closeDoorTip = '左关右开'; + } else { + closeDoorTip = '左开右关'; + } + } + } + console.log(physicalSection, this.device.model.model.physicalCode, '====', this.device.model.model.doorCloseLock, this.device.model.right); const turnBackStrategyMap = new Map([ ['NONE', '无折返'], ['DEFAULT', '默认'], @@ -79,7 +97,7 @@ class EMouse extends Group { text = ` The planned train: ${trainType} \n Table No.: ${this.device.model.serviceNumber} \n Train Trip No.: ${this.device.model.tripNumber}\n Destination: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n Train No.: ${this.device.model.groupNumber}\n Early or late: ${destinationText}\n Direction: ${direction ? 'up' : 'down'}\n Crew No.: \n Start Station: \n Terminal Station: \n Occupied Track: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n Current Station: \n Train-ground communication: normal \n Operation Speed level: 4 \n Detained: ${this.device.model.hold ? 'Detained' : 'Normal'}\n \n 跳停状态: ${this.device.model.jump ? 'Skip to continue moving' : 'Normal'}Stationary: ${!this.device.model.stop ? 'No' : 'Yes'}\n Blocked: No \n Speed: ${this.device.model.speed || 0} km/h \n Authorized Distance: ${this.device.model.maLen || 0} m`; } else { if (this.device.style.Train.moreTrainDetail) { - text = `列车类型: ${trainType}\n来\0\0\0\0源:人工标记\n车\0组\0号: ${this.device.model.groupNumber}\n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n早\0晚\0点: ${destinationText}${this.parseDt(this.device.model.dt)}\n运行方向: ${direction ? '上行' : '下行'}\nATP报告方向: ${direction ? '上行' : '下行'}\n起点站名: ${stationNames.get(this.device.model.startStation) || ''}\n终点站名: ${stationNames.get(this.device.model.endStation) || ''}\n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: ${stationNames.get(this.device.model.stationCode) || ''}\n车次通信: 通信车\n运行时间: ${this.device.model.runningTime}s\n停站时间: ${this.device.model.parkingRemainTime < 0 ? '无效' : `${this.device.model.parkingRemainTime}s`}\n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n车载扣车: 不执行\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'}\n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车状态: ${this.device.model.runLevel || 'CTC'}车\n最高信号系统控制: CTC\n驾驶模式: ${this.device.model.driveMode}模式\n最高ATP模式: AM\nATP1状态: 激活\nATP2状态: 备用\n速度: ${this.device.model.speed || 0} km/h\n车门状态: ${this.device.model.speed ? '关闭' : direction ? '左开右关' : '左关右开'}\n制动状态: 无紧急制动\n停车保证: 可保证停车\n站台无法进入: 否\n前方站台停车点: 中间\n折返策略: ${turnBackStrategyMap.get(this.device.model.turnBackStrategy) || ''}\n折返状态: ${turnBackStatusMap.get(this.device.model.turnBackStatus)}\n屏蔽门开门许可: 是\n运营里程: 无效\n总重量: 196T\n车长: 11860cm\n列车编组: 1`; + text = `列车类型: ${trainType}\n来\0\0\0\0源:人工标记\n车\0组\0号: ${this.device.model.groupNumber}\n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n早\0晚\0点: ${destinationText}${this.parseDt(this.device.model.dt)}\n运行方向: ${direction ? '上行' : '下行'}\nATP报告方向: ${direction ? '上行' : '下行'}\n起点站名: ${stationNames.get(this.device.model.startStation) || ''}\n终点站名: ${stationNames.get(this.device.model.endStation) || ''}\n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: ${stationNames.get(this.device.model.stationCode) || ''}\n车次通信: 通信车\n运行时间: ${this.device.model.runningTime}s\n停站时间: ${this.device.model.parkingRemainTime < 0 ? '无效' : `${this.device.model.parkingRemainTime}s`}\n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n车载扣车: 不执行\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'}\n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车状态: ${this.device.model.runLevel || 'CTC'}车\n最高信号系统控制: CTC\n驾驶模式: ${this.device.model.driveMode}模式\n最高ATP模式: AM\nATP1状态: 激活\nATP2状态: 备用\n速度: ${this.device.model.speed || 0} km/h\n车门状态: ${this.device.model.model.doorCloseLock ? '关闭' : closeDoorTip}\n制动状态: 无紧急制动\n停车保证: 可保证停车\n站台无法进入: 否\n前方站台停车点: 中间\n折返策略: ${turnBackStrategyMap.get(this.device.model.turnBackStrategy) || ''}\n折返状态: ${turnBackStatusMap.get(this.device.model.turnBackStatus)}\n屏蔽门开门许可: 是\n运营里程: 无效\n总重量: 196T\n车长: 11860cm\n列车编组: 1`; } else { text = `列车类型: ${trainType} \n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n车\0组\0号: ${this.device.model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\n乘务组号: \n起点站名: ${stationNames.get(this.device.model.startStation) || ''}\n终点站名: ${stationNames.get(this.device.model.endStation) || ''}\n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${this.device.model.hold ? '扣车' : '正常'}\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'} \n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`; } From 9d64d05202cedc58a09d253d019d4a5aa629e629 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 2 Jul 2021 14:10:52 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=88=A0=E9=99=A4console?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/graph/Train/EMouse.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/jmapNew/shape/graph/Train/EMouse.js b/src/jmapNew/shape/graph/Train/EMouse.js index 86be1a9b4..2ea16cdd3 100644 --- a/src/jmapNew/shape/graph/Train/EMouse.js +++ b/src/jmapNew/shape/graph/Train/EMouse.js @@ -75,7 +75,6 @@ class EMouse extends Group { } } } - console.log(physicalSection, this.device.model.model.physicalCode, '====', this.device.model.model.doorCloseLock, this.device.model.right); const turnBackStrategyMap = new Map([ ['NONE', '无折返'], ['DEFAULT', '默认'],