Commit 81ed822d by zhaochengxiang

word导入

parent dc2c19c6
...@@ -40,6 +40,10 @@ const EditModel = (props) => { ...@@ -40,6 +40,10 @@ const EditModel = (props) => {
const newModelerData = {...modelerData, ...row}; const newModelerData = {...modelerData, ...row};
if (newModelerData.easyDataModelerModelingTemplate==='' || newModelerData.easyDataModelerModelingTemplate==={}) {
newModelerData.easyDataModelerModelingTemplate = null;
}
setConfirmLoading(true); setConfirmLoading(true);
dispatchLatest({ dispatchLatest({
type: 'datamodel.saveDataModel', type: 'datamodel.saveDataModel',
......
...@@ -25,7 +25,7 @@ const ImportModal = (props) => { ...@@ -25,7 +25,7 @@ const ImportModal = (props) => {
payload: { fileList: excelFiles }, payload: { fileList: excelFiles },
callback: data => { callback: data => {
setConfirmLoading(false); setConfirmLoading(false);
onCancel && onCancel({ hints: data||[] }); onCancel && onCancel(data||[]);
}, },
error: () => { error: () => {
setConfirmLoading(false); setConfirmLoading(false);
......
...@@ -48,6 +48,13 @@ const ImportWordModal = (props) => { ...@@ -48,6 +48,13 @@ const ImportWordModal = (props) => {
callback: data => { callback: data => {
setConfirmLoading(false); setConfirmLoading(false);
reset(); reset();
if (onCancel) {
if (reference==='stock') {
onCancel(true);
} else {
onCancel(true, data?.firstId, data?.result);
}
}
onCancel && onCancel(true); onCancel && onCancel(true);
}, },
error: () => { error: () => {
......
...@@ -344,9 +344,20 @@ class Model extends React.Component { ...@@ -344,9 +344,20 @@ class Model extends React.Component {
}); });
} }
onImportWordModalCancel = (refresh = false) => { onImportWordModalCancel = (refresh = false, result = '', id = '') => {
const { catalogId } = this.state;
this.setState({ importWordModalVisible: false }); this.setState({ importWordModalVisible: false });
refresh && this.onTableChange(); refresh && this.onTableChange();
if ((result||'')!=='') {
showMessage('info', result);
}
if ((id||'')!=='') {
setTimeout(() => {
window.open(`/data-govern/data-model-action?${Action}=add&${CatalogId}=${catalogId}&${ModelerId}=${id}`);
}, 1000);
}
} }
onExportDDLModalCancel = () => { onExportDDLModalCancel = () => {
......
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