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
1989c6a8
authored
2025-06-27 14:36:38 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
根节点不显示关系网;提示信息位置不对
1 parent
f9fd4f11
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
10 deletions
src/components/RelationNetwork/index.vue
src/views/data_meta/standard-query.vue
src/components/RelationNetwork/index.vue
View file @
1989c6a
...
...
@@ -24,7 +24,7 @@ const props = defineProps({
type
:
Object
,
default
:
{}
},
noContextMenu
:
{
noContextMenu
:
{
//关系查看页面,显示右键菜单定位到详情。标准查询页面,显示引用标准新建数据集
type
:
Boolean
,
default
:
false
}
...
...
@@ -194,17 +194,28 @@ const initGraph = () => {
getContent
(
evt
:
any
)
{
const
{
item
,
target
}
=
evt
;
let
model
=
item
.
_cfg
.
model
;
if
(
props
.
noContextMenu
)
{
return
`
<div class='context-menu'>
<span class='menu-item'>查看标准管理</span>
</div>`
}
else
{
return
`
<div class='context-menu'>
<span class='menu-item'>引用标准新建数据集</span>
</div>`
}
},
shouldBegin
:
(
evt
:
any
)
=>
{
const
{
item
,
target
}
=
evt
;
let
model
=
item
.
_cfg
.
model
;
if
(
props
.
noContextMenu
)
{
return
false
;
if
(
model
&&
!
model
.
isField
)
{
return
true
;
}
return
false
;
}
const
{
item
,
target
}
=
evt
;
let
model
=
item
.
_cfg
.
model
;
if
(
model
&&
!
model
.
isField
&&
!
model
.
children
?.
length
)
{
return
true
;
}
...
...
@@ -487,18 +498,25 @@ const bindEvents = () => {
detailInfo
.
value
=
{};
// detailInfo.value.guid = model.guid;
detailInfoLabel
.
value
=
model
.
metaStandardId
||
{};
updateTooltipPosition
(
evt
);
detailLoading
.
value
=
true
;
nextTick
(()
=>
{
tooltip1Ref
.
value
.
style
.
display
=
'block'
;
updateTooltipPosition
(
evt
);
getMetaStandardFieldDetail
(
model
.
guid
).
then
((
res
:
any
)
=>
{
if
(
res
?.
code
==
proxy
.
$passCode
)
{
detailInfo
.
value
=
res
.
data
?.
metaStandardValue
||
{};
detailInfoLabel
.
value
=
model
.
metaStandardId
;
detailLoading
.
value
=
false
;
nextTick
(()
=>
{
tooltip1Ref
.
value
.
style
.
display
=
'block'
;
updateTooltipPosition
(
evt
);
})
}
else
{
ElMessage
.
error
(
res
.
msg
);
}
})
})
return
;
}
evt
.
preventDefault
();
...
...
@@ -586,6 +604,7 @@ defineExpose({
width
:
100%
;
height
:
100%
;
position
:
relative
;
overflow
:
hidden
;
}
.canvas-wrapper
:-webkit-full-screen
{
...
...
src/views/data_meta/standard-query.vue
View file @
1989c6a
...
...
@@ -54,11 +54,14 @@ const getTreeData = async () => {
treeInfo
.
value
.
loading
=
false
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
const
data
=
res
.
data
||
[];
data
.
forEach
(
d
=>
{
d
.
disabled
=
true
;
})
treeInfo
.
value
.
data
=
data
;
if
(
data
.
length
)
{
treeInfo
.
value
.
currentNodeKey
=
data
[
0
].
guid
;
treeInfo
.
value
.
currentNodeKey
=
data
[
0
]
?.
children
?.[
0
]?
.
guid
;
treeInfo
.
value
.
expandedKey
=
<
any
>
[
data
[
0
].
guid
];
nodeClick
(
treeInfo
.
value
.
data
[
0
])
nodeClick
(
treeInfo
.
value
.
data
[
0
]
?.
children
?.[
0
]
)
}
}
else
{
ElMessage
.
error
(
res
.
msg
);
...
...
@@ -79,6 +82,14 @@ const nodeClick = (data) => {
if
(
ele
)
{
ele
.
style
.
display
=
"none"
}
if
(
data
.
disabled
)
{
treeInfo
.
value
.
currentNodeKey
=
data
.
guid
;
nextTick
(()
=>
{
treeInfo
.
value
.
currentNodeKey
=
lastClickNode
.
value
.
guid
;
});
// lastClickNode.value = {};
return
;
}
treeInfo
.
value
.
currentNodeKey
=
data
.
guid
;
treeInfo
.
value
.
expandedKey
=
<
any
>
[
data
.
guid
];
lastClickNode
.
value
=
cloneDeep
(
data
);
...
...
@@ -349,7 +360,7 @@ const dialogBtnClick = (btn, info) => {
<Tree
ref=
"treeInfoRef"
:treeInfo=
"treeInfo"
@
nodeClick=
"nodeClick"
/>
</div>
<div
class=
"main_wrap"
>
<div
className=
'g6-component-topbar'
>
<div
v-show=
"lastClickNode?.guid"
className=
'g6-component-topbar'
>
<graphTopbar
ref=
"topBarRef"
@
displaySwitchChange=
"displaySwitchChange"
:isGraphDisplay=
"isGraphDisplay"
/>
</div>
<RelationNetwork
v-show=
"lastClickNode?.guid && isGraphDisplay"
ref=
"relationNetworkRef"
...
...
@@ -360,10 +371,10 @@ const dialogBtnClick = (btn, info) => {
v-loading=
"sankeyDataLoading"
:tree-data=
"sankeyData"
:names=
"sankeyNames"
>
</Sankey>
<div
v-show=
"
!lastClickNode?.guid && !treeInfo.data?.length
|| (!isGraphDisplay && !sankeyDataLoading && !sankeyNames?.length)"
v-show=
"
(!lastClickNode?.guid || !treeInfo.data?.length) && !treeInfo.loading
|| (!isGraphDisplay && !sankeyDataLoading && !sankeyNames?.length)"
class=
"main-placeholder"
>
<img
src=
"../../assets/images/no-data.png"
:style=
"
{ width: '96px', height: '96px' }" />
<div
class=
"empty-text"
>
暂无数据
</div>
<div
class=
"empty-text"
>
{{
treeInfo
.
data
.
length
&&
!
lastClickNode
?.
guid
?
'请选中二级及以下级别标准查看'
:
'暂无数据'
}}
</div>
</div>
</div>
<Dialog
:dialogInfo=
"dialogInfo"
@
btnClick=
"dialogBtnClick"
@
treeSelectNodeChange=
"handleTreeSelectNodeChange"
/>
...
...
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