ABP 添加菜单

项目版本:ABP Zero 4.9.0


1、BIMMP.Core\Localization\SourceFiles\BIMMP-zh-CN.xml

<text name="OAOfficeSuppliesManage">办公用品管理</text>
<text name="OAOfficeSupply">办公用品</text>
<text name="OAOfficeSupplyApply">办公用品申请</text>
<text name="OAOfficeSupplyPutIn">办公用品入库</text>
<text name="OAOfficeSupplyType">办公用品分类</text>

2、BIMMP.WebApp.Areas.OAMS.Startup.OAMS

public const string OAOfficeSuppliesManage = "OAMS.OAOfficeSuppliesManage";
public static class OAOfficeSuppliesManages
{
    public const string OAOfficeSupply = "OAMS.OAOfficeSupplies.OAOfficeSupply";
    public const string OAOfficeSupplyApply = "OAMS.OAOfficeSupplies.OAOfficeSupplyApply";
    public const string OAOfficeSupplyPutIn = "OAMS.OAOfficeSupplies.OAOfficeSupplyPutIn";
    public const string OAOfficeSupplyType = "OAMS.OAOfficeSupplies.OAOfficeSupplyType";
}

3、BIMMP.Authorization.PermissionNames

public const string Pages_OAMS_OAOfficeSuppliesManage = "Pages.OAMS.OAOfficeSuppliesManage";
public const string Pages_OAMS_OAOfficeSuppliesManage_OAOfficeSupply = "Pages.OAMS.OAOfficeSuppliesManage.OAOfficeSupply";
public const string Pages_OAMS_OAOfficeSuppliesManage_OAOfficeSupplyApply = "Pages.OAMS.OAOfficeSuppliesManage.OAOfficeSupplyApply";
public const string Pages_OAMS_OAOfficeSuppliesManage_OAOfficeSupplyPutIn = "Pages.OAMS.OAOfficeSuppliesManage.OAOfficeSupplyPutIn";
public const string Pages_OAMS_OAOfficeSuppliesManage_OAOfficeSupplyType = "Pages.OAMS.OAOfficeSuppliesManage.OAOfficeSupplyType";

4、BIMMP.WebApp.Areas.OAMS.Startup.OAMSNavigationProvider

//办公用品
.AddItem(new MenuItemDefinition(
        OAMSPageNames.OAMS.OAOfficeSuppliesManage,
        L("OAOfficeSuppliesManage"),
        icon: "layui-icon-notice",
        requiredPermissionName: PermissionNames.Pages_OAMS_OAOfficeSuppliesManage
    ).AddItem(new MenuItemDefinition(
            OAMSPageNames.OAMS.OAOfficeSuppliesManages.OAOfficeSupply,
            L("OAOfficeSupply"),
            icon: "layui-icon-align-left",
            url: "/OAMS/OAOfficeSupplies/OAOfficeSupply",
            requiredPermissionName: PermissionNames.Pages_OAMS_OAOfficeSuppliesManage_OAOfficeSupply
        )
    ).AddItem(new MenuItemDefinition(
            OAMSPageNames.OAMS.OAOfficeSuppliesManages.OAOfficeSupplyApply,
            L("OAOfficeSupplyApply"),
            icon: "layui-icon-speaker",
            url: "/OAMS/OAOfficeSupplies/OAOfficeSupplyApply",
            requiredPermissionName: PermissionNames.Pages_OAMS_OAOfficeSuppliesManage_OAOfficeSupplyApply
        )
    ).AddItem(new MenuItemDefinition(
            OAMSPageNames.OAMS.OAOfficeSuppliesManages.OAOfficeSupplyPutIn,
            L("OAOfficeSupplyPutIn"),
            icon: "layui-icon-chat",
            url: "/OAMS/OAOfficeSupplies/OAOfficeSupplyPutIn",
            requiredPermissionName: PermissionNames.Pages_OAMS_OAOfficeSuppliesManage_OAOfficeSupplyPutIn
        )
    ).AddItem(new MenuItemDefinition(
            OAMSPageNames.OAMS.OAOfficeSuppliesManages.OAOfficeSupplyType,
            L("OAOfficeSupplyType"),
            icon: "layui-icon-chat",
            url: "/OAMS/OAOfficeSupplies/OAOfficeSupplyType",
            requiredPermissionName: PermissionNames.Pages_OAMS_OAOfficeSuppliesManage_OAOfficeSupplyType
        )
    )
)

5、BIMMP.Authorization.BIMMPAuthorizationProvider

类库:ContractOwner.Core

var oAOfficeSuppliesManage = oams.CreateChildPermission(PermissionNames.Pages_OAMS_OAOfficeSuppliesManage, L("OAOfficeSuppliesManage"));
oAOfficeSuppliesManage.CreateChildPermission(PermissionNames.Pages_OAMS_OAOfficeSuppliesManage_OAOfficeSupply, L("OAOfficeSupply"));
oAOfficeSuppliesManage.CreateChildPermission(PermissionNames.Pages_OAMS_OAOfficeSuppliesManage_OAOfficeSupplyApply, L("OAOfficeSupplyApply"));
oAOfficeSuppliesManage.CreateChildPermission(PermissionNames.Pages_OAMS_OAOfficeSuppliesManage_OAOfficeSupplyPutIn, L("OAOfficeSupplyPutIn"));
oAOfficeSuppliesManage.CreateChildPermission(PermissionNames.Pages_OAMS_OAOfficeSuppliesManage_OAOfficeSupplyType, L("OAOfficeSupplyType"));
posted @   古兴越  阅读(475)  评论(6编辑  收藏  举报
编辑推荐:
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
历史上的今天:
2018-07-11 前端 常用1
2018-07-11 Oracle 查询表的字段注释
2018-07-11 Oracle Error
2018-07-11 Oracle odbc配置
点击右上角即可分享
微信分享提示