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
afed889e
Commit
afed889e
authored
Mar 30, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
展示完整的业务含义
parent
89763115
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
41 deletions
+42
-41
ImportActionTable.jsx
src/view/Manage/Model/Component/ImportActionTable.jsx
+42
-41
No files found.
src/view/Manage/Model/Component/ImportActionTable.jsx
View file @
afed889e
...
...
@@ -167,47 +167,33 @@ export const EditableCell = ({
let
editingComponent
=
null
;
if
(
editing
)
{
if
(
dataIndex
!==
'datatype'
)
{
const
inputNode
=
inputType
===
'check'
?
<
Checkbox
/>
:
<
InputDebounce
/>
editingComponent
=
(
<
Form
.
Item
name=
{
dataIndex
}
style=
{
{
margin
:
0
,
}
}
valuePropName=
{
(
inputType
===
'check'
)?
'checked'
:
'value'
}
rules=
{
[
{
required
:
(
require
===
null
)?
false
:
require
,
message
:
`请输入${colTitle}!`
,
},
]
}
>
{
inputNode
}
</
Form
.
Item
>
);
}
else
{
editingComponent
=
(
<
Form
.
Item
name=
{
dataIndex
}
style=
{
{
margin
:
0
,
}
}
valuePropName=
{
'value'
}
rules=
{
[
{
required
:
(
require
===
null
)?
false
:
require
,
message
:
`请输入${colTitle}!`
,
},
]
}
>
<
DatatypeInput
datatypes=
{
datatypes
}
/>
</
Form
.
Item
>
)
let
inputNode
=
<
InputDebounce
/>;
if
(
inputType
===
'check'
)
{
inputNode
=
<
Checkbox
/>;
}
else
if
(
inputType
===
'textarea'
)
{
inputNode
=
<
Input
.
TextArea
autoSize=
{
{
minRows
:
1
,
maxRows
:
6
}
}
/>;
}
else
if
(
inputType
===
'datatype'
)
{
inputNode
=
<
DatatypeInput
datatypes=
{
datatypes
}
/>;
}
editingComponent
=
(
<
Form
.
Item
name=
{
dataIndex
}
style=
{
{
margin
:
0
,
}
}
valuePropName=
{
(
inputType
===
'check'
)?
'checked'
:
'value'
}
rules=
{
[
{
required
:
(
require
===
null
)?
false
:
require
,
message
:
`请输入${colTitle}!`
,
},
]
}
>
{
inputNode
}
</
Form
.
Item
>
);
}
...
...
@@ -1120,13 +1106,28 @@ export const ImportActionTable = (props) => {
if (!col.editable) {
return col;
}
let inputType = 'text';
if (
col.dataIndex==='notNull'||
col.dataIndex==='partOfDistributionKey' ||
col.dataIndex==='partOfPrimaryKeyLogically' ||
col.dataIndex==='needAttention' ||
col.dataIndex==='foreignKey'
) {
inputType = 'check';
} else if (col.dataIndex === 'remark') {
inputType = 'textarea';
} else if (col.dataIndex === 'datatype') {
inputType = 'datatype';
}
return {
...col,
onCell: (record) => ({
record,
dataIndex: col.dataIndex,
inputType
: (col.dataIndex==='notNull' || col.dataIndex==='partOfDistributionKey' || col.dataIndex==='partOfPrimaryKeyLogically' || col.dataIndex==='needAttention' || col.dataIndex==='foreignKey') ? 'check' : 'text'
,
inputType,
colTitle: col.title,
editing: isEditing(record),
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