feat: 文件管理增加资源统计,统计总存储量、各类型文件存储占用

This commit is contained in:
kils
2024-04-30 17:46:30 +08:00
committed by Charles7c
parent 70510894ef
commit c70d1adbf9
4 changed files with 129 additions and 7 deletions

View File

@@ -17,3 +17,8 @@ export function updateFile(data: any, id: string) {
export function deleteFile(ids: string | Array<string>) {
return http.del(`${BASE_URL}/${ids}`)
}
/** @desc 查询文件资源统计 */
export function statisticsFile() {
return http.get(`${BASE_URL}/statistics`)
}

View File

@@ -188,6 +188,14 @@ export interface FileQuery extends PageQuery {
name?: string
type?: string
}
/** 文件资源统计 */
export interface FileStatisticsResp {
type: string
size: number
formattedSize: string
number: number
data: Array<FileStatisticsResp>
}
/** 系统存储类型 */
export type StorageResp = {