แก้ ดึงข้อมูลช้ำ

This commit is contained in:
Net 2024-07-24 17:27:46 +07:00
parent 9f110ccc0c
commit 0b9017ff1b

View file

@ -109,8 +109,8 @@ export const useDataStore = defineStore("systemStore", () => {
.then(async (res) => {
backupRunTotal.value = res.data.length;
if (backupRunTotal.value === 0 && prevBackupRunTotal.value !== 0) {
cb();
if (backupRunTotal.value === 0) {
if (prevBackupRunTotal.value !== -1) cb();
prevBackupRunTotal.value = backupRunTotal.value;
return;
}
@ -147,7 +147,7 @@ export const useDataStore = defineStore("systemStore", () => {
.get<BackUpRunning[]>(config.API.backup + "/restore-running-list")
.then(async (res) => {
restoreRunTotal.value = res.data.length;
if (restoreRunTotal.value === 0 && prevRestoreRunTotal.value !== 0) {
if (restoreRunTotal.value === 0) {
cb();
prevRestoreRunTotal.value = restoreRunTotal.value;
return;