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
6c82d010
Commit
6c82d010
authored
Dec 12, 2024
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
newTasks, total bug fix
parent
a83aaafa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
Task.jsx
src/view/Manage/MetadataHarvester/Component/Task.jsx
+18
-18
No files found.
src/view/Manage/MetadataHarvester/Component/Task.jsx
View file @
6c82d010
...
...
@@ -216,7 +216,7 @@ const FC = (props) => {
return
columns
;
},
[
visibleCols
,
tasksProgress
,
permissions
])
const
_tasks
=
useMemo
(()
=>
{
const
[
_tasks
,
total
]
=
useMemo
(()
=>
{
if
(
tasks
)
{
let
newTasks
=
tasks
?.
filter
(
item
=>
{
return
(
configState
.
scope
===
undefined
||
item
.
target
?.
scope
===
configState
.
scope
?.
toString
())
...
...
@@ -249,29 +249,29 @@ const FC = (props) => {
}
})
}
const
total
=
newTasks
.
length
newTasks
=
paginate
(
newTasks
,
pagination
.
pageNum
,
pagination
.
pageSize
);
return
newTasks
;
return
[
newTasks
,
total
]
;
}
return
[]
},
[
tasks
,
pagination
,
configState
,
supportedTargetTypes
,
sortedInfo
,
keyword
,
env
])
const
total
=
useMemo
(()
=>
{
if
(
tasks
)
{
const
newTasks
=
tasks
?.
filter
(
item
=>
{
return
(
configState
.
scope
===
undefined
||
item
.
target
?.
scope
===
configState
.
scope
?.
toString
())
&&
(
configState
.
datasourceId
===
undefined
||
item
.
target
?.
id
===
configState
.
datasourceId
)
&&
(
configState
.
targetType
===
undefined
||
item
.
target
?.
type
===
configState
.
targetType
)
&&
(
!
keyword
||
item
.
taskCode
?.
indexOf
(
keyword
)
!==-
1
||
item
.
schema
?.
indexOf
(
keyword
)
!==-
1
)
&&
item
.
target
?.
namespace
===
env
?.
domainId
?.
toString
()
});
return
(
newTasks
||
[]).
length
;
}
return
0
;
},
[
tasks
,
pagination
,
configState
,
keyword
,
env
])
//
const total = useMemo(() => {
//
if (tasks) {
//
const newTasks = tasks?.filter(item => {
//
return (configState.scope===undefined || item.target?.scope === configState.scope?.toString())
//
&& (configState.datasourceId===undefined || item.target?.id === configState.datasourceId)
//
&& (configState.targetType===undefined || item.target?.type === configState.targetType)
//
&& (!keyword || item.taskCode?.indexOf(keyword)!==-1 || item.schema?.indexOf(keyword)!==-1)
//
&& item.target?.namespace === env?.domainId?.toString()
//
});
//
return (newTasks||[]).length;
//
}
//
return 0;
//
}, [tasks, pagination, configState, keyword, env])
const
getPermissions
=
()
=>
{
dispatch
({
...
...
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