fix: distributed servers info

This commit is contained in:
jialin
2025-06-25 20:29:48 +08:00
parent 3889c1fa71
commit 8751400ae3
23 changed files with 535 additions and 215 deletions
+7 -5
View File
@@ -1,3 +1,4 @@
import useDeleteModel from '@/components/delete-modal';
import useSetChunkRequest from '@/hooks/use-chunk-request';
import useTableRowSelection from '@/hooks/use-table-row-selection';
import useTableSort from '@/hooks/use-table-sort';
@@ -55,7 +56,7 @@ export default function useTableFetch<ListItem>(
perPage: 10,
search: ''
});
const { DeleteModal, show, hide, configuration } = useDeleteModel();
const { setChunkRequest } = useSetChunkRequest();
const { updateChunkedList, cacheDataListRef } = useUpdateChunkedList({
events: ['UPDATE', 'DELETE', 'INSERT'],
@@ -203,7 +204,7 @@ export default function useTableFetch<ListItem>(
row: ListItem & { name: string; id: number },
options?: any
) => {
modalRef.current.show({
show({
content: contentForDelete,
operation: 'common.delete.single.confirm',
name: row.name,
@@ -211,7 +212,7 @@ export default function useTableFetch<ListItem>(
async onOk() {
console.log('OK');
await deleteAPI?.(row.id, {
...modalRef.current?.configuration
...configuration
});
fetchData();
}
@@ -219,7 +220,7 @@ export default function useTableFetch<ListItem>(
};
const handleDeleteBatch = (options = {}) => {
modalRef.current.show({
show({
content: contentForDelete,
operation: 'common.delete.confirm',
selection: true,
@@ -231,7 +232,7 @@ export default function useTableFetch<ListItem>(
rowSelection.selectedRowKeys,
async (id: any) => {
await deleteAPI(id, {
...modalRef.current?.configuration
configuration
});
successIds.push(id);
}
@@ -274,6 +275,7 @@ export default function useTableFetch<ListItem>(
sortOrder,
queryParams,
modalRef,
DeleteModal,
setQueryParams,
handleDelete,
handleDeleteBatch,