This commit is contained in:
joylink_zhaoerwei 2023-11-01 09:07:11 +08:00
parent 3a2324b274
commit 50af8c6c52

View File

@ -41,7 +41,7 @@ watch(
alarm(alarmType, val[0].id);
playAlarmMusic(alarmType);
} else {
waitShowDialog.unshift(markRaw(lineNetStore.alarmInfo[0]));
waitShowDialog.push(markRaw(lineNetStore.alarmInfo[0]));
}
}
}
@ -138,6 +138,7 @@ function alarm(alarmType: number, id: string) {
if (dialogInstance[i].id == id) {
dialogInstance[i].hasHandle = true;
if (close !== undefined) {
alarmWaitDialog();
dialogInstance[i].show = false;
}
break;
@ -147,11 +148,7 @@ function alarm(alarmType: number, id: string) {
},
})
.onCancel(() => {
if (countHasShowFiveDialog() && waitShowDialog.length) {
alarm(alarmType, waitShowDialog[0].id);
playAlarmMusic(waitShowDialog[0].alert_type);
waitShowDialog.shift();
}
alarmWaitDialog();
const index = dialogInstance.findIndex(
(item) => item.dialog == dialogInstanceItem
);
@ -169,6 +166,14 @@ function alarm(alarmType: number, id: string) {
timingPlayAlarmMusic(dialogInstanceItem);
}
function alarmWaitDialog() {
if (countHasShowFiveDialog() && waitShowDialog.length) {
alarm(waitShowDialog[0].alert_type, waitShowDialog[0].id);
playAlarmMusic(waitShowDialog[0].alert_type);
waitShowDialog.shift();
}
}
function closeAllDialog() {
if (dialogInstance.length) {
dialogInstance.forEach((item) => {