From 4217b149df56372cfb7acd424bd3781f7817b274 Mon Sep 17 00:00:00 2001 From: fan Date: Wed, 28 Sep 2022 16:57:35 +0800 Subject: [PATCH 1/8] =?UTF-8?q?ISCS=E9=97=B8=E6=9C=BA=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/iscs/iscs.js | 35 +++++++++++++++++-- src/utils/stomp.js | 5 ++- .../stationConfig/ticketOrEntrance/index.vue | 27 +++++++++++++- 3 files changed, 62 insertions(+), 5 deletions(-) diff --git a/src/iscs/iscs.js b/src/iscs/iscs.js index d6adbfee3..4b5fa2b43 100644 --- a/src/iscs/iscs.js +++ b/src/iscs/iscs.js @@ -299,14 +299,43 @@ class Iscs { this.$painter.update(this.iscsDevice[psdCode]); } }); - } else if (elem.deviceType === 'men') { + } else if (elem.deviceType === 'GATE') { const checkArrowDoubleCodeList = ['IscsPicture_2', 'IscsPicture_8', 'IscsPicture_27', 'IscsPicture_33']; const checkArrowLeftCodeList = ['IscsPicture_3', 'IscsPicture_4', 'IscsPicture_5', 'IscsPicture_6', 'IscsPicture_7', 'IscsPicture_28', 'IscsPicture_29', 'IscsPicture_30', 'IscsPicture_31', 'IscsPicture_34', 'IscsPicture_35', 'IscsPicture_36', 'IscsPicture_37']; const checkArrowRightCodeList = ['IscsPicture_10', 'IscsPicture_11', 'IscsPicture_12', 'IscsPicture_13', 'IscsPicture_14']; + [...checkArrowDoubleCodeList, ...checkArrowLeftCodeList, ...checkArrowRightCodeList].forEach(checkCode => { - this.iscsDevice[checkCode].model.picture = elem.picture; - this.$painter.update(this.iscsDevice[checkCode]); + let picture = ''; + if (elem.status === 1) { + if (checkArrowDoubleCodeList.includes(checkCode)) { + picture = 'checkArrowDoubleLv'; + } else if (checkArrowLeftCodeList.includes(checkCode)) { + picture = 'checkArrowLeftLv'; + } else if (checkArrowRightCodeList.includes(checkCode)) { + picture = 'checkArrowRightLv'; + } + } else if (elem.status === 0) { + if (checkArrowDoubleCodeList.includes(checkCode)) { + picture = 'checkArrowDoubleHong'; + } else if (checkArrowLeftCodeList.includes(checkCode)) { + picture = 'checkArrowLeftHong'; + } else if (checkArrowRightCodeList.includes(checkCode)) { + picture = 'checkArrowRightHong'; + } + } else if (elem.status === -1) { + if (checkArrowDoubleCodeList.includes(checkCode)) { + picture = 'checkArrowDouble'; + } else if (checkArrowLeftCodeList.includes(checkCode)) { + picture = 'checkArrowLeft'; + } else if (checkArrowRightCodeList.includes(checkCode)) { + picture = 'checkArrowRight'; + } + } + if (picture) { + this.iscsDevice[checkCode].model.picture = picture; + this.$painter.update(this.iscsDevice[checkCode]); + } }); } else { const oDevice = this.iscsDevice[code]; diff --git a/src/utils/stomp.js b/src/utils/stomp.js index ba80b426f..5b4f5ec3f 100644 --- a/src/utils/stomp.js +++ b/src/utils/stomp.js @@ -31,6 +31,9 @@ export function getTopic(type, group, param) { case 'ISCSPIS': topic = `/queue/simulation/${group}/iscs/pis`; break; + case 'ISCSGATE': + topic = `/queue/simulation/${group}/iscs/gate/${param.stationCode}`; + break; case 'PIS_STAND': topic = `/queue/simulation/${group}/standPis/${param.standCode}`; break; @@ -75,7 +78,7 @@ function callback(Response) { store.dispatch('socket/setSimulationTimeSync', Number.parseInt(Response.body)); } else if (Response.headers.destination.includes('state')) { store.dispatch('socket/handleSimulationState', Number.parseInt(Response.body)); - } else if (Response.headers.destination.includes('iscs/psd')) { + } else if (Response.headers.destination.includes('iscs/psd') || Response.headers.destination.includes('iscs/gate')) { store.dispatch('socket/handleIscsState', JSON.parse(Response.body)); } else if (Response.headers.destination.includes('iscs/pa')) { store.dispatch('socket/handleIscsPaState', JSON.parse(Response.body)); diff --git a/src/views/iscs/iscsSystem/stationConfig/ticketOrEntrance/index.vue b/src/views/iscs/iscsSystem/stationConfig/ticketOrEntrance/index.vue index 0e0a5ddd9..4555edfe8 100644 --- a/src/views/iscs/iscsSystem/stationConfig/ticketOrEntrance/index.vue +++ b/src/views/iscs/iscsSystem/stationConfig/ticketOrEntrance/index.vue @@ -11,6 +11,8 @@ diff --git a/src/views/newMap/newMapdraft/dataRelation/disStationOperate/index.vue b/src/views/newMap/newMapdraft/dataRelation/disStationOperate/index.vue index 807c66751..9eb98999f 100644 --- a/src/views/newMap/newMapdraft/dataRelation/disStationOperate/index.vue +++ b/src/views/newMap/newMapdraft/dataRelation/disStationOperate/index.vue @@ -4,18 +4,20 @@ ref="routeEdit" :selected="selected" :map-info="mapInfo" - :route-data="routeData" @setCenter="setCenter" /> +