chore: format

This commit is contained in:
Methapon2001 2023-12-04 02:45:11 +00:00
parent cdd2a90d06
commit d0c79673fe
No known key found for this signature in database
GPG key ID: 849924FEF46BD132
14 changed files with 3946 additions and 1413 deletions

View file

@ -10,9 +10,8 @@ import FileForm from './FileForm.vue'
import FolderForm from './FolderForm.vue'
const { getFormatDate, getSize, getType, getFileInfo } = useFileInfoStore()
const { listDataFile, listDataFolder, currentDept, currentPath } = storeToRefs(
useTreeDataStore()
)
const { listDataFile, listDataFolder, currentDept, currentPath } =
storeToRefs(useTreeDataStore())
const {
createFolder,
editFolder,
@ -34,18 +33,18 @@ const currentLevel = computed(() =>
currentDept.value === 0
? 'ตู้จัดเก็บเอกสาร'
: currentDept.value === 1
? 'ลิ้นชัก'
: currentDept.value === 2
? 'แฟ้ม'
: 'แฟ้มย่อย'
? 'ลิ้นชัก'
: currentDept.value === 2
? 'แฟ้ม'
: 'แฟ้มย่อย',
)
const currentIcon = computed(() =>
currentDept.value === 0
? 'mdi-file-cabinet'
: currentDept.value === 1
? 'inbox'
: 'o_folder_open'
? 'inbox'
: 'o_folder_open',
)
const folderFormState = ref<boolean>(false)
@ -121,7 +120,7 @@ function triggerFileEdit(
keyword: string[]
category: string[]
},
pathname: string
pathname: string,
) {
fileFormState.value = true
fileFormType.value = 'edit'
@ -145,7 +144,7 @@ async function submitFileForm(
keyword: string[]
category: string[]
},
force = false
force = false,
) {
currentParam.value = value
@ -170,7 +169,7 @@ async function submitFileForm(
keyword: value.keyword,
category: value.category,
},
value.file
value.file,
)
}
fileFormData.value = {}
@ -263,14 +262,12 @@ const onRowClick = (evt: Event, row: TreeDataFolder, index: number) => {
<div
class="flex flex-break d justify-between space-between"
v-if="currentDept >= 1 && props.mode == 'admin' && currentDept != 4"
>
<div>
<span class="text-h6">{{ currentLevel }}</span>
</div>
<div>
<q-btn
outline
push
class="q-px-md q-ml-md q-py-sm"
@ -295,7 +292,7 @@ const onRowClick = (evt: Event, row: TreeDataFolder, index: number) => {
:rows-per-page-options="[0]"
@row-click="onRowClick"
class="cursor"
v-if=" currentDept != 4 "
v-if="currentDept != 4"
>
<template v-slot:body-cell-name="nameRow">
<q-td style="width: 50%">
@ -331,7 +328,7 @@ const onRowClick = (evt: Event, row: TreeDataFolder, index: number) => {
@click.stop="
triggerFolderEdit(
actionsRow.row.name,
actionsRow.row.pathname
actionsRow.row.pathname,
)
"
id="listViewFolderEdit"