【底座】修复 #IKD0ZT 定时任务,添加年参数时报错

This commit is contained in:
xuyuxiang
2026-09-10 23:21:19 +08:00
parent 3a96092211
commit 2bfa6bd7ed
2 changed files with 14 additions and 4 deletions
@@ -344,6 +344,9 @@
</a-form>
</a-form>
</a-tab-pane>
<!--
注意:Spring 定时任务不支持年字段,仅支持 6 段式 Cron 表达式(秒 分 时 日 月 周)
如需启用年字段,需更换底层定时任务实现(如 Quartz)
<a-tab-pane key="7">
<template #tab>
<div class="cron-num">
@@ -385,6 +388,7 @@
</a-form-item>
</a-form>
</a-tab-pane>
-->
</a-tabs>
</div>
</a-modal>
@@ -719,7 +723,7 @@
}
const submit = () => {
let year = value_year.value ? ' ' + value_year.value : ''
// Spring 定时任务仅支持 6 段式 Cron 表达式,不支持年字段
defaultValue.value =
value_second.value +
' ' +
@@ -731,8 +735,7 @@
' ' +
value_month.value +
' ' +
value_week.value +
year
value_week.value
emit('update:modelValue', defaultValue.value)
modalVisible.value = false
}
+8 -1
View File
@@ -16,7 +16,14 @@
<a-form-item label="任务类名:" name="actionClass">
<a-select v-model:value="formData.actionClass" placeholder="请选择任务类名" :options="actionClassOptions" />
</a-form-item>
<a-form-item ref="cronExpressionRef" label="表达式:" name="cronExpression">
<a-form-item ref="cronExpressionRef" name="cronExpression">
<template #label>
<a-tooltip>
<template #title> Spring 定时任务仅支持 6 段式 Cron 表达式(秒 分 时 日 月 周),不支持年字段 </template>
<question-circle-outlined />
</a-tooltip>
&nbsp; 表达式:
</template>
<cron v-model:modelValue="formData.cronExpression" />
</a-form-item>
<a-form-item label="扩展参数:" name="extJson">