Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
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
周远喜
mes-ui
Commits
5b62adf5
Commit
5b62adf5
authored
Sep 22, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
henq.js
parent
7a90468e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
henq.js
libs/henq.js
+36
-0
No files found.
libs/henq.js
View file @
5b62adf5
...
...
@@ -166,6 +166,42 @@ henq.findRoots = (arr1, id) => {
forFn
(
arr1
,
id
)
return
temp
}
//省市县pacc转为list
henq
.
treeToList1
=
(
tree
)
=>
{
let
list
=
[];
function
treeToList1
(
data
)
{
data
.
map
(
u
=>
{
if
(
u
.
children
&&
u
.
level
!=
1
)
{
treeToList1
(
u
.
children
,
u
)
}
else
if
(
u
.
children
&&
u
.
level
==
1
)
{
list
=
list
.
concat
(
u
.
children
);
}
})
}
treeToList1
(
tree
,
null
)
return
list
;
}
//根据departId返出上级所有name
henq
.
getDepartAllName
=
(
list
,
id
)
=>
{
let
names
=
''
;
function
getDepartAllName
(
list
,
id
)
{
list
.
map
(
u
=>
{
if
(
id
==
u
.
id
)
{
names
=
u
.
name
+
"/"
+
names
if
(
u
.
parent_Id
>
0
)
{
getDepartAllName
(
list
,
u
.
parent_Id
)
}
}
})
}
getDepartAllName
(
list
,
id
)
return
names
.
slice
(
0
,
names
.
length
-
1
);
}
//导出pdf
henq
.
outPdf
=
(
ele
,
fileName
)
=>
{
// document.head.innerHTML =
...
...
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