fixed: 学员列表的部门展开导致部门进度查看失败c

This commit is contained in:
xxx 2023-09-24 10:14:56 +08:00
parent f07741892a
commit 052ee5f9f8
3 changed files with 9 additions and 6 deletions

View File

@ -6,7 +6,7 @@ interface PropInterface {
text: string; text: string;
p: string; p: string;
class: string; class: string;
icon: any; icon?: any;
onClick?: () => void; onClick?: () => void;
disabled: any; disabled: any;
} }

View File

@ -129,8 +129,10 @@ export const TreeDepartment = (props: PropInterface) => {
if (info) { if (info) {
label = info.node.title.props.children; label = info.node.title.props.children;
} }
props.onUpdate(selectedKeys, label); if (selectedKeys.length <= 1) {
setSelectKey(selectedKeys); props.onUpdate(selectedKeys, label);
setSelectKey(selectedKeys);
}
}; };
const onExpand = (selectedKeys: any, info: any) => { const onExpand = (selectedKeys: any, info: any) => {
@ -138,8 +140,10 @@ export const TreeDepartment = (props: PropInterface) => {
if (info) { if (info) {
label = info.node.title.props.children; label = info.node.title.props.children;
} }
props.onUpdate(selectedKeys, label); if (selectedKeys.length <= 1) {
setSelectKey(selectedKeys); props.onUpdate(selectedKeys, label);
setSelectKey(selectedKeys);
}
}; };
return ( return (

View File

@ -396,7 +396,6 @@ const MemberPage = () => {
type="default" type="default"
text="部门学员进度" text="部门学员进度"
class="mr-16" class="mr-16"
icon={null}
p="department-user-learn" p="department-user-learn"
disabled={null} disabled={null}
/> />