From fe6c6ddf3a4bcf7b2c15d7fe9262a93de493dc6e Mon Sep 17 00:00:00 2001 From: fei550 <1420031550@qq.com> Date: Tue, 1 Dec 2026 16:59:43 +0800 Subject: [PATCH] =?UTF-8?q?fix(auth):=20=E8=B0=83=E6=95=B4=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E6=8E=88=E6=9D=83=E8=8F=9C=E5=8D=95=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 按公司和项目范围展示对应的菜单类型,便于配置角色权限。 --- SGGL/FineUIPro.Web/SysManage/RolePower.aspx.cs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/SGGL/FineUIPro.Web/SysManage/RolePower.aspx.cs b/SGGL/FineUIPro.Web/SysManage/RolePower.aspx.cs index 1f136e89..70ab6cfd 100644 --- a/SGGL/FineUIPro.Web/SysManage/RolePower.aspx.cs +++ b/SGGL/FineUIPro.Web/SysManage/RolePower.aspx.cs @@ -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 角色下拉框绑定数据 /// /// 绑定数据 @@ -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(); } }