Commit f27f86a0 authored by 黄奎's avatar 黄奎

页面修改

parent 0269469c
...@@ -141,7 +141,6 @@ namespace Edu.Module.User ...@@ -141,7 +141,6 @@ namespace Edu.Module.User
{ {
deptList = new List<RB_Department_ViewModel>(); deptList = new List<RB_Department_ViewModel>();
} }
//校区部门 //校区部门
List<DepartmentTree_ViewModel> schoolDeptList = new List<DepartmentTree_ViewModel>(); List<DepartmentTree_ViewModel> schoolDeptList = new List<DepartmentTree_ViewModel>();
if (schoolList != null) if (schoolList != null)
...@@ -155,7 +154,12 @@ namespace Edu.Module.User ...@@ -155,7 +154,12 @@ namespace Edu.Module.User
ParentId = item.Dept_Id, ParentId = item.Dept_Id,
ChildList = new List<DepartmentTree_ViewModel>() ChildList = new List<DepartmentTree_ViewModel>()
}; };
tModel.ChildList = GetDeptTreeList(0, deptList.Where(qitem => qitem.School_Id > 0).ToList(), SchoolId:item.SId,null); var currentSchoolDeptList = deptList.Where(qitem => qitem.School_Id ==item.SId).ToList();
if (currentSchoolDeptList != null && currentSchoolDeptList.Count > 0)
{
var currentSchoolDeptId = currentSchoolDeptList?.Min(qitem => qitem.ParentId) ?? 0;
tModel.ChildList = GetDeptTreeList(currentSchoolDeptId, currentSchoolDeptList, SchoolId: item.SId, null);
}
schoolDeptList.Add(tModel); schoolDeptList.Add(tModel);
} }
} }
...@@ -191,8 +195,6 @@ namespace Edu.Module.User ...@@ -191,8 +195,6 @@ namespace Edu.Module.User
return list; return list;
} }
/// <summary> /// <summary>
/// 递归生成树形结构 /// 递归生成树形结构
...@@ -202,7 +204,6 @@ namespace Edu.Module.User ...@@ -202,7 +204,6 @@ namespace Edu.Module.User
private List<DepartmentTree_ViewModel> GetDeptTreeList(int parentId, List<RB_Department_ViewModel> sourceList,int SchoolId=0, List<DepartmentTree_ViewModel> schoolDeptList=null) private List<DepartmentTree_ViewModel> GetDeptTreeList(int parentId, List<RB_Department_ViewModel> sourceList,int SchoolId=0, List<DepartmentTree_ViewModel> schoolDeptList=null)
{ {
List<DepartmentTree_ViewModel> treeList = new List<DepartmentTree_ViewModel>(); List<DepartmentTree_ViewModel> treeList = new List<DepartmentTree_ViewModel>();
foreach (var item in sourceList.Where(qitem => qitem.ParentId == parentId && qitem.School_Id== SchoolId)) foreach (var item in sourceList.Where(qitem => qitem.ParentId == parentId && qitem.School_Id== SchoolId))
{ {
DepartmentTree_ViewModel model = new DepartmentTree_ViewModel() DepartmentTree_ViewModel model = new DepartmentTree_ViewModel()
......
...@@ -976,6 +976,16 @@ namespace Edu.WebApi.Controllers.User ...@@ -976,6 +976,16 @@ namespace Edu.WebApi.Controllers.User
qitem.PostName qitem.PostName
})); }));
} }
/// <summary>
/// 获取员工通讯录
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetEmployeeAddrBook()
{
return ApiResult.Failed();
}
#endregion #endregion
#region 枚举相列表 #region 枚举相列表
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment