Commit 14fcd274 by zhaochengxiang

资产目录功能统一

parent f8c6a8c0
......@@ -387,7 +387,7 @@ const AssetTree = (props) => {
payload: {data: [ currentRightClickDir.nodeId ]},
callback: () => {
showMessage("success","删除成功");
getAllDirectoryAsTree(true);
getAllDirectoryAsTree(true, currentDirId);
}
})
}
......@@ -516,9 +516,15 @@ const AssetTree = (props) => {
refresh && getAllDirectoryAsTree(resetCurrentDirId);
}
const onCustomDirectoryCancel = (refresh=false) => {
const onCustomDirectoryCancel = (refresh=false, id='') => {
setCustomDirectoryModalVisible(false);
refresh && getAllDirectoryAsTree(false);
if (refresh) {
if (customDirectoryAction === 'add') {
getAllDirectoryAsTree(true, id);
} else {
getAllDirectoryAsTree(false);
}
}
}
const displayMenu = (e) => {
......
......@@ -130,10 +130,10 @@ const CustomDirectoryModal = (props) => {
dispatch({
type: 'assetmanage.saveTreeByCustomElements',
payload,
callback: () => {
callback: data => {
setConfirmLoading(false);
reset();
onCancel && onCancel(true);
onCancel && onCancel(true, data?.id);
},
error: () => {
setConfirmLoading(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment