Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaochengxiang
szse
Commits
a816d820
Commit
a816d820
authored
Jan 26, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nullable改为not null
parent
47722fe4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
25 deletions
+21
-25
ImportActionTable.jsx
src/view/Manage/Model/Component/ImportActionTable.jsx
+21
-25
No files found.
src/view/Manage/Model/Component/ImportActionTable.jsx
View file @
a816d820
...
@@ -481,6 +481,12 @@ const ImportActionTable = (props) => {
...
@@ -481,6 +481,12 @@ const ImportActionTable = (props) => {
}
}
})
})
if
(
!
row
.
notNull
)
{
row
.
nullable
=
true
;
}
else
{
row
.
nullable
=
false
;
}
const
newData
=
[...
data
];
const
newData
=
[...
data
];
const
index
=
newData
.
findIndex
((
item
)
=>
editingKey
===
item
.
iid
);
const
index
=
newData
.
findIndex
((
item
)
=>
editingKey
===
item
.
iid
);
...
@@ -623,15 +629,15 @@ const ImportActionTable = (props) => {
...
@@ -623,15 +629,15 @@ const ImportActionTable = (props) => {
getSuggest
();
getSuggest
();
}
}
}
else
if
(
changedValues
.
hasOwnProperty
(
'n
ullable
'
)
)
{
}
else
if
(
changedValues
.
hasOwnProperty
(
'n
otNull
'
)
)
{
if
(
changedValues
.
nullable
&&
ownPrimaryKey
)
{
if
(
!
changedValues
.
notNull
&&
ownPrimaryKey
)
{
showMessage
(
'info'
,
'主键不允许为空'
);
showMessage
(
'info'
,
'主键不允许为空'
);
}
}
}
}
if
(
ownPrimaryKey
)
{
if
(
ownPrimaryKey
)
{
form
.
setFieldsValue
({
form
.
setFieldsValue
({
n
ullable
:
fals
e
n
otNull
:
tru
e
});
});
}
}
...
@@ -716,16 +722,14 @@ const ImportActionTable = (props) => {
...
@@ -716,16 +722,14 @@ const ImportActionTable = (props) => {
}
}
},
},
{
{
title: 'N
ull?
',
title: 'N
ot Null
',
width:
5
0,
width:
7
0,
dataIndex: 'n
ullable
',
dataIndex: 'n
otNull
',
editable: (type==='model'?true:false),
editable: (type==='model'?true:false),
render: (nullable, record, index) => {
render: (notNull, record, index) => {
if (!nullable) {
if (!notNull) {
return (
return '-';
<CloseOutlined />
} else if (notNull) {
);
} else if (nullable === true) {
return (
return (
<CheckOutlined />
<CheckOutlined />
)
)
...
@@ -741,9 +745,7 @@ const ImportActionTable = (props) => {
...
@@ -741,9 +745,7 @@ const ImportActionTable = (props) => {
editable: (type==='model'?true:false),
editable: (type==='model'?true:false),
render: (partOfPrimaryKeyLogically, record, index) => {
render: (partOfPrimaryKeyLogically, record, index) => {
if (!partOfPrimaryKeyLogically) {
if (!partOfPrimaryKeyLogically) {
return (
return '-';
<CloseOutlined />
);
} else if (partOfPrimaryKeyLogically === true) {
} else if (partOfPrimaryKeyLogically === true) {
return (
return (
<CheckOutlined />
<CheckOutlined />
...
@@ -760,9 +762,7 @@ const ImportActionTable = (props) => {
...
@@ -760,9 +762,7 @@ const ImportActionTable = (props) => {
// editable: (type==='model'?true:false),
// editable: (type==='model'?true:false),
// render: (partOfDistributionKey, record, index) => {
// render: (partOfDistributionKey, record, index) => {
// if (!partOfDistributionKey) {
// if (!partOfDistributionKey) {
// return (
// return '-';
// <CloseOutlined />
// );
// } else if (partOfDistributionKey === true) {
// } else if (partOfDistributionKey === true) {
// return (
// return (
// <CheckOutlined />
// <CheckOutlined />
...
@@ -779,9 +779,7 @@ const ImportActionTable = (props) => {
...
@@ -779,9 +779,7 @@ const ImportActionTable = (props) => {
editable: (type==='model'?true:false),
editable: (type==='model'?true:false),
render: (foreignKey, record, index) => {
render: (foreignKey, record, index) => {
if (!foreignKey) {
if (!foreignKey) {
return (
return '-';
<CloseOutlined />
);
} else if (foreignKey === true) {
} else if (foreignKey === true) {
return (
return (
<CheckOutlined />
<CheckOutlined />
...
@@ -798,9 +796,7 @@ const ImportActionTable = (props) => {
...
@@ -798,9 +796,7 @@ const ImportActionTable = (props) => {
editable: (type==='model'?true:false),
editable: (type==='model'?true:false),
render: (needAttention, record, index) => {
render: (needAttention, record, index) => {
if (!needAttention) {
if (!needAttention) {
return (
return '-';
<CloseOutlined />
);
} else if (needAttention === true) {
} else if (needAttention === true) {
return (
return (
<CheckOutlined />
<CheckOutlined />
...
@@ -1047,7 +1043,7 @@ const ImportActionTable = (props) => {
...
@@ -1047,7 +1043,7 @@ const ImportActionTable = (props) => {
onCell: (record) => ({
onCell: (record) => ({
record,
record,
dataIndex: col.dataIndex,
dataIndex: col.dataIndex,
inputType: (col.dataIndex==='n
ullable
' || col.dataIndex==='partOfDistributionKey' || col.dataIndex==='partOfPrimaryKeyLogically' || col.dataIndex==='needAttention' || col.dataIndex==='foreignKey') ? 'check' : 'text',
inputType: (col.dataIndex==='n
otNull
' || col.dataIndex==='partOfDistributionKey' || col.dataIndex==='partOfPrimaryKeyLogically' || col.dataIndex==='needAttention' || col.dataIndex==='foreignKey') ? 'check' : 'text',
colTitle: col.title,
colTitle: col.title,
editing: isEditing(record),
editing: isEditing(record),
datatypes: supportedDatatypes,
datatypes: supportedDatatypes,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment