Commit 667149d0 by zhaochengxiang

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

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