|
|
|
@ -522,7 +522,7 @@ public class CommonService : ICommonService
|
|
|
|
|
foreach (var item in list)
|
|
|
|
|
{
|
|
|
|
|
var childs = db.Queryable<SysPermission>().Filter(null, true)
|
|
|
|
|
.Where(x => x.MenuType == 2 && x.ParentId == item.Id && x.IsHidden == false &&
|
|
|
|
|
.Where(x => (x.MenuType == 1 || x.MenuType == 2) && x.ParentId == item.Id && x.IsHidden == false &&
|
|
|
|
|
(x.PermissionType == 1 || x.PermissionType == 0))
|
|
|
|
|
.OrderBy(x => x.SortCode)
|
|
|
|
|
.Select(a => new RouteItem
|
|
|
|
@ -643,7 +643,7 @@ public class CommonService : ICommonService
|
|
|
|
|
foreach (var item in list)
|
|
|
|
|
{
|
|
|
|
|
var childs = db.Queryable<SysPermissionTenant>().Where(x =>
|
|
|
|
|
x.MenuType == 2 && x.ParentId == item.ParentId && x.IsHidden == false &&
|
|
|
|
|
(x.MenuType == 1 || x.MenuType == 2) && x.ParentId == item.ParentId && x.IsHidden == false &&
|
|
|
|
|
permissions.Contains(x.PermissionId) &&
|
|
|
|
|
(x.PermissionType == 1 || x.PermissionType == 0) &&
|
|
|
|
|
x.PermissionId != 1744968217220222976) //排除企业用户维护
|
|
|
|
@ -760,7 +760,7 @@ public class CommonService : ICommonService
|
|
|
|
|
foreach (var item in list)
|
|
|
|
|
{
|
|
|
|
|
var childs = db.Queryable<SysPermission>().Where(x =>
|
|
|
|
|
x.MenuType == 2 && x.IsHidden == false && x.ParentId == item.Key &&
|
|
|
|
|
(x.MenuType == 1 || x.MenuType == 2) && x.IsHidden == false && x.ParentId == item.Key &&
|
|
|
|
|
(x.PermissionType == 1 || x.PermissionType == 0))
|
|
|
|
|
.OrderBy(x => x.SortCode)
|
|
|
|
|
.Select(a => new PermissionTreeList
|
|
|
|
@ -769,7 +769,20 @@ public class CommonService : ICommonService
|
|
|
|
|
EnTitle = a.PermissionEnName,
|
|
|
|
|
Key = a.Id,
|
|
|
|
|
Icon = a.Icon
|
|
|
|
|
}).ToList();
|
|
|
|
|
}).ToList();
|
|
|
|
|
foreach (var child in childs)
|
|
|
|
|
{
|
|
|
|
|
var grandsons = db.Queryable<SysPermission>().Where(x => x.MenuType == 2 && x.ParentId == child.Key)
|
|
|
|
|
.OrderBy(x => x.SortCode)
|
|
|
|
|
.Select(a => new PermissionTreeList
|
|
|
|
|
{
|
|
|
|
|
Title = a.PermissionName,
|
|
|
|
|
EnTitle = a.PermissionEnName,
|
|
|
|
|
Key = a.Id,
|
|
|
|
|
Icon = a.Icon
|
|
|
|
|
}).ToList();
|
|
|
|
|
child.Children = grandsons;
|
|
|
|
|
}
|
|
|
|
|
item.Children = childs;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|