Commit f90bca90 by zhaochengxiang

模型增加主键 分布键

parent 536dff4a
...@@ -347,20 +347,20 @@ const ImportActionTable = (props) => { ...@@ -347,20 +347,20 @@ const ImportActionTable = (props) => {
title: '序号', title: '序号',
dataIndex: 'key', dataIndex: 'key',
editable: false, editable: false,
width: 80, width: 50,
render: (text, record, index) => { render: (text, record, index) => {
return (index+1).toString(); return (index+1).toString();
} }
}, },
{ {
title: '中文名称', title: '中文名称',
width: 120, width: 100,
dataIndex: 'cnName', dataIndex: 'cnName',
editable: true, editable: true,
}, },
{ {
title: '英文名称', title: '英文名称',
width: 120, width: 100,
dataIndex: 'name', dataIndex: 'name',
editable: true, editable: true,
}, },
...@@ -398,6 +398,36 @@ const ImportActionTable = (props) => { ...@@ -398,6 +398,36 @@ const ImportActionTable = (props) => {
} }
}, },
{ {
title: '主键',
width: 50,
dataIndex: 'partOfPrimaryKey',
editable: true,
render: (partOfPrimaryKey, record, index) => {
if (partOfPrimaryKey === false) {
return '否';
} else if (partOfPrimaryKey === true) {
return '是';
}
return '';
}
},
{
title: '分布键',
width: 50,
dataIndex: 'partOfDistributionKey',
editable: true,
render: (partOfDistributionKey, record, index) => {
if (partOfDistributionKey === false) {
return '否';
} else if (partOfDistributionKey === true) {
return '是';
}
return '';
}
},
{
title: '描述', title: '描述',
dataIndex: 'remark', dataIndex: 'remark',
editable: true, editable: true,
...@@ -517,7 +547,7 @@ const ImportActionTable = (props) => { ...@@ -517,7 +547,7 @@ const ImportActionTable = (props) => {
onCell: (record) => ({ onCell: (record) => ({
record, record,
dataIndex: col.dataIndex, dataIndex: col.dataIndex,
inputType: col.dataIndex==='nullable' ? 'check' : 'text', inputType: (col.dataIndex==='nullable' || col.dataIndex==='partOfDistributionKey' || col.dataIndex==='partOfPrimaryKey') ? 'check' : 'text',
title: col.title, title: col.title,
editing: isEditing(record), editing: isEditing(record),
datatypes: supportedDatatypes, 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