2024-10-14 21:18:42 +08:00
|
|
|
import { reactive } from 'vue';
|
|
|
|
import { $t } from '@/plugins/i18n';
|
|
|
|
|
|
|
|
// 表格列
|
|
|
|
export const columns: TableColumnList = [
|
2024-12-29 22:23:41 +08:00
|
|
|
{ type: 'index', index: (index: number) => index + 1, label: '序号', minWidth: 60 },
|
2024-10-14 21:18:42 +08:00
|
|
|
// 任务名称
|
|
|
|
{ label: $t('schedulers_jobName'), prop: 'jobName' },
|
|
|
|
// 任务分组
|
|
|
|
{ label: $t('schedulers_jobGroup'), prop: 'jobGroup' },
|
|
|
|
// 任务详情
|
2024-10-15 16:52:03 +08:00
|
|
|
{ label: $t('schedulers_description'), prop: 'description' },
|
2024-10-14 21:18:42 +08:00
|
|
|
// 任务类名称
|
|
|
|
{ label: $t('schedulers_jobClassName'), prop: 'jobClassName' },
|
2024-10-21 16:45:04 +08:00
|
|
|
// 触发器名称
|
|
|
|
{ label: $t('schedulers_triggerName'), prop: 'triggerName' },
|
|
|
|
// 触发器状态
|
|
|
|
{ label: $t('schedulers_triggerState'), prop: 'triggerState' },
|
2024-10-14 21:18:42 +08:00
|
|
|
// corn表达式
|
|
|
|
{ label: $t('schedulers_cronExpression'), prop: 'cronExpression' },
|
2024-12-29 22:23:41 +08:00
|
|
|
{ label: $t('table.operation'), fixed: 'right', minWidth: 210, slot: 'operation' },
|
2024-10-14 21:18:42 +08:00
|
|
|
];
|
|
|
|
|
|
|
|
// 添加规则
|
|
|
|
export const rules = reactive({
|
|
|
|
// 任务名称
|
|
|
|
jobName: [{ required: true, message: `${$t('input')}${$t('schedulers_jobName')}`, trigger: 'blur' }],
|
|
|
|
// 任务分组
|
|
|
|
jobGroup: [{ required: true, message: `${$t('input')}${$t('schedulers_jobGroup')}`, trigger: 'blur' }],
|
|
|
|
// 任务类名称
|
|
|
|
jobClassName: [{ required: true, message: `${$t('input')}${$t('schedulers_jobClassName')}`, trigger: 'blur' }],
|
|
|
|
// corn表达式
|
|
|
|
cronExpression: [{ required: true, message: `${$t('input')}${$t('schedulers_cronExpression')}`, trigger: 'blur' }],
|
|
|
|
});
|