From acc05f770eaf0580e753709932a07874354a8513 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Thu, 19 Mar 2020 10:23:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=BF=9B=E8=B7=AF=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=BD=B1=E5=93=8D=E8=87=AA=E5=8A=A8=E8=BF=9B=E8=B7=AF?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/chengdu_03.js | 6 ++++-- src/jmapNew/map.js | 8 +++++++- src/jmapNew/shape/AutomacticRoute/index.js | 5 +++++ src/store/modules/map.js | 3 +++ 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/jmapNew/config/skinCode/chengdu_03.js b/src/jmapNew/config/skinCode/chengdu_03.js index 60e79b999..121794310 100644 --- a/src/jmapNew/config/skinCode/chengdu_03.js +++ b/src/jmapNew/config/skinCode/chengdu_03.js @@ -450,7 +450,8 @@ class SkinCode extends defaultStyle { stroke: '#FFFFFF', // 框的颜色 fill: 'rgba(0,0,0,0)', // 填充色 radiusR: 6, // 控制灯大小 - controlColor: '#b5b3b3' // 控制灯颜色 (灰色) + controlColor: '#b5b3b3', // 控制灯颜色 (灰色) + lightColor: '#FFFF00' // 控制灯亮颜色 } }; this[deviceType.AutomaticRoute] = { @@ -464,7 +465,8 @@ class SkinCode extends defaultStyle { lamp: { fill: 'rgba(0,0,0,0)', // 填充色 radiusR: 6, // 控制灯大小 - controlColor: '#b5b3b3' // 控制灯颜色 (灰色) + controlColor: '#b5b3b3', // 控制灯颜色 (灰色) + lightColor: '#FFFF00' // 控制灯亮颜色 } }; this[deviceType.AutoTurnBack] = { diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index b8036bf9b..2c215efd5 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -331,6 +331,13 @@ class Jlmap { if (elem.deviceType === 'ROUTE') { // 处理进路数据状态 store.dispatch('map/updateRouteState', elem); const route = this.routeData[code]; + if (route.automaticRouteCode) { + const automaticRoute = this.mapDevice[route.automaticRouteCode]; + const automaticRouteStatus = {fleetMode: elem.fleetMode}; + if (this.hookHandle(automaticRoute, automaticRouteStatus)) { + this.$painter.update(automaticRoute); + } + } const signalDevice = this.mapDevice[route.startSignalCode]; const signalStatus = {atsControl: elem.atsControl, fleetMode: elem.fleetMode}; if (this.hookHandle(signalDevice, signalStatus)) { @@ -346,7 +353,6 @@ class Jlmap { // } } } - }); // 状态后处理 diff --git a/src/jmapNew/shape/AutomacticRoute/index.js b/src/jmapNew/shape/AutomacticRoute/index.js index 64138eaff..17979cb80 100644 --- a/src/jmapNew/shape/AutomacticRoute/index.js +++ b/src/jmapNew/shape/AutomacticRoute/index.js @@ -90,6 +90,11 @@ export default class AutomacticRoute extends Group { // 设置状态 setState(model) { if (!this.isShowShape) return; + if (this.model.fleetMode) { + this.control && this.control.setStyle('fill', this.style.AutomaticRoute.lamp.lightColor); + } else { + this.control && this.control.setStyle('fill', this.style.AutomaticRoute.lamp.controlColor); + } } createMouseEvent() { diff --git a/src/store/modules/map.js b/src/store/modules/map.js index c3a854838..814136e7b 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -667,6 +667,9 @@ const map = { routeDataList.forEach(data => { state.routeData[data.code] = data; }); + state.map.automaticRouteButtonList.forEach(item => { + state.routeData[item.automaticRouteCode].automaticRouteCode = item.code; + }); state.routeList = routeDataList; }, setAutoReentryData: (state, autoReentryList) => {