feat: 原料库

This commit is contained in:
rd
2025-08-23 16:14:05 +08:00
parent 23becf5884
commit 4029ec0f7e
11 changed files with 647 additions and 6 deletions

View File

@ -0,0 +1,87 @@
export enum RawMaterialType {
All = '',
Image = 0,
Video = 1,
Text = 2,
}
export const TABS_LIST = [
{
label: '全部',
value: RawMaterialType.All,
},
{
label: '图片',
value: RawMaterialType.Image,
},
{
label: '视频',
value: RawMaterialType.Video,
},
{
label: '文本',
value: RawMaterialType.Text,
},
];
export const ORIGIN_LIST = [
{
label: '本地上传',
value: 0,
},
{
label: 'AI生成',
value: 1,
},
]
export const INITIAL_QUERY = {
name: '',
uid: '',
type: RawMaterialType.All,
created_at: [],
sort_column: undefined,
sort_order: undefined,
};
export const TABLE_COLUMNS = [
{
title: '文件名称',
dataIndex: 'name',
width: 400,
},
{
title: '类型',
dataIndex: 'type',
width: 80,
},
{
title: '来源',
dataIndex: 'origin',
width: 120,
},
{
title: '大小',
dataIndex: 'size',
width: 120,
},
{
title: '上传时间',
dataIndex: 'created_at',
width: 180,
sortable: {
sortDirections: ['ascend', 'descend'],
},
},
{
title: '上传人员',
dataIndex: 'uploader',
width: 180,
},
{
title: '操作',
dataIndex: 'operation',
width: 100,
fixed: 'right',
}
]