Merge branch 'net' into development

This commit is contained in:
somnetsak123 2023-12-01 09:26:44 +07:00
commit 7b894383da
4 changed files with 27 additions and 27 deletions

View file

@ -29,7 +29,6 @@
"vue-router": "^4.2.5"
},
"devDependencies": {
"@mayank1513/vue-tag-input": "^1.2.0",
"@quasar/vite-plugin": "^1.6.0",
"@rushstack/eslint-patch": "^1.6.0",
"@types/jsdom": "^21.1.6",

View file

@ -19,8 +19,8 @@ const props = withDefaults(
mode: 'create' | 'edit'
title?: string
description?: string
keyword?: string
category?: string
keyword?: string[]
category?: string[]
}>(),
{
open: false,

View file

@ -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,
@ -36,8 +37,8 @@ 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)
@ -56,8 +57,8 @@ const fileFormData = ref<{
file?: File
title?: string
description?: string
keyword?: string
category?: string
keyword?: string[]
category?: string[]
}>({})
const fileFormType = ref<'edit' | 'create'>('create')
const fileFormError = ref<{ fileExist?: boolean }>({})
@ -109,10 +110,10 @@ function triggerFileEdit(
value: {
title: string
description: string
keyword: string
category: string
keyword: string[]
category: string[]
},
pathname: string,
pathname: string
) {
fileFormState.value = true
fileFormType.value = 'edit'
@ -121,7 +122,7 @@ function triggerFileEdit(
title: value.title,
description: value.description,
keyword: value.keyword,
category: value.keyword,
category: value.category,
}
}
@ -136,7 +137,7 @@ async function submitFileForm(
keyword: string[]
category: string[]
},
force = false,
force = false
) {
currentParam.value = value
@ -149,8 +150,8 @@ async function submitFileForm(
await uploadFile(currentPath.value, value.file, {
title: value.title,
description: value.description,
keyword: value.keyword.join(''),
category: value.category.join(''),
keyword: value.keyword,
category: value.category,
})
} else {
await updateFile(
@ -158,10 +159,10 @@ async function submitFileForm(
{
title: value.title,
description: value.description,
keyword: value.keyword.join(''),
category: value.category.join(''),
keyword: value.keyword,
category: value.category,
},
value.file,
value.file
)
}
fileFormData.value = {}
@ -306,10 +307,10 @@ async function submitFileForm(
{
title: value.title,
description: value.description,
keyword: value.keyword.join(','),
category: value.category.join(','),
keyword: value.keyword,
category: value.category,
},
value.pathname,
value.pathname
)
"
@delete="() => triggerFileDelete(value.pathname)"

View file

@ -246,8 +246,8 @@ export const useTreeDataStore = defineStore('changeCabinet', () => {
metadata: {
title: string
description: string
keyword: string
category: string
keyword: string[]
category: string[]
},
) {
loader.show()
@ -294,8 +294,8 @@ export const useTreeDataStore = defineStore('changeCabinet', () => {
metadata: {
title: string
description: string
keyword: string
category: string
keyword: string[]
category: string[]
},
file?: File,
) {