152 lines
3.0 KiB
TypeScript
152 lines
3.0 KiB
TypeScript
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
|
import { BasicColumn, BasicTableProps, FormProps } from '@jeesite/core/components/Table';
|
|
import { bizFoldersListData } from '@jeesite/biz/api/biz/folders';
|
|
|
|
const { t } = useI18n('biz.folders');
|
|
|
|
const modalProps = {
|
|
title: t('文件夹信息选择'),
|
|
};
|
|
|
|
const searchForm: FormProps<BizFolders> = {
|
|
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: 'folderName',
|
|
component: 'Input',
|
|
},
|
|
{
|
|
label: t('父文件夹'),
|
|
field: 'parentId',
|
|
component: 'Input',
|
|
},
|
|
{
|
|
label: t('用户名称'),
|
|
field: 'loginCode',
|
|
component: 'Input',
|
|
},
|
|
{
|
|
label: t('是否删除'),
|
|
field: 'isDeleted',
|
|
component: 'Select',
|
|
componentProps: {
|
|
dictType: 'sys_yes_no',
|
|
allowClear: true,
|
|
},
|
|
},
|
|
{
|
|
label: t('文件夹描述'),
|
|
field: 'description',
|
|
component: 'Input',
|
|
},
|
|
],
|
|
};
|
|
|
|
const tableColumns: BasicColumn<BizFolders>[] = [
|
|
{
|
|
title: t('记录时间'),
|
|
dataIndex: 'createTime',
|
|
key: 'a.create_time',
|
|
sorter: true,
|
|
width: 230,
|
|
align: 'left',
|
|
slot: 'firstColumn',
|
|
},
|
|
{
|
|
title: t('文件夹名称'),
|
|
dataIndex: 'folderName',
|
|
key: 'a.folder_name',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'left',
|
|
},
|
|
{
|
|
title: t('父文件夹'),
|
|
dataIndex: 'parentId',
|
|
key: 'a.parent_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: 'updateTime',
|
|
key: 'a.update_time',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'center',
|
|
},
|
|
{
|
|
title: t('是否删除'),
|
|
dataIndex: 'isDeleted',
|
|
key: 'a.is_deleted',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'center',
|
|
dictType: 'sys_yes_no',
|
|
},
|
|
{
|
|
title: t('文件夹描述'),
|
|
dataIndex: 'description',
|
|
key: 'a.description',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'left',
|
|
},
|
|
];
|
|
|
|
const tableProps: BasicTableProps = {
|
|
api: bizFoldersListData,
|
|
beforeFetch: (params) => {
|
|
params['isAll'] = true;
|
|
return params;
|
|
},
|
|
columns: tableColumns,
|
|
formConfig: searchForm,
|
|
rowKey: 'folderId',
|
|
};
|
|
|
|
export default {
|
|
modalProps,
|
|
tableProps,
|
|
itemCode: 'folderId',
|
|
itemName: 'folderId',
|
|
isShowCode: false,
|
|
};
|