Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
smart
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqinghua
smart
Commits
667292d4
Commit
667292d4
authored
Apr 04, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common的注释
parent
89e53fff
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
common.service.ts
src/main/webapp/app/shared/common/common.service.ts
+12
-0
No files found.
src/main/webapp/app/shared/common/common.service.ts
View file @
667292d4
...
...
@@ -21,6 +21,13 @@ export class CommonService implements OnInit {
return
false
;
}
/**
* list一层数组转为树形结构的数组
* @param myId 父级ID
* @param pId 子级ID
* @param list
* @returns {any[]}
*/
listToTree
(
myId
,
pId
,
list
){
const
nodes
=
[];
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
){
...
...
@@ -52,6 +59,11 @@ export class CommonService implements OnInit {
return
nodes
;
}
/**
* JSON格式数据转化为字符串 接口调用
* @param data json格式的数据
* @returns {string}
*/
toQuery
(
data
){
let
str
=
''
;
for
(
let
key
in
data
)
{
...
...
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