From a79fd74130194d16cb7b22ea7f47df07bb4957d1 Mon Sep 17 00:00:00 2001 From: hanhh <18330117883@163.com> Date: Thu, 23 Sep 2021 22:12:19 +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=E8=A1=A8=E6=A0=BC=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/crontab/index.tsx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/pages/crontab/index.tsx b/src/pages/crontab/index.tsx index 4dc0858d..cad12aaf 100644 --- a/src/pages/crontab/index.tsx +++ b/src/pages/crontab/index.tsx @@ -71,6 +71,8 @@ const Crontab = ({ headerStyle, isPhone }: any) => { title: '任务名', dataIndex: 'name', key: 'name', + fixed: 'left', + width: 150, align: 'center' as const, render: (text: string, record: any) => ( @@ -93,7 +95,8 @@ const Crontab = ({ headerStyle, isPhone }: any) => { title: '任务', dataIndex: 'command', key: 'command', - width: '40%', + fixed: 'left', + width: 250, align: 'center' as const, render: (text: string, record: any) => { return ( @@ -118,6 +121,7 @@ const Crontab = ({ headerStyle, isPhone }: any) => { title: '任务定时', dataIndex: 'schedule', key: 'schedule', + width: 110, align: 'center' as const, sorter: { compare: (a: any, b: any) => a.schedule.localeCompare(b.schedule), @@ -127,6 +131,7 @@ const Crontab = ({ headerStyle, isPhone }: any) => { { title: '最后运行时间', align: 'center' as const, + width: 150, sorter: { compare: (a: any, b: any) => { return a.last_execution_time - b.last_execution_time; @@ -137,7 +142,6 @@ const Crontab = ({ headerStyle, isPhone }: any) => { return ( @@ -156,6 +160,7 @@ const Crontab = ({ headerStyle, isPhone }: any) => { { title: '最后运行时长', align: 'center' as const, + width: 120, sorter: { compare: (a: any, b: any) => { return a.last_running_time - b.last_running_time; @@ -166,7 +171,6 @@ const Crontab = ({ headerStyle, isPhone }: any) => { return ( @@ -180,6 +184,7 @@ const Crontab = ({ headerStyle, isPhone }: any) => { { title: '下次运行时间', align: 'center' as const, + width: 150, sorter: { compare: (a: any, b: any) => { return a.nextRunTime - b.nextRunTime; @@ -190,7 +195,6 @@ const Crontab = ({ headerStyle, isPhone }: any) => { return ( @@ -207,7 +211,7 @@ const Crontab = ({ headerStyle, isPhone }: any) => { key: 'status', dataIndex: 'status', align: 'center' as const, - width: 70, + width: 85, filters: [ { text: '运行中', @@ -269,6 +273,8 @@ const Crontab = ({ headerStyle, isPhone }: any) => { title: '操作', key: 'action', align: 'center' as const, + width: 80, + fixed: 'right', render: (text: string, record: any, index: number) => { const isPc = !isPhone; return (