增加故障提示音

This commit is contained in:
joylink_zhaoerwei 2023-08-29 13:04:16 +08:00
parent 0f83f9e004
commit ed3eb1ea9a
12 changed files with 42 additions and 11 deletions

Binary file not shown.

Binary file not shown.

BIN
public/alarmMusic/blue.mp3 Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -12,8 +12,17 @@ import { useLineNetStore } from 'src/stores/line-net-store';
import { DialogChainObject, useQuasar } from 'quasar';
import alarmInfoDialog from 'src/components/alarm/alarmInfoDialog.vue';
import { showAlertTypeData } from './alarmInfoEnum';
import lost from '/alarmMusic/lost.mp3';
import allLineBlue from '/alarmMusic/all-line-blue.mp3';
import atpcut from '/alarmMusic/atp-cut.mp3';
import blue from '/alarmMusic/blue.mp3';
import cannotClose from '/alarmMusic/cannot-close.mp3';
import cannotOpen from '/alarmMusic/cannot-open.mp3';
import orangeMost from '/alarmMusic/orange-most.mp3';
import orange from '/alarmMusic/orange.mp3';
import redMost from '/alarmMusic/red-most.mp3';
import red from '/alarmMusic/red.mp3';
import switchLostMost from '/alarmMusic/switch-lost-most.mp3';
import switchLost from '/alarmMusic/switch-lost.mp3';
import buzzer from '/alarmMusic/buzzer.mp3';
const lineNetStore = useLineNetStore();
@ -38,18 +47,43 @@ watch(
{ deep: true }
);
const redOption = ['计轴红光带', '计轴大面积红光带'];
function playAlarmMusic(type: number) {
if (playAble.value && audio.value.paused) {
const alarmType = (showAlertTypeData as never)[type + ''];
switch (true) {
case alarmType == '道岔失表':
audioSrc.value = lost;
switch (alarmType) {
case '蓝显':
audioSrc.value = blue;
break;
case redOption.includes(alarmType):
case '全线蓝显':
audioSrc.value = allLineBlue;
break;
case '整侧站台门无法打开':
audioSrc.value = cannotOpen;
break;
case '整侧站台门无法关闭':
audioSrc.value = cannotClose;
break;
case '道岔失表':
audioSrc.value = switchLost;
break;
case '道岔大面积失表':
audioSrc.value = switchLostMost;
break;
case '计轴红光带':
audioSrc.value = red;
break;
case '计轴大面积红光带':
audioSrc.value = redMost;
break;
case '计轴橙光带':
audioSrc.value = orange;
break;
case '计轴大面积橙光带':
audioSrc.value = orangeMost;
break;
case '列车信号故障':
audioSrc.value = atpcut;
break;
default:
audioSrc.value = buzzer;
break;

View File

@ -201,17 +201,14 @@ const lineId = ref();
const optionsAlertType = [
'蓝显',
'全线蓝显',
'列车延误2分钟',
'列车延误10分钟',
'整侧站台门无关闭锁紧信号',
'整侧站台门无法打开',
'整侧站台门无法关闭',
'道岔失表',
'道岔大面积失表',
'计轴红光带',
'计轴大面积红光带',
'计轴橙光带',
'计轴大面积橙光带',
'道岔大面积失表',
'列车信号故障',
];
let optionsAlertDevice = ref<string[]>([]);