UPDATE 机构管理/用户管理列表页新增"只看本级"和"查看本级及以下"的过滤条件

This commit is contained in:
2021-07-02 17:56:22 +08:00
parent a30ee519e3
commit 837680422a
4 changed files with 31 additions and 6 deletions

View File

@@ -79,8 +79,8 @@ namespace Ewide.Core.Service
.Where(!string.IsNullOrEmpty(searchValue), x => (x.n.u.Account.Contains(input.SearchValue) ||
x.n.u.Name.Contains(input.SearchValue) ||
x.n.u.Phone.Contains(input.SearchValue)))
.Where(!string.IsNullOrEmpty(pid), x => (x.n.e.OrgId == pid ||
x.o.Pids.Contains($"[{pid.Trim()}]")))
.Where(!string.IsNullOrEmpty(pid), x => input.TreeNodeDataScope.GetValueOrDefault(1) == 2 ? (x.n.e.OrgId == pid ||
x.o.Pids.Contains($"[{pid.Trim()}]")) : x.n.e.OrgId == pid )
.Where(input.SearchStatus >= 0, x => x.n.u.Status == input.SearchStatus)
.Where(!superAdmin, x => x.n.u.AdminType != AdminType.SuperAdmin)
.Where(!superAdmin && dataScopes.Count > 0, x => dataScopes.Contains(x.n.e.OrgId))