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
9661293a
Commit
9661293a
authored
Apr 02, 2025
by
fanyj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改权限
parent
5dba9f5a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
8 deletions
+15
-8
AssetManageTree.jsx
src/view/Manage/AssetManage/Component/AssetManageTree.jsx
+11
-4
AssetTable.jsx
src/view/Manage/AssetManage/Component/AssetTable.jsx
+1
-1
UpdateDirectoryModal.jsx
...iew/Manage/AssetManage/Component/UpdateDirectoryModal.jsx
+3
-3
No files found.
src/view/Manage/AssetManage/Component/AssetManageTree.jsx
View file @
9661293a
...
@@ -84,6 +84,7 @@ const AssetManageTree = (props) => {
...
@@ -84,6 +84,7 @@ const AssetManageTree = (props) => {
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
[
permissions
,
setPermissions
]
=
useState
([])
const
[
addtype
,
setAddType
]
=
useState
(
'children'
)
const
[
modal
,
contextHolder
]
=
Modal
.
useModal
();
const
[
modal
,
contextHolder
]
=
Modal
.
useModal
();
...
@@ -492,11 +493,13 @@ const AssetManageTree = (props) => {
...
@@ -492,11 +493,13 @@ const AssetManageTree = (props) => {
return
dir
;
return
dir
;
}
}
const
addDir
=
()
=>
{
const
addDir
=
(
type
)
=>
{
const
types
=
type
?
type
:
'catalog'
;
if
(
currentDir
?.
resourceType
===
'custom'
)
return
;
if
(
currentDir
?.
resourceType
===
'custom'
)
return
;
setUpdateDirectoryAction
(
'add'
);
setUpdateDirectoryAction
(
'add'
);
setUpdateDirectoryModalVisible
(
true
);
setUpdateDirectoryModalVisible
(
true
);
setAddType
(
types
)
}
}
const
onDetailClick
=
()
=>
{
const
onDetailClick
=
()
=>
{
...
@@ -890,11 +893,11 @@ const AssetManageTree = (props) => {
...
@@ -890,11 +893,11 @@ const AssetManageTree = (props) => {
{
{
viewSelectedKeyRef
.
current
===
'dir'
&&
(
viewSelectedKeyRef
.
current
===
'dir'
&&
(
<
PermissionButton
<
PermissionButton
defaultPermission=
{
havePermission
||
addDirInfo
}
defaultPermission=
{
havePermission
}
tip=
"新增目录"
tip=
"新增
根
目录"
type=
"text"
type=
"text"
icon=
{
<
PlusOutlined
className=
{
(
currentDir
?.
resourceType
===
'custom'
)?
'disable'
:
'default'
}
style=
{
{
fontSize
:
16
,
cursor
:
(
currentDirType
===
'custom'
)?
'not-allowed'
:
'pointer'
}
}
/>
}
icon=
{
<
PlusOutlined
className=
{
(
currentDir
?.
resourceType
===
'custom'
)?
'disable'
:
'default'
}
style=
{
{
fontSize
:
16
,
cursor
:
(
currentDirType
===
'custom'
)?
'not-allowed'
:
'pointer'
}
}
/>
}
onClick=
{
addDir
}
onClick=
{
()
=>
{
addDir
(
'catalog'
)}
}
// size="small"
// size="small"
style=
{
{
width
:
18
}
}
style=
{
{
width
:
18
}
}
/>
/>
...
@@ -1034,6 +1037,7 @@ const AssetManageTree = (props) => {
...
@@ -1034,6 +1037,7 @@ const AssetManageTree = (props) => {
visible=
{
updateDirectoryModalVisible
}
visible=
{
updateDirectoryModalVisible
}
onCancel=
{
onUpdateDirectoryCancel
}
onCancel=
{
onUpdateDirectoryCancel
}
action=
{
updateDirectoryAction
}
action=
{
updateDirectoryAction
}
addtype=
{
addtype
}
dirId=
{
(
updateDirectoryAction
===
'add'
)?
currentDirId
:
currentRightClickDir
.
nodeId
}
dirId=
{
(
updateDirectoryAction
===
'add'
)?
currentDirId
:
currentRightClickDir
.
nodeId
}
/>
/>
<
ImportDirectory
<
ImportDirectory
...
@@ -1054,6 +1058,9 @@ const AssetManageTree = (props) => {
...
@@ -1054,6 +1058,9 @@ const AssetManageTree = (props) => {
{
(
havePermission
||
currentRightClickDir
?.
allowUpdateDir
)
&&
<
RcItem
id=
"edit"
onClick=
{
editDir
}
>
{
(
havePermission
||
currentRightClickDir
?.
allowUpdateDir
)
&&
<
RcItem
id=
"edit"
onClick=
{
editDir
}
>
修改目录
修改目录
</
RcItem
>
}
</
RcItem
>
}
{
(
havePermission
||
currentRightClickDir
?.
allowAddDir
)
&&
<
RcItem
id=
"edit"
onClick=
{
()
=>
{
addDir
(
'children'
)}
}
>
新增子节点
</
RcItem
>
}
{
{
havePermission
&&
(
havePermission
&&
(
<>
<>
...
...
src/view/Manage/AssetManage/Component/AssetTable.jsx
View file @
9661293a
...
@@ -1265,7 +1265,7 @@ const AssetTable = (props) => {
...
@@ -1265,7 +1265,7 @@ const AssetTable = (props) => {
tip={(checkedKeys||[]).length===0?'请先选择资源':''}
tip={(checkedKeys||[]).length===0?'请先选择资源':''}
disabled={(checkedKeys||[]).length===0}
disabled={(checkedKeys||[]).length===0}
>
>
收藏
订阅
</PermissionButton>
</PermissionButton>
{
{
reference===AssetManageReference && <PermissionButton
reference===AssetManageReference && <PermissionButton
...
...
src/view/Manage/AssetManage/Component/UpdateDirectoryModal.jsx
View file @
9661293a
...
@@ -33,7 +33,7 @@ const CodeInput = ({ value = '', onChange, restrict = false, action }) => {
...
@@ -33,7 +33,7 @@ const CodeInput = ({ value = '', onChange, restrict = false, action }) => {
const
UpdateDirectoryModal
=
(
props
)
=>
{
const
UpdateDirectoryModal
=
(
props
)
=>
{
const
{
visible
,
onCancel
,
dirId
,
action
}
=
props
;
const
{
visible
,
onCancel
,
dirId
,
action
,
addtype
}
=
props
;
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
...
@@ -255,8 +255,8 @@ const UpdateDirectoryModal = (props) => {
...
@@ -255,8 +255,8 @@ const UpdateDirectoryModal = (props) => {
style=
{
{
marginBottom
}
}
style=
{
{
marginBottom
}
}
>
>
<
Radio
.
Group
>
<
Radio
.
Group
>
<
Radio
value=
'theme'
>
栏目
</
Radio
>
{
addtype
===
'catalog'
&&
<
Radio
value=
'theme'
>
栏目
</
Radio
>
}
<
Radio
value=
'directory'
disabled=
{
!
dirId
}
>
目录
</
Radio
>
{
addtype
===
'children'
&&
<
Radio
value=
'directory'
disabled=
{
!
dirId
}
>
目录
</
Radio
>
}
</
Radio
.
Group
>
</
Radio
.
Group
>
</
Form
.
Item
>
</
Form
.
Item
>
}
}
...
...
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