Files
ipms-sjy/yudao-ui-admin-vue3/src/views/infra/job/job.data.ts

70 lines
1.4 KiB
TypeScript
Raw Normal View History

2023-01-18 14:23:45 +08:00
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
2022-11-22 17:07:30 +08:00
const { t } = useI18n() // 国际化
2022-07-18 19:06:37 +08:00
// 表单校验
export const rules = reactive({
name: [required],
handlerName: [required],
cronExpression: [required],
retryCount: [required],
retryInterval: [required]
})
// CrudSchema
2022-11-22 17:07:30 +08:00
const crudSchemas = reactive<VxeCrudSchema>({
primaryKey: 'id',
primaryType: 'seq',
primaryTitle: '任务编号',
2022-11-22 17:07:30 +08:00
action: true,
2022-11-29 14:47:15 +08:00
actionWidth: '280px',
2022-11-22 17:07:30 +08:00
columns: [
{
title: '任务名称',
field: 'name',
2022-11-29 23:23:33 +08:00
isSearch: true
2022-07-18 19:06:37 +08:00
},
2022-11-22 17:07:30 +08:00
{
title: t('common.status'),
field: 'status',
dictType: DICT_TYPE.INFRA_JOB_STATUS,
dictClass: 'number',
2022-11-29 23:23:33 +08:00
isForm: false,
isSearch: true
2022-07-29 01:25:44 +08:00
},
2022-11-22 17:07:30 +08:00
{
title: '处理器的名字',
field: 'handlerName',
isSearch: true
},
{
title: '处理器的参数',
field: 'handlerParam',
isTable: false
},
{
title: 'CRON 表达式',
field: 'cronExpression'
2022-07-18 19:06:37 +08:00
},
2022-11-28 23:13:20 +08:00
{
title: '后续执行时间',
field: 'nextTimes',
isTable: false,
isForm: false
},
2022-11-22 17:07:30 +08:00
{
title: '重试次数',
field: 'retryCount',
isTable: false
},
{
title: '重试间隔',
field: 'retryInterval',
isTable: false
},
{
title: '监控超时时间',
field: 'monitorTimeout',
isTable: false
2022-07-18 19:06:37 +08:00
}
2022-11-22 17:07:30 +08:00
]
})
export const { allSchemas } = useVxeCrudSchemas(crudSchemas)