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
1d1e6ff3
Commit
1d1e6ff3
authored
Feb 24, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产浏览增加目录信息
parent
c530e109
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
15 deletions
+29
-15
Relation.jsx
src/view/Manage/AssetBrowse/Component/Relation.jsx
+6
-1
RelationContainer.jsx
src/view/Manage/AssetBrowse/Component/RelationContainer.jsx
+2
-2
index.jsx
src/view/Manage/AssetBrowse/index.jsx
+15
-9
AssetDirectory.jsx
src/view/Manage/AssetManage/Component/AssetDirectory.jsx
+5
-2
AssetTable.jsx
src/view/Manage/AssetManage/Component/AssetTable.jsx
+1
-1
No files found.
src/view/Manage/AssetBrowse/Component/Relation.jsx
View file @
1d1e6ff3
...
@@ -19,7 +19,7 @@ class Relation extends React.Component {
...
@@ -19,7 +19,7 @@ class Relation extends React.Component {
// }
// }
componentDidUpdate
(
prevProps
,
prevState
)
{
componentDidUpdate
(
prevProps
,
prevState
)
{
const
{
data
,
onCenterClick
,
onExpandClick
}
=
this
.
props
;
const
{
data
,
expandTree
,
onCenterClick
,
onExpandClick
}
=
this
.
props
;
if
(
data
)
{
if
(
data
)
{
...
@@ -30,6 +30,11 @@ class Relation extends React.Component {
...
@@ -30,6 +30,11 @@ class Relation extends React.Component {
this
.
graph
=
init
(
this
)(
this
.
elem
,
newData
,
onCenterClick
,
onExpandClick
);
this
.
graph
=
init
(
this
)(
this
.
elem
,
newData
,
onCenterClick
,
onExpandClick
);
}
}
}
}
if
(
expandTree
!==
prevProps
.
expandTree
&&
prevProps
.
expandTree
!==
null
)
{
if
(
!
this
.
elem
||
!
this
.
elem
.
scrollWidth
||
!
this
.
elem
.
scrollHeight
)
return
;
this
.
graph
?.
changeSize
(
this
.
elem
.
scrollWidth
,
this
.
elem
.
scrollHeight
);
}
}
}
...
...
src/view/Manage/AssetBrowse/Component/RelationContainer.jsx
View file @
1d1e6ff3
...
@@ -6,7 +6,7 @@ import { AssetBrowseReference, ResourceBrowseReference } from '../../../../util/
...
@@ -6,7 +6,7 @@ import { AssetBrowseReference, ResourceBrowseReference } from '../../../../util/
const
RelationContainer
=
(
props
)
=>
{
const
RelationContainer
=
(
props
)
=>
{
const
{
nodeParams
,
onChange
,
reference
}
=
props
;
const
{
nodeParams
,
onChange
,
reference
,
expandTree
}
=
props
;
const
[
dirs
,
setDirs
]
=
useState
([]);
const
[
dirs
,
setDirs
]
=
useState
([]);
const
[
nodes
,
setNodes
]
=
useState
([]);
const
[
nodes
,
setNodes
]
=
useState
([]);
...
@@ -178,7 +178,7 @@ const RelationContainer = (props) => {
...
@@ -178,7 +178,7 @@ const RelationContainer = (props) => {
return
(
return
(
<
div
style=
{
{
width
:
'100%'
,
height
:
'100%'
}
}
>
<
div
style=
{
{
width
:
'100%'
,
height
:
'100%'
}
}
>
<
Relation
data=
{
relationData
}
onCenterClick=
{
onCenterClick
}
onExpandClick=
{
onExpandClick
}
/>
<
Relation
data=
{
relationData
}
expandTree=
{
expandTree
}
onCenterClick=
{
onCenterClick
}
onExpandClick=
{
onExpandClick
}
/>
</
div
>
</
div
>
);
);
}
}
...
...
src/view/Manage/AssetBrowse/index.jsx
View file @
1d1e6ff3
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
useState
}
from
'react'
;
import
{
Row
,
Col
}
from
'antd'
;
import
classNames
from
'classnames'
;
import
classNames
from
'classnames'
;
import
{
CaretLeftOutlined
,
CaretRightOutlined
}
from
'@ant-design/icons'
;
import
{
CaretLeftOutlined
,
CaretRightOutlined
}
from
'@ant-design/icons'
;
import
AssetTree
from
'../AssetManage/Component/AssetTree'
;
import
AssetTree
from
'../AssetManage/Component/AssetTree'
;
import
AssetDirectory
from
'../AssetManage/Component/AssetDirectory'
;
import
RelationContainer
from
'./Component/RelationContainer'
;
import
RelationContainer
from
'./Component/RelationContainer'
;
import
AssetTable
from
"../AssetManage/Component/AssetTable"
;
import
AssetTable
from
"../AssetManage/Component/AssetTable"
;
...
@@ -17,6 +17,7 @@ const AssetBrowse = (props) => {
...
@@ -17,6 +17,7 @@ const AssetBrowse = (props) => {
const
[
nodeParams
,
setNodeParams
]
=
useState
({
centerId
:
''
,
expandId
:
''
});
const
[
nodeParams
,
setNodeParams
]
=
useState
({
centerId
:
''
,
expandId
:
''
});
const
[
expandTree
,
setExpandTree
]
=
useState
(
true
);
const
[
expandTree
,
setExpandTree
]
=
useState
(
true
);
const
[
assetCount
,
setAssetCount
]
=
useState
(
0
);
const
{
centerId
,
expandId
}
=
nodeParams
;
const
{
centerId
,
expandId
}
=
nodeParams
;
...
@@ -32,6 +33,10 @@ const AssetBrowse = (props) => {
...
@@ -32,6 +33,10 @@ const AssetBrowse = (props) => {
setNodeParams
(
data
);
setNodeParams
(
data
);
}
}
const
onAssetCountChange
=
(
count
)
=>
{
setAssetCount
(
count
);
}
let
nodeId
=
''
;
let
nodeId
=
''
;
if
((
expandId
||
''
)
!==
''
)
{
if
((
expandId
||
''
)
!==
''
)
{
nodeId
=
expandId
;
nodeId
=
expandId
;
...
@@ -54,14 +59,15 @@ const AssetBrowse = (props) => {
...
@@ -54,14 +59,15 @@ const AssetBrowse = (props) => {
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
'right'
>
<
div
className=
'right'
>
<
Row
style=
{
{
height
:
'100%'
}
}
>
<
AssetDirectory
id=
{
nodeId
}
assetCount=
{
assetCount
}
reference=
{
reference
}
/>
<
Col
span=
{
12
}
>
<
div
className=
'flex'
style=
{
{
height
:
'100%'
}
}
>
<
RelationContainer
reference=
{
reference
}
nodeParams=
{
nodeParams
}
onChange=
{
onRelationChange
}
/>
<
div
style=
{
{
width
:
'50%'
,
height
:
'100%'
}
}
>
</
Col
>
<
RelationContainer
reference=
{
reference
}
nodeParams=
{
nodeParams
}
onChange=
{
onRelationChange
}
expandTree=
{
expandTree
}
/>
<
Col
span=
{
12
}
>
</
div
>
<
AssetTable
nodeId=
{
nodeId
}
reference=
{
reference
}
{
...
props
}
/>
<
div
style=
{
{
width
:
'50%'
}
}
>
</
Col
>
<
AssetTable
nodeId=
{
nodeId
}
reference=
{
reference
}
onCountChange=
{
onAssetCountChange
}
{
...
props
}
/>
</
Row
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
)
)
...
...
src/view/Manage/AssetManage/Component/AssetDirectory.jsx
View file @
1d1e6ff3
...
@@ -2,11 +2,12 @@ import React, { useEffect, useState } from 'react';
...
@@ -2,11 +2,12 @@ import React, { useEffect, useState } from 'react';
import
{
Space
,
Spin
,
Tooltip
}
from
'antd'
;
import
{
Space
,
Spin
,
Tooltip
}
from
'antd'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
AssetManageReference
}
from
'../../../../util/constant'
;
import
record
from
'../../../../assets/record.png'
;
import
record
from
'../../../../assets/record.png'
;
const
AssetDirectory
=
(
props
)
=>
{
const
AssetDirectory
=
(
props
)
=>
{
const
{
id
,
directoryChanged
,
assetCount
}
=
props
;
const
{
id
,
directoryChanged
,
assetCount
,
reference
=
AssetManageReference
}
=
props
;
const
[
dir
,
setDir
]
=
useState
(
null
);
const
[
dir
,
setDir
]
=
useState
(
null
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
...
@@ -57,7 +58,9 @@ const AssetDirectory = (props) => {
...
@@ -57,7 +58,9 @@ const AssetDirectory = (props) => {
<
Tooltip
title=
{
`${dir?(dir.remark||''):''}`
}
>
<
Tooltip
title=
{
`${dir?(dir.remark||''):''}`
}
>
<
div
className=
'textOverflow'
>
{
`描述: ${dir?(dir.desc||''):''}`
}
</
div
>
<
div
className=
'textOverflow'
>
{
`描述: ${dir?(dir.desc||''):''}`
}
</
div
>
</
Tooltip
>
</
Tooltip
>
<
div
>
{
`备注: ${dir?(dir.remarks||''):''}`
}
</
div
>
{
(
reference
===
AssetManageReference
)
&&
<
div
>
{
`备注: ${dir?(dir.remarks||''):''}`
}
</
div
>
}
</
div
>
</
div
>
<
div
<
div
className=
'flex'
className=
'flex'
...
...
src/view/Manage/AssetManage/Component/AssetTable.jsx
View file @
1d1e6ff3
...
@@ -384,7 +384,7 @@ const AssetTable = (props) => {
...
@@ -384,7 +384,7 @@ const AssetTable = (props) => {
}
else
if
(
reference
===
AssetManageReference
)
{
}
else
if
(
reference
===
AssetManageReference
)
{
scrollY
=
'calc(100vh - 182px - 52px - 52px - 84px - 12px)'
;
scrollY
=
'calc(100vh - 182px - 52px - 52px - 84px - 12px)'
;
}
else
if
(
reference
===
AssetBrowseReference
||
reference
===
ResourceBrowseReference
)
{
}
else
if
(
reference
===
AssetBrowseReference
||
reference
===
ResourceBrowseReference
)
{
scrollY
=
'calc(100vh - 182px - 52px - 12px)'
;
scrollY
=
'calc(100vh - 182px -
84px -
52px - 12px)'
;
}
else
if
(
reference
===
AssetRecycleReference
)
{
}
else
if
(
reference
===
AssetRecycleReference
)
{
scrollY
=
'calc(100vh - 182px - 52px - 12px)'
;
scrollY
=
'calc(100vh - 182px - 52px - 12px)'
;
}
}
...
...
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