From 43fc2662770b6afed054ecb02468cc9aabbae6cf Mon Sep 17 00:00:00 2001 From: jingrow Date: Wed, 5 Nov 2025 04:52:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=86=97=E4=BD=99=E7=9A=84ge?= =?UTF-8?q?tFieldSelectOptions=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/jingrow/frontend/src/shared/api/common.ts | 14 -------------- .../frontend/src/shared/api/scheduledJobs.ts | 7 +------ 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/apps/jingrow/frontend/src/shared/api/common.ts b/apps/jingrow/frontend/src/shared/api/common.ts index 6533792..621fcc1 100644 --- a/apps/jingrow/frontend/src/shared/api/common.ts +++ b/apps/jingrow/frontend/src/shared/api/common.ts @@ -259,20 +259,6 @@ export const getRecords = async (pagetype: string, filters: any[] = [], fields: } } -// 获取字段选择选项的通用函数 -export const getFieldSelectOptions = async (pagetype: string, fieldname: string): Promise => { - try { - const res = await axios.post( - `/api/action/jingrow.ai.utils.utils.get_field_select_options`, - { pagetype, fieldname }, - { headers: get_session_api_headers(), withCredentials: true } - ) - return res.data?.message?.options || [] - } catch (error: any) { - return [] - } -} - // 下载图片到本地 export const downloadImageToLocal = async ( imageUrl: string, diff --git a/apps/jingrow/frontend/src/shared/api/scheduledJobs.ts b/apps/jingrow/frontend/src/shared/api/scheduledJobs.ts index b876abd..d54d137 100644 --- a/apps/jingrow/frontend/src/shared/api/scheduledJobs.ts +++ b/apps/jingrow/frontend/src/shared/api/scheduledJobs.ts @@ -1,4 +1,4 @@ -import { deleteRecords, createRecord, updateRecord, getRecord, getFieldSelectOptions, getRecords } from './common' +import { deleteRecords, createRecord, updateRecord, getRecord, getRecords } from './common' // 获取 Scheduled Job 列表 - 使用通用函数 export const getScheduledJobs = async (page: number = 1, pageSize: number = 10, filters: any[] = []): Promise => { @@ -68,11 +68,6 @@ export const toggleScheduledJobStatus = async (name: string): Promise<{ success: } } -// 获取频率选项 - 使用通用函数 -export const getFrequencyOptions = async (): Promise => { - return await getFieldSelectOptions('Local Scheduled Job', 'frequency') -} - // 创建 Scheduled Job - 使用通用函数 export const createScheduledJob = async (data: Record): Promise<{ success: boolean; data?: any; message?: string }> => { return createRecord('Local Scheduled Job', data)