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
26cb3ccb
Commit
26cb3ccb
authored
Apr 22, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
0ad48f01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
17 deletions
+6
-17
AttributeRelationModal.jsx
...w/Manage/AssetManage/Component/AttributeRelationModal.jsx
+6
-17
No files found.
src/view/Manage/AssetManage/Component/AttributeRelationModal.jsx
View file @
26cb3ccb
...
@@ -102,7 +102,7 @@ const MetaModelSelect = ({ value = {}, metaModelTreeData = [], onChange, ...rest
...
@@ -102,7 +102,7 @@ const MetaModelSelect = ({ value = {}, metaModelTreeData = [], onChange, ...rest
}
}
const
AttributeRelationWithSourceModel
=
(
props
)
=>
{
const
AttributeRelationWithSourceModel
=
(
props
)
=>
{
const
{
elements
,
sourceModel
,
supportSourceModelsName
,
metadataModelTreeData
,
activeKey
,
onChange
}
=
props
;
const
{
elements
,
sourceModel
,
metadataModelTreeData
,
activeKey
,
onChange
}
=
props
;
console
.
log
(
'sourceModel'
,
sourceModel
)
console
.
log
(
'sourceModel'
,
sourceModel
)
...
@@ -234,21 +234,13 @@ const AttributeRelationWithSourceModel = (props) => {
...
@@ -234,21 +234,13 @@ const AttributeRelationWithSourceModel = (props) => {
<
Form
.
Item
<
Form
.
Item
label=
'来源模型名称'
label=
'来源模型名称'
name=
'sourceModel'
name=
'sourceModel'
rules=
{
[{
required
:
true
,
message
:
'请输入来源名称'
}]
}
rules=
{
[{
required
:
true
,
message
:
'请输入来源
模型
名称'
}]
}
>
>
<
Select
<
TreeSelect
allowClear
placeholder=
'请选择来源模型名称'
placeholder=
'请选择来源模型名称'
disabled=
{
sourceModel
}
treeData=
{
metadataModelTreeData
}
>
allowClear
{
/>
supportSourceModelsName
?.
map
((
name
,
index
)
=>
{
return
<
Select
.
Option
key=
{
index
}
value=
{
name
}
>
{
name
}
</
Select
.
Option
>
})
}
</
Select
>
</
Form
.
Item
>
</
Form
.
Item
>
{
{
(
elements
||
[]).
map
((
element
,
index
)
=>
{
(
elements
||
[]).
map
((
element
,
index
)
=>
{
...
@@ -273,7 +265,6 @@ const AttributeRelationWithSourceModel = (props) => {
...
@@ -273,7 +265,6 @@ const AttributeRelationWithSourceModel = (props) => {
const
AttributeRelationModal
=
(
props
)
=>
{
const
AttributeRelationModal
=
(
props
)
=>
{
const
{
visible
,
type
=
AssetManageReference
,
onCancel
}
=
props
;
const
{
visible
,
type
=
AssetManageReference
,
onCancel
}
=
props
;
const
[
supportSourceModelsName
,
setSupportSourceModelsName
]
=
useState
()
const
[
loadingSourceModels
,
setLoadingSourceModels
]
=
useState
(
false
)
const
[
loadingSourceModels
,
setLoadingSourceModels
]
=
useState
(
false
)
const
[
sourceModels
,
setSourceModels
]
=
useState
()
const
[
sourceModels
,
setSourceModels
]
=
useState
()
const
[
metadataModelTreeData
,
setMetadataModelTreeData
]
=
useState
([]);
const
[
metadataModelTreeData
,
setMetadataModelTreeData
]
=
useState
([]);
...
@@ -335,7 +326,6 @@ const AttributeRelationModal = (props) => {
...
@@ -335,7 +326,6 @@ const AttributeRelationModal = (props) => {
recursion
(
newData
);
recursion
(
newData
);
setSupportSourceModelsName
((
newData
||
[]).
map
(
item
=>
item
.
nodeName
));
setMetadataModelTreeData
(
newData
||
[]);
setMetadataModelTreeData
(
newData
||
[]);
}
}
})
})
...
@@ -390,7 +380,6 @@ const AttributeRelationModal = (props) => {
...
@@ -390,7 +380,6 @@ const AttributeRelationModal = (props) => {
return
<
Tabs
.
TabPane
tab=
{
item
}
key=
{
item
}
>
return
<
Tabs
.
TabPane
tab=
{
item
}
key=
{
item
}
>
<
AttributeRelationWithSourceModel
<
AttributeRelationWithSourceModel
elements=
{
elements
}
elements=
{
elements
}
supportSourceModelsName=
{
supportSourceModelsName
}
metadataModelTreeData=
{
metadataModelTreeData
}
metadataModelTreeData=
{
metadataModelTreeData
}
sourceModel=
{
item
===
AddSourceModelName
?
undefined
:
item
}
sourceModel=
{
item
===
AddSourceModelName
?
undefined
:
item
}
activeKey=
{
activeKey
}
activeKey=
{
activeKey
}
...
...
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