Commit 68b7dfeb by zhaochengxiang

项目视角word导入

parent 4a0b3663
...@@ -557,7 +557,7 @@ class Model extends React.Component { ...@@ -557,7 +557,7 @@ class Model extends React.Component {
} }
onImportModalCancelByWord = (refresh = false, wordData = {}) => { onImportModalCancelByWord = (refresh = false, wordData = {}) => {
const { catalogId } = this.state; const { catalogId, currentView, branchAddModelCatalog } = this.state;
this.setState({ importModalVisible: false }, () => { this.setState({ importModalVisible: false }, () => {
refresh && this.onTableChange(); refresh && this.onTableChange();
...@@ -572,9 +572,16 @@ class Model extends React.Component { ...@@ -572,9 +572,16 @@ class Model extends React.Component {
} }
setTimeout(() => { setTimeout(() => {
let currentCatalogId = '', branchId = ''
if (currentView === 'dir') {
currentCatalogId = catalogId
} else if (currentView === 'branch') {
currentCatalogId = branchAddModelCatalog
branchId = catalogId
}
wordData.content.slice(0, 5).forEach(data => { wordData.content.slice(0, 5).forEach(data => {
window.open(`/data-govern/data-model-action?${Action}=add&${CatalogId}=${catalogId}&${ModelerData}=${encodeURIComponent(JSON.stringify(data))}`, '_blank'); window.open(`/data-govern/data-model-action?${Action}=add&${CatalogId}=${currentCatalogId}&${BranchId}=${branchId}&${ModelerData}=${encodeURIComponent(JSON.stringify(data))}`, '_blank');
}) })
}, 2000); }, 2000);
......
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