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
20ba0632
Commit
20ba0632
authored
Feb 26, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产列表增加递归展示
parent
f1396cb5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
10 deletions
+23
-10
AssetTable.jsx
src/view/Manage/AssetManage/Component/AssetTable.jsx
+22
-9
VersionCompare.jsx
src/view/Manage/Model/Component/VersionCompare.jsx
+1
-1
No files found.
src/view/Manage/AssetManage/Component/AssetTable.jsx
View file @
20ba0632
import
React
,{
useState
,
useEffect
,
useRef
}
from
"react"
;
import
{
Button
,
Pagination
,
Space
,
Modal
,
Input
,
Table
,
Tooltip
}
from
"antd"
;
import
{
Button
,
Pagination
,
Space
,
Modal
,
Input
,
Table
,
Tooltip
,
Checkbox
}
from
"antd"
;
import
classNames
from
'classnames'
;
import
SmoothScroll
from
'smooth-scroll'
;
...
...
@@ -33,6 +33,7 @@ const AssetTable = (props) => {
const
[
keyword
,
setKeyword
]
=
useState
(
''
);
const
[
batchCatalogChange
,
setBatchCatalogChange
]
=
useState
(
false
);
const
[
fullScreen
,
setFullScreen
]
=
useState
(
false
);
const
[
recursive
,
setRecursive
]
=
useState
(
true
);
const
[
modal
,
contextHolder
]
=
Modal
.
useModal
();
const
anchorId
=
getQueryParam
(
AnchorId
,
props
.
location
.
search
);
...
...
@@ -74,7 +75,7 @@ const AssetTable = (props) => {
getFilterElementsGroupThenGetDataAssets
();
}
//eslint-disable-next-line react-hooks/exhaustive-deps
},
[
keyword
,
pagination
,
elementsChanged
,
assetActionChanged
])
},
[
keyword
,
pagination
,
elementsChanged
,
assetActionChanged
,
recursive
])
useEffect
(()
=>
{
if
(
shouldScrollRef
.
current
)
{
...
...
@@ -202,14 +203,21 @@ const AssetTable = (props) => {
const
getDataAssets
=
(
projectIndex
=
metadataIndexRef
.
current
)
=>
{
setLoading
(
true
);
let
params
=
{
dirId
:
nodeId
,
pageNum
,
pageSize
,
keyword
:
keyword
};
if
(
reference
!==
AssetRecycleReference
)
{
params
.
recursive
=
recursive
;
}
dispatchLatestHomepage
({
type
:
(
reference
===
AssetRecycleReference
)?
'assetmanage.listRecycleBinDataAssetsByPage'
:
'assetmanage.listDataAssetsByPage'
,
payload
:
{
dirId
:
nodeId
,
pageNum
,
pageSize
,
keyword
:
keyword
},
payload
:
params
,
callback
:
data
=>
{
const
_assets
=
[];
...
...
@@ -295,6 +303,10 @@ const AssetTable = (props) => {
setFilterElementVisible
(
true
);
}
const
onRecursiveChange
=
(
e
)
=>
{
setRecursive
(
e
.
target
.
checked
);
}
const
exportAsset
=
()
=>
{
if
((
checkedKeys
||
[]).
length
===
0
)
{
showMessage
(
'warn'
,
'请先选择资产'
);
...
...
@@ -348,7 +360,7 @@ const AssetTable = (props) => {
const
onImportAssetSuccess
=
(
tip
=
''
)
=>
{
getDataAssets
();
if
((
tip
||
''
)
!==
''
)
{
showNotifaction
(
'导入提示'
,
tip
,
5
);
}
...
...
@@ -427,6 +439,7 @@ const AssetTable = (props) => {
</
React
.
Fragment
>
}
<
Button
onClick=
{
onFilterElementClick
}
>
要素设置
</
Button
>
<
Checkbox
onChange=
{
onRecursiveChange
}
checked=
{
recursive
}
>
递归展示
</
Checkbox
>
</
Space
>
<
Space
>
<
Input
...
...
src/view/Manage/Model/Component/VersionCompare.jsx
View file @
20ba0632
...
...
@@ -179,7 +179,7 @@ const VersionCompare = (props) => {
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
>
<
Checkbox
onChange=
{
onOnlyShowChange
}
value
=
{
onlyShowChange
}
>
仅显示差异
</
Checkbox
>
<
Checkbox
onChange=
{
onOnlyShowChange
}
checked
=
{
onlyShowChange
}
>
仅显示差异
</
Checkbox
>
</
Form
.
Item
>
</
Form
>
...
...
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