diff --git a/Services/client/src/components/FileItem.vue b/Services/client/src/components/FileItem.vue index 3c2dd91..23d8e19 100644 --- a/Services/client/src/components/FileItem.vue +++ b/Services/client/src/components/FileItem.vue @@ -173,6 +173,13 @@ async function submitFileForm( }, value.file, ) + setTimeout(() => { + refaceFile(currentPath.value) + }, 3000) + + setTimeout(() => { + refaceFile(currentPath.value) + }, 10000) } fileFormData.value = {} fileFormState.value = false @@ -340,8 +347,8 @@ async function submitFileForm(
{ isActFoundFile.value = true - }, 300) + }, 400) } fileFormData.value = {} @@ -252,8 +252,8 @@ onMounted(() => {
{ {{ nameData.row.fileName }} diff --git a/Services/client/src/components/ListView.vue b/Services/client/src/components/ListView.vue index b1f05e8..1bf753c 100644 --- a/Services/client/src/components/ListView.vue +++ b/Services/client/src/components/ListView.vue @@ -22,6 +22,7 @@ const { updateFile, deleteFile, checkFile, + refaceFile, } = useTreeDataStore() const DEPT_NAME = ['ตู้เอกสาร', 'ลิ้นชัก', 'แฟ้ม', 'แฟ้มย่อย'] as const @@ -162,6 +163,14 @@ async function submitFileForm( keyword: value.keyword, category: value.category, }) + + setTimeout(() => { + refaceFile(currentPath.value) + }, 3000) + + setTimeout(() => { + refaceFile(currentPath.value) + }, 10000) } else { await updateFile( fileFormPath.value, @@ -173,6 +182,14 @@ async function submitFileForm( }, value.file, ) + + setTimeout(() => { + refaceFile(currentPath.value) + }, 3000) + + setTimeout(() => { + refaceFile(currentPath.value) + }, 10000) } fileFormData.value = {} fileFormState.value = false @@ -259,6 +276,7 @@ const onRowClick = (evt: Event, row: TreeDataFolder, index: number) => { diff --git a/Services/client/src/components/PageLayout.vue b/Services/client/src/components/PageLayout.vue index b7e7669..8d30422 100644 --- a/Services/client/src/components/PageLayout.vue +++ b/Services/client/src/components/PageLayout.vue @@ -83,6 +83,7 @@ onMounted(async () => { () => { currentPath = '' getFolder(currentPath) + isSearch = false } " >ตู้จัดเก็บเอกสาร
diff --git a/Services/client/src/views/MainLayout.vue b/Services/client/src/views/MainLayout.vue index d5c23ca..fb4b88d 100644 --- a/Services/client/src/views/MainLayout.vue +++ b/Services/client/src/views/MainLayout.vue @@ -3,7 +3,9 @@ import { useLoader } from '@/stores/loader' import { storeToRefs } from 'pinia' import profile from '@/components/Profile.vue' import { useTreeDataStore } from '@/stores/tree-data' +import { useSearchDataStore } from '@/stores/searched-data'; const { currentPath } = storeToRefs(useTreeDataStore()) +const { isSearch } = storeToRefs(useSearchDataStore()) const { getFolder } = useTreeDataStore() const loaderStore = useLoader() const { loader } = storeToRefs(loaderStore) @@ -32,6 +34,7 @@ const { loader } = storeToRefs(loaderStore) () => { currentPath = '' getFolder(currentPath) + isSearch = false } " >