mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 09:50:21 +08:00
feat: Provider 摘要 API 改为服务端分页,支持搜索和筛选
- 后端 /summary 接口新增 page/page_size/search/status/api_format/model_id 参数 - 新增 ProviderSummaryPageResponse 分页响应模型 - 前端 useProviderFilters 从客户端筛选改为构建服务端查询参数 - ProviderManagement 通过 watch queryParams 实现分页/筛选联动,搜索 debounce 300ms - PriorityManagementDialog 改为对话框打开时自行加载全量 providers - 其他使用方(StandaloneKeyFormDialog/UserFormDialog/ReplayDialog/ModelManagement)适配新接口
This commit is contained in:
@@ -401,12 +401,12 @@ const { isEditMode, handleDialogUpdate, handleCancel } = useFormDialog({
|
||||
// 加载选项数据
|
||||
async function loadAccessRestrictionOptions() {
|
||||
try {
|
||||
const [providersData, modelsData, formatsData] = await Promise.all([
|
||||
getProvidersSummary(),
|
||||
const [providersResponse, modelsData, formatsData] = await Promise.all([
|
||||
getProvidersSummary({ page_size: 9999 }),
|
||||
getGlobalModels({ limit: 1000, is_active: true }),
|
||||
adminApi.getApiFormats()
|
||||
])
|
||||
providers.value = providersData
|
||||
providers.value = providersResponse.items
|
||||
globalModels.value = modelsData.models || []
|
||||
allApiFormats.value = formatsData.formats?.map((f: { value: string }) => f.value) || []
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user