Commit 35769227 by zhaochengxiang

主键逻辑

parent afa1e503
...@@ -388,8 +388,16 @@ const ImportActionTable = (props) => { ...@@ -388,8 +388,16 @@ const ImportActionTable = (props) => {
setEnglishSuggests(data||[]); setEnglishSuggests(data||[]);
} }
}) })
} } else if(changedValues.hasOwnProperty('nullable') ) {
if (changedValues.nullable && allValues.partOfPrimaryKey) {
form.setFields([{ name: 'partOfPrimaryKey', errors: ['必须不勾选主键'] }]);
}
} else if (changedValues.hasOwnProperty('partOfDistributionKey')) {
if (changedValues.partOfDistributionKey && !allValues.partOfPrimaryKey) {
form.setFields([{ name: 'partOfPrimaryKey', errors: ['必须勾选主键'] }]);
}
}
if (allValues.partOfPrimaryKey) { if (allValues.partOfPrimaryKey) {
form.setFieldsValue({ form.setFieldsValue({
nullable: false nullable: false
...@@ -399,6 +407,7 @@ const ImportActionTable = (props) => { ...@@ -399,6 +407,7 @@ const ImportActionTable = (props) => {
partOfDistributionKey: false partOfDistributionKey: false
}) })
} }
}; };
const onSuggestChange = (e) => { const onSuggestChange = (e) => {
......
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