feature:菜单添加unbindParent属性支持不关联上级菜单
This commit is contained in:
@@ -114,6 +114,11 @@ namespace Ewide.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Comment("备注")]
|
[Comment("备注")]
|
||||||
public string Remark { get; set; }
|
public string Remark { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 不关联上级菜单显示 0标识关联 1表示不需要关联菜单 仅按钮有效
|
||||||
|
/// </summary>
|
||||||
|
[Comment("不关联菜单显示")]
|
||||||
|
public int UnbindParent { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 状态(字典 0正常 1停用 2删除)
|
/// 状态(字典 0正常 1停用 2删除)
|
||||||
|
|||||||
@@ -86,6 +86,11 @@ namespace Ewide.Core.Service
|
|||||||
/// 备注
|
/// 备注
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Remark { get; set; }
|
public string Remark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 不绑定上级菜单
|
||||||
|
/// </summary>
|
||||||
|
public int UnbindParent { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AddMenuInput : MenuInput
|
public class AddMenuInput : MenuInput
|
||||||
|
|||||||
@@ -182,6 +182,7 @@ namespace Ewide.Core.Service
|
|||||||
var router = input.Router;
|
var router = input.Router;
|
||||||
var permission = input.Permission;
|
var permission = input.Permission;
|
||||||
var openType = input.OpenType;
|
var openType = input.OpenType;
|
||||||
|
var isUnbindParent = input.UnbindParent==1;
|
||||||
|
|
||||||
if (type.Equals((int)MenuType.DIR))
|
if (type.Equals((int)MenuType.DIR))
|
||||||
{
|
{
|
||||||
@@ -207,6 +208,11 @@ namespace Ewide.Core.Service
|
|||||||
//if (!urlSet.Contains(permission.Replace(":","/")))
|
//if (!urlSet.Contains(permission.Replace(":","/")))
|
||||||
// throw Oops.Oh(ErrorCode.meu1005);
|
// throw Oops.Oh(ErrorCode.meu1005);
|
||||||
}
|
}
|
||||||
|
//按钮可以设置未不绑定菜单
|
||||||
|
if(isUnbindParent && type.Equals((int)MenuType.BTN))
|
||||||
|
{
|
||||||
|
throw Oops.Oh(ErrorCode.D4004);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user