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
a5014adb
Commit
a5014adb
authored
Aug 25, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模型提示
parent
bb38c920
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
53 deletions
+27
-53
ConstraintDetailDrawer.jsx
src/view/Manage/Model/Component/ConstraintDetailDrawer.jsx
+4
-4
ImportActionTable.jsx
src/view/Manage/Model/Component/ImportActionTable.jsx
+18
-12
ModelTable.jsx
src/view/Manage/Model/Component/ModelTable.jsx
+5
-37
No files found.
src/view/Manage/Model/Component/ConstraintDetailDrawer.jsx
View file @
a5014adb
...
@@ -51,7 +51,7 @@ const ConstraintDetailDrawer = (props) => {
...
@@ -51,7 +51,7 @@ const ConstraintDetailDrawer = (props) => {
render
:
(
text
,
_
,
__
)
=>
{
render
:
(
text
,
_
,
__
)
=>
{
return
(
return
(
<
Tooltip
title=
{
text
||
''
}
>
<
Tooltip
title=
{
text
||
''
}
>
{
text
||
''
}
<
span
>
{
text
||
''
}
</
span
>
</
Tooltip
>
</
Tooltip
>
)
)
}
}
...
@@ -64,7 +64,7 @@ const ConstraintDetailDrawer = (props) => {
...
@@ -64,7 +64,7 @@ const ConstraintDetailDrawer = (props) => {
render
:
(
text
,
_
,
__
)
=>
{
render
:
(
text
,
_
,
__
)
=>
{
return
(
return
(
<
Tooltip
title=
{
text
||
''
}
>
<
Tooltip
title=
{
text
||
''
}
>
{
text
||
''
}
<
span
>
{
text
||
''
}
</
span
>
</
Tooltip
>
</
Tooltip
>
)
)
}
}
...
@@ -77,7 +77,7 @@ const ConstraintDetailDrawer = (props) => {
...
@@ -77,7 +77,7 @@ const ConstraintDetailDrawer = (props) => {
render
:
(
text
,
_
,
__
)
=>
{
render
:
(
text
,
_
,
__
)
=>
{
return
(
return
(
<
Tooltip
title=
{
text
||
''
}
>
<
Tooltip
title=
{
text
||
''
}
>
{
text
||
''
}
<
span
>
{
text
||
''
}
</
span
>
</
Tooltip
>
</
Tooltip
>
)
)
}
}
...
@@ -89,7 +89,7 @@ const ConstraintDetailDrawer = (props) => {
...
@@ -89,7 +89,7 @@ const ConstraintDetailDrawer = (props) => {
render
:
(
text
,
_
,
__
)
=>
{
render
:
(
text
,
_
,
__
)
=>
{
return
(
return
(
<
Tooltip
title=
{
text
||
''
}
>
<
Tooltip
title=
{
text
||
''
}
>
{
text
||
''
}
<
span
>
{
text
||
''
}
</
span
>
</
Tooltip
>
</
Tooltip
>
)
)
}
}
...
...
src/view/Manage/Model/Component/ImportActionTable.jsx
View file @
a5014adb
...
@@ -613,9 +613,11 @@ const ImportActionTable = (props) => {
...
@@ -613,9 +613,11 @@ const ImportActionTable = (props) => {
width
:
100
,
width
:
100
,
render
:
(
text
,
_
,
__
)
=>
{
render
:
(
text
,
_
,
__
)
=>
{
return
(
return
(
<
span
>
<
Tooltip
title=
{
text
||
''
}
>
{
highlightSearchContentByTerms
(
text
,
terms
)
}
<
span
>
</
span
>
{
highlightSearchContentByTerms
(
text
,
terms
)
}
</
span
>
</
Tooltip
>
)
)
}
}
},
},
...
@@ -627,9 +629,11 @@ const ImportActionTable = (props) => {
...
@@ -627,9 +629,11 @@ const ImportActionTable = (props) => {
width
:
200
,
width
:
200
,
render
:
(
text
,
_
,
__
)
=>
{
render
:
(
text
,
_
,
__
)
=>
{
return
(
return
(
<
span
>
<
Tooltip
title=
{
text
||
''
}
>
{
highlightSearchContentByTerms
(
text
,
terms
)
}
<
span
>
</
span
>
{
highlightSearchContentByTerms
(
text
,
terms
)
}
</
span
>
</
Tooltip
>
)
)
}
}
},
},
...
@@ -641,9 +645,11 @@ const ImportActionTable = (props) => {
...
@@ -641,9 +645,11 @@ const ImportActionTable = (props) => {
width
:
100
,
width
:
100
,
render
:
(
text
,
_
,
__
)
=>
{
render
:
(
text
,
_
,
__
)
=>
{
return
(
return
(
<
span
>
<
Tooltip
title=
{
text
||
''
}
>
{
highlightSearchContentByTerms
(
text
,
terms
)
}
<
span
>
</
span
>
{
highlightSearchContentByTerms
(
text
,
terms
)
}
</
span
>
</
Tooltip
>
)
)
}
}
},
},
...
@@ -656,9 +662,9 @@ const ImportActionTable = (props) => {
...
@@ -656,9 +662,9 @@ const ImportActionTable = (props) => {
render
:
(
text
,
_
,
__
)
=>
{
render
:
(
text
,
_
,
__
)
=>
{
return
(
return
(
<
Tooltip
title=
{
text
||
''
}
>
<
Tooltip
title=
{
text
||
''
}
>
<
span
>
<
span
>
{
highlightSearchContentByTerms
(
text
,
terms
)
}
{
highlightSearchContentByTerms
(
text
,
terms
)
}
</
span
>
</
span
>
</
Tooltip
>
</
Tooltip
>
)
)
}
}
...
...
src/view/Manage/Model/Component/ModelTable.jsx
View file @
a5014adb
import
React
,
{
useState
,
useEffect
,
useRef
}
from
"react"
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
"react"
;
import
{
Space
,
Button
,
Tooltip
,
Modal
,
Divider
,
Pagination
,
Table
}
from
'antd'
;
import
{
Space
,
Button
,
Tooltip
,
Modal
,
Divider
,
Pagination
,
Table
}
from
'antd'
;
import
{
EditOutlined
,
ReconciliationOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
;
import
{
EditOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
;
import
SmoothScroll
from
'smooth-scroll'
;
import
SmoothScroll
from
'smooth-scroll'
;
import
{
Resizable
}
from
'react-resizable'
;
import
{
dispatchLatest
}
from
'../../../../model'
;
import
{
dispatchLatest
}
from
'../../../../model'
;
import
{
showMessage
,
getQueryParam
,
paginate
}
from
'../../../../util'
;
import
{
showMessage
,
getQueryParam
,
paginate
}
from
'../../../../util'
;
...
@@ -10,31 +9,12 @@ import { AnchorId, AnchorTimestamp } from '../../../../util/constant';
...
@@ -10,31 +9,12 @@ import { AnchorId, AnchorTimestamp } from '../../../../util/constant';
import
'./ModelTable.less'
;
import
'./ModelTable.less'
;
const
ResizeableHeaderCell
=
props
=>
{
const
{
onResize
,
width
,
...
restProps
}
=
props
;
if
(
!
width
)
{
return
<
th
{
...
restProps
}
/>;
}
return
(
<
Resizable
width=
{
width
}
height=
{
0
}
onResize=
{
onResize
}
draggableOpts=
{
{
enableUserSelectHack
:
false
}
}
>
<
th
{
...
restProps
}
/>
</
Resizable
>
);
};
const
ModelTable
=
(
props
)
=>
{
const
ModelTable
=
(
props
)
=>
{
const
{
data
,
onChange
,
onItemAction
,
onSelect
,
catalogId
,
keyword
,
onAutoCreateTable
,
offset
=
null
}
=
props
;
const
{
data
,
onChange
,
onItemAction
,
onSelect
,
catalogId
,
keyword
,
onAutoCreateTable
,
offset
=
null
}
=
props
;
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
([]);
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
([]);
const
[
columns
,
setColumns
]
=
useState
(
[
const
columns
=
[
{
{
title
:
'序号'
,
title
:
'序号'
,
dataIndex
:
'key'
,
dataIndex
:
'key'
,
...
@@ -66,7 +46,7 @@ const ModelTable = (props) => {
...
@@ -66,7 +46,7 @@ const ModelTable = (props) => {
render
:
(
text
,
_
,
__
)
=>
{
render
:
(
text
,
_
,
__
)
=>
{
return
(
return
(
<
Tooltip
title=
{
text
||
''
}
>
<
Tooltip
title=
{
text
||
''
}
>
{
text
||
''
}
<
span
>
{
text
||
''
}
</
span
>
</
Tooltip
>
</
Tooltip
>
)
)
}
}
...
@@ -78,7 +58,7 @@ const ModelTable = (props) => {
...
@@ -78,7 +58,7 @@ const ModelTable = (props) => {
render
:
(
text
,
_
,
__
)
=>
{
render
:
(
text
,
_
,
__
)
=>
{
return
(
return
(
<
Tooltip
title=
{
text
||
''
}
>
<
Tooltip
title=
{
text
||
''
}
>
{
text
||
''
}
<
span
>
{
text
||
''
}
</
span
>
</
Tooltip
>
</
Tooltip
>
);
);
}
}
...
@@ -133,7 +113,7 @@ const ModelTable = (props) => {
...
@@ -133,7 +113,7 @@ const ModelTable = (props) => {
)
)
}
}
}
}
]
)
;
];
const
[
pagination
,
setPagination
]
=
useState
(
{
pageNum
:
1
,
pageSize
:
20
}
);
const
[
pagination
,
setPagination
]
=
useState
(
{
pageNum
:
1
,
pageSize
:
20
}
);
const
{
pageNum
,
pageSize
}
=
pagination
;
const
{
pageNum
,
pageSize
}
=
pagination
;
...
@@ -259,18 +239,6 @@ const ModelTable = (props) => {
...
@@ -259,18 +239,6 @@ const ModelTable = (props) => {
onSelect
&&
onSelect
(
keys
);
onSelect
&&
onSelect
(
keys
);
};
};
const
handleResize
=
index
=>
(
e
,
{
size
})
=>
{
const
nextColumns
=
[...
columns
];
nextColumns
[
index
]
=
{
...
nextColumns
[
index
],
width
:
size
.
width
,
};
setColumns
(
nextColumns
);
};
const
rowSelection
=
{
const
rowSelection
=
{
selectedRowKeys
,
selectedRowKeys
,
onChange
:
onSelectChange
,
onChange
:
onSelectChange
,
...
...
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