码迷,mamicode.com
首页 > 其他好文 > 详细

ABP 添加菜单

时间:2020-07-11 17:33:02      阅读:53      评论:0      收藏:0      [点我收藏+]

标签:author   miss   stat   msn   required   local   soa   ide   layui   

项目版本: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

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"));

ABP 添加菜单

标签:author   miss   stat   msn   required   local   soa   ide   layui   

原文地址:https://www.cnblogs.com/guxingy/p/13284013.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!