From 5fad2ee88f1880e5b5871c632c96e18082d34acb Mon Sep 17 00:00:00 2001 From: whyour Date: Wed, 12 May 2021 12:02:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BD=AE=E8=AF=A2=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E5=92=8C=E4=BB=BB=E5=8A=A1=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/crontab/index.tsx | 4 ++-- src/pages/crontab/logModal.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/crontab/index.tsx b/src/pages/crontab/index.tsx index 2dc52192..0ef45f17 100644 --- a/src/pages/crontab/index.tsx +++ b/src/pages/crontab/index.tsx @@ -99,12 +99,12 @@ const Crontab = () => { align: 'center' as const, render: (text: string, record: any) => ( <> - {record.status !== CrontabStatus.disabled && !record.pid && ( + {record.status === CrontabStatus.idle && ( } color="default"> 空闲中 )} - {record.status === CrontabStatus.running && record.pid && ( + {record.status === CrontabStatus.running && ( } color="processing"> 运行中 diff --git a/src/pages/crontab/logModal.tsx b/src/pages/crontab/logModal.tsx index 6e27246d..a5323890 100644 --- a/src/pages/crontab/logModal.tsx +++ b/src/pages/crontab/logModal.tsx @@ -31,7 +31,7 @@ const CronLogModal = ({ if (localStorage.getItem('logCron') === cron._id) { const log = data.data as string; setValue(log || '暂无日志'); - if (log && !log.includes('执行结束') && visible) { + if (log && !log.includes('执行结束')) { setTimeout(() => { getCronLog(); }, 2000);