178 lines
3.5 KiB
TypeScript
178 lines
3.5 KiB
TypeScript
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
|
import { BasicColumn, BasicTableProps, FormProps } from '@jeesite/core/components/Table';
|
|
import { bizProjectInfoListData } from '@jeesite/biz/api/biz/projectInfo';
|
|
|
|
const { t } = useI18n('biz.projectInfo');
|
|
|
|
const modalProps = {
|
|
title: t('项目信息选择'),
|
|
};
|
|
|
|
const searchForm: FormProps<BizProjectInfo> = {
|
|
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: 'projectCode',
|
|
component: 'Input',
|
|
},
|
|
{
|
|
label: t('项目名称'),
|
|
field: 'projectName',
|
|
component: 'Input',
|
|
},
|
|
{
|
|
label: t('员工列表'),
|
|
field: 'employeeId',
|
|
component: 'Select',
|
|
componentProps: {
|
|
dictType: '',
|
|
allowClear: true,
|
|
},
|
|
},
|
|
{
|
|
label: t('项目类型'),
|
|
field: 'projectType',
|
|
component: 'Select',
|
|
componentProps: {
|
|
dictType: '',
|
|
allowClear: true,
|
|
},
|
|
},
|
|
{
|
|
label: t('项目状态'),
|
|
field: 'projectStatus',
|
|
component: 'Select',
|
|
componentProps: {
|
|
dictType: '',
|
|
allowClear: true,
|
|
},
|
|
},
|
|
],
|
|
};
|
|
|
|
const tableColumns: BasicColumn<BizProjectInfo>[] = [
|
|
{
|
|
title: t('记录时间'),
|
|
dataIndex: 'createTime',
|
|
key: 'a.create_time',
|
|
sorter: true,
|
|
width: 230,
|
|
align: 'left',
|
|
slot: 'firstColumn',
|
|
},
|
|
{
|
|
title: t('项目编码'),
|
|
dataIndex: 'projectCode',
|
|
key: 'a.project_code',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'left',
|
|
},
|
|
{
|
|
title: t('项目名称'),
|
|
dataIndex: 'projectName',
|
|
key: 'a.project_name',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'left',
|
|
},
|
|
{
|
|
title: t('项目描述'),
|
|
dataIndex: 'projectDesc',
|
|
key: 'a.project_desc',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'left',
|
|
},
|
|
{
|
|
title: t('开始日期'),
|
|
dataIndex: 'startDate',
|
|
key: 'a.start_date',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'center',
|
|
},
|
|
{
|
|
title: t('预计结束日期'),
|
|
dataIndex: 'endDate',
|
|
key: 'a.end_date',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'center',
|
|
},
|
|
{
|
|
title: t('实际结束日期'),
|
|
dataIndex: 'actualEndDate',
|
|
key: 'a.actual_end_date',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'center',
|
|
},
|
|
{
|
|
title: t('员工列表'),
|
|
dataIndex: 'employeeId',
|
|
key: 'a.employee_id',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'left',
|
|
dictType: '',
|
|
},
|
|
{
|
|
title: t('项目类型'),
|
|
dataIndex: 'projectType',
|
|
key: 'a.project_type',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'left',
|
|
dictType: '',
|
|
},
|
|
{
|
|
title: t('项目状态'),
|
|
dataIndex: 'projectStatus',
|
|
key: 'a.project_status',
|
|
sorter: true,
|
|
width: 130,
|
|
align: 'left',
|
|
dictType: '',
|
|
},
|
|
];
|
|
|
|
const tableProps: BasicTableProps = {
|
|
api: bizProjectInfoListData,
|
|
beforeFetch: (params) => {
|
|
params['isAll'] = true;
|
|
return params;
|
|
},
|
|
columns: tableColumns,
|
|
formConfig: searchForm,
|
|
rowKey: 'projectId',
|
|
};
|
|
|
|
export default {
|
|
modalProps,
|
|
tableProps,
|
|
itemCode: 'projectId',
|
|
itemName: 'projectId',
|
|
isShowCode: false,
|
|
};
|