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
29e4f59d
Commit
29e4f59d
authored
Aug 21, 2025
by
放生的三文鱼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成编辑
parent
f77e7ce0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
76 additions
and
4 deletions
+76
-4
AssetManageTree.jsx
src/view/Manage/AssetManage/Component/AssetManageTree.jsx
+32
-2
CustomDirectoryModal.jsx
...iew/Manage/AssetManage/Component/CustomDirectoryModal.jsx
+1
-1
PreviewTree.jsx
src/view/Manage/AssetManage/Component/PreviewTree.jsx
+2
-1
overview.jsx
src/view/Manage/AssetManage/Component/overview.jsx
+41
-0
No files found.
src/view/Manage/AssetManage/Component/AssetManageTree.jsx
View file @
29e4f59d
...
@@ -4,7 +4,6 @@ import { PlusOutlined, ImportOutlined,ExportOutlined,ReloadOutlined, SettingOutl
...
@@ -4,7 +4,6 @@ import { PlusOutlined, ImportOutlined,ExportOutlined,ReloadOutlined, SettingOutl
import
classNames
from
'classnames'
;
import
classNames
from
'classnames'
;
import
{
useContextMenu
,
Menu
as
RcMenu
,
Item
as
RcItem
}
from
"react-contexify"
;
import
{
useContextMenu
,
Menu
as
RcMenu
,
Item
as
RcItem
}
from
"react-contexify"
;
import
LocalStorage
from
'local-storage'
;
import
LocalStorage
from
'local-storage'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
dispatch
}
from
'../../../../model'
;
import
ImportDirectory
from
'./ImportDirectory'
;
import
ImportDirectory
from
'./ImportDirectory'
;
import
UpdateDirectoryModal
from
'./UpdateDirectoryModal'
;
import
UpdateDirectoryModal
from
'./UpdateDirectoryModal'
;
...
@@ -13,7 +12,7 @@ import { showMessage, getQueryParam, getAssetRange } from '../../../../util';
...
@@ -13,7 +12,7 @@ import { showMessage, getQueryParam, getAssetRange } from '../../../../util';
import
{
AnchorTimestamp
,
AnchorId
,
AssetManageReference
,
AssetBrowseReference
,
ResourceBrowseReference
,
AssetMountReference
,
AnchorDirId
,
AnchorTemplateType
}
from
'../../../../util/constant'
;
import
{
AnchorTimestamp
,
AnchorId
,
AssetManageReference
,
AssetBrowseReference
,
ResourceBrowseReference
,
AssetMountReference
,
AnchorDirId
,
AnchorTemplateType
}
from
'../../../../util/constant'
;
import
{
highlightSearchContentByTerms
}
from
'../../../../util'
;
import
{
highlightSearchContentByTerms
}
from
'../../../../util'
;
import
{
listSubject
}
from
'./AssetTable'
;
import
{
listSubject
}
from
'./AssetTable'
;
import
Overview
from
'./overview'
;
import
'./AssetManageTree.less'
;
import
'./AssetManageTree.less'
;
import
'react-contexify/dist/ReactContexify.css'
;
import
'react-contexify/dist/ReactContexify.css'
;
import
{
appId
}
from
'../../../../App'
;
import
{
appId
}
from
'../../../../App'
;
...
@@ -74,6 +73,10 @@ const AssetManageTree = (props) => {
...
@@ -74,6 +73,10 @@ const AssetManageTree = (props) => {
const
[
updateDirectoryModalVisible
,
setUpdateDirectoryModalVisible
]
=
useState
(
false
);
const
[
updateDirectoryModalVisible
,
setUpdateDirectoryModalVisible
]
=
useState
(
false
);
const
[
updateDirectoryAction
,
setUpdateDirectoryAction
]
=
useState
(
''
);
const
[
updateDirectoryAction
,
setUpdateDirectoryAction
]
=
useState
(
''
);
const
[
customDirectoryModalVisible
,
setCustomDirectoryModalVisible
]
=
useState
(
false
);
const
[
customDirectoryModalVisible
,
setCustomDirectoryModalVisible
]
=
useState
(
false
);
const
[
customOverview
,
setCustomOverview
]
=
useState
({
visible
:
false
,
customItem
:
null
})
const
[
customDirectoryAction
,
setCustomDirectoryAction
]
=
useState
(
''
);
const
[
customDirectoryAction
,
setCustomDirectoryAction
]
=
useState
(
''
);
const
[
options
,
setOptions
]
=
useState
([]);
const
[
options
,
setOptions
]
=
useState
([]);
const
[
loadedKeys
,
setLoadedKeys
]
=
useState
([]);
const
[
loadedKeys
,
setLoadedKeys
]
=
useState
([]);
...
@@ -517,6 +520,13 @@ const AssetManageTree = (props) => {
...
@@ -517,6 +520,13 @@ const AssetManageTree = (props) => {
}
}
}
}
const
previewCustom
=
()
=>
{
setCustomOverview
({
visible
:
true
,
customItem
:
currentRightClickDir
})
}
const
deleteDir
=
()
=>
{
const
deleteDir
=
()
=>
{
console
.
log
(
'currentRightClickDir'
,
currentRightClickDir
)
console
.
log
(
'currentRightClickDir'
,
currentRightClickDir
)
if
(
currentRightClickDir
.
nodeId
)
{
if
(
currentRightClickDir
.
nodeId
)
{
...
@@ -985,6 +995,16 @@ const AssetManageTree = (props) => {
...
@@ -985,6 +995,16 @@ const AssetManageTree = (props) => {
action=
{
customDirectoryAction
}
action=
{
customDirectoryAction
}
dirId=
{
currentDirId
}
dirId=
{
currentDirId
}
/>
/>
<
Overview
visible=
{
customOverview
.
visible
}
onCancel=
{
()
=>
{
setCustomOverview
({
visible
:
false
,
customItem
:
null
})
}
}
customItem=
{
customOverview
.
customItem
}
/>
{
{
(
reference
!==
AssetMountReference
)
&&
<
RcMenu
id=
{
MENU_ID
}
>
(
reference
!==
AssetMountReference
)
&&
<
RcMenu
id=
{
MENU_ID
}
>
{
{
...
@@ -1000,6 +1020,16 @@ const AssetManageTree = (props) => {
...
@@ -1000,6 +1020,16 @@ const AssetManageTree = (props) => {
</
RcItem
>
</
RcItem
>
</
React
.
Fragment
>
</
React
.
Fragment
>
}
}
{
viewSelectedKeyRef
.
current
===
'custom'
&&
<
React
.
Fragment
>
<
RcItem
id=
"edit"
onClick=
{
previewCustom
}
>
预览
</
RcItem
>
<
RcItem
id=
"edit"
>
编辑
</
RcItem
>
</
React
.
Fragment
>
}
<
RcItem
id=
"delete"
onClick=
{
deleteDir
}
>
<
RcItem
id=
"delete"
onClick=
{
deleteDir
}
>
删除目录
删除目录
</
RcItem
>
</
RcItem
>
...
...
src/view/Manage/AssetManage/Component/CustomDirectoryModal.jsx
View file @
29e4f59d
...
@@ -97,7 +97,7 @@ const CustomDirectoryModal = (props) => {
...
@@ -97,7 +97,7 @@ const CustomDirectoryModal = (props) => {
resourceType
:
(
reference
===
ResourceBrowseReference
)?
'resource'
:
'dataAsset'
,
resourceType
:
(
reference
===
ResourceBrowseReference
)?
'resource'
:
'dataAsset'
,
}
}
}
}
dispatchLatest
({
dispatchLatest
({
type
:
url
,
type
:
url
,
payload
,
payload
,
...
...
src/view/Manage/AssetManage/Component/PreviewTree.jsx
View file @
29e4f59d
...
@@ -163,7 +163,8 @@ class PreviewTree extends React.Component {
...
@@ -163,7 +163,8 @@ class PreviewTree extends React.Component {
layoutGraph
=
()
=>
{
layoutGraph
=
()
=>
{
const
{
data
}
=
this
.
props
;
const
{
data
}
=
this
.
props
;
console
.
log
(
'PreviewTree layoutGraph data:'
,
data
);
if
(
graph
&&
data
){
if
(
graph
&&
data
){
graph
.
data
(
data
);
graph
.
data
(
data
);
graph
.
render
();
graph
.
render
();
...
...
src/view/Manage/AssetManage/Component/overview.jsx
0 → 100644
View file @
29e4f59d
import
React
,
{
useEffect
,
useState
}
from
"react"
;
import
PreviewTree
from
"./PreviewTree"
;
import
{
Modal
,
Spin
}
from
"antd"
;
import
{
dispatchLatest
}
from
"@/model"
;
const
Overview
=
({
visible
,
customItem
,
onCancel
})
=>
{
const
[
previewTreeData
,
setPreviewTreeData
]
=
useState
(
null
);
const
[
loading
,
setLoading
]
=
useState
(
true
);
useEffect
(()
=>
{
if
(
visible
)
{
let
url
=
"assetmanage.previewTreeByCustomElements"
;
let
payload
=
{
data
:
customItem
?.
elementIds
,
};
setLoading
(
true
)
dispatchLatest
({
type
:
url
,
payload
,
callback
:
(
data
)
=>
{
setPreviewTreeData
((
data
||
[]).
length
>
0
?
data
[
0
]
:
{});
setLoading
(
false
)
},
});
}
},
[
visible
,
customItem
]);
return
(
<
Modal
width=
{
1000
}
title=
"预览"
visible=
{
visible
}
onCancel=
{
onCancel
}
footer=
{
null
}
>
<
div
style=
{
{
height
:
800
,
width
:
"100%"
}
}
>
{
loading
?
<
Spin
style=
{
{
height
:
"100%"
,
width
:
"100%"
}
}
/>
:
<
PreviewTree
data=
{
previewTreeData
}
/>
}
</
div
>
</
Modal
>
);
};
export
default
Overview
;
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