Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
Details
Activity
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
zhaochengxiang
szse
Commits
a9f0e2ca
Commit
a9f0e2ca
authored
Apr 15, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
热力图还原功能
parent
babe5f83
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
24 deletions
+14
-24
RelationContainer.jsx
src/view/Manage/AssetBrowse/Component/RelationContainer.jsx
+2
-4
Thermodynamic.jsx
src/view/Manage/AssetBrowse/Component/Thermodynamic.jsx
+12
-20
No files found.
src/view/Manage/AssetBrowse/Component/RelationContainer.jsx
View file @
a9f0e2ca
...
...
@@ -43,9 +43,7 @@ const RelationContainer = (props) => {
}
}
else
{
if
((
nodeParams
?.
centerId
||
''
)
!==
''
&&
(
dirs
||
[]).
length
>
0
)
{
if
(
!
thermodynamicData
||
(
thermodynamicData
.
length
>
0
&&
thermodynamicData
[
0
].
nodeId
!==
nodeParams
?.
centerId
))
{
generateThermodynamicData
();
}
generateThermodynamicData
();
}
else
{
setThermodynamicData
(
null
);
}
...
...
@@ -256,7 +254,7 @@ const RelationContainer = (props) => {
}
const
onThermodynamicClick
=
(
id
)
=>
{
onChange
&&
onChange
({
...
nodeParams
,
expandId
:
id
});
onChange
&&
onChange
({
centerId
:
id
,
expandId
:
''
});
}
const
onTypeChange
=
(
e
)
=>
{
...
...
src/view/Manage/AssetBrowse/Component/Thermodynamic.jsx
View file @
a9f0e2ca
...
...
@@ -20,12 +20,8 @@ class Thermodynamic extends React.Component {
const
{
data
,
onClick
,
resize
}
=
this
.
props
;
if
(
data
!==
prevProps
.
data
)
{
if
(
!
data
||
(
data
.
length
>
0
&&
(
data
[
0
].
children
||
[]).
length
===
0
))
{
this
.
graph
?.
clear
();
}
else
{
this
.
graph
?.
dispose
();
this
.
graph
=
init
(
this
)(
this
.
elem
,
data
,
onClick
);
}
this
.
graph
?.
dispose
();
this
.
graph
=
init
(
this
)(
this
.
elem
,
data
,
onClick
);
}
else
if
(
resize
!==
prevProps
.
resize
)
{
this
.
graph
?.
resize
();
}
...
...
@@ -39,9 +35,6 @@ class Thermodynamic extends React.Component {
return
(
<
div
ref=
{
ref
=>
this
.
elem
=
ref
}
style=
{
{
position
:
'relative'
,
width
:
'100%'
,
height
:
'100%'
}
}
>
{
data
&&
data
.
length
>
0
&&
(
data
[
0
].
children
||
[]).
length
===
0
&&
<
Empty
image=
{
<
img
src=
{
emptyImg
}
/>
}
imageStyle=
{
{
width
:
100
,
height
:
100
,
marginBottom
:
0
}
}
description=
'当前已是最底层'
style=
{
{
position
:
'absolute'
,
top
:
0
,
display
:
'flex'
,
flexDirection
:
'column'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
width
:
'100%'
,
height
:
'100%'
}
}
/>
}
</
div
>
);
}
...
...
@@ -56,7 +49,7 @@ const init = (ctx) => function (container, data, onClick) {
return
[
{
itemStyle
:
{
borderColor
:
'#777'
,
borderColor
:
((
data
||
[]).
length
>
0
)
&&
(
data
[
0
].
dataAssetAndSubDirCount
===
0
||
(
data
[
0
].
children
||
[]).
length
===
0
)
?
'#5e7dd6'
:
'#777'
,
borderWidth
:
0
,
gapWidth
:
1
},
...
...
@@ -88,14 +81,14 @@ const init = (ctx) => function (container, data, onClick) {
}
var
option
=
{
//
title: {
//
text: ((data||[]).length>0) ? `${data[0]?.text||''} (${data[0]?.dataAssetAndSubDirCount})` : '',
//
left: 'center',
//
bottom: 10,
//
textStyle: {
//
fontSize: 16
//
}
//
},
title
:
{
text
:
((
data
||
[]).
length
>
0
)
?
`
${
data
[
0
]?.
text
||
''
}
(
$
{
data
[
0
]?.
dataAssetAndSubDirCount
})
` : '',
left: 'center',
bottom: 10,
textStyle: {
fontSize: 16
}
},
tooltip: {
formatter: function (info) {
var treePathInfo = info.treePathInfo;
...
...
@@ -129,8 +122,7 @@ const init = (ctx) => function (container, data, onClick) {
borderColor: '#555'
},
breadcrumb: {
show: true,
top: '95%',
show: false,
},
levels: getLevelOption(),
data: ((data||[]).length>0) ? (data[0].children||[]) : [],
...
...
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