Commit a816d820 by zhaochengxiang

nullable改为not null

parent 47722fe4
......@@ -481,6 +481,12 @@ const ImportActionTable = (props) => {
}
})
if (!row.notNull) {
row.nullable = true;
} else {
row.nullable = false;
}
const newData = [...data];
const index = newData.findIndex((item) => editingKey === item.iid);
......@@ -623,15 +629,15 @@ const ImportActionTable = (props) => {
getSuggest();
}
} else if(changedValues.hasOwnProperty('nullable') ) {
if (changedValues.nullable && ownPrimaryKey) {
} else if(changedValues.hasOwnProperty('notNull') ) {
if (!changedValues.notNull && ownPrimaryKey) {
showMessage('info', '主键不允许为空');
}
}
if (ownPrimaryKey) {
form.setFieldsValue({
nullable: false
notNull: true
});
}
......@@ -716,16 +722,14 @@ const ImportActionTable = (props) => {
}
},
{
title: 'Null?',
width: 50,
dataIndex: 'nullable',
title: 'Not Null',
width: 70,
dataIndex: 'notNull',
editable: (type==='model'?true:false),
render: (nullable, record, index) => {
if (!nullable) {
return (
<CloseOutlined />
);
} else if (nullable === true) {
render: (notNull, record, index) => {
if (!notNull) {
return '-';
} else if (notNull) {
return (
<CheckOutlined />
)
......@@ -741,9 +745,7 @@ const ImportActionTable = (props) => {
editable: (type==='model'?true:false),
render: (partOfPrimaryKeyLogically, record, index) => {
if (!partOfPrimaryKeyLogically) {
return (
<CloseOutlined />
);
return '-';
} else if (partOfPrimaryKeyLogically === true) {
return (
<CheckOutlined />
......@@ -760,9 +762,7 @@ const ImportActionTable = (props) => {
// editable: (type==='model'?true:false),
// render: (partOfDistributionKey, record, index) => {
// if (!partOfDistributionKey) {
// return (
// <CloseOutlined />
// );
// return '-';
// } else if (partOfDistributionKey === true) {
// return (
// <CheckOutlined />
......@@ -779,9 +779,7 @@ const ImportActionTable = (props) => {
editable: (type==='model'?true:false),
render: (foreignKey, record, index) => {
if (!foreignKey) {
return (
<CloseOutlined />
);
return '-';
} else if (foreignKey === true) {
return (
<CheckOutlined />
......@@ -798,9 +796,7 @@ const ImportActionTable = (props) => {
editable: (type==='model'?true:false),
render: (needAttention, record, index) => {
if (!needAttention) {
return (
<CloseOutlined />
);
return '-';
} else if (needAttention === true) {
return (
<CheckOutlined />
......@@ -1047,7 +1043,7 @@ const ImportActionTable = (props) => {
onCell: (record) => ({
record,
dataIndex: col.dataIndex,
inputType: (col.dataIndex==='nullable' || col.dataIndex==='partOfDistributionKey' || col.dataIndex==='partOfPrimaryKeyLogically' || col.dataIndex==='needAttention' || col.dataIndex==='foreignKey') ? 'check' : 'text',
inputType: (col.dataIndex==='notNull' || col.dataIndex==='partOfDistributionKey' || col.dataIndex==='partOfPrimaryKeyLogically' || col.dataIndex==='needAttention' || col.dataIndex==='foreignKey') ? 'check' : 'text',
colTitle: col.title,
editing: isEditing(record),
datatypes: supportedDatatypes,
......
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