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
|
<q-btn
|
||||||
outline
|
outline
|
||||||
push
|
push
|
||||||
class="q-px-md q-ml-md q-py-sm"
|
class="q-px-md q-ml-md"
|
||||||
:label="'สร้าง' + currentLevel"
|
:label="'สร้าง' + currentLevel"
|
||||||
type="submit"
|
type="submit"
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|
@ -377,7 +377,7 @@ const onRowClick = (evt: Event, row: TreeDataFolder, index: number) => {
|
||||||
v-if="props.mode == 'admin'"
|
v-if="props.mode == 'admin'"
|
||||||
outline
|
outline
|
||||||
push
|
push
|
||||||
class="q-px-md q-ml-md q-py-sm"
|
class="q-px-md q-ml-md"
|
||||||
label="สร้างเอกสาร"
|
label="สร้างเอกสาร"
|
||||||
type="submit"
|
type="submit"
|
||||||
color="primary"
|
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>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<section id="header" class="q-px-md q-pt-md q-pb-none">
|
<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) {
|
async function getFolder(pathname: string, updateStatus = true) {
|
||||||
loader.show()
|
loader.show()
|
||||||
|
|
||||||
|
sessionStorage.setItem('currentPath', pathname)
|
||||||
|
|
||||||
const pathArray: string[] = pathname.split('/').filter(Boolean)
|
const pathArray: string[] = pathname.split('/').filter(Boolean)
|
||||||
|
|
||||||
currentDept.value = pathArray.length
|
currentDept.value = pathArray.length
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue