Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
49c60049
Commit
49c60049
authored
Dec 04, 2019
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
39f294d4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
15 deletions
+20
-15
xggsve-uc/app/base/service/impl/auth/authSve.js
+19
-14
xggsve-uc/app/base/service/impl/user/userSve.js
+1
-1
No files found.
xggsve-uc/app/base/service/impl/auth/authSve.js
View file @
49c60049
...
@@ -72,23 +72,28 @@ class AuthService extends ServiceBase {
...
@@ -72,23 +72,28 @@ class AuthService extends ServiceBase {
}
}
async
tree
(
params
)
{
async
tree
(
params
)
{
var
all
=
await
this
.
dao
.
all
(
params
.
saas_id
,
"id, orgname, path, pid"
);
try
{
var
all
=
await
this
.
dao
.
all
(
params
.
saas_id
,
"id,name,path,pid"
);
var
pmap
=
{};
for
(
var
item
of
all
)
{
var
pmap
=
{};
item
.
label
=
item
.
name
;
for
(
var
item
of
all
)
{
var
list
=
pmap
[
item
.
pid
];
item
.
label
=
item
.
name
;
if
(
!
list
)
{
var
list
=
pmap
[
item
.
pid
];
list
=
[];
if
(
!
list
)
{
list
=
[];
}
list
.
push
(
item
);
pmap
[
item
.
pid
]
=
list
;
}
}
list
.
push
(
item
);
pmap
[
item
.
pid
]
=
list
;
for
(
var
item
of
all
)
{
item
.
children
=
pmap
[
item
.
id
]
||
[];
}
return
system
.
getResultSuccess
(
pmap
[
0
]);
}
catch
(
error
)
{
return
system
.
getResult
(
error
);
}
}
for
(
var
item
of
all
)
{
item
.
children
=
pmap
[
item
.
id
]
||
[];
}
return
system
.
getResultSuccess
(
pmap
[
0
][
0
]);
}
}
async
byRoleIds
(
params
)
{
async
byRoleIds
(
params
)
{
...
...
xggsve-uc/app/base/service/impl/user/userSve.js
View file @
49c60049
...
@@ -208,7 +208,7 @@ class UserService extends ServiceBase {
...
@@ -208,7 +208,7 @@ class UserService extends ServiceBase {
isMain
:
obj
.
isMain
||
0
,
isMain
:
obj
.
isMain
||
0
,
}
}
if
(
user
.
uctype
===
1
)
{
if
(
Number
(
this
.
trim
(
user
.
uctype
))
===
1
)
{
user
.
orgpath
=
isMain
?
org
.
path
:
org
.
path
+
"/"
+
id
;
user
.
orgpath
=
isMain
?
org
.
path
:
org
.
path
+
"/"
+
id
;
}
}
...
...
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