refactor: mode ListView
This commit is contained in:
parent
6348ea0ba6
commit
2b07b0fba5
4 changed files with 260 additions and 5 deletions
|
|
@ -47,7 +47,8 @@ export const useTreeDataStore = defineStore('changeCabinet', () => {
|
|||
const currentFile = ref<EhrFile[]>([])
|
||||
const currentPath = ref<string>('')
|
||||
const currentDept = ref<number>(0)
|
||||
|
||||
const listDataFolder = ref<TreeDataFolder[]>()
|
||||
const listDataFile = ref<EhrFile[]>()
|
||||
async function getCabinet() {
|
||||
const res = await axiosClient.get<EhrFolder[]>(`${apiEndpoint}cabinet`)
|
||||
|
||||
|
|
@ -56,6 +57,8 @@ export const useTreeDataStore = defineStore('changeCabinet', () => {
|
|||
status: false,
|
||||
folder: [],
|
||||
}))
|
||||
|
||||
listDataFolder.value = data.value
|
||||
}
|
||||
|
||||
async function getFolder(pathname: string, updateStatus = true) {
|
||||
|
|
@ -129,6 +132,8 @@ export const useTreeDataStore = defineStore('changeCabinet', () => {
|
|||
|
||||
await getFile(pathname)
|
||||
|
||||
listDataFolder.value = currentFolder.value
|
||||
|
||||
return loader.hide()
|
||||
}
|
||||
|
||||
|
|
@ -150,6 +155,7 @@ export const useTreeDataStore = defineStore('changeCabinet', () => {
|
|||
const res = await axiosClient.get<EhrFile[]>(`${apiEndpoint}${requestPath}`)
|
||||
|
||||
currentFile.value = res.data
|
||||
listDataFile.value = currentFile.value
|
||||
|
||||
return loader.hide()
|
||||
}
|
||||
|
|
@ -237,6 +243,8 @@ export const useTreeDataStore = defineStore('changeCabinet', () => {
|
|||
currentFolder,
|
||||
currentFile,
|
||||
currentDept,
|
||||
listDataFolder,
|
||||
listDataFile,
|
||||
getCabinet,
|
||||
getFolder,
|
||||
gotoParent,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue