Commit b40dbf97 by zhaochengxiang

资产目录功能调整

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