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
44a31086
Commit
44a31086
authored
May 12, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模型调整
parent
7cb07f96
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
17 deletions
+56
-17
ImportActionIndex.jsx
src/view/Manage/Model/Component/ImportActionIndex.jsx
+13
-3
ImportActionTable.jsx
src/view/Manage/Model/Component/ImportActionTable.jsx
+43
-14
No files found.
src/view/Manage/Model/Component/ImportActionIndex.jsx
View file @
44a31086
import
React
,
{
useState
,
useCallback
,
useRef
,
useEffect
}
from
'react'
;
import
{
Table
,
Input
,
Form
,
Typography
,
Divider
,
Button
,
Select
,
Row
,
Col
,
Popover
,
Checkbox
,
Tooltip
}
from
'antd'
;
import
{
QuestionCircleOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
;
import
{
QuestionCircleOutlined
,
DeleteOutlined
,
CloseOutlined
,
CheckOutlined
}
from
'@ant-design/icons'
;
import
{
DndProvider
,
useDrag
,
useDrop
}
from
'react-dnd'
;
import
{
HTML5Backend
}
from
'react-dnd-html5-backend'
;
import
update
from
'immutability-helper'
;
...
...
@@ -423,6 +423,11 @@ const ImportActionIndex = (props) => {
dataIndex
:
'name'
,
editable
:
true
,
ellipsis
:
true
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
span
style=
{
{
fontWeight
:
'bold'
}
}
>
{
text
}
</
span
>
)
}
},
{
title
:
'是否唯一索引'
,
...
...
@@ -431,9 +436,13 @@ const ImportActionIndex = (props) => {
editable
:
true
,
render
:
(
unique
,
_
,
__
)
=>
{
if
(
unique
===
false
)
{
return
'否'
;
return
(
<
CloseOutlined
/>
);
}
else
if
(
unique
===
true
)
{
return
'是'
;
return
(
<
CheckOutlined
/>
)
}
return
''
;
...
...
@@ -671,6 +680,7 @@ const ImportActionIndex = (props) => {
rowKey=
'name'
rowClassName=
"editable-row"
pagination=
{
false
}
sticky
/>
</
Form
>
</
DndProvider
>
...
...
src/view/Manage/Model/Component/ImportActionTable.jsx
View file @
44a31086
import
React
,
{
useState
,
useCallback
,
useRef
,
useEffect
}
from
'react'
;
import
{
Table
,
Input
,
Form
,
Typography
,
Radio
,
Divider
,
Button
,
Popconfirm
,
Select
,
Row
,
Col
,
Popover
,
Checkbox
}
from
'antd'
;
import
{
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
import
{
QuestionCircleOutlined
,
CloseOutlined
,
CheckOutlined
}
from
'@ant-design/icons'
;
import
{
DndProvider
,
useDrag
,
useDrop
}
from
'react-dnd'
;
import
{
HTML5Backend
}
from
'react-dnd-html5-backend'
;
import
update
from
'immutability-helper'
;
...
...
@@ -58,7 +58,7 @@ const DatatypeInput = ({ value = {}, datatypes, onChange }) => {
<>
<
Row
align=
'middle'
>
<
Col
span=
{
9
}
>
<
span
>
类型
名称:
</
span
>
<
span
>
名称:
</
span
>
</
Col
>
<
Col
span=
{
15
}
>
<
Select
...
...
@@ -430,6 +430,11 @@ const ImportActionTable = (props) => {
dataIndex
:
'name'
,
editable
:
true
,
ellipsis
:
true
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
span
style=
{
{
fontWeight
:
'bold'
}
}
>
{
text
}
</
span
>
)
}
},
{
title
:
'类型'
,
...
...
@@ -439,15 +444,26 @@ const ImportActionTable = (props) => {
ellipsis
:
true
,
render
:
(
datatype
,
record
,
index
)
=>
{
let
_text
=
''
;
if
(
datatype
)
{
_text
=
datatype
.
name
||
''
;
(
datatype
.
parameterCnNames
||
[]).
forEach
((
cnName
,
index
)
=>
{
_text
+=
' '
+
cnName
+
':'
+
(
datatype
.
parameterValues
[
index
]?
datatype
.
parameterValues
[
index
]:
0
);
})
return
(
<>
<
span
>
{
`名称: ${datatype.name||''}`
}
</
span
>
{
(
datatype
.
parameterCnNames
||
[]).
map
((
cnName
,
index
)
=>
{
return
(
<
div
key=
{
index
}
>
<
span
>
{
`${cnName}: `
}
</
span
>
<
span
style=
{
{
fontWeight
:
'bold'
}
}
>
{
`${(datatype.parameterValues[index]?datatype.parameterValues[index]:0)}`
}
</
span
>
</
div
>
)
})
}
</>
)
}
return
_text
;
return
''
;
}
},
{
...
...
@@ -457,9 +473,13 @@ const ImportActionTable = (props) => {
editable
:
true
,
render
:
(
nullable
,
record
,
index
)
=>
{
if
(
!
nullable
)
{
return
'否'
;
return
(
<
CloseOutlined
/>
);
}
else
if
(
nullable
===
true
)
{
return
'是'
;
return
(
<
CheckOutlined
/>
)
}
return
''
;
...
...
@@ -472,9 +492,13 @@ const ImportActionTable = (props) => {
editable
:
true
,
render
:
(
partOfPrimaryKey
,
record
,
index
)
=>
{
if
(
!
partOfPrimaryKey
)
{
return
'否'
;
return
(
<
CloseOutlined
/>
);
}
else
if
(
partOfPrimaryKey
===
true
)
{
return
'是'
;
return
(
<
CheckOutlined
/>
)
}
return
''
;
...
...
@@ -487,9 +511,13 @@ const ImportActionTable = (props) => {
editable
:
true
,
render
:
(
partOfDistributionKey
,
record
,
index
)
=>
{
if
(
!
partOfDistributionKey
)
{
return
'否'
;
return
(
<
CloseOutlined
/>
);
}
else
if
(
partOfDistributionKey
===
true
)
{
return
'是'
;
return
(
<
CheckOutlined
/>
)
}
return
''
;
...
...
@@ -703,6 +731,7 @@ const ImportActionTable = (props) => {
rowKey=
'iid'
rowClassName=
"editable-row"
pagination=
{
false
}
sticky
expandable=
{
{
columnWidth
:
0
,
expandedRowRender
:
record
=>
(
...
...
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