实时广播问题调整&注释iscs信号系统&stationNav换成车站名称&iscs点击修改mode

This commit is contained in:
fan 2024-04-19 18:25:09 +08:00 committed by joylink_fanyuhong
parent bd10b05228
commit d5eb68ea1c
8 changed files with 43 additions and 35 deletions

View File

@ -471,7 +471,11 @@ export default {
const audio = document.getElementById(position.toLowerCase() + '_voice'); const audio = document.getElementById(position.toLowerCase() + '_voice');
if (!audio) { return; } if (!audio) { return; }
audio.pause(); 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(); audio.play();
const _that = this; const _that = this;
audio.addEventListener('ended', function() { audio.addEventListener('ended', function() {

View File

@ -270,12 +270,12 @@ export default {
id: 'schedule', id: 'schedule',
type: 'interface' type: 'interface'
}, },
{ // {
name: '信号系统', // name: '',
mode: 'signal', // mode: 'signal',
id: 'signal', // id: 'signal',
type: 'interface' // type: 'interface'
}, // },
// { // {
// name: '线', // name: '线',
// mode: 'allLineSignal', // mode: 'allLineSignal',
@ -365,7 +365,7 @@ export default {
res.data.forEach(station => { res.data.forEach(station => {
if (!station.depot && station.visible) { if (!station.depot && station.visible) {
const param = { const param = {
name: station.runPlanName.includes('站') ? station.runPlanName : `${station.runPlanName}`, name: station.name,
id: station.code id: station.code
}; };

View File

@ -488,7 +488,11 @@ export default {
const audio = document.getElementById(position.toLowerCase() + '_voice'); const audio = document.getElementById(position.toLowerCase() + '_voice');
if (!audio) { return; } if (!audio) { return; }
audio.pause(); 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(); audio.play();
// const _that = this; // const _that = this;
// audio.addEventListener('ended', function() { // audio.addEventListener('ended', function() {
@ -635,13 +639,13 @@ export default {
return; return;
} }
sendCommandNew(this.$route.query.group, 'ISCS_PA_Stop_Playing', { iscsDeviceCodes: iscsDeviceCodes }).then(resp => { sendCommandNew(this.$route.query.group, 'ISCS_PA_Stop_Playing', { iscsDeviceCodes: iscsDeviceCodes }).then(resp => {
// positionList.forEach(elem => { positionList.forEach(elem => {
// const audio = document.getElementById(elem.toLowerCase() + '_voice'); const audio = document.getElementById(elem.toLowerCase() + '_voice');
// audio.pause(); audio && audio.pause();
// }); });
// const audio = document.getElementById('voice'); const audio = document.getElementById('voice');
// audio.pause(); audio.pause();
}).catch(() => { }).catch((e) => {
this.$message.error('背景音乐终止播放失败!'); this.$message.error('背景音乐终止播放失败!');
}); });
}, },

View File

@ -24,7 +24,6 @@ export default {
}; };
}, },
mounted() { mounted() {
}, },
methods:{ methods:{
selectIscsPane(param) { selectIscsPane(param) {

View File

@ -33,6 +33,7 @@ import PidsEmergency from '../config/pis/emergencyRelease';
import PidsMain from '../config/pis/mainScreen'; import PidsMain from '../config/pis/mainScreen';
import PidsPreview from '../config/pis/timePreview'; import PidsPreview from '../config/pis/timePreview';
import PidsLcd from '../config/pis/lcdControl'; import PidsLcd from '../config/pis/lcdControl';
import { EventBus } from '@/scripts/event-bus';
export default { export default {
name:'StationConfig', 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:{ methods:{
showPane(param) { showPane(param) {
this.mode = param.type; this.mode = param.type;

View File

@ -18,6 +18,7 @@ import ProtectReset from './dialog/protectReset';
import mapElement from '@/iscs/status/mapElement.js'; import mapElement from '@/iscs/status/mapElement.js';
import {deviceFactory} from '@/iscs/utils/parser'; import {deviceFactory} from '@/iscs/utils/parser';
import { setNum } from '@/iscs/status/mapElement.js'; import { setNum } from '@/iscs/status/mapElement.js';
import { EventBus } from '@/scripts/event-bus';
export default { export default {
name: 'IscsStation', name: 'IscsStation',
@ -109,15 +110,6 @@ export default {
onlclick(em) { 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 = ''; let type = '';
if (em.deviceType == 'IscsButton') { if (em.deviceType == 'IscsButton') {
if (em.deviceModel.function == 'goToStand') { if (em.deviceModel.function == 'goToStand') {
@ -149,7 +141,7 @@ export default {
} }
if (type) { if (type) {
this.$router.replace({ path: `/displayIscs/system/stationConfig/${type}`, query: query }); EventBus.$emit('iscsModeChange', type)
} }
} }
}, },

View File

@ -259,12 +259,12 @@ export default {
id: 'schedule', id: 'schedule',
type: 'interface' type: 'interface'
}, },
{ // {
name: '信号系统', // name: '',
mode: 'signal', // mode: 'signal',
id: 'signal', // id: 'signal',
type: 'interface' // type: 'interface'
}, // },
// { // {
// name: '线', // name: '线',
// mode: 'allLineSignal', // mode: 'allLineSignal',
@ -335,7 +335,7 @@ export default {
res.data.forEach(station => { res.data.forEach(station => {
if (!station.depot && station.visible) { if (!station.depot && station.visible) {
const param = { const param = {
name: station.runPlanName.includes('站') ? station.runPlanName : `${station.runPlanName}`, name: station.name,
id: station.code id: station.code
}; };
if (station.centralized) { if (station.centralized) {

View File

@ -70,7 +70,7 @@ export default {
res.data.forEach(station => { res.data.forEach(station => {
if (!station.depot && station.visible) { if (!station.depot && station.visible) {
const param = { const param = {
name: station.runPlanName.includes('站') ? station.runPlanName : `${station.runPlanName}`, name: station.name,
id: station.code id: station.code
}; };
if (station.centralized) { if (station.centralized) {