删除冗余的getFieldSelectOptions函数

This commit is contained in:
jingrow 2025-11-05 04:52:37 +08:00
parent f711090e8d
commit 43fc266277
2 changed files with 1 additions and 20 deletions

View File

@ -259,20 +259,6 @@ export const getRecords = async (pagetype: string, filters: any[] = [], fields:
} }
} }
// 获取字段选择选项的通用函数
export const getFieldSelectOptions = async (pagetype: string, fieldname: string): Promise<string[]> => {
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 ( export const downloadImageToLocal = async (
imageUrl: string, imageUrl: string,

View File

@ -1,4 +1,4 @@
import { deleteRecords, createRecord, updateRecord, getRecord, getFieldSelectOptions, getRecords } from './common' import { deleteRecords, createRecord, updateRecord, getRecord, getRecords } from './common'
// 获取 Scheduled Job 列表 - 使用通用函数 // 获取 Scheduled Job 列表 - 使用通用函数
export const getScheduledJobs = async (page: number = 1, pageSize: number = 10, filters: any[] = []): Promise<any> => { export const getScheduledJobs = async (page: number = 1, pageSize: number = 10, filters: any[] = []): Promise<any> => {
@ -68,11 +68,6 @@ export const toggleScheduledJobStatus = async (name: string): Promise<{ success:
} }
} }
// 获取频率选项 - 使用通用函数
export const getFrequencyOptions = async (): Promise<string[]> => {
return await getFieldSelectOptions('Local Scheduled Job', 'frequency')
}
// 创建 Scheduled Job - 使用通用函数 // 创建 Scheduled Job - 使用通用函数
export const createScheduledJob = async (data: Record<string, any>): Promise<{ success: boolean; data?: any; message?: string }> => { export const createScheduledJob = async (data: Record<string, any>): Promise<{ success: boolean; data?: any; message?: string }> => {
return createRecord('Local Scheduled Job', data) return createRecord('Local Scheduled Job', data)