108 lines
2.2 KiB
TypeScript
108 lines
2.2 KiB
TypeScript
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
|
import { BasicColumn, BasicTableProps, FormProps } from '@jeesite/core/components/Table';
|
|
import { bizDataReportUserListData } from '@jeesite/biz/api/biz/dataReportUser';
|
|
|
|
const { t } = useI18n('biz.dataReportUser');
|
|
|
|
const modalProps = {
|
|
title: t('指标用户选择'),
|
|
};
|
|
|
|
const searchForm: FormProps<BizDataReportUser> = {
|
|
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('ustatus'),
|
|
field: 'ustatus',
|
|
component: 'Select',
|
|
componentProps: {
|
|
dictType: 'ustatus',
|
|
allowClear: true,
|
|
},
|
|
},
|
|
],
|
|
};
|
|
|
|
const tableColumns: BasicColumn<BizDataReportUser>[] = [
|
|
{
|
|
title: t('记录时间'),
|
|
dataIndex: 'createTime',
|
|
key: 'a.create_time',
|
|
sorter: true,
|
|
width: 230,
|
|
align: 'left',
|
|
slot: 'firstColumn',
|
|
},
|
|
{
|
|
title: t('data_report_id'),
|
|
dataIndex: 'dataReportId',
|
|
key: 'a.data_report_id',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'left',
|
|
},
|
|
{
|
|
title: t('user_code'),
|
|
dataIndex: 'userCode',
|
|
key: 'a.user_code',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'left',
|
|
},
|
|
{
|
|
title: t('user_name'),
|
|
dataIndex: 'userName',
|
|
key: 'a.user_name',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'left',
|
|
},
|
|
{
|
|
title: t('ustatus'),
|
|
dataIndex: 'ustatus',
|
|
key: 'a.ustatus',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'center',
|
|
dictType: 'ustatus',
|
|
},
|
|
];
|
|
|
|
const tableProps: BasicTableProps = {
|
|
api: bizDataReportUserListData,
|
|
beforeFetch: (params) => {
|
|
params['isAll'] = true;
|
|
return params;
|
|
},
|
|
columns: tableColumns,
|
|
formConfig: searchForm,
|
|
rowKey: 'id',
|
|
};
|
|
|
|
export default {
|
|
modalProps,
|
|
tableProps,
|
|
itemCode: 'id',
|
|
itemName: 'id',
|
|
isShowCode: false,
|
|
};
|