Commit b40dbf97 by zhaochengxiang

资产目录功能调整

parent d22f3d3b
...@@ -415,7 +415,7 @@ const AssetTree = (props) => { ...@@ -415,7 +415,7 @@ const AssetTree = (props) => {
}, },
callback: () => { callback: () => {
showMessage('success', (steps===1)?'上移目录成功':'下移目录成功'); showMessage('success', (steps===1)?'上移目录成功':'下移目录成功');
getAllDirectoryAsTree(); getAllDirectoryAsTree(false);
}, },
error: () => { error: () => {
setLoading(false); setLoading(false);
...@@ -499,12 +499,13 @@ const AssetTree = (props) => { ...@@ -499,12 +499,13 @@ const AssetTree = (props) => {
setAutoExpandParent(false); setAutoExpandParent(false);
}; };
const onUpdateDirectoryCancel = (refresh=false) => { const onUpdateDirectoryCancel = (refresh=false, id) => {
setUpdateDirectoryModalVisible(false); setUpdateDirectoryModalVisible(false);
if (refresh) { if (refresh) {
getAllDirectoryAsTree(false); if (updateDirectoryAction === 'add') {
getAllDirectoryAsTree(true, id);
if (updateDirectoryAction === 'edit') { } else {
getAllDirectoryAsTree();
onDirectoryChange && onDirectoryChange(); onDirectoryChange && onDirectoryChange();
} }
} }
......
...@@ -98,9 +98,9 @@ const UpdateDirectoryModal = (props) => { ...@@ -98,9 +98,9 @@ const UpdateDirectoryModal = (props) => {
dispatch({ dispatch({
type: 'assetmanage.addOrUpdateDirectory', type: 'assetmanage.addOrUpdateDirectory',
payload: payload, payload: payload,
callback: () => { callback: data => {
setConfirmLoading(false); setConfirmLoading(false);
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