优化
This commit is contained in:
@@ -1,52 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
/** AI模型配置信息 */
|
||||
export interface AiModelConfig {
|
||||
id: number // 主键
|
||||
modelName?: string // 模型名称
|
||||
modelCode?: string // 模型标识/编码
|
||||
platform?: string // 所属平台
|
||||
apiKey?: string // API秘钥
|
||||
status?: number // 状态(0-禁用 1-启用)
|
||||
modelType?: string // 模型类型(image-图像 text-文本 video-视频 audio-音频)
|
||||
consumePoints?: number // 消耗积分
|
||||
remark?: string // 备注
|
||||
}
|
||||
|
||||
// AI模型配置 API
|
||||
export const AiModelConfigApi = {
|
||||
// 查询AI模型配置分页
|
||||
getAiModelConfigPage: async (params: any) => {
|
||||
return await request.get({ url: `/muye/ai-model-config/page`, params })
|
||||
},
|
||||
|
||||
// 查询AI模型配置详情
|
||||
getAiModelConfig: async (id: number) => {
|
||||
return await request.get({ url: `/muye/ai-model-config/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增AI模型配置
|
||||
createAiModelConfig: async (data: AiModelConfig) => {
|
||||
return await request.post({ url: `/muye/ai-model-config/create`, data })
|
||||
},
|
||||
|
||||
// 修改AI模型配置
|
||||
updateAiModelConfig: async (data: AiModelConfig) => {
|
||||
return await request.put({ url: `/muye/ai-model-config/update`, data })
|
||||
},
|
||||
|
||||
// 删除AI模型配置
|
||||
deleteAiModelConfig: async (id: number) => {
|
||||
return await request.delete({ url: `/muye/ai-model-config/delete?id=` + id })
|
||||
},
|
||||
|
||||
/** 批量删除AI模型配置 */
|
||||
deleteAiModelConfigList: async (ids: number[]) => {
|
||||
return await request.delete({ url: `/muye/ai-model-config/delete-list?ids=${ids.join(',')}` })
|
||||
},
|
||||
|
||||
// 导出AI模型配置 Excel
|
||||
exportAiModelConfig: async (params) => {
|
||||
return await request.download({ url: `/muye/ai-model-config/export-excel`, params })
|
||||
},
|
||||
}
|
||||
56
yudao-ui-admin-vue3/src/api/muye/aiserviceconfig/index.ts
Normal file
56
yudao-ui-admin-vue3/src/api/muye/aiserviceconfig/index.ts
Normal file
@@ -0,0 +1,56 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
/** AI第三方服务配置信息 */
|
||||
export interface AiServiceConfig {
|
||||
id: number // 主键
|
||||
serviceName?: string // 服务名称
|
||||
serviceCode?: string // 服务标识
|
||||
platform?: string // 所属平台
|
||||
apiKey?: string // API秘钥
|
||||
status?: number // 状态(0-禁用 1-启用)
|
||||
modelType?: string // 服务类型(image-图像 text-文本 video-视频 audio-音频)
|
||||
consumePoints?: number // 消耗积分
|
||||
remark?: string // 备注
|
||||
}
|
||||
|
||||
// AI第三方服务配置 API
|
||||
export const AiServiceConfigApi = {
|
||||
// 查询AI服务配置分页
|
||||
getAiServiceConfigPage: async (params: any) => {
|
||||
return await request.get({ url: `/muye/ai-service-config/page`, params })
|
||||
},
|
||||
|
||||
// 查询AI服务配置详情
|
||||
getAiServiceConfig: async (id: number) => {
|
||||
return await request.get({ url: `/muye/ai-service-config/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增AI服务配置
|
||||
createAiServiceConfig: async (data: AiServiceConfig) => {
|
||||
return await request.post({ url: `/muye/ai-service-config/create`, data })
|
||||
},
|
||||
|
||||
// 修改AI服务配置
|
||||
updateAiServiceConfig: async (data: AiServiceConfig) => {
|
||||
return await request.put({ url: `/muye/ai-service-config/update`, data })
|
||||
},
|
||||
|
||||
// 删除AI服务配置
|
||||
deleteAiServiceConfig: async (id: number) => {
|
||||
return await request.delete({ url: `/muye/ai-service-config/delete?id=` + id })
|
||||
},
|
||||
|
||||
/** 批量删除AI服务配置 */
|
||||
deleteAiServiceConfigList: async (ids: number[]) => {
|
||||
return await request.delete({ url: `/muye/ai-service-config/delete-list?ids=${ids.join(',')}` })
|
||||
},
|
||||
|
||||
// 导出AI服务配置 Excel
|
||||
exportAiServiceConfig: async (params) => {
|
||||
return await request.download({ url: `/muye/ai-service-config/export-excel`, params })
|
||||
},
|
||||
}
|
||||
|
||||
// 兼容旧名称
|
||||
export const AiModelConfigApi = AiServiceConfigApi
|
||||
export type AiModelConfig = AiServiceConfig
|
||||
Reference in New Issue
Block a user