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
2257ad9e
Commit
2257ad9e
authored
Mar 13, 2025
by
fanyj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tijiao
parent
45990b72
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
102 additions
and
21 deletions
+102
-21
AssetAction.jsx
src/view/Manage/AssetManage/Component/AssetAction.jsx
+7
-0
AssetManageTree.jsx
src/view/Manage/AssetManage/Component/AssetManageTree.jsx
+75
-13
AssetTable.jsx
src/view/Manage/AssetManage/Component/AssetTable.jsx
+14
-5
AssetTree.jsx
src/view/Manage/AssetManage/Component/AssetTree.jsx
+3
-1
index.jsx
src/view/Manage/AssetManage/index.jsx
+3
-2
No files found.
src/view/Manage/AssetManage/Component/AssetAction.jsx
View file @
2257ad9e
...
@@ -70,6 +70,8 @@ const AssetAction = React.forwardRef(function (props, ref) {
...
@@ -70,6 +70,8 @@ const AssetAction = React.forwardRef(function (props, ref) {
const
[
businessElements
,
setBusinessElements
]
=
useState
();
const
[
businessElements
,
setBusinessElements
]
=
useState
();
const
[
businessColumns
,
setBusinessColumns
]
=
useState
();
const
[
businessColumns
,
setBusinessColumns
]
=
useState
();
console
.
log
(
'refence'
,
reference
)
const
[
loadingSaveAsDraft
,
setLoadingSaveAsDraft
]
=
React
.
useState
(
false
)
const
[
loadingSaveAsDraft
,
setLoadingSaveAsDraft
]
=
React
.
useState
(
false
)
const
[
needSaveAsDraft
,
setNeedSaveAsDraft
]
=
React
.
useState
()
const
[
needSaveAsDraft
,
setNeedSaveAsDraft
]
=
React
.
useState
()
...
@@ -960,11 +962,16 @@ const AssetAction = React.forwardRef(function (props, ref) {
...
@@ -960,11 +962,16 @@ const AssetAction = React.forwardRef(function (props, ref) {
</Form>
</Form>
</Spin>
</Spin>
{
assets?.structedState==='unStructured'&&(
<MatchMetaInfo
<MatchMetaInfo
item={assets} reference={reference} AssetDraftReference={AssetDraftReference} getAsset={getAsset}
item={assets} reference={reference} AssetDraftReference={AssetDraftReference} getAsset={getAsset}
dirId={dirId} metadataId={metadataId} needSaveAsDraft={needSaveAsDraft} currentAction={currentAction}
dirId={dirId} metadataId={metadataId} needSaveAsDraft={needSaveAsDraft} currentAction={currentAction}
selectData={selectData} setSelectData={setSelectData}
selectData={selectData} setSelectData={setSelectData}
/>
/>
)
}
<div>
<div>
<div style={{display:'flex',justifyContent:'space-between',alignItems:'center',gap:10}}>
<div style={{display:'flex',justifyContent:'space-between',alignItems:'center',gap:10}}>
<div style={{flex:1}}>
<div style={{flex:1}}>
...
...
src/view/Manage/AssetManage/Component/AssetManageTree.jsx
View file @
2257ad9e
import
React
,
{
useEffect
,
useState
,
useRef
}
from
'react'
;
import
React
,
{
useEffect
,
useState
,
useRef
,
useMemo
}
from
'react'
;
import
{
Card
,
Spin
,
Tooltip
,
Tree
,
Dropdown
,
Menu
,
Modal
,
AutoComplete
,
Select
,
Descriptions
}
from
'antd'
;
import
{
Card
,
Spin
,
Tooltip
,
Tree
,
Dropdown
,
Menu
,
Modal
,
AutoComplete
,
Select
,
Descriptions
}
from
'antd'
;
import
{
PlusOutlined
,
ImportOutlined
,
ExportOutlined
,
ReloadOutlined
,
SettingOutlined
,
UnorderedListOutlined
}
from
'@ant-design/icons'
;
import
{
PlusOutlined
,
ImportOutlined
,
ExportOutlined
,
ReloadOutlined
,
SettingOutlined
,
UnorderedListOutlined
}
from
'@ant-design/icons'
;
import
classNames
from
'classnames'
;
import
classNames
from
'classnames'
;
...
@@ -18,6 +18,7 @@ import './AssetManageTree.less';
...
@@ -18,6 +18,7 @@ import './AssetManageTree.less';
import
'react-contexify/dist/ReactContexify.css'
;
import
'react-contexify/dist/ReactContexify.css'
;
import
{
appId
}
from
'../../../../App'
;
import
{
appId
}
from
'../../../../App'
;
import
{
getTemplateType
}
from
'../../../../util/axios'
;
import
{
getTemplateType
}
from
'../../../../util/axios'
;
import
PermissionButton
from
"../../../../util/Component/PermissionButton"
const
{
Option
}
=
AutoComplete
;
const
{
Option
}
=
AutoComplete
;
...
@@ -57,7 +58,7 @@ const AssetManageTree = (props) => {
...
@@ -57,7 +58,7 @@ const AssetManageTree = (props) => {
id
:
MENU_ID
,
id
:
MENU_ID
,
});
});
const
{
checkable
=
false
,
onSelect
,
className
,
onCheck
,
tableId
,
reference
=
AssetManageReference
,
onDirectoryChange
,
centerId
,
metadataIds
,
onTemplateChange
}
=
props
;
const
{
checkable
=
false
,
onSelect
,
className
,
onCheck
,
tableId
,
reference
=
AssetManageReference
,
onDirectoryChange
,
centerId
,
metadataIds
,
onTemplateChange
,
addDirInfo
}
=
props
;
const
[
keyword
,
setKeyword
]
=
useState
(
''
);
const
[
keyword
,
setKeyword
]
=
useState
(
''
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
treeData
,
setTreeData
]
=
useState
([]);
const
[
treeData
,
setTreeData
]
=
useState
([]);
...
@@ -82,6 +83,7 @@ const AssetManageTree = (props) => {
...
@@ -82,6 +83,7 @@ const AssetManageTree = (props) => {
const
[
currentTemplateType
,
setTemplateType
]
=
useState
()
const
[
currentTemplateType
,
setTemplateType
]
=
useState
()
const
[
metadataRelatedTemplate
,
setMetadataRelatedTemplate
]
=
useState
()
const
[
metadataRelatedTemplate
,
setMetadataRelatedTemplate
]
=
useState
()
const
[
viewSelectedKey
,
setViewSelectedKey
]
=
useState
(
viewModes
[
0
].
key
);
const
[
viewSelectedKey
,
setViewSelectedKey
]
=
useState
(
viewModes
[
0
].
key
);
const
[
permissions
,
setPermissions
]
=
useState
([])
const
[
modal
,
contextHolder
]
=
Modal
.
useModal
();
const
[
modal
,
contextHolder
]
=
Modal
.
useModal
();
...
@@ -111,6 +113,10 @@ const AssetManageTree = (props) => {
...
@@ -111,6 +113,10 @@ const AssetManageTree = (props) => {
//eslint-disable-next-line react-hooks/exhaustive-deps
//eslint-disable-next-line react-hooks/exhaustive-deps
},
[
metadataIds
])
},
[
metadataIds
])
useEffect
(()
=>
{
getPermissions
()
},[])
// useEffect(() => {
// useEffect(() => {
// if ((did||'') !== '') {
// if ((did||'') !== '') {
// getAllDirectoryAsTree(true, did);
// getAllDirectoryAsTree(true, did);
...
@@ -146,6 +152,22 @@ const AssetManageTree = (props) => {
...
@@ -146,6 +152,22 @@ const AssetManageTree = (props) => {
}
}
}
}
const
getPermissions
=
()
=>
{
dispatch
({
type
:
'assetmanage.getPrivilegeByRange'
,
payload
:
{
range
:
getAssetRange
(
AssetManageReference
),
},
callback
:
data
=>
{
setPermissions
(
data
);
}
})
}
const
havePermission
=
useMemo
(()
=>
{
return
(
permissions
??[]).
findIndex
(
item
=>
item
===
'dirManage'
)
!==
-
1
},
[
permissions
])
const
getTemplates
=
()
=>
{
const
getTemplates
=
()
=>
{
setLoadingTemplates
(
true
)
setLoadingTemplates
(
true
)
dispatch
({
dispatch
({
...
@@ -864,26 +886,66 @@ const AssetManageTree = (props) => {
...
@@ -864,26 +886,66 @@ const AssetManageTree = (props) => {
</
Tooltip
>
</
Tooltip
>
</
Dropdown
>
</
Dropdown
>
{
{
viewSelectedKeyRef
.
current
===
'dir'
&&
<
Tooltip
title=
"新增目录"
>
viewSelectedKeyRef
.
current
===
'dir'
&&
(
<
PlusOutlined
className=
{
(
currentDir
?.
resourceType
===
'custom'
)?
'disable'
:
'default'
}
onClick=
{
addDir
}
style=
{
{
fontSize
:
16
,
cursor
:
(
currentDirType
===
'custom'
)?
'not-allowed'
:
'pointer'
}
}
/>
<
PermissionButton
</
Tooltip
>
defaultPermission=
{
havePermission
||
addDirInfo
}
tip=
"新增目录"
type=
"text"
icon=
{
<
PlusOutlined
className=
{
(
currentDir
?.
resourceType
===
'custom'
)?
'disable'
:
'default'
}
style=
{
{
fontSize
:
16
,
cursor
:
(
currentDirType
===
'custom'
)?
'not-allowed'
:
'pointer'
}
}
/>
}
onClick=
{
addDir
}
// size="small"
style=
{
{
width
:
18
}
}
/>
// <Tooltip title="新增目录">
// <PlusOutlined className=
{(
currentDir
?.
resourceType
===
'custom'
)?
'disable'
:
'default'
}
onClick
=
{
addDir
}
style
=
{{
fontSize
:
16
,
cursor
:
(
currentDirType
===
'custom'
)?
'not-allowed'
:
'pointer'
}}
/
>
// </Tooltip>
)
}
}
<
Tooltip
title=
"刷新目录"
>
<
Tooltip
title=
"刷新目录"
>
<
ReloadOutlined
className=
'default'
onClick=
{
refreshTree
}
style=
{
{
fontSize
:
16
,
cursor
:
'pointer'
}
}
/>
<
ReloadOutlined
className=
'default'
onClick=
{
refreshTree
}
style=
{
{
fontSize
:
16
,
cursor
:
'pointer'
}
}
/>
</
Tooltip
>
</
Tooltip
>
{
{
viewSelectedKeyRef
.
current
===
'dir'
?
<>
viewSelectedKeyRef
.
current
===
'dir'
?
<>
<
Tooltip
title=
"导入目录"
>
<
PermissionButton
defaultPermission=
{
havePermission
}
tip=
"导入目录"
type=
"text"
icon=
{
<
ImportOutlined
className=
{
(
currentDirType
===
'custom'
)?
'disable'
:
'default'
}
onClick=
{
importDir
}
style=
{
{
fontSize
:
16
,
cursor
:(
currentDirType
===
'custom'
)?
'not-allowed'
:
'pointer'
}
}
/>
}
onClick=
{
importDir
}
// size="small"
style=
{
{
width
:
18
}
}
/>
{
/* <Tooltip title="导入目录">
<ImportOutlined className={(currentDirType==='custom')?'disable': 'default'} onClick={importDir} style={{ fontSize:16,cursor:(currentDirType==='custom')?'not-allowed':'pointer' }} />
<ImportOutlined className={(currentDirType==='custom')?'disable': 'default'} onClick={importDir} style={{ fontSize:16,cursor:(currentDirType==='custom')?'not-allowed':'pointer' }} />
</
Tooltip
>
</Tooltip> */
}
<
Dropdown
overlay=
{
exportMenu
}
placement=
"bottomCenter"
>
<
Dropdown
overlay=
{
havePermission
?
exportMenu
:<></>
}
placement=
"bottomCenter"
>
<
Tooltip
title=
"导出目录"
>
<
PermissionButton
defaultPermission=
{
havePermission
}
tip=
"导出目录"
type=
"text"
icon=
{
<
ExportOutlined
className=
'default'
style=
{
{
fontSize
:
16
,
cursor
:
'pointer'
}
}
/>
}
// onClick=
{
importDir
}
// size="small"
style=
{
{
width
:
18
}
}
/>
{
/* <Tooltip title="导出目录">
<ExportOutlined className='default' style={{ fontSize:16,cursor:'pointer' }} />
<ExportOutlined className='default' style={{ fontSize:16,cursor:'pointer' }} />
</
Tooltip
>
</Tooltip>
*/
}
</
Dropdown
>
</
Dropdown
>
</>
:
<
Tooltip
title=
"自定义目录"
>
</>
:
<>
<
PermissionButton
defaultPermission=
{
havePermission
}
tip=
"自定义目录"
type=
"text"
icon=
{
<
SettingOutlined
className=
'default'
style=
{
{
fontSize
:
16
,
cursor
:
'pointer'
}
}
/>
}
onClick=
{
customDir
}
// size="small"
style=
{
{
width
:
18
}
}
/>
{
/* <Tooltip title="自定义目录">
<SettingOutlined className='default' onClick={customDir} style={{ fontSize:16,cursor:'pointer' }} />
<SettingOutlined className='default' onClick={customDir} style={{ fontSize:16,cursor:'pointer' }} />
</
Tooltip
>
</Tooltip> */
}
</>
}
}
</
div
>
</
div
>
)
}
)
}
...
@@ -955,7 +1017,7 @@ const AssetManageTree = (props) => {
...
@@ -955,7 +1017,7 @@ const AssetManageTree = (props) => {
checkedKeys=
{
checkedKeys
}
checkedKeys=
{
checkedKeys
}
checkStrictly
checkStrictly
onRightClick=
{
({
event
,
node
})
=>
{
onRightClick=
{
({
event
,
node
})
=>
{
if
(
reference
===
AssetManageReference
)
{
if
(
reference
===
AssetManageReference
&&
havePermission
)
{
setCurrentRightClickDir
(
node
);
setCurrentRightClickDir
(
node
);
setCurrentDirType
(
node
.
type
||
''
);
setCurrentDirType
(
node
.
type
||
''
);
displayMenu
(
event
);
displayMenu
(
event
);
...
...
src/view/Manage/AssetManage/Component/AssetTable.jsx
View file @
2257ad9e
...
@@ -104,7 +104,7 @@ export const listSubject = new Subject();
...
@@ -104,7 +104,7 @@ export const listSubject = new Subject();
const
AssetTable
=
(
props
)
=>
{
const
AssetTable
=
(
props
)
=>
{
const
{
className
,
nodeId
,
nodeType
,
nodeLevel
,
nodeAllowdLoadDataAsset
,
elementsChanged
,
assetActionChanged
,
onSelect
,
onCountChange
,
reference
=
AssetManageReference
,
onFullScreenChange
,
template
}
=
props
;
const
{
className
,
nodeId
,
nodeType
,
setAddDir
,
nodeAllowdLoadDataAsset
,
elementsChanged
,
assetActionChanged
,
onSelect
,
onCountChange
,
reference
=
AssetManageReference
,
onFullScreenChange
,
template
}
=
props
;
const
MENU_ID
=
'asset-table'
;
const
MENU_ID
=
'asset-table'
;
...
@@ -329,8 +329,8 @@ const AssetTable = (props) => {
...
@@ -329,8 +329,8 @@ const AssetTable = (props) => {
}
}
},
[
nodeId
,
nodeType
])
},
[
nodeId
,
nodeType
])
const
[
addAble
,
importAble
,
exportAble
,
changeDirectoryAble
,
deleteAble
,
offlineAble
,
addTagAble
,
subscribeAble
]
=
React
.
useMemo
(()
=>
{
const
[
addAble
,
importAble
,
exportAble
,
changeDirectoryAble
,
deleteAble
,
offlineAble
,
addTagAble
,
subscribeAble
,
adddirAble
]
=
React
.
useMemo
(()
=>
{
let
[
_addAble
,
_importAble
,
_exportAble
,
_changeDirectoryAble
,
_deleteAble
,
_offlineAble
,
_addTagAble
,
_subscribeAble
]
=
[
false
,
false
,
false
,
false
,
false
,
false
,
false
,
false
]
let
[
_addAble
,
_importAble
,
_exportAble
,
_changeDirectoryAble
,
_deleteAble
,
_offlineAble
,
_addTagAble
,
_subscribeAble
,
_addDirAble
]
=
[
false
,
false
,
false
,
false
,
false
,
false
,
false
,
false
,
false
]
_addAble
=
(
permissions
??[]).
findIndex
(
item
=>
item
===
'add'
)
!==
-
1
_addAble
=
(
permissions
??[]).
findIndex
(
item
=>
item
===
'add'
)
!==
-
1
...
@@ -354,13 +354,14 @@ const AssetTable = (props) => {
...
@@ -354,13 +354,14 @@ const AssetTable = (props) => {
_exportAble
=
allowExport
_exportAble
=
allowExport
}
}
let
[
allowChangeDirectory
,
allowDelete
,
allowOffline
,
allowAddTag
,
allowSubscribe
]
=
[
true
,
true
,
true
,
true
,
true
]
let
[
allowChangeDirectory
,
allowDelete
,
allowOffline
,
allowAddTag
,
allowSubscribe
,
allowAddDir
]
=
[
true
,
true
,
true
,
true
,
true
,
true
]
for
(
const
row
of
selectedRows
??[])
{
for
(
const
row
of
selectedRows
??[])
{
const
changeDirecotoryIndex
=
(
row
.
allowButtons
??[]).
findIndex
(
item
=>
item
===
'changeDir'
)
const
changeDirecotoryIndex
=
(
row
.
allowButtons
??[]).
findIndex
(
item
=>
item
===
'changeDir'
)
const
deleteIndex
=
(
row
.
allowButtons
??[]).
findIndex
(
item
=>
item
===
'delete'
)
const
deleteIndex
=
(
row
.
allowButtons
??[]).
findIndex
(
item
=>
item
===
'delete'
)
const
offlineIndex
=
(
row
.
allowButtons
??[]).
findIndex
(
item
=>
item
===
'offline'
)
const
offlineIndex
=
(
row
.
allowButtons
??[]).
findIndex
(
item
=>
item
===
'offline'
)
const
addTagIndex
=
(
row
.
allowButtons
??[]).
findIndex
(
item
=>
item
===
'addTag'
)
const
addTagIndex
=
(
row
.
allowButtons
??[]).
findIndex
(
item
=>
item
===
'addTag'
)
const
subscribeIndex
=
(
row
.
allowButtons
??[]).
findIndex
(
item
=>
item
===
'subscribe'
)
const
subscribeIndex
=
(
row
.
allowButtons
??[]).
findIndex
(
item
=>
item
===
'subscribe'
)
const
addDir
=
(
row
.
allowButtons
??[]).
findIndex
(
item
=>
item
===
'addDir'
)
if
(
changeDirecotoryIndex
===
-
1
)
{
if
(
changeDirecotoryIndex
===
-
1
)
{
allowChangeDirectory
=
false
allowChangeDirectory
=
false
}
}
...
@@ -376,6 +377,9 @@ const AssetTable = (props) => {
...
@@ -376,6 +377,9 @@ const AssetTable = (props) => {
if
(
subscribeIndex
===
-
1
)
{
if
(
subscribeIndex
===
-
1
)
{
allowSubscribe
=
false
allowSubscribe
=
false
}
}
if
(
addDir
===-
1
){
allowAddDir
=
false
}
}
}
_changeDirectoryAble
=
allowChangeDirectory
_changeDirectoryAble
=
allowChangeDirectory
...
@@ -383,10 +387,15 @@ const AssetTable = (props) => {
...
@@ -383,10 +387,15 @@ const AssetTable = (props) => {
_offlineAble
=
allowOffline
_offlineAble
=
allowOffline
_addTagAble
=
allowAddTag
_addTagAble
=
allowAddTag
_subscribeAble
=
allowSubscribe
_subscribeAble
=
allowSubscribe
_addDirAble
=
allowAddDir
return
[
_addAble
,
_importAble
,
_exportAble
,
_changeDirectoryAble
,
_deleteAble
,
_offlineAble
,
_addTagAble
,
_subscribeAble
]
return
[
_addAble
,
_importAble
,
_exportAble
,
_changeDirectoryAble
,
_deleteAble
,
_offlineAble
,
_addTagAble
,
_subscribeAble
,
_addDirAble
]
},
[
permissions
,
selectedRows
])
},
[
permissions
,
selectedRows
])
useEffect
(()
=>
{
setAddDir
(
adddirAble
)
},[
adddirAble
])
const
realAssets
=
useMemo
(()
=>
{
const
realAssets
=
useMemo
(()
=>
{
const
newAssets
=
[...
assets
];
const
newAssets
=
[...
assets
];
// if (users?.length > 0 && assets?.length > 0 && columns?.length > 0) {
// if (users?.length > 0 && assets?.length > 0 && columns?.length > 0) {
...
...
src/view/Manage/AssetManage/Component/AssetTree.jsx
View file @
2257ad9e
import
React
,
{
useEffect
,
useState
,
useRef
}
from
'react'
;
import
React
,
{
useEffect
,
useState
,
useRef
,
useMemo
}
from
'react'
;
import
{
Card
,
Spin
,
Tooltip
,
Tree
,
Modal
,
AutoComplete
,
Select
,
Button
,
Menu
,
Dropdown
,
Space
}
from
'antd'
;
import
{
Card
,
Spin
,
Tooltip
,
Tree
,
Modal
,
AutoComplete
,
Select
,
Button
,
Menu
,
Dropdown
,
Space
}
from
'antd'
;
import
{
ReloadOutlined
,
SettingOutlined
,
UnorderedListOutlined
}
from
'@ant-design/icons'
;
import
{
ReloadOutlined
,
SettingOutlined
,
UnorderedListOutlined
}
from
'@ant-design/icons'
;
import
{
useContextMenu
,
Menu
as
RcMenu
,
Item
as
RcItem
}
from
"react-contexify"
;
import
{
useContextMenu
,
Menu
as
RcMenu
,
Item
as
RcItem
}
from
"react-contexify"
;
...
@@ -64,6 +64,7 @@ const AssetTree = (props) => {
...
@@ -64,6 +64,7 @@ const AssetTree = (props) => {
const
[
updateDirectoryModalVisible
,
setUpdateDirectoryModalVisible
]
=
useState
(
false
);
const
[
updateDirectoryModalVisible
,
setUpdateDirectoryModalVisible
]
=
useState
(
false
);
const
[
viewSelectedKey
,
setViewSelectedKey
]
=
useState
(
viewModes
[
0
].
key
);
const
[
viewSelectedKey
,
setViewSelectedKey
]
=
useState
(
viewModes
[
0
].
key
);
const
[
modal
,
contextHolder
]
=
Modal
.
useModal
();
const
[
modal
,
contextHolder
]
=
Modal
.
useModal
();
const
timestamp
=
getQueryParam
(
AnchorTimestamp
,
props
?.
location
?.
search
);
const
timestamp
=
getQueryParam
(
AnchorTimestamp
,
props
?.
location
?.
search
);
...
@@ -76,6 +77,7 @@ const AssetTree = (props) => {
...
@@ -76,6 +77,7 @@ const AssetTree = (props) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
getTemplates
()
getTemplates
()
window
?.
addEventListener
(
"storage"
,
storageChange
);
window
?.
addEventListener
(
"storage"
,
storageChange
);
return
()
=>
{
return
()
=>
{
...
...
src/view/Manage/AssetManage/index.jsx
View file @
2257ad9e
...
@@ -28,6 +28,7 @@ const AssetManage = (props) => {
...
@@ -28,6 +28,7 @@ const AssetManage = (props) => {
const
[
elementsChanged
,
setElementsChanged
]
=
useState
(
false
);
const
[
elementsChanged
,
setElementsChanged
]
=
useState
(
false
);
const
[
template
,
setTemplate
]
=
useState
();
const
[
template
,
setTemplate
]
=
useState
();
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
const
[
addDir
,
setAddDir
]
=
useState
(
false
)
const
{
assetId
,
assetDirId
}
=
assetParams
;
const
{
assetId
,
assetDirId
}
=
assetParams
;
...
@@ -83,7 +84,7 @@ const AssetManage = (props) => {
...
@@ -83,7 +84,7 @@ const AssetManage = (props) => {
axis=
'x'
axis=
'x'
minConstraints=
{
[
230
,
Infinity
]
}
maxConstraints=
{
[
Infinity
,
Infinity
]
}
minConstraints=
{
[
230
,
Infinity
]
}
maxConstraints=
{
[
Infinity
,
Infinity
]
}
>
>
<
AssetTree
onSelect=
{
onTreeSelect
}
onDirectoryChange=
{
onDirectoryChange
}
onTemplateChange=
{
onTemplateChange
}
{
...
props
}
/>
<
AssetTree
onSelect=
{
onTreeSelect
}
addDirInfo=
{
addDir
}
onDirectoryChange=
{
onDirectoryChange
}
onTemplateChange=
{
onTemplateChange
}
{
...
props
}
/>
</
ResizableBox
>
</
ResizableBox
>
{
{
expandTree
&&
<
Separate
width=
{
15
}
/>
expandTree
&&
<
Separate
width=
{
15
}
/>
...
@@ -91,7 +92,7 @@ const AssetManage = (props) => {
...
@@ -91,7 +92,7 @@ const AssetManage = (props) => {
<
div
className=
{
middleClasses
}
>
<
div
className=
{
middleClasses
}
>
{
/* <AssetDirectory id={nodeId} assetCount={assetCount} directoryChanged={directoryChanged} onElementsChange={onElementsChange} />
{
/* <AssetDirectory id={nodeId} assetCount={assetCount} directoryChanged={directoryChanged} onElementsChange={onElementsChange} />
<Separate height={15} /> */
}
<Separate height={15} /> */
}
<
AssetTable
template=
{
template
}
nodeId=
{
nodeId
}
nodeType=
{
nodeType
}
nodeLevel=
{
nodeLevel
}
nodeAllowdLoadDataAsset=
{
nodeAllowdLoadDataAsset
}
reference=
{
AssetManageReference
}
elementsChanged=
{
elementsChanged
}
onSelect=
{
onTableSelect
}
onCountChange=
{
onAssetCountChange
}
onFullScreenChange=
{
onFullScreenChange
}
{
...
props
}
/>
<
AssetTable
template=
{
template
}
setAddDir=
{
setAddDir
}
nodeId=
{
nodeId
}
nodeType=
{
nodeType
}
nodeLevel=
{
nodeLevel
}
nodeAllowdLoadDataAsset=
{
nodeAllowdLoadDataAsset
}
reference=
{
AssetManageReference
}
elementsChanged=
{
elementsChanged
}
onSelect=
{
onTableSelect
}
onCountChange=
{
onAssetCountChange
}
onFullScreenChange=
{
onFullScreenChange
}
{
...
props
}
/>
<
div
className=
'tree-toggle'
onClick=
{
treeToggleClick
}
>
<
div
className=
'tree-toggle'
onClick=
{
treeToggleClick
}
>
{
expandTree
?
<
CaretLeftOutlined
/>
:
<
CaretRightOutlined
/>
}
{
expandTree
?
<
CaretLeftOutlined
/>
:
<
CaretRightOutlined
/>
}
</
div
>
</
div
>
...
...
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