🐛 修复 job 在 IDEA 报错的问题

This commit is contained in:
YunaiV 2023-12-03 18:11:54 +08:00
parent 85fe4ad8d6
commit 5eb30c7e85
5 changed files with 15 additions and 9 deletions

View File

@ -7,8 +7,8 @@ export interface JobLogVO {
handlerParam: string handlerParam: string
cronExpression: string cronExpression: string
executeIndex: string executeIndex: string
beginTime: string beginTime: Date
endTime: string endTime: Date
duration: string duration: string
status: number status: number
createTime: string createTime: string

View File

@ -51,7 +51,7 @@ defineOptions({ name: 'InfraJobDetail' })
const dialogVisible = ref(false) // const dialogVisible = ref(false) //
const detailLoading = ref(false) // const detailLoading = ref(false) //
const detailData = ref({}) // const detailData = ref({} as JobApi.JobVO) //
const nextTimes = ref([]) // const nextTimes = ref([]) //
/** 打开弹窗 */ /** 打开弹窗 */

View File

@ -62,7 +62,10 @@ const formData = ref({
name: '', name: '',
handlerName: '', handlerName: '',
handlerParam: '', handlerParam: '',
cronExpression: '' cronExpression: '',
retryCount: undefined,
retryInterval: undefined,
monitorTimeout: undefined
}) })
const formRules = reactive({ const formRules = reactive({
name: [{ required: true, message: '任务名称不能为空', trigger: 'blur' }], name: [{ required: true, message: '任务名称不能为空', trigger: 'blur' }],
@ -124,7 +127,10 @@ const resetForm = () => {
name: '', name: '',
handlerName: '', handlerName: '',
handlerParam: '', handlerParam: '',
cronExpression: '' cronExpression: '',
retryCount: undefined,
retryInterval: undefined,
monitorTimeout: undefined
} }
formRef.value?.resetFields() formRef.value?.resetFields()
} }

View File

@ -65,7 +65,7 @@
> >
<Icon icon="ep:download" class="mr-5px" /> 导出 <Icon icon="ep:download" class="mr-5px" /> 导出
</el-button> </el-button>
<el-button type="info" plain @click="handleJobLog" v-hasPermi="['infra:job:query']"> <el-button type="info" plain @click="handleJobLog()" v-hasPermi="['infra:job:query']">
<Icon icon="ep:zoom-in" class="mr-5px" /> 执行日志 <Icon icon="ep:zoom-in" class="mr-5px" /> 执行日志
</el-button> </el-button>
</el-form-item> </el-form-item>
@ -292,8 +292,8 @@ const openDetail = (id: number) => {
} }
/** 跳转执行日志 */ /** 跳转执行日志 */
const handleJobLog = (id: number) => { const handleJobLog = (id?: number) => {
if (id > 0) { if (id && id > 0) {
push('/job/job-log?id=' + id) push('/job/job-log?id=' + id)
} else { } else {
push('/job/job-log') push('/job/job-log')

View File

@ -40,7 +40,7 @@ defineOptions({ name: 'JobLogDetail' })
const dialogVisible = ref(false) // const dialogVisible = ref(false) //
const detailLoading = ref(false) // const detailLoading = ref(false) //
const detailData = ref({}) // const detailData = ref({} as JobLogApi.JobLogVO) //
/** 打开弹窗 */ /** 打开弹窗 */
const open = async (id: number) => { const open = async (id: number) => {