|
@@ -147,15 +147,14 @@ const TaskLogWatcher = () => {
|
|
|
const { data } = await getTaskLog(params);
|
|
|
if (data.code === 200) {
|
|
|
setLogData(data.data.log);
|
|
|
+ const index = jobList.findIndex(item => item.key === record.key);
|
|
|
+ const list = [...jobList];
|
|
|
+ if (list[index]) {
|
|
|
+ list[index].handleResult = data.data.status;
|
|
|
+ setJobList(list);
|
|
|
+ }
|
|
|
if ([2, 3].includes(data.data.status)) {
|
|
|
clearInterval(timeout);
|
|
|
- } else {
|
|
|
- const index = jobList.findIndex(item => item.key === record.key);
|
|
|
- const list = [...jobList];
|
|
|
- if (list[index]) {
|
|
|
- list[index].handleResult = data.data.status;
|
|
|
- setJobList(list);
|
|
|
- }
|
|
|
}
|
|
|
} else {
|
|
|
message.error(data.msg);
|