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
bbe18d59
authored
2025-06-27 13:12:08 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
调整关系网字段间距
1 parent
c9c8e3cc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
11 deletions
src/components/RelationNetwork/index.vue
src/components/RelationNetwork/index.vue
View file @
bbe18d5
...
...
@@ -4,7 +4,7 @@
<div
class=
"title"
>
{{
detailInfoLabel
}}
</div>
<div
class=
"row"
v-for=
"item in Object.keys(detailInfo)"
>
<span>
{{
item
+
':'
}}
</span>
<span>
{{
detailInfo
[
item
]
==
null
?
'-'
:
detailInfo
[
item
]
}}
</span>
<span>
{{
detailInfo
[
item
]
==
null
||
detailInfo
[
item
]
==
''
?
'-'
:
detailInfo
[
item
]
}}
</span>
</div>
</div>
</div>
...
...
@@ -37,7 +37,7 @@ const emits = defineEmits([
const
{
proxy
}
=
getCurrentInstance
()
as
any
;
const
maxChineseCount
=
ref
(
1
4
);
const
maxChineseCount
=
ref
(
1
6
);
const
maxEnglishCount
=
ref
(
26
);
...
...
@@ -122,7 +122,9 @@ const handleLabelLength = (label: string) => {
if
(
detectLanguage
(
label
)
==
'English'
)
{
return
label
?.
length
>
maxEnglishCount
.
value
?
label
.
slice
(
0
,
maxEnglishCount
.
value
)
+
'...'
:
label
;
}
return
label
?.
length
>
maxChineseCount
.
value
?
label
.
slice
(
0
,
maxChineseCount
.
value
)
+
'...'
:
label
;
let
arr
=
label
.
split
(
'\n'
);
let
maxLen
=
Math
.
max
(...
arr
.
map
(
s
=>
s
.
length
));
return
maxLen
>
maxChineseCount
.
value
?
label
.
slice
(
0
,
maxChineseCount
.
value
)
+
'...'
:
label
;
};
insertCss
(
`
...
...
@@ -167,7 +169,9 @@ const initGraph = () => {
if
(
detectLanguage
(
name
)
==
'English'
)
{
return
name
?.
length
>
maxEnglishCount
.
value
;
}
return
name
?.
length
>
maxChineseCount
.
value
;
let
arr
=
name
.
split
(
'\n'
);
let
maxLen
=
Math
.
max
(...
arr
.
map
(
s
=>
s
.
length
));
return
maxLen
>
maxChineseCount
.
value
;
}
return
false
;
},
...
...
@@ -178,7 +182,7 @@ const initGraph = () => {
const
outDiv
=
document
.
createElement
(
'div'
);
outDiv
.
className
=
'node'
;
outDiv
.
style
.
width
=
'fit-content'
;
const
name
=
item
.
_cfg
.
model
.
label
;
const
name
=
item
.
_cfg
.
model
.
isField
?
item
.
_cfg
.
model
.
metaStandardId
:
item
.
_cfg
.
model
.
standardName
;
if
(
currentAnchor
==
'text-shape'
)
{
outDiv
.
innerHTML
=
`<h4>
${
name
}
</h4>`
}
...
...
@@ -265,7 +269,7 @@ const initGraph = () => {
],
},
defaultNode
:
{
size
:
20
,
size
:
16
,
anchorPoints
:
[
[
0
,
0.5
],
[
1
,
0.5
],
...
...
@@ -291,8 +295,11 @@ const initGraph = () => {
getWidth
:
function
getWidth
()
{
return
16
;
},
getVGap
:
function
getVGap
()
{
return
15
;
getVGap
:
function
getVGap
(
node
)
{
if
(
node
.
isField
)
{
return
6
;
}
return
20
;
},
getHGap
:
function
getHGap
()
{
return
120
;
...
...
@@ -479,14 +486,14 @@ const bindEvents = () => {
lastSelectNode
.
value
=
item
;
detailInfo
.
value
=
{};
// detailInfo.value.guid = model.guid;
detailInfoLabel
.
value
=
model
.
label
||
{};
detailInfoLabel
.
value
=
model
.
metaStandardId
||
{};
updateTooltipPosition
(
evt
);
detailLoading
.
value
=
true
;
getMetaStandardFieldDetail
(
model
.
guid
).
then
((
res
:
any
)
=>
{
if
(
res
?.
code
==
proxy
.
$passCode
)
{
detailInfo
.
value
=
res
.
data
?.
metaStandardValue
||
{};
detailInfoLabel
.
value
=
model
.
label
;
detailInfoLabel
.
value
=
model
.
metaStandardId
;
detailLoading
.
value
=
false
;
}
else
{
ElMessage
.
error
(
res
.
msg
);
...
...
@@ -618,7 +625,7 @@ defineExpose({
font-size
:
12px
;
color
:
#666666
;
word-break
:
break-all
;
line-height
:
21
px
;
line-height
:
18
px
;
}
}
</
style
>
\ No newline at end of file
...
...
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