From cf727afa850496f3a239907fab342b4bd3ff77fc Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期一, 04 八月 2025 18:22:13 +0800 Subject: [PATCH] fix: 修改功能模块 --- src/utils/module/index.ts | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/utils/module/index.ts b/src/utils/module/index.ts index 17586a4..03f682d 100644 --- a/src/utils/module/index.ts +++ b/src/utils/module/index.ts @@ -3,13 +3,14 @@ export * from './tree'; -export type TreeModuleDtoGroupDto = API.ModuleDto & { +export type TreeModuleDtoGroupDto = API.GetMenusQueryResultItem & { children?: TreeModuleDtoGroupDto[]; parentNode?: TreeModuleDtoGroupDto; + hasCheck?: boolean; }; export class ModuleUtils { - static convertToModuleGroup(data: API.ModuleDto[]) { + static convertToModuleGroup(data: API.GetMenusQueryResultItem[]) { const moduleTreeStore = new TreeStore<TreeModuleDtoGroupDto>({ data: TreeStore.formatListToTree(data, null), }); @@ -59,7 +60,7 @@ if (module) { const moduleTreeNode = moduleTreeStore.getNode(module.id); const siblingsNodes = moduleTreeNode.parent.childNodes; - return siblingsNodes[siblingsNodes.length - 1].data.sortCode; + return siblingsNodes[siblingsNodes.length - 1].data.sort; } else { return moduleTreeStore.root.childNodes.length; } @@ -72,7 +73,7 @@ const moduleTreeNode = moduleTreeStore.getNode(module.id); const childNodes = moduleTreeNode.childNodes; const lastChildNode = childNodes[childNodes.length - 1]; - return lastChildNode ? lastChildNode.data.sortCode : 0; + return lastChildNode ? lastChildNode.data.sort : 0; } static getParentModule( -- Gitblit v1.9.1