Commit d5b4b53e by zhaochengxiang

资产目录刷新提示

parent d807a806
...@@ -149,7 +149,7 @@ const AssetManageTree = (props) => { ...@@ -149,7 +149,7 @@ const AssetManageTree = (props) => {
}) })
} }
const getAllDirectoryAsTree = (resetCurrentDirId=true, defaultSelectedId='') => { const getAllDirectoryAsTree = (resetCurrentDirId=true, defaultSelectedId='', refresh = false) => {
setLoading(true); setLoading(true);
if (resetCurrentDirId) { if (resetCurrentDirId) {
...@@ -166,6 +166,8 @@ const AssetManageTree = (props) => { ...@@ -166,6 +166,8 @@ const AssetManageTree = (props) => {
callback: data => { callback: data => {
setLoading(false); setLoading(false);
refresh && showMessage('success', '操作成功');
let newData = [...data]; let newData = [...data];
if (reference === AssetMountReference) { if (reference === AssetMountReference) {
...@@ -403,7 +405,7 @@ const AssetManageTree = (props) => { ...@@ -403,7 +405,7 @@ const AssetManageTree = (props) => {
} }
const refreshTree = () => { const refreshTree = () => {
getAllDirectoryAsTree(false); getAllDirectoryAsTree(false, '', true);
} }
const importDir = () => { const importDir = () => {
......
...@@ -138,7 +138,7 @@ const AssetTree = (props) => { ...@@ -138,7 +138,7 @@ const AssetTree = (props) => {
}) })
} }
const getAllDirectoryAsTree = (resetCurrentDirId=true, defaultSelectedId='') => { const getAllDirectoryAsTree = (resetCurrentDirId=true, defaultSelectedId='', refresh = false) => {
setLoading(true); setLoading(true);
if (resetCurrentDirId) { if (resetCurrentDirId) {
...@@ -156,6 +156,7 @@ const AssetTree = (props) => { ...@@ -156,6 +156,7 @@ const AssetTree = (props) => {
type: url, type: url,
callback: data => { callback: data => {
setLoading(false); setLoading(false);
refresh && showMessage('success', '操作成功');
let newData = [...data]; let newData = [...data];
...@@ -341,7 +342,7 @@ const AssetTree = (props) => { ...@@ -341,7 +342,7 @@ const AssetTree = (props) => {
} }
const refreshTree = () => { const refreshTree = () => {
getAllDirectoryAsTree(false); getAllDirectoryAsTree(false, '', true);
} }
const deleteDir = () => { const deleteDir = () => {
......
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