refactor: migrate to storage
refactor: migrate to storage
This commit is contained in:
parent
4bdf1f620b
commit
cc87de5995
12 changed files with 388 additions and 879 deletions
|
|
@ -3,7 +3,7 @@ import axios from 'axios'
|
|||
import { storeToRefs } from 'pinia'
|
||||
import axiosClient from '@/services/HttpService'
|
||||
|
||||
import type { EhrFile } from '@/stores/tree-data'
|
||||
import type { StorageFile } from '@/stores/storage'
|
||||
import { useFileInfoStore } from '@/stores/file-info-data'
|
||||
|
||||
import FileIcon from '@/components/FileIcon.vue'
|
||||
|
|
@ -25,7 +25,7 @@ async function downloadSubmit(path: string | undefined) {
|
|||
formatPath = `cabinet/${cabinet}/drawer/${drawer}/folder/${folder}/subfolder/${subfolder}/file/${file}`
|
||||
}
|
||||
|
||||
const res = await axiosClient.get<EhrFile & { download: string }>(
|
||||
const res = await axiosClient.get<StorageFile & { download: string }>(
|
||||
`${import.meta.env.VITE_API_ENDPOINT}${formatPath}`,
|
||||
)
|
||||
await axios
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { storeToRefs } from 'pinia'
|
|||
import axiosClient from '@/services/HttpService'
|
||||
import mime from 'mime'
|
||||
|
||||
import type { EhrFile } from '@/stores/tree-data'
|
||||
import type { StorageFile } from '@/stores/storage'
|
||||
import { useSearchDataStore } from '@/stores/searched-data'
|
||||
import { useLoader } from '@/stores/loader'
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ async function searchSubmit() {
|
|||
|
||||
try {
|
||||
loaderStore.show()
|
||||
const res = await axiosClient.post<EhrFile[]>(
|
||||
const res = await axiosClient.post<StorageFile[]>(
|
||||
`${import.meta.env.VITE_API_ENDPOINT}/search`,
|
||||
submitSearchData.value,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue