mirror of
https://github.com/Cccc-owo/CheckInApp.git
synced 2026-06-17 14:06:28 +00:00
feat: 支持创建任务时自定义crontab并清理冗余代码
- 添加创建任务时的crontab编辑控件 - 修复创建任务按钮状态重置问题 - 创建任务后自动加载到调度器 - 删除废弃的手动创建任务API和相关代码
This commit is contained in:
@@ -132,7 +132,7 @@ export const useTemplateStore = defineStore('template', {
|
||||
}
|
||||
},
|
||||
|
||||
async createTaskFromTemplate(templateId, threadId, fieldValues, taskName = null) {
|
||||
async createTaskFromTemplate(templateId, threadId, fieldValues, taskName = null, cronExpression = '0 20 * * *') {
|
||||
this.loading = true;
|
||||
this.error = null;
|
||||
try {
|
||||
@@ -141,6 +141,7 @@ export const useTemplateStore = defineStore('template', {
|
||||
thread_id: threadId,
|
||||
field_values: fieldValues,
|
||||
task_name: taskName,
|
||||
cron_expression: cronExpression,
|
||||
});
|
||||
return task;
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user