Commit 667149d0 by zhaochengxiang

模版不许云编辑可否为空 主键 分布键

parent 44a31086
......@@ -219,7 +219,7 @@ const DragableBodyRow = ({ index, moveRow, className, style, ...restProps }) =>
};
const ImportActionTable = (props) => {
const { modelerData, onChange, editable, supportedDatatypes, constraint, template, validateReports } = props;
const { modelerData, onChange, editable, supportedDatatypes, constraint, template, validateReports, type = 'model' } = props;
const [ data, setData ] = useState([]);
const [ form ] = Form.useForm();
......@@ -470,7 +470,7 @@ const ImportActionTable = (props) => {
title: '可否为空',
width: 80,
dataIndex: 'nullable',
editable: true,
editable: (type==='model'?true:false),
render: (nullable, record, index) => {
if (!nullable) {
return (
......@@ -489,7 +489,7 @@ const ImportActionTable = (props) => {
title: '主键',
width: 80,
dataIndex: 'partOfPrimaryKey',
editable: true,
editable: (type==='model'?true:false),
render: (partOfPrimaryKey, record, index) => {
if (!partOfPrimaryKey) {
return (
......@@ -508,7 +508,7 @@ const ImportActionTable = (props) => {
title: '分布键',
width: 80,
dataIndex: 'partOfDistributionKey',
editable: true,
editable: (type==='model'?true:false),
render: (partOfDistributionKey, record, index) => {
if (!partOfDistributionKey) {
return (
......
......@@ -80,6 +80,7 @@ const TemplateAction = (props) => {
templateData={templateData||{}}
/>
<ImportActionTable
type='template'
modelerData={templateData||{}}
supportedDatatypes={supportedDatatypes}
onChange={onTableChange}
......
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