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
16c612fb
Commit
16c612fb
authored
Jul 25, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模型增加路径
parent
59012d1e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
42 deletions
+28
-42
ExpandedModelTable.jsx
src/view/Manage/Model/Component/ExpandedModelTable.jsx
+13
-17
ModelTable.jsx
src/view/Manage/Model/Component/ModelTable.jsx
+15
-25
No files found.
src/view/Manage/Model/Component/ExpandedModelTable.jsx
View file @
16c612fb
...
@@ -156,6 +156,19 @@ const ExpandedModelTable = (props) => {
...
@@ -156,6 +156,19 @@ const ExpandedModelTable = (props) => {
}
}
},
},
{
{
title
:
'路径'
,
dataIndex
:
'path'
,
width
:
120
,
ellipsis
:
true
,
render
:
(
text
,
_
,
__
)
=>
{
return
(
<
Tooltip
title=
{
text
||
''
}
>
<
Text
ellipsis=
{
true
}
>
{
text
||
''
}
</
Text
>
</
Tooltip
>
)
}
},
{
title
:
'状态'
,
title
:
'状态'
,
dataIndex
:
'state'
,
dataIndex
:
'state'
,
width
:
100
,
width
:
100
,
...
@@ -226,20 +239,6 @@ const ExpandedModelTable = (props) => {
...
@@ -226,20 +239,6 @@ const ExpandedModelTable = (props) => {
},
},
];
];
const
pathColumn
=
{
title
:
'路径'
,
dataIndex
:
'path'
,
width
:
120
,
ellipsis
:
true
,
render
:
(
text
,
_
,
__
)
=>
{
return
(
<
Tooltip
title=
{
text
||
''
}
>
<
Text
ellipsis=
{
true
}
>
{
text
||
''
}
</
Text
>
</
Tooltip
>
)
}
};
useEffect
(()
=>
{
useEffect
(()
=>
{
setSelectedRowKeys
(
checked
?[
id
]:[]);
setSelectedRowKeys
(
checked
?[
id
]:[]);
if
(
dataMap
.
has
(
id
))
{
if
(
dataMap
.
has
(
id
))
{
...
@@ -253,9 +252,6 @@ const ExpandedModelTable = (props) => {
...
@@ -253,9 +252,6 @@ const ExpandedModelTable = (props) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
tableWidth
>
0
&&
columns
.
length
===
0
)
{
if
(
tableWidth
>
0
&&
columns
.
length
===
0
)
{
let
newColumns
=
[...
cols
];
let
newColumns
=
[...
cols
];
if
(
view
===
'state'
||
(
keyword
||
''
)
!==
''
)
{
newColumns
.
splice
(
3
,
0
,
pathColumn
);
}
newColumns
.
forEach
((
column
,
index
)
=>
{
newColumns
.
forEach
((
column
,
index
)
=>
{
if
(
!
column
.
width
)
{
if
(
!
column
.
width
)
{
...
...
src/view/Manage/Model/Component/ModelTable.jsx
View file @
16c612fb
...
@@ -147,6 +147,20 @@ const ModelTable = (props) => {
...
@@ -147,6 +147,20 @@ const ModelTable = (props) => {
}
}
},
},
{
{
name
:
'路径'
,
key
:
'path'
,
width
:
120
,
sortable
:
true
,
resizable
:
true
,
formatter
(
props
)
{
return
(
<
Tooltip
title=
{
props
.
row
.
path
||
''
}
>
<
Text
ellipsis=
{
true
}
>
{
props
.
row
.
path
||
''
}
</
Text
>
</
Tooltip
>
)
}
},
{
name
:
'状态'
,
name
:
'状态'
,
key
:
'state'
,
key
:
'state'
,
width
:
100
,
width
:
100
,
...
@@ -202,30 +216,6 @@ const ModelTable = (props) => {
...
@@ -202,30 +216,6 @@ const ModelTable = (props) => {
},
},
];
];
const
pathColumn
=
{
name
:
'路径'
,
key
:
'path'
,
width
:
120
,
sortable
:
true
,
resizable
:
true
,
formatter
(
props
)
{
return
(
<
Tooltip
title=
{
props
.
row
.
path
||
''
}
>
<
Text
ellipsis=
{
true
}
>
{
props
.
row
.
path
||
''
}
</
Text
>
</
Tooltip
>
)
}
};
const
columns
=
useMemo
(()
=>
{
const
newColumns
=
[...
cols
];
if
(
view
===
'state'
||
(
keyword
||
''
)
!==
''
)
{
newColumns
.
splice
(
3
,
0
,
pathColumn
);
}
return
newColumns
;
// eslint-disable-next-line react-hooks/exhaustive-deps
},
[
view
,
keyword
]);
const
summarySelectedCount
=
useMemo
(()
=>
{
const
summarySelectedCount
=
useMemo
(()
=>
{
let
newSelectedRowKeys
=
Array
.
from
(
new
Set
([...
selectedRowKeys
,
...
expandedSelectedRowKeys
]));
let
newSelectedRowKeys
=
Array
.
from
(
new
Set
([...
selectedRowKeys
,
...
expandedSelectedRowKeys
]));
...
@@ -491,7 +481,7 @@ const ModelTable = (props) => {
...
@@ -491,7 +481,7 @@ const ModelTable = (props) => {
gridRef=
{
gridRef
}
gridRef=
{
gridRef
}
style=
{
{
blockSize
:
'calc(100vh - 94px - 37px - 57px - 24px - 32px)'
}
}
style=
{
{
blockSize
:
'calc(100vh - 94px - 37px - 57px - 24px - 32px)'
}
}
checkable
checkable
columns=
{
col
umn
s
}
columns=
{
cols
}
rows=
{
data
||
[]
}
rows=
{
data
||
[]
}
rowHeight=
{
51
}
rowHeight=
{
51
}
rowClassName=
{
(
row
)
=>
{
rowClassName=
{
(
row
)
=>
{
...
...
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