This commit is contained in:
joylink_zhaoerwei 2023-08-18 10:35:54 +08:00
parent 11bc0ba046
commit 9ea0fdd522

View File

@ -40,17 +40,16 @@ watch(
{ deep: true }
);
const redOption = ['计轴红光带', '计轴大面积红光带'];
function playAlarmMusic(type: number) {
if (playAble.value && audio.value.paused) {
const alarmType = (showAlertTypeData as never)[type + ''];
switch (alarmType) {
case '道岔失表':
switch (true) {
case alarmType == '道岔失表':
audioSrc.value = lost;
break;
case '计轴红光带':
audioSrc.value = red;
break;
case '计轴大面积红光带':
case redOption.includes(alarmType):
audioSrc.value = red;
break;
default: