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
677a2185
Commit
677a2185
authored
Nov 30, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
关联对象
parent
4eabd5e5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
92 additions
and
1 deletion
+92
-1
ImportAction.jsx
src/view/Manage/Model/Component/ImportAction.jsx
+6
-1
ImportActionRelation.jsx
src/view/Manage/Model/Component/ImportActionRelation.jsx
+86
-0
No files found.
src/view/Manage/Model/Component/ImportAction.jsx
View file @
677a2185
...
@@ -7,6 +7,7 @@ import ImportActionInherited from './ImportActionInherited';
...
@@ -7,6 +7,7 @@ import ImportActionInherited from './ImportActionInherited';
import
{
ImportActionTable
}
from
'./ImportActionTable'
;
import
{
ImportActionTable
}
from
'./ImportActionTable'
;
import
ImportActionIndex
from
'./ImportActionIndex'
;
import
ImportActionIndex
from
'./ImportActionIndex'
;
import
ImportActionManage
from
'./ImportActionManage'
;
import
ImportActionManage
from
'./ImportActionManage'
;
import
ImportActionRelation
from
'./ImportActionRelation'
;
import
{
getInternalCurrentAnchor
,
getQueryParam
}
from
'../../../../util'
;
import
{
getInternalCurrentAnchor
,
getQueryParam
}
from
'../../../../util'
;
import
{
Action
}
from
'../../../../util/constant'
;
import
{
Action
}
from
'../../../../util/constant'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
dispatch
}
from
'../../../../model'
;
...
@@ -133,6 +134,7 @@ const ImportAction = React.forwardRef((props, ref) => {
...
@@ -133,6 +134,7 @@ const ImportAction = React.forwardRef((props, ref) => {
'model-import-action-table'
,
'model-import-action-table'
,
'model-import-action-index'
,
'model-import-action-index'
,
'model-import-action-manage'
,
'model-import-action-manage'
,
'model-import-action-relation'
,
],
],
0
,
0
,
5
,
5
,
...
@@ -591,6 +593,7 @@ const ImportAction = React.forwardRef((props, ref) => {
...
@@ -591,6 +593,7 @@ const ImportAction = React.forwardRef((props, ref) => {
<Tabs.TabPane tab='数据表结构' key="model-import-action-table" />
<Tabs.TabPane tab='数据表结构' key="model-import-action-table" />
<Tabs.TabPane tab='数据表索引' key="model-import-action-index" />
<Tabs.TabPane tab='数据表索引' key="model-import-action-index" />
<Tabs.TabPane tab='管理信息' key="model-import-action-manage" />
<Tabs.TabPane tab='管理信息' key="model-import-action-manage" />
<Tabs.TabPane tab='关联对象' key="model-import-action-relation" />
</Tabs>
</Tabs>
</div>
</div>
<div ref={setContainer} style={{ height: action==='edit-inherite-modal'?'60vh':'calc(100vh - 44px - 64px - 82px)', overflow: 'auto', padding: '0 20px' }}>
<div ref={setContainer} style={{ height: action==='edit-inherite-modal'?'60vh':'calc(100vh - 44px - 64px - 82px)', overflow: 'auto', padding: '0 20px' }}>
...
@@ -607,7 +610,6 @@ const ImportAction = React.forwardRef((props, ref) => {
...
@@ -607,7 +610,6 @@ const ImportAction = React.forwardRef((props, ref) => {
terms={terms}
terms={terms}
supportedPartitionTypes={supportedPartitionTypes}
supportedPartitionTypes={supportedPartitionTypes}
/>
/>
<ImportActionInherited modelerData={modelerData} action={action} />
<ImportActionTable
<ImportActionTable
modelerData={modelerData||{}}
modelerData={modelerData||{}}
constraint={constraint}
constraint={constraint}
...
@@ -635,6 +637,9 @@ const ImportAction = React.forwardRef((props, ref) => {
...
@@ -635,6 +637,9 @@ const ImportAction = React.forwardRef((props, ref) => {
modelerData={modelerData||{}}
modelerData={modelerData||{}}
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'&&action!=='edit-inherited'}
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'&&action!=='edit-inherited'}
/>
/>
<ImportActionRelation
modelerData={modelerData} action={action}
/>
</div>
</div>
</div>
</div>
}
}
...
...
src/view/Manage/Model/Component/ImportActionRelation.jsx
0 → 100644
View file @
677a2185
import
React
from
"react"
import
{
Button
,
Descriptions
,
Space
,
Popover
}
from
"antd"
import
{
DownOutlined
,
UpOutlined
,
QuestionCircleOutlined
}
from
'@ant-design/icons'
import
{
Action
,
ModelerId
,
PermitCheckOut
,
Editable
,
StateId
,
Holder
,
ReadOnly
}
from
'../../../../util/constant'
const
FC
=
(
props
)
=>
{
const
{
modelerData
,
action
}
=
props
const
[
isCollapse
,
setCollapse
]
=
React
.
useState
(
true
)
const
[
relationModelerDatas
,
setRelationModelerDatas
]
=
React
.
useState
([])
React
.
useEffect
(()
=>
{
if
(
modelerData
?.
inheritedFromEasyDataModelerDataModel
)
{
const
newRelationModelerDatas
=
[];
newRelationModelerDatas
.
push
(
modelerData
?.
inheritedFromEasyDataModelerDataModel
);
if
(
modelerData
?.
otherEasyDataModelerDataModelsInheritedFromSameOrigin
)
{
Object
.
keys
(
modelerData
.
otherEasyDataModelerDataModelsInheritedFromSameOrigin
).
forEach
(
key
=>
{
newRelationModelerDatas
.
push
(
modelerData
.
otherEasyDataModelerDataModelsInheritedFromSameOrigin
[
key
]);
})
}
setRelationModelerDatas
(
newRelationModelerDatas
);
}
else
{
const
newRelationModelerDatas
=
[];
if
(
modelerData
?.
inheritedEasyDataModelerDataModels
?.
historical
)
{
newRelationModelerDatas
.
push
(
modelerData
?.
inheritedEasyDataModelerDataModels
?.
historical
);
}
if
(
modelerData
?.
inheritedEasyDataModelerDataModels
?.
zipper
)
{
newRelationModelerDatas
.
push
(
modelerData
?.
inheritedEasyDataModelerDataModels
?.
zipper
);
}
setRelationModelerDatas
(
newRelationModelerDatas
);
}
//eslint-disable-next-line react-hooks/exhaustive-deps
},
[
modelerData
])
return
(
<
div
>
<
div
className=
'model-import-action-relation mb-3'
>
<
Space
>
<
h3
style=
{
{
marginBottom
:
0
}
}
>
关联对象
</
h3
>
{
action
===
'add'
&&
<
Popover
content=
'保存当前模型后方可选择历史存储形式'
>
<
QuestionCircleOutlined
className=
'pointer'
/>
</
Popover
>
}
{
isCollapse
?
<
Button
type=
'primary'
size=
'small'
onClick=
{
()
=>
{
setCollapse
(
!
isCollapse
)
}
}
>
展开
<
DownOutlined
/></
Button
>
:
<
Button
type=
'primary'
size=
'small'
onClick=
{
()
=>
{
setCollapse
(
!
isCollapse
)
}
}
>
收起
<
UpOutlined
/></
Button
>
}
</
Space
>
</
div
>
{
!
isCollapse
&&
<
Descriptions
column=
{
3
}
>
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
100
}
}
>
历史存储形式
</
div
>
}
>
<
span
>
{
relationModelerDatas
?.
length
===
0
?
'暂无信息'
:
relationModelerDatas
?.
map
((
item
,
index
)
=>
(
<
a
className=
'mr-3'
key=
{
index
}
onClick=
{
()
=>
{
window
.
open
(
`/data-govern/data-model-action?${Action}=detail&${ModelerId}=${item.id}&${PermitCheckOut}=${item.permitCheckOut||false}&${Editable}=${item.editable||false}&${StateId}=${item.state?.id||''}&${Holder}=${item.holder||''}&${ReadOnly}=false`
);
}
}
>
{
item
.
cnName
}
</
a
>
))
}
</
span
>
</
Descriptions
.
Item
>
</
Descriptions
>
}
</
div
>
)
}
export
default
FC
\ No newline at end of file
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