Files
lingji-work-fe/src/views/material-center/components/raw-material/constants.ts

98 lines
1.6 KiB
TypeScript
Raw Normal View History

2025-08-23 16:14:05 +08:00
export enum RawMaterialType {
All = '',
Image = 0,
Video = 1,
Text = 2,
}
export const imageExtensions = ['.jpg', '.jpeg', '.png', '.gif', '.webp', '.bmp'];
export const videoExtensions = ['.mp4', '.mov', '.avi', '.flv', '.wmv', '.m4v'];
export const documentExtensions = ['.txt', '.doc', '.docx', '.pdf', '.xls', '.xlsx'];
2025-08-23 16:14:05 +08:00
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: '',
2025-08-23 16:14:05 +08:00
type: RawMaterialType.All,
created_at: [],
2025-09-18 11:54:48 +08:00
tag_ids: [],
2025-08-23 16:14:05 +08:00
sort_column: undefined,
sort_order: undefined,
};
export const TABLE_COLUMNS = [
{
title: '文件名称',
dataIndex: 'name',
width: 400,
},
{
title: '类型',
dataIndex: 'type',
width: 80,
},
{
title: '标签',
dataIndex: 'tags',
width: 190,
},
2025-08-23 16:14:05 +08:00
{
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: 180,
2025-08-23 16:14:05 +08:00
fixed: 'right',
},
];