Commit 0f24d6b2 by zhaochengxiang

资产导入

parent a84d2e19
...@@ -155,19 +155,29 @@ const ImportAssetDrawer = (props) => { ...@@ -155,19 +155,29 @@ const ImportAssetDrawer = (props) => {
setConfirmLoading(true); setConfirmLoading(true);
dispatch({ dispatch({
type: 'assetmanage.assetImport', type: 'assetmanage.checkAdmin',
payload: { fileList: fileList, params: { env: `${app?.env?.domainId}`, saveAsDraft: true } }, callback: (data) => {
callback: data => { const isAdmin = (data==='true')?true:false
setConfirmLoading(false);
setFileList([]); dispatch({
getLogs(pageNum, pageSize); type: 'assetmanage.assetImport',
showMessage('success', '导入动作完成,详情查看日志'); payload: { fileList: fileList, params: { env: `${app?.env?.domainId}`, saveAsDraft: isAdmin?false:true } },
onSuccess && onSuccess(data||''); callback: data => {
setConfirmLoading(false);
setFileList([]);
getLogs(pageNum, pageSize);
showMessage('success', '导入动作完成,详情查看日志');
onSuccess && onSuccess(data||'');
},
error: () => {
setConfirmLoading(false);
}
});
}, },
error: () => { error: () => {
setConfirmLoading(false); setConfirmLoading(false);
} }
}); })
} }
const reset = () => { const reset = () => {
......
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