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
c08f00de
Commit
c08f00de
authored
Nov 21, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产删除
parent
1ee001e7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
4 deletions
+39
-4
assetmanage.js
src/model/assetmanage.js
+5
-0
dataassetmanager.js
src/service/dataassetmanager.js
+4
-0
AssetManageTree.jsx
src/view/Manage/AssetManage/Component/AssetManageTree.jsx
+15
-2
AssetTree.jsx
src/view/Manage/AssetManage/Component/AssetTree.jsx
+15
-2
No files found.
src/model/assetmanage.js
View file @
c08f00de
...
...
@@ -79,6 +79,11 @@ export function* listRecycleBinDataAssetsByPage(payload) {
export
function
*
addOrUpdateDirectory
(
payload
)
{
return
yield
call
(
service
.
addOrUpdateDirectory
,
payload
);
}
export
function
*
checkDirectoryDeleteAble
(
payload
)
{
return
yield
call
(
service
.
checkDirectoryDeleteAble
,
payload
)
}
export
function
*
deleteDirectory
(
payload
)
{
return
yield
call
(
service
.
deleteDirectory
,
payload
);
}
...
...
src/service/dataassetmanager.js
View file @
c08f00de
...
...
@@ -112,6 +112,10 @@ export function addOrUpdateDirectory(payload) {
return
PostJSON
(
"/dataassetmanager/directoryApi/addOrUpdateDirectory"
,
payload
);
}
export
function
checkDirectoryDeleteAble
(
payload
)
{
return
Post
(
"/dataassetmanager/directoryApi/checkDirDeleteAble"
,
payload
);
}
export
function
deleteDirectory
(
payload
)
{
return
PostJSON
(
"/dataassetmanager/directoryApi/deleteDirectory"
,
payload
);
}
...
...
src/view/Manage/AssetManage/Component/AssetManageTree.jsx
View file @
c08f00de
...
...
@@ -435,10 +435,18 @@ const AssetManageTree = (props) => {
const
deleteDir
=
()
=>
{
if
(
currentRightClickDir
.
nodeId
)
{
modal
.
confirm
({
title
:
'提示'
,
content
:
'节点下可能包含资产信息,删除后将把资产从该目录上移除,确定继续吗?'
,
title
:
'您确定要删除该目录吗?'
,
onOk
:
()
=>
{
dispatch
({
type
:
'assetmanage.checkDirectoryDeleteAble'
,
payload
:
{
params
:
{
dirId
:
currentRightClickDir
.
nodeId
}
},
callback
:
able
=>
{
if
(
able
===
'true'
)
{
dispatch
({
type
:
'assetmanage.deleteDirectory'
,
payload
:
{
data
:
[
currentRightClickDir
.
nodeId
]},
callback
:
()
=>
{
...
...
@@ -446,6 +454,11 @@ const AssetManageTree = (props) => {
getAllDirectoryAsTree
(
true
,
(
currentRightClickDir
.
nodeId
===
currentDirId
)?
''
:
currentDirId
);
}
})
}
else
{
showMessage
(
"warn"
,
"目录下有资产信息,不允许删除!"
);
}
}
})
}
})
...
...
src/view/Manage/AssetManage/Component/AssetTree.jsx
View file @
c08f00de
...
...
@@ -347,10 +347,18 @@ const AssetTree = (props) => {
const
deleteDir
=
()
=>
{
if
(
currentRightClickDir
.
nodeId
)
{
modal
.
confirm
({
title
:
'提示'
,
content
:
'节点下可能包含资产信息,删除后将把资产从该目录上移除,确定继续吗?'
,
title
:
'您确定要删除该目录吗?'
,
onOk
:
()
=>
{
dispatch
({
type
:
'assetmanage.checkDirectoryDeleteAble'
,
payload
:
{
params
:
{
dirId
:
currentRightClickDir
.
nodeId
}
},
callback
:
able
=>
{
if
(
able
===
'true'
)
{
dispatch
({
type
:
'assetmanage.deletePersonalCustomDirectory'
,
payload
:
{
data
:
[
currentRightClickDir
.
nodeId
]},
callback
:
()
=>
{
...
...
@@ -358,6 +366,11 @@ const AssetTree = (props) => {
getAllDirectoryAsTree
(
true
,
currentDirId
);
}
})
}
else
{
showMessage
(
"warn"
,
"目录下有资产信息,不允许删除!"
);
}
}
})
}
})
...
...
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