Merge branch 'methapon' into development
This commit is contained in:
commit
8d9ab5e3af
3 changed files with 11 additions and 3 deletions
|
|
@ -272,7 +272,7 @@ const onRowClick = (evt: Event, row: TreeDataFolder, index: number) => {
|
|||
<q-btn
|
||||
outline
|
||||
push
|
||||
class="q-px-md q-ml-md q-py-sm"
|
||||
class="q-px-md q-ml-md"
|
||||
:label="'สร้าง' + currentLevel"
|
||||
type="submit"
|
||||
color="primary"
|
||||
|
|
@ -377,7 +377,7 @@ const onRowClick = (evt: Event, row: TreeDataFolder, index: number) => {
|
|||
v-if="props.mode == 'admin'"
|
||||
outline
|
||||
push
|
||||
class="q-px-md q-ml-md q-py-sm"
|
||||
class="q-px-md q-ml-md"
|
||||
label="สร้างเอกสาร"
|
||||
type="submit"
|
||||
color="primary"
|
||||
|
|
|
|||
|
|
@ -48,7 +48,13 @@ async function submitFolderForm(value: {
|
|||
}
|
||||
}
|
||||
|
||||
onMounted(getCabinet)
|
||||
onMounted(async () => {
|
||||
await getCabinet()
|
||||
|
||||
const sessionCurrentPath = sessionStorage.getItem('currentPath')
|
||||
|
||||
if (sessionCurrentPath) await getFolder(sessionCurrentPath)
|
||||
})
|
||||
</script>
|
||||
<template>
|
||||
<section id="header" class="q-px-md q-pt-md q-pb-none">
|
||||
|
|
|
|||
|
|
@ -62,6 +62,8 @@ export const useTreeDataStore = defineStore('changeCabinet', () => {
|
|||
async function getFolder(pathname: string, updateStatus = true) {
|
||||
loader.show()
|
||||
|
||||
sessionStorage.setItem('currentPath', pathname)
|
||||
|
||||
const pathArray: string[] = pathname.split('/').filter(Boolean)
|
||||
|
||||
currentDept.value = pathArray.length
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue