Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
94d1f70f
Commit
94d1f70f
authored
Dec 04, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
72e89725
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
9 deletions
+15
-9
DepartmentTree_ViewModel.cs
Edu.Model/ViewModel/User/DepartmentTree_ViewModel.cs
+5
-0
DepartmentModule.cs
Edu.Module.User/DepartmentModule.cs
+8
-8
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+2
-1
No files found.
Edu.Model/ViewModel/User/DepartmentTree_ViewModel.cs
View file @
94d1f70f
...
...
@@ -33,6 +33,11 @@ namespace Edu.Model.ViewModel.User
/// </summary>
public
int
IsCompany
{
get
;
set
;
}
/// <summary>
/// 数据类型(1-部门,2-员工)
/// </summary>
public
int
DataType
{
get
;
set
;
}
/// <summary>
/// 下级部门列表
...
...
Edu.Module.User/DepartmentModule.cs
View file @
94d1f70f
...
...
@@ -176,9 +176,9 @@ namespace Edu.Module.User
ParentId
=
fItem
.
ParentId
,
ChildList
=
new
List
<
DepartmentTree_ViewModel
>(),
School_Id
=
fItem
.
School_Id
,
IsCompany
=
fItem
.
IsCompany
IsCompany
=
fItem
.
IsCompany
,
DataType
=
1
,
};
#
region
添加员工信息
if
(
isQueryEmployee
)
{
...
...
@@ -193,18 +193,17 @@ namespace Edu.Module.User
DeptName
=
eItem
.
EmployeeName
,
ParentId
=
0
,
ChildList
=
new
List
<
DepartmentTree_ViewModel
>(),
School_Id
=
eItem
.
School_Id
School_Id
=
eItem
.
School_Id
,
DataType
=
2
,
});
}
}
}
#
endregion
tModel
.
ChildList
=
GetDeptTreeList
(
fItem
.
DeptId
,
deptList
,
empList
:
empList
);
list
.
Add
(
tModel
);
}
}
}
return
list
;
}
...
...
@@ -228,7 +227,8 @@ namespace Edu.Module.User
ParentId
=
item
.
ParentId
,
ChildList
=
new
List
<
DepartmentTree_ViewModel
>(),
School_Id
=
item
.
School_Id
,
IsCompany
=
item
.
IsCompany
IsCompany
=
item
.
IsCompany
,
DataType
=
1
,
};
#
region
添加员工信息
if
(
empList
!=
null
&&
empList
.
Count
>
0
)
...
...
@@ -244,13 +244,13 @@ namespace Edu.Module.User
DeptName
=
eItem
.
EmployeeName
,
ParentId
=
0
,
School_Id
=
eItem
.
School_Id
,
ChildList
=
new
List
<
DepartmentTree_ViewModel
>()
ChildList
=
new
List
<
DepartmentTree_ViewModel
>(),
DataType
=
2
,
});
}
}
}
#
endregion
model
.
ChildList
=
GetDeptTreeList
(
item
.
DeptId
,
sourceList
);
treeList
.
Add
(
model
);
}
...
...
Edu.WebApi/Controllers/User/UserController.cs
View file @
94d1f70f
...
...
@@ -1104,7 +1104,8 @@ namespace Edu.WebApi.Controllers.User
{
var
query
=
new
RB_Department_ViewModel
()
{
Group_Id
=
base
.
ParmJObj
.
GetInt
(
"Group_Id"
),
Group_Id
=
base
.
UserInfo
.
Group_Id
,
School_Id
=
base
.
ParmJObj
.
GetInt
(
"School_Id"
)
};
var
list
=
departmentModule
.
GetDepartmentTreeModule
(
query
,
isQueryEmployee
:
true
);
return
ApiResult
.
Success
(
data
:
list
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment