From 8fdc69421c5c13cb3c53cdc309942d9cf3d3b22b Mon Sep 17 00:00:00 2001 From: whyour Date: Tue, 11 Nov 2025 01:02:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=9A=E6=97=B6=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=94=AF=E6=8C=81=E7=9A=84=E6=8E=92=E5=BA=8F=E9=A1=BA?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/crontab/index.tsx | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/src/pages/crontab/index.tsx b/src/pages/crontab/index.tsx index 976c0ffa..a9feda49 100644 --- a/src/pages/crontab/index.tsx +++ b/src/pages/crontab/index.tsx @@ -247,8 +247,8 @@ const Crontab = () => { > {record.last_execution_time ? dayjs(record.last_execution_time * 1000).format( - 'YYYY-MM-DD HH:mm:ss', - ) + 'YYYY-MM-DD HH:mm:ss', + ) : '-'} ); @@ -361,11 +361,10 @@ const Crontab = () => { const getCrons = () => { setLoading(true); const { page, size, sorter, filters } = pageConf; - let url = `${ - config.apiPrefix - }crons?searchValue=${searchText}&page=${page}&size=${size}&filters=${JSON.stringify( - filters, - )}`; + let url = `${config.apiPrefix + }crons?searchValue=${searchText}&page=${page}&size=${size}&filters=${JSON.stringify( + filters, + )}`; if (sorter && sorter.column && sorter.order) { url += `&sorter=${JSON.stringify({ field: sorter.column.key, @@ -523,9 +522,8 @@ const Crontab = () => { const enabledOrDisabledCron = (record: any, index: number) => { Modal.confirm({ - title: `确认${ - record.isDisabled === 1 ? intl.get('启用') : intl.get('禁用') - }`, + title: `确认${record.isDisabled === 1 ? intl.get('启用') : intl.get('禁用') + }`, content: ( <> {intl.get('确认')} @@ -540,8 +538,7 @@ const Crontab = () => { onOk() { request .put( - `${config.apiPrefix}crons/${ - record.isDisabled === 1 ? 'enable' : 'disable' + `${config.apiPrefix}crons/${record.isDisabled === 1 ? 'enable' : 'disable' }`, [record.id], ) @@ -565,9 +562,8 @@ const Crontab = () => { const pinOrUnPinCron = (record: any, index: number) => { Modal.confirm({ - title: `确认${ - record.isPinned === 1 ? intl.get('取消置顶') : intl.get('置顶') - }`, + title: `确认${record.isPinned === 1 ? intl.get('取消置顶') : intl.get('置顶') + }`, content: ( <> {intl.get('确认')} @@ -582,8 +578,7 @@ const Crontab = () => { onOk() { request .put( - `${config.apiPrefix}crons/${ - record.isPinned === 1 ? 'unpin' : 'pin' + `${config.apiPrefix}crons/${record.isPinned === 1 ? 'unpin' : 'pin' }`, [record.id], ) @@ -1014,6 +1009,7 @@ const Crontab = () => { )}