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
b1dd0b6a
Commit
b1dd0b6a
authored
Jan 26, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
dbe0e74f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
update-task.jsx
src/view/Manage/ModelCompare/update-task.jsx
+12
-4
No files found.
src/view/Manage/ModelCompare/update-task.jsx
View file @
b1dd0b6a
...
@@ -69,7 +69,7 @@ const FC = (props) => {
...
@@ -69,7 +69,7 @@ const FC = (props) => {
console
.
log
(
'rangeRows'
,
rangeRows
)
console
.
log
(
'rangeRows'
,
rangeRows
)
console
.
log
(
'strategyRows'
,
strategyRows
)
console
.
log
(
'strategyRows'
,
strategyRows
)
console
.
log
(
'scheduleRows'
,
scheduleRows
)
console
.
log
(
'scheduleRows'
,
scheduleRows
)
if
((
rangeRows
??[]).
length
===
0
)
{
if
((
rangeRows
??[]).
length
===
0
)
{
showMessage
(
'warn'
,
'请先填写对比范围'
)
showMessage
(
'warn'
,
'请先填写对比范围'
)
return
return
...
@@ -731,6 +731,10 @@ const Range = React.forwardRef(function ({ type, task }, ref) {
...
@@ -731,6 +731,10 @@ const Range = React.forwardRef(function ({ type, task }, ref) {
},
},
}),
[
ranges
,
isAdding
])
}),
[
ranges
,
isAdding
])
React
.
useEffect
(()
=>
{
setRanges
(
task
?.
jobCatalogItems
)
},
[
task
])
const
onAddClick
=
()
=>
{
const
onAddClick
=
()
=>
{
if
(
isAdding
)
return
if
(
isAdding
)
return
...
@@ -750,7 +754,6 @@ const Range = React.forwardRef(function ({ type, task }, ref) {
...
@@ -750,7 +754,6 @@ const Range = React.forwardRef(function ({ type, task }, ref) {
...
rows
.
metadataRange
,
...
rows
.
metadataRange
,
}]
}]
console
.
log
(
'newRanges'
,
newRanges
)
setRanges
(
newRanges
)
setRanges
(
newRanges
)
rangesRef
.
current
=
newRanges
rangesRef
.
current
=
newRanges
...
@@ -852,6 +855,10 @@ const Strategy = React.forwardRef(function ({ type, task }, ref) {
...
@@ -852,6 +855,10 @@ const Strategy = React.forwardRef(function ({ type, task }, ref) {
return
tableDataRef
.
current
return
tableDataRef
.
current
},
},
}),
[
tableData
,
editingKey
])
}),
[
tableData
,
editingKey
])
React
.
useEffect
(()
=>
{
setTableData
(
task
?.
strategyItemPropertyTypes
)
},
[
task
])
React
.
useEffect
(()
=>
{
React
.
useEffect
(()
=>
{
setSelectablePropertyTypes
(
setSelectablePropertyTypes
(
...
@@ -1209,6 +1216,7 @@ const ScheduleForm = React.forwardRef(function ({ type, task }, ref) {
...
@@ -1209,6 +1216,7 @@ const ScheduleForm = React.forwardRef(function ({ type, task }, ref) {
React
.
useEffect
(()
=>
{
React
.
useEffect
(()
=>
{
if
(
task
?.
jobSchedule
)
{
if
(
task
?.
jobSchedule
)
{
setScheduleEnable
(
task
?.
jobSchedule
?.
active
)
setScheduleEnable
(
task
?.
jobSchedule
?.
active
)
form
?.
setFieldsValue
(
task
?.
jobSchedule
)
}
}
},
[
task
])
},
[
task
])
...
@@ -1332,7 +1340,7 @@ const CronItem = ({ value, onChange }) => {
...
@@ -1332,7 +1340,7 @@ const CronItem = ({ value, onChange }) => {
React.useEffect(() => {
React.useEffect(() => {
if (value) {
if (value) {
setCycleKey(value?.cycleType)
setCycleKey(value?.cycleType)
setCronSelectedKeys((value?.
l
ist??[]).map(item => item.itemType))
setCronSelectedKeys((value?.
selectL
ist??[]).map(item => item.itemType))
} else {
} else {
setCycleKey()
setCycleKey()
setCronSelectedKeys()
setCronSelectedKeys()
...
@@ -1376,7 +1384,7 @@ const CronItem = ({ value, onChange }) => {
...
@@ -1376,7 +1384,7 @@ const CronItem = ({ value, onChange }) => {
let newValue = null
let newValue = null
if (index !== -1) {
if (index !== -1) {
newValue = cycleTypes[index]
newValue = cycleTypes[index]
newValue = {...newValue,
l
ist: (newValue.list??[]).filter(item => (prevCronSelectedKeys??[]).indexOf(item.itemType) !== -1) }
newValue = {...newValue,
selectL
ist: (newValue.list??[]).filter(item => (prevCronSelectedKeys??[]).indexOf(item.itemType) !== -1) }
}
}
onChange?.(newValue)
onChange?.(newValue)
...
...
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