ตั้งค่า onMounted ของ prevBackupRunTotal และ prevRestoreRunTotal = -1
This commit is contained in:
parent
d470e88418
commit
4f05f1164d
1 changed files with 7 additions and 0 deletions
|
|
@ -13,12 +13,17 @@ import Card from "@/modules/04_system/components/cardBackupRestore.vue";
|
||||||
import CardAutoBackup from "@/modules/04_system/components/cardAutoBackup.vue";
|
import CardAutoBackup from "@/modules/04_system/components/cardAutoBackup.vue";
|
||||||
|
|
||||||
import { useDataStore } from "@/modules/04_system/stores/main";
|
import { useDataStore } from "@/modules/04_system/stores/main";
|
||||||
|
import { storeToRefs } from "pinia";
|
||||||
|
|
||||||
const { fetchListBackup, backupRunningList, restoreRunningList } =
|
const { fetchListBackup, backupRunningList, restoreRunningList } =
|
||||||
useDataStore();
|
useDataStore();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ตัวแปร
|
* ตัวแปร
|
||||||
*/
|
*/
|
||||||
|
const storeData = useDataStore();
|
||||||
|
const { prevBackupRunTotal, prevRestoreRunTotal } = storeToRefs(storeData);
|
||||||
|
|
||||||
const tab = ref<string>("backup");
|
const tab = ref<string>("backup");
|
||||||
const tabItems = ref<ItemsTeb[]>([
|
const tabItems = ref<ItemsTeb[]>([
|
||||||
{ name: "backup", label: "Backup & Restore", icon: "mdi-database" },
|
{ name: "backup", label: "Backup & Restore", icon: "mdi-database" },
|
||||||
|
|
@ -26,6 +31,8 @@ const tabItems = ref<ItemsTeb[]>([
|
||||||
]);
|
]);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
prevBackupRunTotal.value = -1;
|
||||||
|
prevRestoreRunTotal.value = -1;
|
||||||
await fetchListBackup();
|
await fetchListBackup();
|
||||||
await backupRunningList(fetchListBackup);
|
await backupRunningList(fetchListBackup);
|
||||||
await restoreRunningList(() => {});
|
await restoreRunningList(() => {});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue