Commit 04d1dfff by zhaochengxiang

主键逻辑

parent 35769227
...@@ -5,7 +5,7 @@ import { DndProvider, useDrag, useDrop } from 'react-dnd'; ...@@ -5,7 +5,7 @@ import { DndProvider, useDrag, useDrop } from 'react-dnd';
import { HTML5Backend } from 'react-dnd-html5-backend'; import { HTML5Backend } from 'react-dnd-html5-backend';
import update from 'immutability-helper'; import update from 'immutability-helper';
import { generateUUID, highlightSearchContentByTerms } from '../../../../util'; import { generateUUID, highlightSearchContentByTerms, showMessage } from '../../../../util';
import { dispatchLatest } from '../../../../model'; import { dispatchLatest } from '../../../../model';
import './ImportActionTable.less'; import './ImportActionTable.less';
...@@ -390,11 +390,11 @@ const ImportActionTable = (props) => { ...@@ -390,11 +390,11 @@ const ImportActionTable = (props) => {
}) })
} else if(changedValues.hasOwnProperty('nullable') ) { } else if(changedValues.hasOwnProperty('nullable') ) {
if (changedValues.nullable && allValues.partOfPrimaryKey) { if (changedValues.nullable && allValues.partOfPrimaryKey) {
form.setFields([{ name: 'partOfPrimaryKey', errors: ['必须不勾选主键'] }]); showMessage('info', '主键不允许为空');
} }
} else if (changedValues.hasOwnProperty('partOfDistributionKey')) { } else if (changedValues.hasOwnProperty('partOfDistributionKey')) {
if (changedValues.partOfDistributionKey && !allValues.partOfPrimaryKey) { if (changedValues.partOfDistributionKey && !allValues.partOfPrimaryKey) {
form.setFields([{ name: 'partOfPrimaryKey', errors: ['必须勾选主键'] }]); showMessage('info', '分布键必须是主键的子集');
} }
} }
......
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