This commit is contained in:
yubao
2017-10-31 00:44:23 +08:00
parent 45a08aaf41
commit 9c37623d7f
11 changed files with 257 additions and 718 deletions

View File

@@ -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
{

View File

@@ -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>