From d5eb68ea1c27b86a926b36957002fd644e82037d Mon Sep 17 00:00:00 2001 From: fan Date: Fri, 19 Apr 2024 18:25:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AE=9E=E6=97=B6=E5=B9=BF=E6=92=AD?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E8=B0=83=E6=95=B4&=E6=B3=A8=E9=87=8Aiscs?= =?UTF-8?q?=E4=BF=A1=E5=8F=B7=E7=B3=BB=E7=BB=9F&stationNav=E6=8D=A2?= =?UTF-8?q?=E6=88=90=E8=BD=A6=E7=AB=99=E5=90=8D=E7=A7=B0&iscs=E7=82=B9?= =?UTF-8?q?=E5=87=BB=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) { From 3fc31777a2e074cd6d7e281e584755df59bc4f60 Mon Sep 17 00:00:00 2001 From: fan Date: Fri, 19 Apr 2024 22:25:43 +0800 Subject: [PATCH 2/2] =?UTF-8?q?iscs=E9=80=80=E5=87=BA=E4=BB=BF=E7=9C=9F?= =?UTF-8?q?=E8=B0=83=E6=95=B4&iscs=E7=BB=98=E5=88=B6=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/iscs/iscsDesign/demonList.vue | 2 +- src/views/iscs/iscsSystem/stationNav.vue | 13 ++++++---- src/views/iscs/iscsSystemNew/stationNav.vue | 27 +++++++++++---------- 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/src/views/iscs/iscsDesign/demonList.vue b/src/views/iscs/iscsDesign/demonList.vue index 2f84b5a9e..d82adf835 100644 --- a/src/views/iscs/iscsDesign/demonList.vue +++ b/src/views/iscs/iscsDesign/demonList.vue @@ -58,7 +58,7 @@ export default { mapPublishList: [], pageTreeMap: { '01': [], - '49': [ + '63': [ { // 牵引降压混合变电所主接线图 变电所接线图 降压变电所主接线图 解除网图 混合变电所主接线图 name: '电力监控系统', diff --git a/src/views/iscs/iscsSystem/stationNav.vue b/src/views/iscs/iscsSystem/stationNav.vue index ecccb14d1..848e476cc 100644 --- a/src/views/iscs/iscsSystem/stationNav.vue +++ b/src/views/iscs/iscsSystem/stationNav.vue @@ -86,7 +86,7 @@ import { getByGroupStationList } from '@/api/jmap/map'; import { getToken } from '@/utils/auth'; // import { getSessionStorage } from '@/utils/auth'; import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp'; -import { clearSimulation } from '@/api/simulation'; +import { destroySimulationByAdmin } from '@/api/simulation'; import alarmConfig from './stationConfig/dialog/alarm'; import incidentConfig from './stationConfig/dialog/incident'; @@ -492,13 +492,16 @@ export default { this.$store.dispatch('LogOut').then(() => { location.reload(); }); - } else { - clearSimulation(this.$route.query.group).then(resp => { - this.$router.push({ path: `/trainingPlatform` }); + } else if(this.$store.state.training.simulationCreator){ + destroySimulationByAdmin(this.$route.query.group).then(resp => { + history.go(-1); }).catch(()=> { this.$message.error('清除仿真失败!'); }); - } + } else { + history.go(-1); + } + }, quit() { window.close(); diff --git a/src/views/iscs/iscsSystemNew/stationNav.vue b/src/views/iscs/iscsSystemNew/stationNav.vue index 16c45be3d..0976fad6e 100644 --- a/src/views/iscs/iscsSystemNew/stationNav.vue +++ b/src/views/iscs/iscsSystemNew/stationNav.vue @@ -82,6 +82,7 @@ import iscs_icon7 from '@/assets/iscs_system/iscs_icon7.png'; import alarmConfig from './stationConfig/dialog/alarm'; import incidentConfig from './stationConfig/dialog/incident'; import malfunction from './stationConfig/dialog/malfunction'; +import { destroySimulationByAdmin } from '@/api/simulation'; export default { name:'StationNav', components: { @@ -402,19 +403,19 @@ export default { this.$refs.malfunction.doShow('CANCEL'); }, back() { - history.go(-1); - // this.clearSubscribe(); - // if (this.projectDevice) { - // this.$store.dispatch('LogOut').then(() => { - // location.reload(); - // }); - // } else { - // clearSimulation(this.$route.query.group).then(resp => { - // this.$router.push({ path: `/trainingPlatform` }); - // }).catch(()=> { - // this.$message.error('清除仿真失败!'); - // }); - // } + if (this.projectDevice) { + this.$store.dispatch('LogOut').then(() => { + location.reload(); + }); + } else if(this.$store.state.training.simulationCreator){ + destroySimulationByAdmin(this.$route.query.group).then(resp => { + history.go(-1); + }).catch(()=> { + this.$message.error('清除仿真失败!'); + }); + } else { + history.go(-1); + } } } };