diff --git a/packages/plugins/@hera/plugin-core/src/client/features/departments/common/scopes/useDepartmentFilterActionProps.tsx b/packages/plugins/@hera/plugin-core/src/client/features/departments/common/scopes/useDepartmentFilterActionProps.tsx
index 7710f0f61..6cf66eea7 100644
--- a/packages/plugins/@hera/plugin-core/src/client/features/departments/common/scopes/useDepartmentFilterActionProps.tsx
+++ b/packages/plugins/@hera/plugin-core/src/client/features/departments/common/scopes/useDepartmentFilterActionProps.tsx
@@ -10,6 +10,5 @@ export const useDepartmentFilterActionProps = () => {
params: service.state?.params?.[0] || service.params,
service,
});
-
return result;
};
diff --git a/packages/plugins/@hera/plugin-core/src/client/features/departments/main-tab/DepartmentIndex.tsx b/packages/plugins/@hera/plugin-core/src/client/features/departments/main-tab/DepartmentIndex.tsx
index 40a80608e..1ce2760a8 100644
--- a/packages/plugins/@hera/plugin-core/src/client/features/departments/main-tab/DepartmentIndex.tsx
+++ b/packages/plugins/@hera/plugin-core/src/client/features/departments/main-tab/DepartmentIndex.tsx
@@ -1,12 +1,12 @@
import React from 'react';
import { SchemaComponentContext, useSchemaComponentContext } from '@tachybase/client';
-import { ViewDepartmentManagement } from './DepartmentManagement.view';
import { ProviderDepartmentIndex } from './DepartmentIndex.provider';
+import { ViewDepartmentManagement } from './DepartmentManagement.view';
/**
* TODO: 组件名称有待重新确认
- * @returns
+ * @returns
*/
export const DepartmentIndex = () => {
const context = useSchemaComponentContext();
diff --git a/packages/plugins/@hera/plugin-core/src/client/features/departments/main-tab/departments-block/DepartmentsTree.component.tsx b/packages/plugins/@hera/plugin-core/src/client/features/departments/main-tab/departments-block/DepartmentsTree.component.tsx
index 6f61df4f9..a6b48133d 100644
--- a/packages/plugins/@hera/plugin-core/src/client/features/departments/main-tab/departments-block/DepartmentsTree.component.tsx
+++ b/packages/plugins/@hera/plugin-core/src/client/features/departments/main-tab/departments-block/DepartmentsTree.component.tsx
@@ -5,7 +5,6 @@ import { MoreOutlined } from '@ant-design/icons';
import { App, Dropdown, Empty, Tree } from 'antd';
import { useTranslation } from '../../../../locale';
-import { getUserListByDepartment } from '../../utils/getUserListByDepartment';
import { useContextDepartments } from '../context/Department.context';
import { useContextDepartmentsExpanded } from '../context/DepartmentsExpanded.context';
import { schemaDepartmentEdit } from './schemas/schemaDepartmentEdit';
@@ -13,7 +12,6 @@ import { schemaDepartmentNewSub } from './schemas/schemaDepartmentNewSub';
// 部门左边-部门列表
export const DepartmentsTree = () => {
- const api = useAPIClient();
const { data, loading } = useResourceActionContext();
const { department, setDepartment, setUser } = useContextDepartments();
const { treeData, nodeMap, loadData, loadedKeys, setLoadedKeys, initData, expandedKeys, setExpandedKeys } =
@@ -24,8 +22,6 @@ export const DepartmentsTree = () => {
return;
}
const department = nodeMap[keys[0]];
- const userList = await getUserListByDepartment(api, department.id);
-
setDepartment(department);
setUser(null);
};
diff --git a/packages/plugins/@hera/plugin-core/src/client/features/departments/main-tab/departments-users-block/DepartmentsUsersBlock.tsx b/packages/plugins/@hera/plugin-core/src/client/features/departments/main-tab/departments-users-block/DepartmentsUsersBlock.tsx
index 4e2f42805..87d5219ed 100644
--- a/packages/plugins/@hera/plugin-core/src/client/features/departments/main-tab/departments-users-block/DepartmentsUsersBlock.tsx
+++ b/packages/plugins/@hera/plugin-core/src/client/features/departments/main-tab/departments-users-block/DepartmentsUsersBlock.tsx
@@ -19,13 +19,13 @@ import { UserDepartmentsField } from './UserDepartmentsField.component';
export const ViewDepartmentsUsersBlock = () => {
const { t } = useTranslation();
const { department, user } = useContextDepartments();
- const { data, setState } = useResourceActionContext();
+ const { data, setState, refresh } = useResourceActionContext();
const MemberActions = () =>