个性化配置:1.代码生成器跟个性化配置相关的代码优化

2.进入表单详情页时,改成通过菜单的组件路径获取formId。
This commit is contained in:
suguangxu
2025-05-27 18:16:44 +08:00
parent 6ab4743b7b
commit 13ab86a814
3 changed files with 99 additions and 55 deletions

View File

@ -11,6 +11,7 @@ enum Api {
SimpleTree = '/system/menu/simple-tree',
TenantSimpleTree = '/system/menu/tenant-auth-tree',
Menu = '/system/menu',
MenuInfoByComponentPath = '/system/menu/info-by-component-path',
Button = '/system/menu/button',
Column = '/system/menu-colum/list',
Form = '/system/menu-form/list',
@ -197,3 +198,21 @@ export async function getMenuFormById(params, mode: ErrorMessageMode = 'modal')
},
);
}
/**
* @description: 根据组件路径查询菜单
*/
export async function getMenuByIdComponentPath(componentPath:String, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MenuModel[]>(
{
url: Api.MenuInfoByComponentPath,
params:{componentPath}
},
{
errorMessageMode: mode,
},
);
}