From 98662ec1776a424ef1005436d33ae7a9d7cd272d Mon Sep 17 00:00:00 2001 From: fan Date: Fri, 19 Apr 2024 18:25:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E6=97=B6=E5=B9=BF=E6=92=AD=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E8=B0=83=E6=95=B4&=E6=B3=A8=E9=87=8Aiscs=E4=BF=A1?= =?UTF-8?q?=E5=8F=B7=E7=B3=BB=E7=BB=9F&stationNav=E6=8D=A2=E6=88=90?= =?UTF-8?q?=E8=BD=A6=E7=AB=99=E5=90=8D=E7=A7=B0&iscs=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E4=BF=AE=E6=94=B9mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../config/broadcast/stationHome.vue | 6 +++++- src/views/iscs/iscsSystem/stationNav.vue | 14 ++++++------- .../config/broadcast/stationHome.vue | 20 +++++++++++-------- src/views/iscs/iscsSystemNew/index.vue | 1 - .../iscsSystemNew/stationConfig/index.vue | 9 +++++++++ .../stationConfig/iscsCanvas.vue | 12 ++--------- src/views/iscs/iscsSystemNew/stationNav.vue | 14 ++++++------- .../newMap/display/terminals/pisScreen.vue | 2 +- 8 files changed, 43 insertions(+), 35 deletions(-) diff --git a/src/views/iscs/iscsSystem/config/broadcast/stationHome.vue b/src/views/iscs/iscsSystem/config/broadcast/stationHome.vue index 4dae2d43d..233624d48 100644 --- a/src/views/iscs/iscsSystem/config/broadcast/stationHome.vue +++ b/src/views/iscs/iscsSystem/config/broadcast/stationHome.vue @@ -471,7 +471,11 @@ export default { const audio = document.getElementById(position.toLowerCase() + '_voice'); if (!audio) { return; } audio.pause(); - audio.src = this.$store.state.user.ossUrl + info.url; + if(info.url.startsWith('http')) { + audio.src = info.url; + } else { + audio.src = this.$store.state.user.ossUrl + info.url; + } audio.play(); const _that = this; audio.addEventListener('ended', function() { diff --git a/src/views/iscs/iscsSystem/stationNav.vue b/src/views/iscs/iscsSystem/stationNav.vue index fac761f1a..ecccb14d1 100644 --- a/src/views/iscs/iscsSystem/stationNav.vue +++ b/src/views/iscs/iscsSystem/stationNav.vue @@ -270,12 +270,12 @@ export default { id: 'schedule', type: 'interface' }, - { - name: '信号系统', - mode: 'signal', - id: 'signal', - type: 'interface' - }, + // { + // name: '信号系统', + // mode: 'signal', + // id: 'signal', + // type: 'interface' + // }, // { // name: '全线信号系统界面', // mode: 'allLineSignal', @@ -365,7 +365,7 @@ export default { res.data.forEach(station => { if (!station.depot && station.visible) { const param = { - name: station.runPlanName.includes('站') ? station.runPlanName : `${station.runPlanName}站`, + name: station.name, id: station.code }; diff --git a/src/views/iscs/iscsSystemNew/config/broadcast/stationHome.vue b/src/views/iscs/iscsSystemNew/config/broadcast/stationHome.vue index afb642f6a..62c23f725 100644 --- a/src/views/iscs/iscsSystemNew/config/broadcast/stationHome.vue +++ b/src/views/iscs/iscsSystemNew/config/broadcast/stationHome.vue @@ -488,7 +488,11 @@ export default { const audio = document.getElementById(position.toLowerCase() + '_voice'); if (!audio) { return; } audio.pause(); - audio.src = this.$store.state.user.ossUrl + info.url; + if(info.url.startsWith('http')) { + audio.src = info.url; + } else { + audio.src = this.$store.state.user.ossUrl + info.url; + } audio.play(); // const _that = this; // audio.addEventListener('ended', function() { @@ -635,13 +639,13 @@ export default { return; } sendCommandNew(this.$route.query.group, 'ISCS_PA_Stop_Playing', { iscsDeviceCodes: iscsDeviceCodes }).then(resp => { - // positionList.forEach(elem => { - // const audio = document.getElementById(elem.toLowerCase() + '_voice'); - // audio.pause(); - // }); - // const audio = document.getElementById('voice'); - // audio.pause(); - }).catch(() => { + positionList.forEach(elem => { + const audio = document.getElementById(elem.toLowerCase() + '_voice'); + audio && audio.pause(); + }); + const audio = document.getElementById('voice'); + audio.pause(); + }).catch((e) => { this.$message.error('背景音乐终止播放失败!'); }); }, diff --git a/src/views/iscs/iscsSystemNew/index.vue b/src/views/iscs/iscsSystemNew/index.vue index c5677537e..dcebaee1c 100644 --- a/src/views/iscs/iscsSystemNew/index.vue +++ b/src/views/iscs/iscsSystemNew/index.vue @@ -24,7 +24,6 @@ export default { }; }, mounted() { - }, methods:{ selectIscsPane(param) { diff --git a/src/views/iscs/iscsSystemNew/stationConfig/index.vue b/src/views/iscs/iscsSystemNew/stationConfig/index.vue index cdfd1bdee..8b3210015 100644 --- a/src/views/iscs/iscsSystemNew/stationConfig/index.vue +++ b/src/views/iscs/iscsSystemNew/stationConfig/index.vue @@ -33,6 +33,7 @@ import PidsEmergency from '../config/pis/emergencyRelease'; import PidsMain from '../config/pis/mainScreen'; import PidsPreview from '../config/pis/timePreview'; import PidsLcd from '../config/pis/lcdControl'; +import { EventBus } from '@/scripts/event-bus'; export default { name:'StationConfig', @@ -67,6 +68,14 @@ export default { ] }; }, + mounted() { + EventBus.$on('iscsModeChange', (type) => { + this.mode = type; + }); + }, + beforeDestroy() { + EventBus.$off('iscsModeChange',(type) => {this.mode = type}); + }, methods:{ showPane(param) { this.mode = param.type; diff --git a/src/views/iscs/iscsSystemNew/stationConfig/iscsCanvas.vue b/src/views/iscs/iscsSystemNew/stationConfig/iscsCanvas.vue index 9a169deef..b9297b955 100644 --- a/src/views/iscs/iscsSystemNew/stationConfig/iscsCanvas.vue +++ b/src/views/iscs/iscsSystemNew/stationConfig/iscsCanvas.vue @@ -18,6 +18,7 @@ import ProtectReset from './dialog/protectReset'; import mapElement from '@/iscs/status/mapElement.js'; import {deviceFactory} from '@/iscs/utils/parser'; import { setNum } from '@/iscs/status/mapElement.js'; +import { EventBus } from '@/scripts/event-bus'; export default { name: 'IscsStation', @@ -109,15 +110,6 @@ export default { onlclick(em) { // 父编组上元素内容 - const query = { - stationName: this.$route.query.stationName, - stationId: this.$route.query.stationId, - group: this.$route.query.group, - mapId: this.$route.query.mapId, - lineCode:'02', - noPreLogout:this.$route.query.noPreLogout, - partId: '' - }; let type = ''; if (em.deviceType == 'IscsButton') { if (em.deviceModel.function == 'goToStand') { @@ -149,7 +141,7 @@ export default { } if (type) { - this.$router.replace({ path: `/displayIscs/system/stationConfig/${type}`, query: query }); + EventBus.$emit('iscsModeChange', type) } } }, diff --git a/src/views/iscs/iscsSystemNew/stationNav.vue b/src/views/iscs/iscsSystemNew/stationNav.vue index fc11a81b8..16c45be3d 100644 --- a/src/views/iscs/iscsSystemNew/stationNav.vue +++ b/src/views/iscs/iscsSystemNew/stationNav.vue @@ -259,12 +259,12 @@ export default { id: 'schedule', type: 'interface' }, - { - name: '信号系统', - mode: 'signal', - id: 'signal', - type: 'interface' - }, + // { + // name: '信号系统', + // mode: 'signal', + // id: 'signal', + // type: 'interface' + // }, // { // name: '全线信号系统界面', // mode: 'allLineSignal', @@ -335,7 +335,7 @@ export default { res.data.forEach(station => { if (!station.depot && station.visible) { const param = { - name: station.runPlanName.includes('站') ? station.runPlanName : `${station.runPlanName}站`, + name: station.name, id: station.code }; if (station.centralized) { diff --git a/src/views/newMap/display/terminals/pisScreen.vue b/src/views/newMap/display/terminals/pisScreen.vue index 86a6ec706..2e8460058 100644 --- a/src/views/newMap/display/terminals/pisScreen.vue +++ b/src/views/newMap/display/terminals/pisScreen.vue @@ -70,7 +70,7 @@ export default { res.data.forEach(station => { if (!station.depot && station.visible) { const param = { - name: station.runPlanName.includes('站') ? station.runPlanName : `${station.runPlanName}站`, + name: station.name, id: station.code }; if (station.centralized) {