diff --git a/public/alarmMusic/all-line-blue.mp3 b/public/alarmMusic/all-line-blue.mp3 new file mode 100644 index 0000000..4bda92e Binary files /dev/null and b/public/alarmMusic/all-line-blue.mp3 differ diff --git a/public/alarmMusic/atp-cut.mp3 b/public/alarmMusic/atp-cut.mp3 new file mode 100644 index 0000000..7288aa1 Binary files /dev/null and b/public/alarmMusic/atp-cut.mp3 differ diff --git a/public/alarmMusic/blue.mp3 b/public/alarmMusic/blue.mp3 new file mode 100644 index 0000000..df23371 Binary files /dev/null and b/public/alarmMusic/blue.mp3 differ diff --git a/public/alarmMusic/cannot-close.mp3 b/public/alarmMusic/cannot-close.mp3 new file mode 100644 index 0000000..9d568d8 Binary files /dev/null and b/public/alarmMusic/cannot-close.mp3 differ diff --git a/public/alarmMusic/cannot-open.mp3 b/public/alarmMusic/cannot-open.mp3 new file mode 100644 index 0000000..55c0e0a Binary files /dev/null and b/public/alarmMusic/cannot-open.mp3 differ diff --git a/public/alarmMusic/orange-most.mp3 b/public/alarmMusic/orange-most.mp3 new file mode 100644 index 0000000..5cf2991 Binary files /dev/null and b/public/alarmMusic/orange-most.mp3 differ diff --git a/public/alarmMusic/orange.mp3 b/public/alarmMusic/orange.mp3 new file mode 100644 index 0000000..0337816 Binary files /dev/null and b/public/alarmMusic/orange.mp3 differ diff --git a/public/alarmMusic/red-most.mp3 b/public/alarmMusic/red-most.mp3 new file mode 100644 index 0000000..fad1085 Binary files /dev/null and b/public/alarmMusic/red-most.mp3 differ diff --git a/public/alarmMusic/switch-lost-most.mp3 b/public/alarmMusic/switch-lost-most.mp3 new file mode 100644 index 0000000..375c7b8 Binary files /dev/null and b/public/alarmMusic/switch-lost-most.mp3 differ diff --git a/public/alarmMusic/lost.mp3 b/public/alarmMusic/switch-lost.mp3 similarity index 100% rename from public/alarmMusic/lost.mp3 rename to public/alarmMusic/switch-lost.mp3 diff --git a/src/components/alarm/commonAlarm.vue b/src/components/alarm/commonAlarm.vue index 75e0096..9de37ae 100644 --- a/src/components/alarm/commonAlarm.vue +++ b/src/components/alarm/commonAlarm.vue @@ -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; diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index 89cb0b6..b8da7ea 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -201,17 +201,14 @@ const lineId = ref(); const optionsAlertType = [ '蓝显', '全线蓝显', - '列车延误2分钟', - '列车延误10分钟', - '整侧站台门无关闭锁紧信号', '整侧站台门无法打开', '整侧站台门无法关闭', '道岔失表', + '道岔大面积失表', '计轴红光带', '计轴大面积红光带', '计轴橙光带', '计轴大面积橙光带', - '道岔大面积失表', '列车信号故障', ]; let optionsAlertDevice = ref([]);