Commit 717d5c74 by zhaochengxiang

bug fix

parent 3ea0b4dd
...@@ -65,8 +65,8 @@ const ImportModal = (props) => { ...@@ -65,8 +65,8 @@ const ImportModal = (props) => {
}, },
callback: data => { callback: data => {
setConfirmLoading(false); setConfirmLoading(false);
reset();
onCancelByWord && onCancelByWord(true, data||{}); onCancelByWord && onCancelByWord(true, data||{});
reset();
}, },
error: () => { error: () => {
setConfirmLoading(false); setConfirmLoading(false);
...@@ -81,8 +81,8 @@ const ImportModal = (props) => { ...@@ -81,8 +81,8 @@ const ImportModal = (props) => {
payload: { fileList: row.upload }, payload: { fileList: row.upload },
callback: data => { callback: data => {
setConfirmLoading(false); setConfirmLoading(false);
reset();
onCancel && onCancel(false, true, data||[]); onCancel && onCancel(false, true, data||[]);
reset();
}, },
error: () => { error: () => {
setConfirmLoading(false); setConfirmLoading(false);
...@@ -90,16 +90,14 @@ const ImportModal = (props) => { ...@@ -90,16 +90,14 @@ const ImportModal = (props) => {
}) })
} else if (modeKey==='excel-copy') { } else if (modeKey==='excel-copy') {
reset();
onCancel && onCancel(false, true, hints||[]); onCancel && onCancel(false, true, hints||[]);
} else if (modeKey==='no-condition') {
reset(); reset();
} else if (modeKey==='no-condition') {
onCancel && onCancel(false, true, []); onCancel && onCancel(false, true, []);
} else if (modeKey==='ddl') {
reset(); reset();
} else if (modeKey==='ddl') {
onCancelByDDL && onCancelByDDL(true, ddl); onCancelByDDL && onCancelByDDL(true, ddl);
reset();
} else if (modeKey === 'asset-import') { } else if (modeKey === 'asset-import') {
setSelectAssetParams({ visible: true, catalogId }) setSelectAssetParams({ visible: true, catalogId })
} else if (modeKey === 'metadata-import') { } else if (modeKey === 'metadata-import') {
...@@ -123,8 +121,8 @@ const ImportModal = (props) => { ...@@ -123,8 +121,8 @@ const ImportModal = (props) => {
} }
const cancel = () => { const cancel = () => {
reset();
onCancel && onCancel(); onCancel && onCancel();
reset();
} }
const reset = () => { const reset = () => {
...@@ -164,13 +162,12 @@ const ImportModal = (props) => { ...@@ -164,13 +162,12 @@ const ImportModal = (props) => {
return ( return (
<> <>
<Modal <Modal
forceRender destroyOnClose
visible={visible} visible={visible}
title='新建模型' title='新建模型'
width={isSzseEnv?540:630} width={isSzseEnv?540:630}
onCancel={cancel} onCancel={cancel}
footer={footer} footer={footer}
bodyStyle={{ height: 210, overflow: 'auto' }}
> >
<Form form={form}> <Form form={form}>
<Form.Item <Form.Item
......
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