fix(auth): 调整角色授权菜单类型
按公司和项目范围展示对应的菜单类型,便于配置角色权限。
This commit is contained in:
@@ -21,10 +21,24 @@ namespace FineUIPro.Web.SysManage
|
||||
this.GetButtonPower();
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
ConstValue.InitConstValueCheckBoxList(this.ckMenuType, this.rbMenuType.SelectedValue);
|
||||
this.BindMenuTypes();
|
||||
}
|
||||
}
|
||||
|
||||
private void BindMenuTypes()
|
||||
{
|
||||
string groupId = this.rbMenuType.SelectedValue;
|
||||
string[] menuTypes = groupId == ConstValue.Group_MenuType_S
|
||||
? new[] { Const.Menu_Project, Const.Menu_Person, Const.Menu_ZHGL, Const.Menu_SysSet }
|
||||
: new[] { Const.Menu_ProjectSet, Const.Menu_PPerson, Const.Menu_HJGL, Const.Menu_Help };
|
||||
|
||||
this.ckMenuType.DataValueField = "ConstValue";
|
||||
this.ckMenuType.DataTextField = "ConstText";
|
||||
this.ckMenuType.DataSource = menuTypes.Join(ConstValue.drpConstItemList(groupId),
|
||||
menuType => menuType, item => item.ConstValue, (menuType, item) => item).ToList();
|
||||
this.ckMenuType.DataBind();
|
||||
}
|
||||
|
||||
#region 角色下拉框绑定数据
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
@@ -327,7 +341,7 @@ namespace FineUIPro.Web.SysManage
|
||||
|
||||
protected void rbMenuType_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
ConstValue.InitConstValueCheckBoxList(this.ckMenuType, this.rbMenuType.SelectedValue);
|
||||
this.BindMenuTypes();
|
||||
this.SelectedIndexChanged();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user