From 5eb30c7e85b74fcbbf0a3ca61378aedfd960c300 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 3 Dec 2023 18:11:54 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=20job=20?= =?UTF-8?q?=E5=9C=A8=20IDEA=20=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/infra/jobLog/index.ts | 4 ++-- src/views/infra/job/JobDetail.vue | 2 +- src/views/infra/job/JobForm.vue | 10 ++++++++-- src/views/infra/job/index.vue | 6 +++--- src/views/infra/job/logger/JobLogDetail.vue | 2 +- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/api/infra/jobLog/index.ts b/src/api/infra/jobLog/index.ts index f429cd9e..dc80f1d9 100644 --- a/src/api/infra/jobLog/index.ts +++ b/src/api/infra/jobLog/index.ts @@ -7,8 +7,8 @@ export interface JobLogVO { handlerParam: string cronExpression: string executeIndex: string - beginTime: string - endTime: string + beginTime: Date + endTime: Date duration: string status: number createTime: string diff --git a/src/views/infra/job/JobDetail.vue b/src/views/infra/job/JobDetail.vue index db91d0f8..d2e8c460 100644 --- a/src/views/infra/job/JobDetail.vue +++ b/src/views/infra/job/JobDetail.vue @@ -51,7 +51,7 @@ defineOptions({ name: 'InfraJobDetail' }) const dialogVisible = ref(false) // 弹窗的是否展示 const detailLoading = ref(false) // 表单的加载中 -const detailData = ref({}) // 详情数据 +const detailData = ref({} as JobApi.JobVO) // 详情数据 const nextTimes = ref([]) // 下一轮执行时间的数组 /** 打开弹窗 */ diff --git a/src/views/infra/job/JobForm.vue b/src/views/infra/job/JobForm.vue index 632eef7f..79f85e77 100644 --- a/src/views/infra/job/JobForm.vue +++ b/src/views/infra/job/JobForm.vue @@ -62,7 +62,10 @@ const formData = ref({ name: '', handlerName: '', handlerParam: '', - cronExpression: '' + cronExpression: '', + retryCount: undefined, + retryInterval: undefined, + monitorTimeout: undefined }) const formRules = reactive({ name: [{ required: true, message: '任务名称不能为空', trigger: 'blur' }], @@ -124,7 +127,10 @@ const resetForm = () => { name: '', handlerName: '', handlerParam: '', - cronExpression: '' + cronExpression: '', + retryCount: undefined, + retryInterval: undefined, + monitorTimeout: undefined } formRef.value?.resetFields() } diff --git a/src/views/infra/job/index.vue b/src/views/infra/job/index.vue index fedd3a23..a9ab332b 100644 --- a/src/views/infra/job/index.vue +++ b/src/views/infra/job/index.vue @@ -65,7 +65,7 @@ > 导出 - + 执行日志 @@ -292,8 +292,8 @@ const openDetail = (id: number) => { } /** 跳转执行日志 */ -const handleJobLog = (id: number) => { - if (id > 0) { +const handleJobLog = (id?: number) => { + if (id && id > 0) { push('/job/job-log?id=' + id) } else { push('/job/job-log') diff --git a/src/views/infra/job/logger/JobLogDetail.vue b/src/views/infra/job/logger/JobLogDetail.vue index a010c947..1a84e4e8 100644 --- a/src/views/infra/job/logger/JobLogDetail.vue +++ b/src/views/infra/job/logger/JobLogDetail.vue @@ -40,7 +40,7 @@ defineOptions({ name: 'JobLogDetail' }) const dialogVisible = ref(false) // 弹窗的是否展示 const detailLoading = ref(false) // 表单的加载中 -const detailData = ref({}) // 详情数据 +const detailData = ref({} as JobLogApi.JobLogVO) // 详情数据 /** 打开弹窗 */ const open = async (id: number) => {