修改软件控制权限页脚跳转问题
This commit is contained in:
parent
7781c6c95c
commit
8b1ccfed47
@ -187,7 +187,7 @@ const SoftwareControlManagement: FC<SoftwareControlManagementProps> = () => {
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
await SoftwareControl.AddSoftwareControlExpirationTime(id, 0, false);
|
await SoftwareControl.AddSoftwareControlExpirationTime(id, 0, false);
|
||||||
// 重新查询
|
// 重新查询
|
||||||
await QueryUserSoftwareControlCollection();
|
await QueryUserSoftwareControlCollection(tableParams, form.getFieldsValue());
|
||||||
messageApi.success("停用成功");
|
messageApi.success("停用成功");
|
||||||
} else {
|
} else {
|
||||||
messageApi.info("取消停用");
|
messageApi.info("取消停用");
|
||||||
@ -209,7 +209,7 @@ const SoftwareControlManagement: FC<SoftwareControlManagementProps> = () => {
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
await SoftwareControl.AddSoftwareControlExpirationTime(id, days, days == 0);
|
await SoftwareControl.AddSoftwareControlExpirationTime(id, days, days == 0);
|
||||||
// 重新查询
|
// 重新查询
|
||||||
await QueryUserSoftwareControlCollection();
|
await QueryUserSoftwareControlCollection(tableParams, form.getFieldsValue());
|
||||||
if (days == 0) {
|
if (days == 0) {
|
||||||
messageApi.success("添加永久成功");
|
messageApi.success("添加永久成功");
|
||||||
} else {
|
} else {
|
||||||
@ -225,7 +225,7 @@ const SoftwareControlManagement: FC<SoftwareControlManagementProps> = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function QueryUserSoftwareControlCollection(options?: SoftwareModel.SoftwareControlQueryParams) {
|
async function QueryUserSoftwareControlCollection(tableParams: TableModel.TableParams, options?: SoftwareModel.SoftwareControlQueryParams) {
|
||||||
try {
|
try {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
let res = await SoftwareControl.GetUserSoftwareControlCollection(tableParams, options ?? {});
|
let res = await SoftwareControl.GetUserSoftwareControlCollection(tableParams, options ?? {});
|
||||||
@ -235,7 +235,7 @@ const SoftwareControlManagement: FC<SoftwareControlManagementProps> = () => {
|
|||||||
...tableParams.pagination,
|
...tableParams.pagination,
|
||||||
total: res.total
|
total: res.total
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
messageApi.error(error.message);
|
messageApi.error(error.message);
|
||||||
} finally {
|
} finally {
|
||||||
@ -244,7 +244,7 @@ const SoftwareControlManagement: FC<SoftwareControlManagementProps> = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
QueryUserSoftwareControlCollection().then();
|
QueryUserSoftwareControlCollection(tableParams, form.getFieldsValue()).then();
|
||||||
Software.GetSoftwareBaseCollection().then((res) => {
|
Software.GetSoftwareBaseCollection().then((res) => {
|
||||||
setSoftwareBasicInfo(res);
|
setSoftwareBasicInfo(res);
|
||||||
let options = []
|
let options = []
|
||||||
@ -263,14 +263,14 @@ const SoftwareControlManagement: FC<SoftwareControlManagementProps> = () => {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
async function TableChangeHandle(pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<SoftwareModel.SoftwareControlBase> | SorterResult<SoftwareModel.SoftwareControlBase>[], extra: TableCurrentDataSource<SoftwareModel.SoftwareControlBase>): Promise<void> {
|
async function TableChangeHandle(pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<SoftwareModel.SoftwareControlBase> | SorterResult<SoftwareModel.SoftwareControlBase>[], extra: TableCurrentDataSource<SoftwareModel.SoftwareControlBase>): Promise<void> {
|
||||||
await QueryUserSoftwareControlCollection();
|
await QueryUserSoftwareControlCollection({ pagination }, form.getFieldsValue());
|
||||||
setTableParams({
|
setTableParams({
|
||||||
pagination: {
|
pagination: {
|
||||||
...tableParams.pagination,
|
...tableParams.pagination,
|
||||||
current: pagination.current,
|
current: pagination.current,
|
||||||
pageSize: pagination.pageSize,
|
pageSize: pagination.pageSize
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -64,12 +64,6 @@ const UserSoftwareInfo: React.FC<UserSoftwareInfoProps> = ({ userId }) => {
|
|||||||
userId: userId
|
userId: userId
|
||||||
});
|
});
|
||||||
setData(res.collection);
|
setData(res.collection);
|
||||||
setTableParams({
|
|
||||||
pagination: {
|
|
||||||
...tableParams.pagination,
|
|
||||||
total: res.total
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
messageApi.error(error.message);
|
messageApi.error(error.message);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user