|
|
@@ -32,6 +32,13 @@ const Contracts: React.FC = () => {
|
|
|
},
|
|
|
});
|
|
|
|
|
|
+ const [dataSource, setDataSource] = useState<HetongItem[]>([]);
|
|
|
+ const [pagination, setPagination] = useState({
|
|
|
+ current: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ total: 0,
|
|
|
+ });
|
|
|
+
|
|
|
// 获取合同列表数据
|
|
|
const fetchContracts = async ({ page, pageSize }: { page: number; pageSize: number }): Promise<HetongListResponse> => {
|
|
|
const response = await hetongClient.$get({ query: { page, pageSize, keyword: searchText } });
|
|
|
@@ -51,13 +58,6 @@ const Contracts: React.FC = () => {
|
|
|
},
|
|
|
});
|
|
|
|
|
|
- const [dataSource, setDataSource] = useState<HetongItem[]>([]);
|
|
|
- const [pagination, setPagination] = useState({
|
|
|
- current: 1,
|
|
|
- pageSize: 10,
|
|
|
- total: 0,
|
|
|
- });
|
|
|
-
|
|
|
// 搜索
|
|
|
const handleSearch = () => {
|
|
|
setPagination({ ...pagination, current: 1 });
|