v3.4.6
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user