增加故障提示音
This commit is contained in:
parent
0f83f9e004
commit
ed3eb1ea9a
BIN
public/alarmMusic/all-line-blue.mp3
Normal file
BIN
public/alarmMusic/all-line-blue.mp3
Normal file
Binary file not shown.
BIN
public/alarmMusic/atp-cut.mp3
Normal file
BIN
public/alarmMusic/atp-cut.mp3
Normal file
Binary file not shown.
BIN
public/alarmMusic/blue.mp3
Normal file
BIN
public/alarmMusic/blue.mp3
Normal file
Binary file not shown.
BIN
public/alarmMusic/cannot-close.mp3
Normal file
BIN
public/alarmMusic/cannot-close.mp3
Normal file
Binary file not shown.
BIN
public/alarmMusic/cannot-open.mp3
Normal file
BIN
public/alarmMusic/cannot-open.mp3
Normal file
Binary file not shown.
BIN
public/alarmMusic/orange-most.mp3
Normal file
BIN
public/alarmMusic/orange-most.mp3
Normal file
Binary file not shown.
BIN
public/alarmMusic/orange.mp3
Normal file
BIN
public/alarmMusic/orange.mp3
Normal file
Binary file not shown.
BIN
public/alarmMusic/red-most.mp3
Normal file
BIN
public/alarmMusic/red-most.mp3
Normal file
Binary file not shown.
BIN
public/alarmMusic/switch-lost-most.mp3
Normal file
BIN
public/alarmMusic/switch-lost-most.mp3
Normal file
Binary file not shown.
@ -12,8 +12,17 @@ import { useLineNetStore } from 'src/stores/line-net-store';
|
|||||||
import { DialogChainObject, useQuasar } from 'quasar';
|
import { DialogChainObject, useQuasar } from 'quasar';
|
||||||
import alarmInfoDialog from 'src/components/alarm/alarmInfoDialog.vue';
|
import alarmInfoDialog from 'src/components/alarm/alarmInfoDialog.vue';
|
||||||
import { showAlertTypeData } from './alarmInfoEnum';
|
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 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';
|
import buzzer from '/alarmMusic/buzzer.mp3';
|
||||||
|
|
||||||
const lineNetStore = useLineNetStore();
|
const lineNetStore = useLineNetStore();
|
||||||
@ -38,18 +47,43 @@ watch(
|
|||||||
{ deep: true }
|
{ deep: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
const redOption = ['计轴红光带', '计轴大面积红光带'];
|
|
||||||
|
|
||||||
function playAlarmMusic(type: number) {
|
function playAlarmMusic(type: number) {
|
||||||
if (playAble.value && audio.value.paused) {
|
if (playAble.value && audio.value.paused) {
|
||||||
const alarmType = (showAlertTypeData as never)[type + ''];
|
const alarmType = (showAlertTypeData as never)[type + ''];
|
||||||
switch (true) {
|
switch (alarmType) {
|
||||||
case alarmType == '道岔失表':
|
case '蓝显':
|
||||||
audioSrc.value = lost;
|
audioSrc.value = blue;
|
||||||
break;
|
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;
|
audioSrc.value = red;
|
||||||
break;
|
break;
|
||||||
|
case '计轴大面积红光带':
|
||||||
|
audioSrc.value = redMost;
|
||||||
|
break;
|
||||||
|
case '计轴橙光带':
|
||||||
|
audioSrc.value = orange;
|
||||||
|
break;
|
||||||
|
case '计轴大面积橙光带':
|
||||||
|
audioSrc.value = orangeMost;
|
||||||
|
break;
|
||||||
|
case '列车信号故障':
|
||||||
|
audioSrc.value = atpcut;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
audioSrc.value = buzzer;
|
audioSrc.value = buzzer;
|
||||||
break;
|
break;
|
||||||
|
@ -201,17 +201,14 @@ const lineId = ref();
|
|||||||
const optionsAlertType = [
|
const optionsAlertType = [
|
||||||
'蓝显',
|
'蓝显',
|
||||||
'全线蓝显',
|
'全线蓝显',
|
||||||
'列车延误2分钟',
|
|
||||||
'列车延误10分钟',
|
|
||||||
'整侧站台门无关闭锁紧信号',
|
|
||||||
'整侧站台门无法打开',
|
'整侧站台门无法打开',
|
||||||
'整侧站台门无法关闭',
|
'整侧站台门无法关闭',
|
||||||
'道岔失表',
|
'道岔失表',
|
||||||
|
'道岔大面积失表',
|
||||||
'计轴红光带',
|
'计轴红光带',
|
||||||
'计轴大面积红光带',
|
'计轴大面积红光带',
|
||||||
'计轴橙光带',
|
'计轴橙光带',
|
||||||
'计轴大面积橙光带',
|
'计轴大面积橙光带',
|
||||||
'道岔大面积失表',
|
|
||||||
'列车信号故障',
|
'列车信号故障',
|
||||||
];
|
];
|
||||||
let optionsAlertDevice = ref<string[]>([]);
|
let optionsAlertDevice = ref<string[]>([]);
|
||||||
|
Loading…
Reference in New Issue
Block a user