mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-20 10:37:55 +08:00
ru
This commit is contained in:
@@ -97,14 +97,6 @@ namespace OpenAuth.Mvc.Controllers
|
||||
sb.Append(">\r\n");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载模块下面的所有模块
|
||||
/// </summary>
|
||||
public string Load(string orgId, int page = 1, int rows = 30)
|
||||
{
|
||||
return JsonHelper.Instance.Serialize(App.Load(orgId, page, rows));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载用户模块
|
||||
/// </summary>
|
||||
@@ -137,7 +129,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
|
||||
//添加或修改模块
|
||||
[HttpPost]
|
||||
public string Add(Module model)
|
||||
public string AddOrUpdate(Module model)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@@ -21,6 +21,23 @@ namespace OpenAuth.Mvc.Controllers
|
||||
return JsonHelper.Instance.Serialize(moduleTree);
|
||||
}
|
||||
|
||||
public string GetModules(string pId)
|
||||
{
|
||||
var query = user.Modules;
|
||||
if (!string.IsNullOrEmpty(pId))
|
||||
{
|
||||
query = query.Where(u => u.ParentId == pId).ToList();
|
||||
}
|
||||
var data = new GridData
|
||||
{
|
||||
page = 1,
|
||||
data = query,
|
||||
count = query.Count(),
|
||||
total = 1
|
||||
};
|
||||
return JsonHelper.Instance.Serialize(data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取登录用户可访问的所有部门
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user