Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zghywpc-vue
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
李苏
zghywpc-vue
Commits
767b1342
Commit
767b1342
authored
Sep 25, 2024
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
过滤无用数据
parent
6093fcc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
19 deletions
+44
-19
index.vue
src/views/sbxxgl/sblxgx/sblxtree/index.vue
+44
-19
No files found.
src/views/sbxxgl/sblxgx/sblxtree/index.vue
View file @
767b1342
...
@@ -4,7 +4,9 @@
...
@@ -4,7 +4,9 @@
<div
class=
"sblxtreeTitle"
>
<div
class=
"sblxtreeTitle"
>
节点流向关系查询
节点流向关系查询
<!-- 全屏查询-->
<!-- 全屏查询-->
<i
title=
'在单独页面查看'
@
click=
"toFullPage"
style=
"float: right;line-height: 30px;margin-right: 15px;font-size: 16px;cursor: pointer;"
class=
"el-icon-full-screen"
></i>
<i
title=
'在单独页面查看'
@
click=
"toFullPage"
style=
"float: right;line-height: 30px;margin-right: 15px;font-size: 16px;cursor: pointer;"
class=
"el-icon-full-screen"
></i>
</div>
</div>
<!-- 查询框-->
<!-- 查询框-->
<div
style=
"padding: 10px;"
>
<div
style=
"padding: 10px;"
>
...
@@ -34,6 +36,10 @@
...
@@ -34,6 +36,10 @@
<div
v-if=
"showList.length!=0"
class=
"padding-10"
>
<div
v-if=
"showList.length!=0"
class=
"padding-10"
>
<el-collapse
v-model=
'activeName'
@
change=
'change'
accordion
>
<el-collapse
v-model=
'activeName'
@
change=
'change'
accordion
>
<el-collapse-item
v-for=
"(item,index) in showList"
:title=
"item.name"
:name=
"index"
>
<el-collapse-item
v-for=
"(item,index) in showList"
:title=
"item.name"
:name=
"index"
>
<!-- -->
<!--
<i
title=
'保存流向'
@
click=
"savefile()"
style=
"float: right;line-height: 30px;margin-right: 15px;font-size: 16px;cursor: pointer;"
class=
"el-icon-paperclip"
></i>
-->
<div
class=
"padding-10 divlist"
:id=
'item.name'
:ref=
"item.name"
>
<div
class=
"padding-10 divlist"
:id=
'item.name'
:ref=
"item.name"
>
</div>
</div>
...
@@ -46,10 +52,12 @@
...
@@ -46,10 +52,12 @@
</
template
>
</
template
>
<
script
>
<
script
>
const
html2canvas
=
require
(
'html2canvas'
);
export
default
{
export
default
{
mounted
()
{
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
const
scrollableDiv
=
document
.
getElementById
(
'sblxtree'
);
const
scrollableDiv
=
document
.
body
scrollableDiv
.
addEventListener
(
'scroll'
,
()
=>
{
scrollableDiv
.
addEventListener
(
'scroll'
,
()
=>
{
this
.
arrowLineList
.
forEach
(
item
=>
item
.
position
())
this
.
arrowLineList
.
forEach
(
item
=>
item
.
position
())
});
});
...
@@ -60,14 +68,14 @@
...
@@ -60,14 +68,14 @@
},
},
beforeDestroy
()
{
beforeDestroy
()
{
this
.
arrowLineList
.
forEach
(
item
=>
item
.
remove
())
this
.
arrowLineList
.
forEach
(
item
=>
item
.
remove
())
this
.
arrowLineList
=
[]
this
.
arrowLineList
=
[]
clearInterval
(
this
.
timer
)
clearInterval
(
this
.
timer
)
this
.
activeName
=
-
1
this
.
activeName
=
-
1
},
},
deactivated
()
{
deactivated
()
{
this
.
arrowLineList
.
forEach
(
item
=>
item
.
remove
())
this
.
arrowLineList
.
forEach
(
item
=>
item
.
remove
())
this
.
arrowLineList
=
[]
this
.
arrowLineList
=
[]
this
.
activeName
=
-
1
this
.
activeName
=
-
1
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -168,17 +176,23 @@
...
@@ -168,17 +176,23 @@
let
name
=
this
.
showList
[
val
].
name
let
name
=
this
.
showList
[
val
].
name
let
lxList
=
this
.
showList
[
val
].
data
let
lxList
=
this
.
showList
[
val
].
data
lxList
.
forEach
(
item
=>
{
lxList
.
forEach
(
item
=>
{
let
arrobj
=
new
LeaderLine
(
document
.
querySelector
(
`[data-jd="
${
name
+
item
.
syjd
}
"]`
),
document
if
(
item
.
syjd
==
item
.
dqjd
){
.
querySelector
(
`[data-jd="
${
name
+
item
.
dqjd
}
"]`
),
{
console
.
log
(
`绘制
${
item
.
syjd
}
====>
${
item
.
dqjd
}
节点重复,取消绘制`
)
path
:
'arc'
,
}
else
{
startPlugColor
:
'#1a6be0'
,
let
arrobj
=
new
LeaderLine
(
document
.
querySelector
(
`[data-jd="
${
name
+
item
.
syjd
}
"]`
),
document
endPlugColor
:
'#1efdaa'
,
.
querySelector
(
`[data-jd="
${
name
+
item
.
dqjd
}
"]`
),
{
gradient
:
true
,
path
:
'arc'
,
dash
:
{
startPlugColor
:
'#1a6be0'
,
animation
:
true
endPlugColor
:
'#1efdaa'
,
}
gradient
:
true
,
});
dash
:
{
this
.
arrowLineList
.
push
(
arrobj
)
animation
:
true
}
});
this
.
arrowLineList
.
push
(
arrobj
)
}
})
})
this
.
arrowLineList
.
forEach
(
item
=>
item
.
position
())
this
.
arrowLineList
.
forEach
(
item
=>
item
.
position
())
this
.
lxObj
=
this
.
showList
[
val
]
this
.
lxObj
=
this
.
showList
[
val
]
...
@@ -193,7 +207,18 @@
...
@@ -193,7 +207,18 @@
},
},
toFullPage
(){
savefile
(){
const
element
=
document
.
getElementsByName
(
'body'
);
html2canvas
(
element
).
then
(
canvas
=>
{
const
imgData
=
canvas
.
toDataURL
(
'image/png'
);
var
link
=
document
.
createElement
(
'a'
);
link
.
href
=
imgData
;
link
.
download
=
'image.png'
;
link
.
click
();
link
.
remove
()
});
},
toFullPage
()
{
const
url
=
`
${
location
.
origin
}
/#/sblxtree`
const
url
=
`
${
location
.
origin
}
/#/sblxtree`
window
.
open
(
url
,
'_blank'
);
// 第二个参数 '_blank' 表示在新窗口或标签页中打开
window
.
open
(
url
,
'_blank'
);
// 第二个参数 '_blank' 表示在新窗口或标签页中打开
...
...
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