Commit 14fcd274 by zhaochengxiang

资产目录功能统一

parent f8c6a8c0
...@@ -387,7 +387,7 @@ const AssetTree = (props) => { ...@@ -387,7 +387,7 @@ const AssetTree = (props) => {
payload: {data: [ currentRightClickDir.nodeId ]}, payload: {data: [ currentRightClickDir.nodeId ]},
callback: () => { callback: () => {
showMessage("success","删除成功"); showMessage("success","删除成功");
getAllDirectoryAsTree(true); getAllDirectoryAsTree(true, currentDirId);
} }
}) })
} }
...@@ -516,9 +516,15 @@ const AssetTree = (props) => { ...@@ -516,9 +516,15 @@ const AssetTree = (props) => {
refresh && getAllDirectoryAsTree(resetCurrentDirId); refresh && getAllDirectoryAsTree(resetCurrentDirId);
} }
const onCustomDirectoryCancel = (refresh=false) => { const onCustomDirectoryCancel = (refresh=false, id='') => {
setCustomDirectoryModalVisible(false); setCustomDirectoryModalVisible(false);
refresh && getAllDirectoryAsTree(false); if (refresh) {
if (customDirectoryAction === 'add') {
getAllDirectoryAsTree(true, id);
} else {
getAllDirectoryAsTree(false);
}
}
} }
const displayMenu = (e) => { const displayMenu = (e) => {
......
...@@ -130,10 +130,10 @@ const CustomDirectoryModal = (props) => { ...@@ -130,10 +130,10 @@ const CustomDirectoryModal = (props) => {
dispatch({ dispatch({
type: 'assetmanage.saveTreeByCustomElements', type: 'assetmanage.saveTreeByCustomElements',
payload, payload,
callback: () => { callback: data => {
setConfirmLoading(false); setConfirmLoading(false);
reset(); reset();
onCancel && onCancel(true); onCancel && onCancel(true, data?.id);
}, },
error: () => { error: () => {
setConfirmLoading(false); 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