208 lines
4.0 KiB
TypeScript
208 lines
4.0 KiB
TypeScript
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
|
import { BasicColumn, BasicTableProps, FormProps } from '@jeesite/core/components/Table';
|
|
import { bizMyfilesListData } from '@jeesite/biz/api/biz/myfiles';
|
|
|
|
const { t } = useI18n('biz.myfiles');
|
|
|
|
const modalProps = {
|
|
title: t('文件信息选择'),
|
|
};
|
|
|
|
const searchForm: FormProps<BizMyfiles> = {
|
|
baseColProps: { md: 8, lg: 6 },
|
|
labelWidth: 90,
|
|
schemas: [
|
|
{
|
|
label: t('记录时间起'),
|
|
field: 'createTime_gte',
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
format: 'YYYY-MM-DD HH:mm',
|
|
showTime: { format: 'HH:mm' },
|
|
},
|
|
},
|
|
{
|
|
label: t('记录时间止'),
|
|
field: 'createTime_lte',
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
format: 'YYYY-MM-DD HH:mm',
|
|
showTime: { format: 'HH:mm' },
|
|
},
|
|
},
|
|
{
|
|
label: t('原始名称'),
|
|
field: 'fileName',
|
|
component: 'Input',
|
|
},
|
|
{
|
|
label: t('文件MD5'),
|
|
field: 'fileHash',
|
|
component: 'Input',
|
|
},
|
|
{
|
|
label: t('文件夹标识'),
|
|
field: 'folderId',
|
|
component: 'Input',
|
|
},
|
|
{
|
|
label: t('用户名称'),
|
|
field: 'loginCode',
|
|
component: 'Input',
|
|
},
|
|
{
|
|
label: t('是否删除'),
|
|
field: 'isDelete',
|
|
component: 'Select',
|
|
componentProps: {
|
|
dictType: 'sys_yes_no',
|
|
allowClear: true,
|
|
},
|
|
},
|
|
],
|
|
};
|
|
|
|
const tableColumns: BasicColumn<BizMyfiles>[] = [
|
|
{
|
|
title: t('记录时间'),
|
|
dataIndex: 'createTime',
|
|
key: 'a.create_time',
|
|
sorter: true,
|
|
width: 230,
|
|
align: 'left',
|
|
slot: 'firstColumn',
|
|
},
|
|
{
|
|
title: t('原始名称'),
|
|
dataIndex: 'fileName',
|
|
key: 'a.file_name',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'left',
|
|
},
|
|
{
|
|
title: t('存储路径'),
|
|
dataIndex: 'filePath',
|
|
key: 'a.file_path',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'left',
|
|
},
|
|
{
|
|
title: t('文件MD5'),
|
|
dataIndex: 'fileHash',
|
|
key: 'a.file_hash',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'left',
|
|
},
|
|
{
|
|
title: t('文件大小'),
|
|
dataIndex: 'fileSize',
|
|
key: 'a.file_size',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'center',
|
|
},
|
|
{
|
|
title: t('文件扩展名'),
|
|
dataIndex: 'fileExt',
|
|
key: 'a.file_ext',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'left',
|
|
},
|
|
{
|
|
title: t('文件类型'),
|
|
dataIndex: 'mimeType',
|
|
key: 'a.mime_type',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'left',
|
|
},
|
|
{
|
|
title: t('文件夹标识'),
|
|
dataIndex: 'folderId',
|
|
key: 'a.folder_id',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'left',
|
|
},
|
|
{
|
|
title: t('用户姓名'),
|
|
dataIndex: 'userName',
|
|
key: 'a.user_name',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'left',
|
|
},
|
|
{
|
|
title: t('用户名称'),
|
|
dataIndex: 'loginCode',
|
|
key: 'a.login_code',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'left',
|
|
},
|
|
{
|
|
title: t('下载次数'),
|
|
dataIndex: 'downloadCount',
|
|
key: 'a.download_count',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'center',
|
|
},
|
|
{
|
|
title: t('查看次数'),
|
|
dataIndex: 'viewCount',
|
|
key: 'a.view_count',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'center',
|
|
},
|
|
{
|
|
title: t('过期时间'),
|
|
dataIndex: 'expireTime',
|
|
key: 'a.expire_time',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'center',
|
|
},
|
|
{
|
|
title: t('是否删除'),
|
|
dataIndex: 'isDelete',
|
|
key: 'a.is_delete',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'center',
|
|
dictType: 'sys_yes_no',
|
|
},
|
|
{
|
|
title: t('更新时间'),
|
|
dataIndex: 'updateTime',
|
|
key: 'a.update_time',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'center',
|
|
},
|
|
];
|
|
|
|
const tableProps: BasicTableProps = {
|
|
api: bizMyfilesListData,
|
|
beforeFetch: (params) => {
|
|
params['isAll'] = true;
|
|
return params;
|
|
},
|
|
columns: tableColumns,
|
|
formConfig: searchForm,
|
|
rowKey: 'tid',
|
|
};
|
|
|
|
export default {
|
|
modalProps,
|
|
tableProps,
|
|
itemCode: 'tid',
|
|
itemName: 'tid',
|
|
isShowCode: false,
|
|
};
|