fix(admin-web): 引荐关系树节点点击切换为该节点为根显示
点击节点后以该节点为根重新加载树,显示其祖先链和一级下线。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e715fd2504
commit
5392c47e47
|
|
@ -236,10 +236,11 @@ export default function UserDetailPage() {
|
|||
}
|
||||
}, [activeTab, accountSequence, contractsPage]);
|
||||
|
||||
// 点击节点跳转到该用户详情页
|
||||
// 点击节点:以该节点为根重新加载树,显示它及其一级下线
|
||||
const handleTreeNodeClick = useCallback((node: ReferralNode) => {
|
||||
router.push(`/users/${node.accountSequence}`);
|
||||
}, [router]);
|
||||
setExpandedNodes({});
|
||||
setTreeRootUser(node.accountSequence);
|
||||
}, []);
|
||||
|
||||
// 展开/收起节点的下级
|
||||
const handleToggleNode = useCallback(async (nodeSeq: string, hasChildren: boolean) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue