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
946cc452
Commit
946cc452
authored
Jul 24, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
浏览变更目录
parent
318b6f4c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
11 deletions
+28
-11
AssetTable.jsx
src/view/Manage/AssetManage/Component/AssetTable.jsx
+28
-11
No files found.
src/view/Manage/AssetManage/Component/AssetTable.jsx
View file @
946cc452
import
React
,{
useState
,
useEffect
,
useRef
,
useContext
,
useMemo
}
from
"react"
;
import
{
Button
,
Pagination
,
Space
,
Modal
,
Input
,
Table
,
Tooltip
,
Checkbox
,
Typography
,
Dropdown
,
Menu
}
from
"antd"
;
import
{
Button
,
Pagination
,
Space
,
Modal
,
Input
,
Table
,
Tooltip
,
Checkbox
,
Typography
,
Dropdown
,
Menu
,
Divider
}
from
"antd"
;
import
classNames
from
'classnames'
;
import
{
Resizable
}
from
'react-resizable'
;
import
ResizeObserver
from
'rc-resize-observer'
;
...
...
@@ -137,13 +137,11 @@ const AssetTable = (props) => {
const
[
importAssetVisible
,
setImportAssetVisible
]
=
useState
(
false
);
const
[
filterElementVisible
,
setFilterElementVisible
]
=
useState
(
false
);
const
[
assetEditVisible
,
setAssetEditVisible
]
=
useState
(
false
);
const
[
assetMountVisible
,
setAssetMountVisible
]
=
useState
(
false
);
const
[
assetDetailDrawerVisible
,
setAssetDetailDrawerVisible
]
=
useState
(
false
);
// const [ currentAssetId, setCurrentAssetId ] = useState('');
const
[
pagination
,
setPagination
]
=
useState
(
{
pageNum
:
1
,
pageSize
:
20
}
);
const
{
pageNum
,
pageSize
}
=
pagination
;
const
[
keyword
,
setKeyword
]
=
useState
(
''
);
const
[
batchCatalogChange
,
setBatchCatalogChange
]
=
useState
(
false
);
const
[
fullScreen
,
setFullScreen
]
=
useState
(
false
);
const
[
recursive
,
setRecursive
]
=
useState
(
true
);
const
[
fullSearch
,
setFullSearch
]
=
useState
(
false
);
...
...
@@ -152,6 +150,10 @@ const AssetTable = (props) => {
const
[
assetDeleteModalVisible
,
setAssetDeleteModalVisible
]
=
useState
(
false
);
const
[
startFlowModalVisible
,
setStartFlowModalVisible
]
=
useState
(
false
);
const
[
users
,
setUsers
]
=
useState
([]);
const
[
assetMountParam
,
setAssetMountParam
]
=
useState
({
visible
:
false
,
ids
:
undefined
})
const
[
modal
,
contextHolder
]
=
Modal
.
useModal
();
const
anchorId
=
getQueryParam
(
AnchorId
,
props
?.
location
?.
search
);
...
...
@@ -167,19 +169,28 @@ const AssetTable = (props) => {
const
actionCol
=
{
title
:
'操作'
,
dataIndex
:
'action'
,
width
:
8
0
,
width
:
12
0
,
fixed
:
'right'
,
filter
:
false
,
render
:
(
_
,
record
)
=>
{
return
(
<
React
.
Fragment
>
<
Space
size=
{
5
}
split=
{
<
Divider
type=
'vertical'
style=
{
{
margin
:
0
}
}
/>
}
>
{
(
reference
===
AssetManageReference
||
(
reference
===
AssetBrowseReference
&&
record
.
hasPermission
))
&&
<
a
onClick=
{
(
e
)
=>
{
e
.
stopPropagation
();
handleItemClick
(
'authorization'
,
record
);
}
}
>
授权
</
a
>
}
</
React
.
Fragment
>
{
(
reference
===
AssetManageReference
||
(
reference
===
AssetBrowseReference
&&
record
.
hasPermission
))
&&
<
a
onClick=
{
(
e
)
=>
{
e
.
stopPropagation
();
setAssetMountParam
({
visible
:
true
,
ids
:
[
record
.
id
]
});
}
}
>
变更目录
</
a
>
}
</
Space
>
)
}
}
...
...
@@ -579,7 +590,10 @@ const AssetTable = (props) => {
}
const
onAssetMountCancel
=
(
refresh
=
false
)
=>
{
setAssetMountVisible
(
false
);
setAssetMountParam
({
visible
:
false
,
ids
:
undefined
});
if
(
refresh
)
{
setCheckedKeys
([]);
...
...
@@ -700,8 +714,11 @@ const AssetTable = (props) => {
const
onBatchCatalogChangeBtnClick
=
()
=>
{
if
((
checkedKeys
||
[]).
length
===
0
)
return
;
setBatchCatalogChange
(
true
);
setAssetMountVisible
(
true
);
setAssetMountParam
({
visible
:
true
,
ids
:
checkedKeys
});
}
const
onAssetDeleteModalCancel
=
()
=>
{
...
...
@@ -1129,9 +1146,9 @@ const AssetTable = (props) => {
onSuccess=
{
onImportAssetSuccess
}
/>
<
AssetMount
visible=
{
assetMount
V
isible
}
visible=
{
assetMount
Param
.
v
isible
}
reference=
{
reference
}
ids=
{
batchCatalogChange
?
checkedKeys
:[]
}
ids=
{
assetMountParam
.
ids
}
onCancel=
{
onAssetMountCancel
}
{
...
props
}
/>
...
...
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