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
96600c1b
Commit
96600c1b
authored
Aug 26, 2025
by
放生的三文鱼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成目录的编辑和预览
parent
29e4f59d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
8 deletions
+28
-8
assetmanage.js
src/model/assetmanage.js
+5
-2
dataassetmanager.js
src/service/dataassetmanager.js
+6
-0
AssetManageTree.jsx
src/view/Manage/AssetManage/Component/AssetManageTree.jsx
+8
-1
CustomDirectoryModal.jsx
...iew/Manage/AssetManage/Component/CustomDirectoryModal.jsx
+9
-5
No files found.
src/model/assetmanage.js
View file @
96600c1b
...
@@ -568,4 +568,8 @@ export function* processDetail(payload) {
...
@@ -568,4 +568,8 @@ export function* processDetail(payload) {
export
function
*
auditProcess
(
payload
)
{
export
function
*
auditProcess
(
payload
)
{
return
yield
call
(
service
.
auditProcess
,
payload
);
return
yield
call
(
service
.
auditProcess
,
payload
);
}
}
\ No newline at end of file
export
function
*
saveCustomTree
(
payload
)
{
return
yield
call
(
service
.
saveCustomTree
,
payload
);
}
src/service/dataassetmanager.js
View file @
96600c1b
...
@@ -552,6 +552,10 @@ export function queryCustomTypeRootDirectory() {
...
@@ -552,6 +552,10 @@ export function queryCustomTypeRootDirectory() {
return
GetJSON
(
"/dataassetmanager/directoryApi/queryCustomTypeRootDirectory"
);
return
GetJSON
(
"/dataassetmanager/directoryApi/queryCustomTypeRootDirectory"
);
}
}
export
function
saveCustomTree
(
payload
)
{
return
PostJSON
(
"/dataassetmanager/directoryApi/saveCustomElementTree"
,
payload
)
}
export
function
getPrivilegeByRange
(
payload
)
{
export
function
getPrivilegeByRange
(
payload
)
{
return
GetJSON
(
"/dataassetmanager/AuthorityApi/listAllowButtonsByRange"
,
payload
);
return
GetJSON
(
"/dataassetmanager/AuthorityApi/listAllowButtonsByRange"
,
payload
);
}
}
...
@@ -579,3 +583,5 @@ export function processDetail(payload) {
...
@@ -579,3 +583,5 @@ export function processDetail(payload) {
export
function
auditProcess
(
payload
)
{
export
function
auditProcess
(
payload
)
{
return
PostJSON
(
"/dataassetmanager/flowApi/auditProcess"
,
payload
)
return
PostJSON
(
"/dataassetmanager/flowApi/auditProcess"
,
payload
)
}
}
src/view/Manage/AssetManage/Component/AssetManageTree.jsx
View file @
96600c1b
...
@@ -527,6 +527,11 @@ const AssetManageTree = (props) => {
...
@@ -527,6 +527,11 @@ const AssetManageTree = (props) => {
})
})
}
}
const
editCustom
=
()
=>
{
setCustomDirectoryAction
(
'edit'
);
setCustomDirectoryModalVisible
(
true
);
}
const
deleteDir
=
()
=>
{
const
deleteDir
=
()
=>
{
console
.
log
(
'currentRightClickDir'
,
currentRightClickDir
)
console
.
log
(
'currentRightClickDir'
,
currentRightClickDir
)
if
(
currentRightClickDir
.
nodeId
)
{
if
(
currentRightClickDir
.
nodeId
)
{
...
@@ -970,6 +975,7 @@ const AssetManageTree = (props) => {
...
@@ -970,6 +975,7 @@ const AssetManageTree = (props) => {
checkStrictly
checkStrictly
onRightClick=
{
({
event
,
node
})
=>
{
onRightClick=
{
({
event
,
node
})
=>
{
if
(
reference
===
AssetManageReference
)
{
if
(
reference
===
AssetManageReference
)
{
console
.
log
(
'node'
,
node
);
setCurrentRightClickDir
(
node
);
setCurrentRightClickDir
(
node
);
setCurrentDirType
(
node
.
type
||
''
);
setCurrentDirType
(
node
.
type
||
''
);
displayMenu
(
event
);
displayMenu
(
event
);
...
@@ -994,6 +1000,7 @@ const AssetManageTree = (props) => {
...
@@ -994,6 +1000,7 @@ const AssetManageTree = (props) => {
onCancel=
{
onCustomDirectoryCancel
}
onCancel=
{
onCustomDirectoryCancel
}
action=
{
customDirectoryAction
}
action=
{
customDirectoryAction
}
dirId=
{
currentDirId
}
dirId=
{
currentDirId
}
node=
{
currentRightClickDir
}
/>
/>
<
Overview
<
Overview
visible=
{
customOverview
.
visible
}
visible=
{
customOverview
.
visible
}
...
@@ -1025,7 +1032,7 @@ const AssetManageTree = (props) => {
...
@@ -1025,7 +1032,7 @@ const AssetManageTree = (props) => {
<
RcItem
id=
"edit"
onClick=
{
previewCustom
}
>
<
RcItem
id=
"edit"
onClick=
{
previewCustom
}
>
预览
预览
</
RcItem
>
</
RcItem
>
<
RcItem
id=
"edit"
>
<
RcItem
id=
"edit"
onClick=
{
editCustom
}
>
编辑
编辑
</
RcItem
>
</
RcItem
>
</
React
.
Fragment
>
</
React
.
Fragment
>
...
...
src/view/Manage/AssetManage/Component/CustomDirectoryModal.jsx
View file @
96600c1b
import
React
,
{
useEffect
,
useState
,
useCallback
}
from
'react'
;
import
React
,
{
useEffect
,
useState
,
useCallback
}
from
'react'
;
import
{
Modal
,
Checkbox
,
Row
,
Col
,
Form
,
Input
,
Empty
,
Select
}
from
'antd'
;
import
{
Modal
,
Checkbox
,
Row
,
Col
,
Form
,
Input
,
Empty
,
Select
,
Spin
}
from
'antd'
;
import
{
DndProvider
}
from
'react-dnd'
;
import
{
DndProvider
}
from
'react-dnd'
;
import
{
HTML5Backend
}
from
'react-dnd-html5-backend'
;
import
{
HTML5Backend
}
from
'react-dnd-html5-backend'
;
import
update
from
'immutability-helper'
;
import
update
from
'immutability-helper'
;
...
@@ -18,7 +18,7 @@ const resourceTypes = [
...
@@ -18,7 +18,7 @@ const resourceTypes = [
]
]
const
CustomDirectoryModal
=
(
props
)
=>
{
const
CustomDirectoryModal
=
(
props
)
=>
{
const
{
visible
,
onCancel
,
action
,
dirId
,
reference
=
AssetManageReference
}
=
props
;
const
{
visible
,
onCancel
,
action
,
dirId
,
reference
=
AssetManageReference
,
node
}
=
props
;
const
[
keyword
,
setKeyword
]
=
useState
(
''
);
const
[
keyword
,
setKeyword
]
=
useState
(
''
);
const
[
data
,
setData
]
=
useState
([]);
const
[
data
,
setData
]
=
useState
([]);
...
@@ -53,7 +53,9 @@ const CustomDirectoryModal = (props) => {
...
@@ -53,7 +53,9 @@ const CustomDirectoryModal = (props) => {
setData
(
elements
||
[]);
setData
(
elements
||
[]);
setFilterData
((
elements
||
[]).
filter
(
item
=>
(
item
.
name
||
''
).
indexOf
(
keyword
)
!==-
1
));
setFilterData
((
elements
||
[]).
filter
(
item
=>
(
item
.
name
||
''
).
indexOf
(
keyword
)
!==-
1
));
if
(
action
===
'edit'
)
{
if
(
action
===
'edit'
)
{
getCurrentDirectory
(
elements
||
[]);
setCheckedValues
(
node
.
elementIds
||
[]);
form
.
setFieldsValue
({
name
:
node
.
name
||
''
,
desc
:
node
.
desc
||
''
});
onCheckboxChange
(
node
.
elementIds
||
[],
elements
);
}
}
}
}
})
})
...
@@ -158,11 +160,13 @@ const CustomDirectoryModal = (props) => {
...
@@ -158,11 +160,13 @@ const CustomDirectoryModal = (props) => {
params
:
row
params
:
row
}
}
let
url
=
'assetmanage.saveTreeByCustomElements'
;
if
(
action
===
'edit'
)
{
if
(
action
===
'edit'
)
{
url
=
'assetmanage.saveCustomTree'
;
payload
.
params
=
{...
payload
.
params
,
dirId
};
payload
.
params
=
{...
payload
.
params
,
dirId
};
}
}
let
url
=
'assetmanage.saveTreeByCustomElements'
;
if
(
reference
===
AssetManageReference
)
{
if
(
reference
===
AssetManageReference
)
{
payload
.
params
=
{
payload
.
params
=
{
...
@@ -252,7 +256,7 @@ const CustomDirectoryModal = (props) => {
...
@@ -252,7 +256,7 @@ const CustomDirectoryModal = (props) => {
}
}
}
}
onOk=
{
onOk
}
onOk=
{
onOk
}
>
>
<
Row
gutter=
{
30
}
>
<
Row
gutter=
{
30
}
>
<
Col
span=
{
8
}
style=
{
{
borderRight
:
'1px solid #EFEFEF'
}
}
>
<
Col
span=
{
8
}
style=
{
{
borderRight
:
'1px solid #EFEFEF'
}
}
>
<
div
className=
'mb-3'
>
资产目录要素
</
div
>
<
div
className=
'mb-3'
>
资产目录要素
</
div
>
<
Input
<
Input
...
...
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