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;
p: string;
class: string;
icon: any;
icon?: any;
onClick?: () => void;
disabled: any;
}

View File

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

View File

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