diff --git a/frontend/src/views/AdminView.vue b/frontend/src/views/AdminView.vue index bb7f0f94..27ae6b71 100644 --- a/frontend/src/views/AdminView.vue +++ b/frontend/src/views/AdminView.vue @@ -426,7 +426,7 @@ const wecomSystemSettings = ref({ }); const wecomIntegrationManifest = ref(null); const schedules = ref([]); -const schedulesLoaded = ref(false); +const schedulesLoaded = ref(false); void schedulesLoaded; const selectedScheduleRuns = ref([]); const scheduleLoading = ref(false); const scheduleRunsLoading = ref(false); @@ -714,13 +714,13 @@ const openScheduleEditModal = async (task: ScheduleTask) => { notify_enabled: !!task.notify_enabled, notify_user_ids_json: task.notify_user_ids_json || [], enabled: !!task.enabled, - data_source_type: task.data_source_type || 'database', + data_source_type: (task.data_source_type || 'database') as 'database' | 'external_api', }; try { const result = await getAdminScheduleTaskConfig(task.id); const cfg = result.config; - scheduleCreateForm.value.data_source_type = result.data_source_type || 'database'; + scheduleCreateForm.value.data_source_type = (result.data_source_type || 'database') as 'database' | 'external_api'; if (cfg) { scheduleSqlEditForm.value = { base_fetch_sql: cfg.base_fetch_sql || '', @@ -861,7 +861,7 @@ const handleTestRun = async () => { testRunLoading.value = true; testRunResult.value = null; try { - const result = await testAdminScheduleRun(name, { + const result = await testAdminScheduleRun(Number(name), { fetch_where_conditions: testRunWhere.value, fetch_order_by: testRunOrderBy.value, limit: testRunLimit.value, @@ -948,7 +948,7 @@ const scheduleSqlEditForm = ref({ api_headers_str: '{}', api_body_template: '', }); -const scheduleSqlSaving = ref(false); +const scheduleSqlSaving = ref(false); void scheduleSqlSaving; const scheduleTestLoading = ref(false); const scheduleTestResult = ref<{ total: number; showing: number; columns: string[]; rows: any[]; sql: string } | null>(null);