Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaochengxiang
szse
Commits
ed452bed
Commit
ed452bed
authored
Mar 14, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模型详情增加导出
parent
7b2f01f9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
+48
-0
EditModel.jsx
src/view/Manage/Model/Component/EditModel.jsx
+48
-0
No files found.
src/view/Manage/Model/Component/EditModel.jsx
View file @
ed452bed
...
@@ -3,6 +3,7 @@ import { Form, Button, Space, Tooltip, Modal, Select, Input } from 'antd';
...
@@ -3,6 +3,7 @@ import { Form, Button, Space, Tooltip, Modal, Select, Input } from 'antd';
import
LocalStorage
from
'local-storage'
;
import
LocalStorage
from
'local-storage'
;
import
{
useMount
,
useUnmount
}
from
'ahooks'
;
import
{
useMount
,
useUnmount
}
from
'ahooks'
;
import
{
LeftCircleFilled
,
RightCircleFilled
}
from
'@ant-design/icons'
;
import
{
LeftCircleFilled
,
RightCircleFilled
}
from
'@ant-design/icons'
;
import
copy
from
"copy-to-clipboard"
;
import
ImportAction
from
'./ImportAction'
;
import
ImportAction
from
'./ImportAction'
;
import
CatalogModal
from
'./CatalogModal'
;
import
CatalogModal
from
'./CatalogModal'
;
...
@@ -15,6 +16,8 @@ import EditInherited from './EditInherited';
...
@@ -15,6 +16,8 @@ import EditInherited from './EditInherited';
import
{
ImportActionHeaderSubject
}
from
'./ImportActionManage'
;
import
{
ImportActionHeaderSubject
}
from
'./ImportActionManage'
;
import
PermissionButton
from
'../../../../util/Component/PermissionButton'
;
import
PermissionButton
from
'../../../../util/Component/PermissionButton'
;
import
RecatalogModal
from
'./RecatalogModal'
;
import
RecatalogModal
from
'./RecatalogModal'
;
import
ExportModel
from
'./ExportOtherModal'
;
import
ExportDDLModel
from
'./ExportDDLModal'
;
import
'./EditModel.less'
;
import
'./EditModel.less'
;
...
@@ -37,6 +40,12 @@ const EditModel = (props) => {
...
@@ -37,6 +40,12 @@ const EditModel = (props) => {
visible
:
false
,
visible
:
false
,
ids
:
undefined
,
ids
:
undefined
,
})
})
const
[
exportParams
,
setExportParams
]
=
useState
({
visible
:
false
})
const
[
exportDDLParams
,
setExportDDLParams
]
=
useState
({
visible
:
false
,
})
const
actionRef
=
useRef
(
''
);
const
actionRef
=
useRef
(
''
);
const
attrIsEditingRef
=
useRef
(
false
);
const
attrIsEditingRef
=
useRef
(
false
);
...
@@ -336,7 +345,31 @@ const EditModel = (props) => {
...
@@ -336,7 +345,31 @@ const EditModel = (props) => {
}
}
const onExport = () => {
const onExport = () => {
setExportParams({ visible: true })
}
const onExportCancel = (val) => {
setExportParams({ visible: false })
if (val === 'ddl') {
setExportDDLParams({ visible: true })
} else if (val === 'erwin') {
dispatch({
type: 'datamodel.exportERWinString',
payload: {
ids: modelerData?.id,
},
callback: data => {
copy(JSON.stringify(data));
showNotifaction('提示', 'Erwin信息已成功复制到剪贴板', 5);
}
});
} else if (val === 'excel') {
window.open(`
/
api
/
datamodeler
/
easyDataModelerExport
/
excel
?
ids
=
$
{
modelerData
?.
id
}
`);
} else if (val === 'word') {
window.open(`
/
api
/
datamodeler
/
easyDataModelerExport
/
word
/
template
?
ids
=
$
{
modelerData
?.
id
}
`);
} else if (val === 'basicExcel') {
window.open(`
/
api
/
datamodeler
/
easyDataModelerExport
/
modelBaseDataExcel
?
ids
=
$
{
modelerData
?.
id
}
`);
}
}
}
const onChangeCatalog = () => {
const onChangeCatalog = () => {
...
@@ -659,6 +692,21 @@ const EditModel = (props) => {
...
@@ -659,6 +692,21 @@ const EditModel = (props) => {
visible={historyAndVersionDrawerVisible}
visible={historyAndVersionDrawerVisible}
onCancel={onHistoryAndVersionDrawerCancel}
onCancel={onHistoryAndVersionDrawerCancel}
/>
/>
<ExportModel
{...exportParams}
onCancel={onExportCancel}
/>
<ExportDDLModel
{...exportDDLParams}
reference='exportDDL'
ids={[modelerData?.id]}
names={[modelerData?.name]}
onCancel={() => {
setExportDDLParams({
visible: false
})
}}
/>
<EditInherited
<EditInherited
visible={editInheritedParam.visible}
visible={editInheritedParam.visible}
modelerData={editInheritedParam.modelerData}
modelerData={editInheritedParam.modelerData}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment