Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
fe-data-trusted-space
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
d3bd009b
authored
2025-06-27 10:10:45 +0800
by
fanguang
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'develop' of
http://117.78.60.236:8000/csbr-daop/fe-data-asset-management
into develop
2 parents
ab595da1
1b5d6599
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
19 deletions
src/components/RelationNetwork/index.vue
src/views/data_meta/components/Sankey.vue
src/views/data_meta/standard-query-view.vue
src/views/data_meta/standard-query.vue
src/components/RelationNetwork/index.vue
View file @
d3bd009
...
...
@@ -82,7 +82,7 @@ watch(() => props.treeData, (val) => {
const
renderGraph
=
(
graph
:
any
,
lineageData
:
any
)
=>
{
if
(
!
graph
||
!
lineageData
)
return
;
graph
.
setMinZoom
(
0.7
);
graph
.
setMinZoom
(
1
);
graph
.
setMaxZoom
(
1
);
graph
.
data
(
lineageData
);
graph
.
render
();
...
...
@@ -247,6 +247,11 @@ const initGraph = () => {
}
const
data
=
item
.
getModel
();
data
.
collapsed
=
collapsed
;
setTimeout
(()
=>
{
graph
.
focusItem
(
item
,
true
,
{
duration
:
400
// 动画时长为500ms
});
},
500
)
return
true
;
},
shouldBegin
:
(
e
)
=>
{
...
...
@@ -260,7 +265,7 @@ const initGraph = () => {
],
},
defaultNode
:
{
size
:
2
4
,
size
:
2
0
,
anchorPoints
:
[
[
0
,
0.5
],
[
1
,
0.5
],
...
...
@@ -287,7 +292,7 @@ const initGraph = () => {
return
16
;
},
getVGap
:
function
getVGap
()
{
return
2
5
;
return
1
5
;
},
getHGap
:
function
getHGap
()
{
return
120
;
...
...
@@ -301,7 +306,7 @@ const initGraph = () => {
label
:
handleLabelLength
((
node
.
isField
?
node
.
metaStandardId
:
node
.
standardName
)
as
string
),
collapsed
:
node
.
children
?.
length
?
false
:
true
,
labelCfg
:
{
offset
:
10
,
offset
:
7
,
style
:
{
fontSize
:
13
,
fill
:
'#212121'
,
...
...
@@ -364,7 +369,7 @@ const observeResize = () => {
return
;
}
graphRef
.
value
.
changeSize
(
width
,
height
);
graphRef
.
value
.
setMinZoom
(
0.7
);
graphRef
.
value
.
setMinZoom
(
1
);
graphRef
.
value
.
setMaxZoom
(
1
);
graphRef
.
value
.
fitView
(
40
,
{
direction
:
'both'
});
graphRef
.
value
.
fitCenter
();
...
...
@@ -380,7 +385,7 @@ const observeResize = () => {
return
;
}
graphRef
.
value
.
changeSize
(
width
,
height
);
graphRef
.
value
.
setMinZoom
(
0.7
);
graphRef
.
value
.
setMinZoom
(
1
);
graphRef
.
value
.
setMaxZoom
(
1
);
graphRef
.
value
.
fitView
(
40
,
{
direction
:
'both'
});
graphRef
.
value
.
fitCenter
();
...
...
@@ -472,7 +477,9 @@ const bindEvents = () => {
}
});
lastSelectNode
.
value
=
item
;
detailInfo
.
value
.
guid
=
model
.
guid
;
detailInfo
.
value
=
{};
// detailInfo.value.guid = model.guid;
detailInfoLabel
.
value
=
model
.
label
||
{};
updateTooltipPosition
(
evt
);
detailLoading
.
value
=
true
;
...
...
@@ -600,7 +607,7 @@ defineExpose({
overflow-y
:
auto
;
.title
{
font-size
:
1
6
px
;
font-size
:
1
4
px
;
color
:
#212121
;
line-height
:
24px
;
font-weight
:
600
;
...
...
@@ -608,7 +615,7 @@ defineExpose({
.row
{
margin-top
:
8px
;
font-size
:
1
4
px
;
font-size
:
1
2
px
;
color
:
#666666
;
word-break
:
break-all
;
line-height
:
21px
;
...
...
src/views/data_meta/components/Sankey.vue
View file @
d3bd009
...
...
@@ -78,6 +78,7 @@ const sankeyInstance: any = ref();
const
containerRef
=
ref
();
const
setChartsOption
=
()
=>
{
let
option
=
{
tooltip
:
{
trigger
:
'item'
,
...
...
@@ -85,19 +86,33 @@ const setChartsOption = () => {
if
(
params
.
data
.
name
)
{
return
null
;
}
return
params
.
data
.
source
+
'
-->
'
+
params
.
data
.
target
return
params
.
data
.
source
+
'
>
'
+
params
.
data
.
target
}
},
color
:
[
"#3DBCBE"
,
"#6b67d1"
,
"#7BBCE0"
,
"#2B8EF3"
,
"#51dca2"
,
"#E19D46"
],
series
:
[
{
type
:
'sankey'
,
top
:
8
0
,
bottom
:
4
0
,
top
:
6
0
,
bottom
:
2
0
,
draggable
:
false
,
left
:
40
,
right
:
80
,
data
:
props
.
names
,
left
:
50
,
right
:
100
,
label
:
{
fontSize
:
10
,
},
data
:
props
.
names
?.
map
(
n
=>
{
if
(
n
.
isLast
)
{
return
{
...
n
,
label
:
{
width
:
97
,
overflow
:
'breakAll'
}
}
}
return
n
;
}),
links
:
props
.
treeData
,
lineStyle
:
{
color
:
'source'
,
...
...
@@ -113,10 +128,9 @@ const setChartsOption = () => {
const
resizeObserver
=
ref
();
const
observeResize
=
()
=>
{
resizeObserver
.
value
=
new
ResizeObserver
((
)
=>
{
window
.
addEventListener
(
'resize'
,
(
e
)
=>
{
sankeyInstance
.
value
?.
resize
();
});
resizeObserver
.
value
.
observe
(
containerRef
.
value
);
}
onMounted
(()
=>
{
...
...
src/views/data_meta/standard-query-view.vue
View file @
d3bd009
...
...
@@ -7,8 +7,8 @@
<div
className=
'g6-component-topbar'
>
<graphTopbar
ref=
"topBarRef"
@
displaySwitchChange=
"displaySwitchChange"
:isGraphDisplay=
"isGraphDisplay"
/>
</div>
<RelationNetwork
v-show=
"graphTreeData?.guid && isGraphDisplay"
ref=
"relationNetworkRef"
:tree-data=
"graphTreeData"
:noContextMenu=
"true"
@
nodeItemClick=
"handleNodeItemClick"
>
<RelationNetwork
v-show=
"graphTreeData?.guid && isGraphDisplay"
ref=
"relationNetworkRef"
:tree-data=
"graphTreeData"
:noContextMenu=
"true"
@
nodeItemClick=
"handleNodeItemClick"
>
</RelationNetwork>
<Sankey
v-show=
"!isGraphDisplay && (sankeyNames?.length || sankeyDataLoading)"
v-loading=
"sankeyDataLoading"
:tree-data=
"sankeyData"
:names=
"sankeyNames"
>
...
...
@@ -128,6 +128,9 @@ const handleNodeItemClick = (graph, nodeItem) => {
graph
.
layout
();
graph
.
setMinZoom
(
0.5
);
graph
.
setMaxZoom
(
5
);
graph
.
focusItem
(
nodeItem
,
true
,
{
duration
:
400
// 动画时长为500ms
});
},
500
);
}
else
{
parentData
.
isLoading
=
false
;
...
...
src/views/data_meta/standard-query.vue
View file @
d3bd009
...
...
@@ -204,6 +204,9 @@ const handleNodeItemClick = (graph, nodeItem) => {
graph
.
layout
();
graph
.
setMinZoom
(
0.5
);
graph
.
setMaxZoom
(
5
);
graph
.
focusItem
(
nodeItem
,
true
,
{
duration
:
500
// 动画时长为500ms
});
},
500
);
}
else
{
parentData
.
isLoading
=
false
;
...
...
Write
Preview
Styling with
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