mirror of
https://github.com/whyour/qinglong.git
synced 2026-08-12 19:30:48 +08:00
定时任务支持复制
This commit is contained in:
@@ -36,6 +36,7 @@ import {
|
||||
PlusOutlined,
|
||||
UnorderedListOutlined,
|
||||
CheckOutlined,
|
||||
CopyOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import config from '@/utils/config';
|
||||
import { PageContainer } from '@ant-design/pro-layout';
|
||||
@@ -57,7 +58,7 @@ import { useVT } from 'virtualizedtableforantd4';
|
||||
import { ICrontab, OperationName, OperationPath, CrontabStatus } from './type';
|
||||
import Name from '@/components/name';
|
||||
import dayjs from 'dayjs';
|
||||
import { noop } from 'lodash';
|
||||
import { noop, omit } from 'lodash';
|
||||
|
||||
const { Text, Paragraph, Link } = Typography;
|
||||
const { Search } = Input;
|
||||
@@ -620,6 +621,7 @@ const Crontab = () => {
|
||||
icon:
|
||||
record.isDisabled === 1 ? <CheckCircleOutlined /> : <StopOutlined />,
|
||||
},
|
||||
{ label: intl.get('复制'), key: 'copy', icon: <CopyOutlined /> },
|
||||
{ label: intl.get('删除'), key: 'delete', icon: <DeleteOutlined /> },
|
||||
{
|
||||
label: record.isPinned === 1 ? intl.get('取消置顶') : intl.get('置顶'),
|
||||
@@ -655,6 +657,9 @@ const Crontab = () => {
|
||||
case 'edit':
|
||||
editCron(record, index);
|
||||
break;
|
||||
case 'copy':
|
||||
editCron(omit(record, 'id'), index);
|
||||
break;
|
||||
case 'enableOrDisable':
|
||||
enabledOrDisabledCron(record, index);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user