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
ef15b222
Commit
ef15b222
authored
Jan 25, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
确保各种键类和字段一致
parent
e6be7c01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
25 deletions
+27
-25
ImportAction.jsx
src/view/Manage/Model/Component/ImportAction.jsx
+27
-25
No files found.
src/view/Manage/Model/Component/ImportAction.jsx
View file @
ef15b222
...
...
@@ -128,7 +128,7 @@ const ImportAction = (props) => {
},
callback
:
data
=>
{
let
newModelerData
=
{...(
data
||
{})};
newModelerData
=
{
...
newModelerData
,
...
get
AllNewKeysAfterTableChange
(
newModelerData
)
};
newModelerData
=
{
...
newModelerData
,
...
get
ConsistentKeys
(
newModelerData
)
};
setModelerData
(
newModelerData
);
modelerDataRef
.
current
=
newModelerData
;
...
...
@@ -193,36 +193,38 @@ const ImportAction = (props) => {
}
const
getExtraData
=
(
data
)
=>
{
setModelerData
(
data
||
{});
modelerDataRef
.
current
=
data
||
{};
const
newModelerData
=
{
...(
data
||
{}),
...
getConsistentKeys
(
data
||
{})
};
setConstraint
(
data
.
easyDataModelerModelingConstraint
||
{});
setTemplate
(
data
.
easyDataModelerModelingTemplate
||
{});
onChange
&&
onChange
(
data
||
{});
setModelerData
(
newModelerData
||
{});
modelerDataRef
.
current
=
newModelerData
||
{};
setConstraint
(
newModelerData
.
easyDataModelerModelingConstraint
||
{});
setTemplate
(
newModelerData
.
easyDataModelerModelingTemplate
||
{});
onChange
&&
onChange
(
newModelerData
||
{});
getSupportedDatatypes
();
getSupportedPartitionTypes
();
if
(
d
ata
)
{
if
(
newModelerD
ata
)
{
form
.
setFieldsValue
({
cnName
:
d
ata
.
cnName
||
''
,
name
:
d
ata
.
name
||
''
,
remark
:
d
ata
.
remark
||
''
,
easyDataModelerModelingConstraint
:
d
ata
.
easyDataModelerModelingConstraint
||
''
,
easyDataModelerModelingTemplate
:
d
ata
.
easyDataModelerModelingTemplate
||
''
,
dataResidence
:
d
ata
.
dataResidence
||
''
,
tableType
:
d
ata
.
tableType
||
''
,
dataUpdatingTiming
:
d
ata
.
dataUpdatingTiming
||
''
,
maintenanceRecords
:
d
ata
.
maintenanceRecords
||
''
,
dataLoadingStrategy
:
d
ata
.
dataLoadingStrategy
||
''
,
primaryKeysDescription
:
d
ata
.
primaryKeysDescription
||
''
,
distributionKeysDescription
:
d
ata
.
distributionKeysDescription
||
''
,
dataCircumstances
:
d
ata
.
dataCircumstances
||
''
,
partitionsDescription
:
d
ata
.
partitionsDescription
||
''
,
semiPrimaryKeysDescription
:
d
ata
.
semiPrimaryKeysDescription
||
''
,
cnName
:
newModelerD
ata
.
cnName
||
''
,
name
:
newModelerD
ata
.
name
||
''
,
remark
:
newModelerD
ata
.
remark
||
''
,
easyDataModelerModelingConstraint
:
newModelerD
ata
.
easyDataModelerModelingConstraint
||
''
,
easyDataModelerModelingTemplate
:
newModelerD
ata
.
easyDataModelerModelingTemplate
||
''
,
dataResidence
:
newModelerD
ata
.
dataResidence
||
''
,
tableType
:
newModelerD
ata
.
tableType
||
''
,
dataUpdatingTiming
:
newModelerD
ata
.
dataUpdatingTiming
||
''
,
maintenanceRecords
:
newModelerD
ata
.
maintenanceRecords
||
''
,
dataLoadingStrategy
:
newModelerD
ata
.
dataLoadingStrategy
||
''
,
primaryKeysDescription
:
newModelerD
ata
.
primaryKeysDescription
||
''
,
distributionKeysDescription
:
newModelerD
ata
.
distributionKeysDescription
||
''
,
dataCircumstances
:
newModelerD
ata
.
dataCircumstances
||
''
,
partitionsDescription
:
newModelerD
ata
.
partitionsDescription
||
''
,
semiPrimaryKeysDescription
:
newModelerD
ata
.
semiPrimaryKeysDescription
||
''
,
});
}
validateDataModel
(
d
ata
||
{});
validateDataModel
(
newModelerD
ata
||
{});
}
const
onConstraintChange
=
(
value
)
=>
{
...
...
@@ -331,7 +333,7 @@ const ImportAction = (props) => {
let
newModelerData
=
{...
modelerDataRef
.
current
,
...{
easyDataModelerDataModelAttributes
:
data
}};
newModelerData
=
{
...
newModelerData
,
...
get
AllNewKeysAfterTableChange
(
newModelerData
)
};
newModelerData
=
{
...
newModelerData
,
...
get
ConsistentKeys
(
newModelerData
)
};
setModelerData
(
newModelerData
);
modelerDataRef
.
current
=
newModelerData
;
...
...
@@ -371,7 +373,7 @@ const ImportAction = (props) => {
}
}
const
get
AllNewKeysAfterTableChange
=
(
newModelerData
)
=>
{
const
get
ConsistentKeys
=
(
newModelerData
)
=>
{
//分布键
let
newDistribution
=
[];
...
...
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