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
156b720a
Commit
156b720a
authored
Nov 11, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分区内容回填到表头
parent
8ee9f26c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
22 deletions
+36
-22
ImportAction.jsx
src/view/Manage/Model/Component/ImportAction.jsx
+13
-0
ImportActionHeader.jsx
src/view/Manage/Model/Component/ImportActionHeader.jsx
+4
-2
ImportActionPartition.jsx
src/view/Manage/Model/Component/ImportActionPartition.jsx
+0
-1
ImportActionTable.jsx
src/view/Manage/Model/Component/ImportActionTable.jsx
+19
-19
No files found.
src/view/Manage/Model/Component/ImportAction.jsx
View file @
156b720a
...
...
@@ -309,6 +309,19 @@ const ImportAction = (props) => {
const
onPartitionChange
=
(
data
,
validate
=
false
)
=>
{
const
newModelerData
=
{...
modelerData
,
partition
:
data
};
//数据表分区内容回填到基本信息分区键中
let
newPartitionDesc
=
''
;
(
data
?.
keys
||
[]).
forEach
((
item
,
index
)
=>
{
if
(
index
>
0
)
{
newPartitionDesc
+=
','
}
newPartitionDesc
+=
item
.
name
||
''
;
})
newPartitionDesc
+=
'/'
+
data
?.
partitionType
?.
name
||
''
;
newModelerData
.
partitionsDescription
=
newPartitionDesc
;
setModelerData
(
newModelerData
);
onChange
&&
onChange
(
newModelerData
);
...
...
src/view/Manage/Model/Component/ImportActionHeader.jsx
View file @
156b720a
...
...
@@ -34,7 +34,7 @@ const TemplateSelect = ({ value = {}, templates = [], onChange, ...restProps })
return
(
<
Select
onChange=
{
onChange
}
value=
{
value
.
name
||
''
}
value=
{
value
?
.
name
||
''
}
placeholder=
'请选择生成表类型'
allowClear
{
...
restProps
}
...
...
@@ -82,7 +82,9 @@ const ImportActionHeader = (props) => {
useEffect
(()
=>
{
setAutoTranslate
((
modelerData
.
name
||
''
)
===
''
);
if
(
modelerData
)
{
form
.
setFieldsValue
(
modelerData
);
}
},
[
modelerData
])
const
formItemLayout
=
{
...
...
src/view/Manage/Model/Component/ImportActionPartition.jsx
View file @
156b720a
...
...
@@ -414,7 +414,6 @@ const ImportActionPartition = (props) => {
dataSource=
{
data
?[
data
]:[]
}
columns=
{
mergedColumns
()
}
size=
'small'
rowKey=
'name'
rowClassName=
"editable-row"
pagination=
{
false
}
sticky
...
...
src/view/Manage/Model/Component/ImportActionTable.jsx
View file @
156b720a
...
...
@@ -617,25 +617,25 @@ const ImportActionTable = (props) => {
return '';
}
},
//
{
//
title: '分布键',
//
width: 60,
//
dataIndex: 'partOfDistributionKey',
//
editable: (type==='model'?true:false),
//
render: (partOfDistributionKey, record, index) => {
//
if (!partOfDistributionKey) {
//
return (
//
<CloseOutlined />
//
);
//
} else if (partOfDistributionKey === true) {
//
return (
//
<CheckOutlined />
//
)
//
}
//
return '';
//
}
//
},
{
title: '分布键',
width: 60,
dataIndex: 'partOfDistributionKey',
editable: (type==='model'?true:false),
render: (partOfDistributionKey, record, index) => {
if (!partOfDistributionKey) {
return (
<CloseOutlined />
);
} else if (partOfDistributionKey === true) {
return (
<CheckOutlined />
)
}
return '';
}
},
{
title: '外键',
width: 50,
...
...
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