修改定时任务列表布局

This commit is contained in:
whyour 2022-08-25 23:58:20 +08:00
parent bc281ee4d7
commit 05ed8c9f4b
2 changed files with 45 additions and 23 deletions

View File

@ -101,3 +101,9 @@
background: #fafafa; background: #fafafa;
} }
} }
.crontab-view {
.ant-tabs-nav-wrap {
flex: unset !important;
}
}

View File

@ -12,6 +12,7 @@ import {
Typography, Typography,
Input, Input,
Popover, Popover,
Tabs,
} from 'antd'; } from 'antd';
import { import {
ClockCircleOutlined, ClockCircleOutlined,
@ -816,29 +817,8 @@ const Crontab = ({ headerStyle, isPhone, theme }: any) => {
}); });
}, []); }, []);
return ( const panelContent = (
<PageContainer <>
className="ql-container-wrapper crontab-wrapper"
title="定时任务"
extra={[
<Search
placeholder="请输入名称或者关键词"
style={{ width: 'auto' }}
enterButton
allowClear
loading={loading}
value={searchValue}
onChange={(e) => setSearchValue(e.target.value)}
onSearch={onSearch}
/>,
<Button key="2" type="primary" onClick={() => addCron()}>
</Button>,
]}
header={{
style: headerStyle,
}}
>
{selectedRowIds.length > 0 && ( {selectedRowIds.length > 0 && (
<div style={{ marginBottom: 16 }}> <div style={{ marginBottom: 16 }}>
<Button type="primary" style={{ marginBottom: 5 }} onClick={delCrons}> <Button type="primary" style={{ marginBottom: 5 }} onClick={delCrons}>
@ -926,6 +906,42 @@ const Crontab = ({ headerStyle, isPhone, theme }: any) => {
rowSelection={rowSelection} rowSelection={rowSelection}
rowClassName={getRowClassName} rowClassName={getRowClassName}
/> />
</>
);
return (
<PageContainer
className="ql-container-wrapper crontab-wrapper"
title="定时任务"
extra={[
<Search
placeholder="请输入名称或者关键词"
style={{ width: 'auto' }}
enterButton
allowClear
loading={loading}
value={searchValue}
onChange={(e) => setSearchValue(e.target.value)}
onSearch={onSearch}
/>,
<Button key="2" type="primary" onClick={() => addCron()}>
</Button>,
]}
header={{
style: headerStyle,
}}
>
<Tabs
defaultActiveKey="all"
size="small"
tabPosition="top"
className="crontab-view"
>
<Tabs.TabPane tab="全部任务" key="all">
{panelContent}
</Tabs.TabPane>
</Tabs>
<CronLogModal <CronLogModal
visible={isLogModalVisible} visible={isLogModalVisible}
handleCancel={() => { handleCancel={() => {