Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
finance-manage
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
finance-oa
finance-manage
Commits
3755597c
Commit
3755597c
authored
Dec 26, 2019
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加一个默认空属性,用来判断节点显示
parent
71c31dfd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
ruoyi-ui/src/views/system/dept/index.vue
ruoyi-ui/src/views/system/dept/index.vue
+1
-1
ruoyi-ui/src/views/system/user/index.vue
ruoyi-ui/src/views/system/user/index.vue
+4
-4
ruoyi/src/main/java/com/ruoyi/project/system/service/impl/SysDeptServiceImpl.java
...ruoyi/project/system/service/impl/SysDeptServiceImpl.java
+6
-2
No files found.
ruoyi-ui/src/views/system/dept/index.vue
View file @
3755597c
...
...
@@ -228,7 +228,7 @@ export default {
reset
()
{
this
.
form
=
{
deptId
:
undefined
,
parentId
:
100
,
parentId
:
undefined
,
deptName
:
undefined
,
orderNum
:
undefined
,
leader
:
undefined
,
...
...
ruoyi-ui/src/views/system/user/index.vue
View file @
3755597c
...
...
@@ -135,9 +135,9 @@
<el-table
v-loading=
"loading"
:data=
"userList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"40"
align=
"center"
/>
<el-table-column
label=
"用户编号"
align=
"center"
prop=
"userId"
/>
<el-table-column
label=
"用户名称"
align=
"center"
prop=
"userName"
/>
<el-table-column
label=
"用户昵称"
align=
"center"
prop=
"nickName"
/>
<el-table-column
label=
"部门"
align=
"center"
prop=
"dept.deptName"
/>
<el-table-column
label=
"用户名称"
align=
"center"
prop=
"userName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"用户昵称"
align=
"center"
prop=
"nickName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"部门"
align=
"center"
prop=
"dept.deptName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"手机号码"
align=
"center"
prop=
"phonenumber"
width=
"120"
/>
<el-table-column
label=
"状态"
align=
"center"
>
<template
slot-scope=
"scope"
>
...
...
@@ -502,7 +502,7 @@ export default {
reset
()
{
this
.
form
=
{
userId
:
undefined
,
deptId
:
100
,
deptId
:
undefined
,
userName
:
undefined
,
nickName
:
undefined
,
password
:
undefined
,
...
...
ruoyi/src/main/java/com/ruoyi/project/system/service/impl/SysDeptServiceImpl.java
View file @
3755597c
...
...
@@ -49,11 +49,15 @@ public class SysDeptServiceImpl implements ISysDeptService
public
List
<
SysDept
>
buildDeptTree
(
List
<
SysDept
>
depts
)
{
List
<
SysDept
>
returnList
=
new
ArrayList
<
SysDept
>();
if
(
StringUtils
.
isNotEmpty
(
depts
)
&&
StringUtils
.
isNotNull
(
depts
.
stream
().
findFirst
()))
{
depts
.
stream
().
findFirst
().
get
().
setParentId
(
null
);
}
for
(
Iterator
<
SysDept
>
iterator
=
depts
.
iterator
();
iterator
.
hasNext
();)
{
SysDept
t
=
(
SysDept
)
iterator
.
next
();
// 根据传入的某个父节点ID,遍历该父节点的所有子节点
if
(
t
.
getParentId
()
==
0
)
if
(
StringUtils
.
isNull
(
t
.
getParentId
())
||
t
.
getParentId
()
==
0
)
{
recursionFn
(
depts
,
t
);
returnList
.
add
(
t
);
...
...
@@ -271,7 +275,7 @@ public class SysDeptServiceImpl implements ISysDeptService
while
(
it
.
hasNext
())
{
SysDept
n
=
(
SysDept
)
it
.
next
();
if
(
n
.
getParentId
().
longValue
()
==
t
.
getDeptId
().
longValue
())
if
(
StringUtils
.
isNotNull
(
n
.
getParentId
())
&&
n
.
getParentId
().
longValue
()
==
t
.
getDeptId
().
longValue
())
{
tlist
.
add
(
n
);
}
...
...
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