This commit is contained in:
2023-05-31 10:19:05 +08:00
parent 1b65a7a9e5
commit 9c621c75cd
238 changed files with 9905 additions and 4034 deletions

View File

@@ -172,13 +172,16 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
var pItems = treeList.Select(x => x.organizeIds.FirstOrDefault()).Distinct().ToList();
pItems.ForEach(item =>
{
var addItem = orgTree.Find(x => x.Id.Equals(item)).Adapt<DepartmentSelectorOutput>();
if (addItem.type != null && addItem.type.Equals("company")) addItem.icon = "icon-ym icon-ym-tree-organization3";
addItem.fullName = orgTree.FirstOrDefault(x => x.Id.Equals(addItem.id))?.Description;
addItem.organize = addItem.fullName;
addItem.organizeIds = addItem.organizeIdTree.Split(",").ToList();
addItem.disabled = true;
if (!treeList.Any(x => x.id.Equals(addItem.id))) treeList.Add(addItem);
if (treeList.Select(x => x.id).Contains(item))
{
var addItem = orgTree.Find(x => x.Id.Equals(item)).Adapt<DepartmentSelectorOutput>();
if (addItem.type != null && addItem.type.Equals("company")) addItem.icon = "icon-ym icon-ym-tree-organization3";
addItem.fullName = orgTree.FirstOrDefault(x => x.Id.Equals(addItem.id))?.Description;
addItem.organize = addItem.fullName;
addItem.organizeIds = addItem.organizeIdTree.Split(",").ToList();
addItem.disabled = true;
if (!treeList.Any(x => x.id.Equals(addItem.id))) treeList.Add(addItem);
}
});
}