故障音乐map调整
This commit is contained in:
parent
ed3eb1ea9a
commit
be5408aedc
@ -50,43 +50,24 @@ watch(
|
||||
function playAlarmMusic(type: number) {
|
||||
if (playAble.value && audio.value.paused) {
|
||||
const alarmType = (showAlertTypeData as never)[type + ''];
|
||||
switch (alarmType) {
|
||||
case '蓝显':
|
||||
audioSrc.value = blue;
|
||||
break;
|
||||
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:
|
||||
const mapAlarmMusic = new Map([
|
||||
['蓝显', blue],
|
||||
['全线蓝显', allLineBlue],
|
||||
['整侧站台门无法打开', cannotOpen],
|
||||
['整侧站台门无法关闭', cannotClose],
|
||||
['道岔失表', switchLost],
|
||||
['道岔大面积失表', switchLostMost],
|
||||
['计轴红光带', red],
|
||||
['计轴大面积红光带', redMost],
|
||||
['计轴橙光带', orange],
|
||||
['计轴大面积橙光带', orangeMost],
|
||||
['列车信号故障', atpcut],
|
||||
]);
|
||||
const music = mapAlarmMusic.get(alarmType);
|
||||
if (music !== undefined) {
|
||||
audioSrc.value = music;
|
||||
} else {
|
||||
audioSrc.value = buzzer;
|
||||
break;
|
||||
}
|
||||
audio.value.src = audioSrc.value;
|
||||
audio.value.play();
|
||||
|
Loading…
Reference in New Issue
Block a user