refactor(system/file): 添加文件路径和md5值 (#52)

This commit is contained in:
luoqiz
2025-03-08 17:55:21 +08:00
committed by GitHub
parent 7bb46a424c
commit 30821b551c
3 changed files with 14 additions and 0 deletions

View File

@@ -204,8 +204,14 @@ export interface FileItem {
name: string
size: number
url: string
parentPath: string
absPath: string
metadata: string
md5: string
contentType: string
thumbnailSize: number
thumbnailUrl: string
thumbnailMetadata: string
extension: string
type: number
storageId: string
@@ -226,6 +232,7 @@ export interface FileStatisticsResp {
export interface FileQuery {
name?: string
type?: string
absPath?: string
sort: Array<string>
}
export interface FilePageQuery extends FileQuery, PageQuery {

View File

@@ -13,6 +13,8 @@
</a-typography-paragraph>
</a-descriptions-item>
<a-descriptions-item label="大小">{{ formatFileSize(data.size) }}</a-descriptions-item>
<a-descriptions-item label="路径">{{ data.absPath + getFileName(data) }}</a-descriptions-item>
<a-descriptions-item label="MD5">{{ data.md5 }}</a-descriptions-item>
<a-descriptions-item label="上传时间">{{ data.createTime }}</a-descriptions-item>
<a-descriptions-item label="修改时间">{{ data.updateTime }}</a-descriptions-item>
<a-descriptions-item label="存储名称">{{ data.storageName }}</a-descriptions-item>

View File

@@ -17,6 +17,10 @@
</a-dropdown>
<a-input-group>
<a-input
v-model="queryForm.absPath" placeholder="路径" allow-clear style="width: 300px"
@change="search"
/>
<a-input
v-model="queryForm.name" placeholder="搜索文件名" allow-clear style="width: 200px"
@change="search"
@@ -110,6 +114,7 @@ const { mode, selectedFileIds, toggleMode, addSelectedFileItem } = useFileManage
const queryForm = reactive<FileQuery>({
name: undefined,
absPath: undefined,
type: route.query.type?.toString() !== '0' ? route.query.type?.toString() : undefined,
sort: ['updateTime,desc'],
})