|
@@ -26,14 +26,17 @@ function profile(props) {
|
|
const columnsApplay = [
|
|
const columnsApplay = [
|
|
{
|
|
{
|
|
title: '标题',
|
|
title: '标题',
|
|
- dataIndex: 'table_name',
|
|
|
|
|
|
+ dataIndex: 'name',
|
|
width: '30%',
|
|
width: '30%',
|
|
},
|
|
},
|
|
|
|
|
|
{
|
|
{
|
|
title: '发起人',
|
|
title: '发起人',
|
|
- dataIndex: 'CName',
|
|
|
|
|
|
+ // dataIndex: 'CName',
|
|
width: '20%',
|
|
width: '20%',
|
|
|
|
+ render: (record) => (
|
|
|
|
+ <div>{record.CName ? record.CName : record.AuthorInfo?.CName}</div>
|
|
|
|
+ ),
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '发起时间',
|
|
title: '发起时间',
|
|
@@ -112,24 +115,6 @@ function profile(props) {
|
|
dataIndex: 'name',
|
|
dataIndex: 'name',
|
|
width: '30%',
|
|
width: '30%',
|
|
},
|
|
},
|
|
- // {
|
|
|
|
- // title: '摘要',
|
|
|
|
- // dataIndex: 'table_desc',
|
|
|
|
- // render: (descList) => {
|
|
|
|
- // return (
|
|
|
|
- // <ul>
|
|
|
|
- // {descList?.map((item) => (
|
|
|
|
- // <li>{item}</li>
|
|
|
|
- // ))}
|
|
|
|
- // </ul>
|
|
|
|
- // );
|
|
|
|
- // },
|
|
|
|
- // },
|
|
|
|
- // {
|
|
|
|
- // title: '发起人',
|
|
|
|
- // dataIndex: 'CName',
|
|
|
|
- // width: '20%',
|
|
|
|
- // },
|
|
|
|
{
|
|
{
|
|
title: '发起时间',
|
|
title: '发起时间',
|
|
render: (record) => {
|
|
render: (record) => {
|
|
@@ -164,22 +149,22 @@ function profile(props) {
|
|
];
|
|
];
|
|
|
|
|
|
//我的申请
|
|
//我的申请
|
|
- const queryApplay = async () => {
|
|
|
|
- const data = await queryApplyList();
|
|
|
|
|
|
+ const queryApplay = async (params) => {
|
|
|
|
+ const data = await queryApplyList(params);
|
|
console.log(data);
|
|
console.log(data);
|
|
setData(data);
|
|
setData(data);
|
|
setLoading(false);
|
|
setLoading(false);
|
|
};
|
|
};
|
|
//我的待审批
|
|
//我的待审批
|
|
- const queryApprove = async () => {
|
|
|
|
- const data = await queryProfileList();
|
|
|
|
|
|
+ const queryApprove = async (params) => {
|
|
|
|
+ const data = await queryProfileList(params);
|
|
console.log(data);
|
|
console.log(data);
|
|
setData(data);
|
|
setData(data);
|
|
setLoading(false);
|
|
setLoading(false);
|
|
};
|
|
};
|
|
//我的已审批
|
|
//我的已审批
|
|
- const queryApproved = async () => {
|
|
|
|
- const data = await queryApprovedList();
|
|
|
|
|
|
+ const queryApproved = async (params) => {
|
|
|
|
+ const data = await queryApprovedList(params);
|
|
console.log(data);
|
|
console.log(data);
|
|
setData(data);
|
|
setData(data);
|
|
setLoading(false);
|
|
setLoading(false);
|
|
@@ -234,6 +219,19 @@ function profile(props) {
|
|
},
|
|
},
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
+ const handleProfilePaginationChange = (pagination) => {
|
|
|
|
+ switch (tabActive) {
|
|
|
|
+ case '1':
|
|
|
|
+ queryApplay({ currentPage: pagination.current, pageSize: 10 });
|
|
|
|
+ break;
|
|
|
|
+ case '2':
|
|
|
|
+ queryApprove({ currentPage: pagination.current, pageSize: 10 });
|
|
|
|
+ break;
|
|
|
|
+ case '3':
|
|
|
|
+ queryApproved({ currentPage: pagination.current, pageSize: 10 });
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
|
|
return (
|
|
return (
|
|
<PageContent
|
|
<PageContent
|
|
@@ -253,7 +251,13 @@ function profile(props) {
|
|
]}
|
|
]}
|
|
onTabChange={setTabActive}
|
|
onTabChange={setTabActive}
|
|
>
|
|
>
|
|
- <Table columns={columns} dataSource={data?.list} loading={loading} />
|
|
|
|
|
|
+ <Table
|
|
|
|
+ columns={columns}
|
|
|
|
+ dataSource={data?.list}
|
|
|
|
+ loading={loading}
|
|
|
|
+ pagination={{ ...data?.pagination, showSizeChanger: false }}
|
|
|
|
+ onChange={handleProfilePaginationChange}
|
|
|
|
+ />
|
|
</PageContent>
|
|
</PageContent>
|
|
);
|
|
);
|
|
}
|
|
}
|