From d405ea2542fdecda3e3d86e10b03545c9d12209d Mon Sep 17 00:00:00 2001 From: summer853300975 <853300975@qq.com> Date: Sat, 29 Oct 2016 09:24:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2=E6=8C=87=E6=B4=BE=E9=83=A8?= =?UTF-8?q?=E9=97=A8=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Content/js/framework.js | 1 - Bootstrap.Admin/Scripts/Roles.js | 14 ++++---------- Bootstrap.DataAccess/RoleHelper.cs | 19 +++++++++++++++++++ 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/Bootstrap.Admin/Content/js/framework.js b/Bootstrap.Admin/Content/js/framework.js index d319f2de..4eb7d992 100644 --- a/Bootstrap.Admin/Content/js/framework.js +++ b/Bootstrap.Admin/Content/js/framework.js @@ -339,5 +339,4 @@ Group.saveGroupsByRoleId = function (roleId,groupIds,callback) { processGroupsData({ Id: roleId, callback: callback, method: "PUT", data: { type: "role", groupIds: groupIds } }); }; - }; })(jQuery); \ No newline at end of file diff --git a/Bootstrap.Admin/Scripts/Roles.js b/Bootstrap.Admin/Scripts/Roles.js index 3514b591..fb614f5c 100644 --- a/Bootstrap.Admin/Scripts/Roles.js +++ b/Bootstrap.Admin/Scripts/Roles.js @@ -38,21 +38,15 @@ } }, { - id: 'btnSubmitRoleGroup', + id: 'btnSubmitUserGroup', click: function (row) { var roleId = row.ID; var groupIds = $('#dialogGroup :checked').map(function (index, element) { return $(element).val(); }).toArray().join(','); - Group.saveGroupsByRoleId(roleId, groupIds, function (result) { - if (result) { - $('#dialogGroup').modal('hide'); - swal("成功", "修改部门", "success"); - } - else { - swal("失败", "修改部门", "error"); - } - }); + Group.saveGroupsByRoleId(roleId, groupIds, { modal: 'dialogGroup' }); + + } }] } diff --git a/Bootstrap.DataAccess/RoleHelper.cs b/Bootstrap.DataAccess/RoleHelper.cs index 7bd50ef8..d58a275e 100644 --- a/Bootstrap.DataAccess/RoleHelper.cs +++ b/Bootstrap.DataAccess/RoleHelper.cs @@ -295,5 +295,24 @@ namespace Bootstrap.DataAccess { CacheManager.Clear(key => string.IsNullOrEmpty(cacheKey) || key == cacheKey); } + /// + /// 查询某个部门所拥有的角色 + /// + /// + /// + public static IEnumerable RetrieveRolesByGroupId(int groupId) + { + return null; + } + /// + /// 保存部门角色关系 + /// + /// + /// + /// + public static bool SaveRolesByGroupId(int id, string value) + { + return false; + } } } \ No newline at end of file