Commit 0f24d6b2 by zhaochengxiang

资产导入

parent a84d2e19
......@@ -155,8 +155,13 @@ const ImportAssetDrawer = (props) => {
setConfirmLoading(true);
dispatch({
type: 'assetmanage.checkAdmin',
callback: (data) => {
const isAdmin = (data==='true')?true:false
dispatch({
type: 'assetmanage.assetImport',
payload: { fileList: fileList, params: { env: `${app?.env?.domainId}`, saveAsDraft: true } },
payload: { fileList: fileList, params: { env: `${app?.env?.domainId}`, saveAsDraft: isAdmin?false:true } },
callback: data => {
setConfirmLoading(false);
setFileList([]);
......@@ -168,6 +173,11 @@ const ImportAssetDrawer = (props) => {
setConfirmLoading(false);
}
});
},
error: () => {
setConfirmLoading(false);
}
})
}
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