Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
liangzhen
/
framework-tools-web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 03d805a8
authored
Feb 29, 2024
by
liuyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
1 parent
09d000c0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
3 deletions
public/echarts.min.js
public/index.html
src/views/archi-intelligence-search/index.vue
public/echarts.min.js
0 → 100644
View file @
03d805a
This diff could not be displayed because it is too large.
public/index.html
View file @
03d805a
...
...
@@ -11,6 +11,7 @@
<script
type=
"text/javascript"
src=
"./jsmind/jsmind.draggable-node.js"
></script>
<script
type=
"text/javascript"
src=
"./jsmind/dom-to-image.js"
></script>
<script
type=
"text/javascript"
src=
"./jsmind/jsmind.screenshot.js"
></script>
<script
type=
"text/javascript"
src=
"./echarts.min.js"
></script>
</head>
<body>
<noscript>
...
...
src/views/archi-intelligence-search/index.vue
View file @
03d805a
...
...
@@ -13,7 +13,9 @@
ref="tree">
</el-tree>
</div>
<div
class=
"right_container"
></div>
<div
class=
"right_container"
>
<div
id=
"main"
style=
"width: 100%;height: 100%;"
></div>
</div>
</div>
</
template
>
...
...
@@ -33,8 +35,48 @@ export default {
},
mounted
(){
this
.
getTreeData
();
// this.echarts1();
},
methods
:
{
echarts1
(
seriesData
,
linkData
)
{
if
(
myChart
)
{
myChart
.
dispose
();
}
var
myChart
=
echarts
.
init
(
document
.
getElementById
(
'main'
));
var
option
=
{
series
:
[
{
type
:
'graph'
,
layout
:
'force'
,
symbolSize
:
120
,
label
:
{
normal
:
{
show
:
true
,
textStyle
:
{
fontSize
:
12
},
}
},
lineStyle
:
{
normal
:
{
opacity
:
0.9
,
width
:
5
,
curveness
:
0
}
},
force
:
{
repulsion
:
6000
},
edgeSymbol
:
[
'circle'
,
'arrow'
],
data
:
seriesData
,
links
:
linkData
}
]
};
myChart
.
setOption
(
option
);
},
getTreeData
()
{
//查询左侧树
const
params
=
{
"assetName"
:
null
,
...
...
@@ -47,8 +89,53 @@ export default {
});
},
treeCheckChange
(
data
,
tree
)
{
//左侧树勾选
console
.
log
(
data
)
console
.
log
(
tree
)
// console.log(data)
// console.log(tree.checkedNodes);
let
seriesData
=
[],
linkData
=
[];
if
(
tree
.
checkedNodes
.
length
>
0
)
{
tree
.
checkedNodes
.
forEach
(
item
=>
{
seriesData
.
push
({
name
:
item
.
assetName
,
// symbol: item.icon,
draggable
:
true
,
itemStyle
:
{
color
:
'green'
,
normal
:
{
borderColor
:
"#04f2a7"
,
borderWidth
:
4
,
shadowBlur
:
10
,
shadowColor
:
"#04f2a7"
,
color
:
"#001c43"
,
},
}
});
if
(
item
.
targetList
.
length
>
0
)
{
item
.
targetList
.
forEach
(
item2
=>
{
seriesData
.
push
({
name
:
item2
.
assetName
,
// symbol: item.icon,
draggable
:
true
,
itemStyle
:
{
color
:
'green'
,
normal
:
{
borderColor
:
"#04f2a7"
,
borderWidth
:
4
,
shadowBlur
:
10
,
shadowColor
:
"#04f2a7"
,
color
:
"#001c43"
,
},
}
})
linkData
.
push
({
source
:
item
.
assetName
,
target
:
item2
.
assetName
,
})
})
}
})
}
this
.
echarts1
(
seriesData
,
linkData
);
},
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment