Merge branch 'net' into development
This commit is contained in:
commit
ed9c552cac
2 changed files with 39 additions and 9 deletions
|
|
@ -15,12 +15,13 @@ const props = withDefaults(
|
|||
defineProps<{ action: boolean; viewMode: 'view_list' | 'view_module' }>(),
|
||||
{
|
||||
action: false,
|
||||
},
|
||||
}
|
||||
)
|
||||
const DEPT_NAME = ['ตู้เอกสาร', 'ลิ้นชัก', 'แฟ้ม', 'แฟ้มย่อย'] as const
|
||||
const { getFileInfo, getFileNameFormat } = useFileInfoStore()
|
||||
const { currentFolder, currentFile, currentDept, currentPath } =
|
||||
storeToRefs(useTreeDataStore())
|
||||
const { currentFolder, currentFile, currentDept, currentPath } = storeToRefs(
|
||||
useTreeDataStore()
|
||||
)
|
||||
const {
|
||||
createFolder,
|
||||
editFolder,
|
||||
|
|
@ -30,14 +31,15 @@ const {
|
|||
updateFile,
|
||||
deleteFile,
|
||||
checkFile,
|
||||
refaceFile,
|
||||
} = useTreeDataStore()
|
||||
|
||||
const currentIcon = computed(() =>
|
||||
currentDept.value === 0
|
||||
? 'mdi-file-cabinet'
|
||||
: currentDept.value === 1
|
||||
? 'inbox'
|
||||
: 'o_folder_open',
|
||||
? 'inbox'
|
||||
: 'o_folder_open'
|
||||
)
|
||||
|
||||
const dialogDeleteState = ref<boolean>(false)
|
||||
|
|
@ -112,7 +114,7 @@ function triggerFileEdit(
|
|||
keyword: string[]
|
||||
category: string[]
|
||||
},
|
||||
pathname: string,
|
||||
pathname: string
|
||||
) {
|
||||
fileFormState.value = true
|
||||
fileFormType.value = 'edit'
|
||||
|
|
@ -136,7 +138,7 @@ async function submitFileForm(
|
|||
keyword: string[]
|
||||
category: string[]
|
||||
},
|
||||
force = false,
|
||||
force = false
|
||||
) {
|
||||
currentParam.value = value
|
||||
|
||||
|
|
@ -152,6 +154,13 @@ async function submitFileForm(
|
|||
keyword: value.keyword,
|
||||
category: value.category,
|
||||
})
|
||||
setTimeout(() => {
|
||||
refaceFile(currentPath.value)
|
||||
}, 3000)
|
||||
|
||||
setTimeout(() => {
|
||||
refaceFile(currentPath.value)
|
||||
}, 10000)
|
||||
} else {
|
||||
await updateFile(
|
||||
fileFormPath.value,
|
||||
|
|
@ -161,7 +170,7 @@ async function submitFileForm(
|
|||
keyword: value.keyword,
|
||||
category: value.category,
|
||||
},
|
||||
value.file,
|
||||
value.file
|
||||
)
|
||||
}
|
||||
fileFormData.value = {}
|
||||
|
|
@ -313,7 +322,7 @@ async function submitFileForm(
|
|||
keyword: value.keyword,
|
||||
category: value.category,
|
||||
},
|
||||
value.pathname,
|
||||
value.pathname
|
||||
)
|
||||
"
|
||||
@delete="() => triggerFileDelete(value.pathname)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue