项目需求、任务以及模块精简
This commit is contained in:
@@ -0,0 +1,168 @@
|
||||
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
||||
import { BasicColumn, BasicTableProps, FormProps } from '@jeesite/core/components/Table';
|
||||
import { MyProjectInfo, myProjectInfoListData } from '@jeesite/biz/api/biz/myProjectInfo';
|
||||
|
||||
const { t } = useI18n('biz.myProjectInfo');
|
||||
|
||||
const modalProps = {
|
||||
title: t('项目选择'),
|
||||
};
|
||||
|
||||
const searchForm: FormProps<MyProjectInfo> = {
|
||||
baseColProps: { md: 8, lg: 6 },
|
||||
labelWidth: 90,
|
||||
schemas: [
|
||||
{
|
||||
label: t('项目名称'),
|
||||
field: 'projectName',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: t('责任人员'),
|
||||
field: 'personId',
|
||||
fieldLabel: 'personName',
|
||||
component: 'ListSelect',
|
||||
componentProps: {
|
||||
selectType: 'bizPersonSelect',
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('项目状态'),
|
||||
field: 'projectStatus',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
dictType: 'project_status',
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const tableColumns: BasicColumn<MyProjectInfo>[] = [
|
||||
{
|
||||
title: t('记录时间'),
|
||||
dataIndex: 'createTime',
|
||||
key: 'a.create_time',
|
||||
sorter: true,
|
||||
width: 150,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
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: 'personName',
|
||||
key: 'c.person_name',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('区域级别'),
|
||||
dataIndex: 'areaLevel',
|
||||
key: 'a.area_level',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
dictType: 'area_level',
|
||||
},
|
||||
{
|
||||
title: t('区域名称'),
|
||||
dataIndex: 'areaName',
|
||||
key: 'b.area_name',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('区域全称'),
|
||||
dataIndex: 'treeName',
|
||||
key: 'b.tree_name',
|
||||
sorter: true,
|
||||
width: 200,
|
||||
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: 'projectType',
|
||||
key: 'a.project_type',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
dictType: 'project_type',
|
||||
},
|
||||
{
|
||||
title: t('项目状态'),
|
||||
dataIndex: 'projectStatus',
|
||||
key: 'a.project_status',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
dictType: 'project_status',
|
||||
},
|
||||
{
|
||||
title: t('更新时间'),
|
||||
dataIndex: 'updateTime',
|
||||
key: 'a.update_time',
|
||||
sorter: true,
|
||||
width: 150,
|
||||
align: 'center',
|
||||
},
|
||||
];
|
||||
|
||||
const tableProps: BasicTableProps = {
|
||||
api: myProjectInfoListData,
|
||||
beforeFetch: (params) => {
|
||||
params['isAll'] = true;
|
||||
return params;
|
||||
},
|
||||
columns: tableColumns,
|
||||
formConfig: searchForm,
|
||||
rowKey: 'projectId',
|
||||
};
|
||||
|
||||
export default {
|
||||
modalProps,
|
||||
tableProps,
|
||||
itemCode: 'projectId',
|
||||
itemName: 'projectName',
|
||||
isShowCode: false,
|
||||
};
|
||||
Reference in New Issue
Block a user