llmage/wwwroot/llm_api_map_manage.ui
yumoqing d84cc1d859 fix: API返回纯数组格式,添加模型上下架功能
- get_organizations/get_upapps/uapi_options: 返回纯数组[{value,text}]
- 新增 get_catelogs/get_apis/get_ppids: 独立下拉数据API
- llm_api_map_manage.ui: 使用独立API替代data_field嵌套格式
- json/llm.json: 移除data_field,添加上架/下架toolbar
- llm_status_update.dspy: 模型上下架状态更新API
- 重新生成 llm/index.ui CRUD界面
2026-05-30 01:43:09 +08:00

219 lines
6.3 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"widgettype": "VBox",
"options": {
"width": "100%",
"height": "100%",
"spacing": 16
},
"subwidgets": [
{
"widgettype": "Title2",
"options": {
"text": "模型能力映射管理",
"halign": "left"
}
},
{
"widgettype": "VScrollPanel",
"options": {
"height": "500px"
},
"subwidgets": [
{
"widgettype": "VBox",
"options": {
"width": "calc(100% - 40px)",
"margin": "0 20px",
"padding": "16px",
"bgcolor": "#f5f5f5",
"spacing": 12
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "添加新映射",
"fontSize": "16px",
"fontWeight": "bold"
}
},
{
"widgettype": "Form",
"id": "add_form",
"options": {
"layout": "horizontal",
"cols": 3,
"fields": [
{
"name": "llmid",
"uitype": "hidden",
"value": "{{params_kw.llmid}}"
},
{
"name": "llmcatelogid",
"label": "选择分类",
"uitype": "code",
"dataurl": "{{entire_url('./api/get_catelogs.dspy')}}",
"placeholder": "请选择分类"
},
{
"name": "apiname",
"label": "API接口",
"uitype": "code",
"dataurl": "{{entire_url('./api/get_apis.dspy')}}",
"placeholder": "请选择API接口"
},
{
"name": "query_apiname",
"label": "查询API",
"uitype": "str",
"placeholder": "异步查询API名多个用逗号分隔"
},
{
"name": "query_period",
"label": "查询间隔(秒)",
"uitype": "int",
"placeholder": "默认30"
},
{
"name": "ppid",
"label": "计费项目",
"uitype": "code",
"dataurl": "{{entire_url('./api/get_ppids.dspy')}}",
"placeholder": "请选择计费项目"
}
],
"buttons": [
{
"name": "add_btn",
"label": "添加映射",
"variant": "primary"
}
]
},
"binds": [
{
"wid": "add_btn",
"event": "click",
"actiontype": "urlwidget",
"target": "PopupWindow",
"popup_options": {
"archor": "cc",
"width": "30%",
"height": "20%"
},
"options": {
"url": "{{entire_url('./api/llm_api_map_create.dspy')}}",
"params": {
"llmid": "$[add_form.llmid]$",
"llmcatelogid": "$[add_form.llmcatelogid]$",
"apiname": "$[add_form.apiname]$",
"query_apiname": "$[add_form.query_apiname]$",
"query_period": "$[add_form.query_period]$",
"ppid": "$[add_form.ppid]$"
}
}
}
]
}
]
}
]
},
{
"widgettype": "VBox",
"options": {
"width": "calc(100% - 40px)",
"margin": "0 20px",
"spacing": 12,
"cheight": 30
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "当前映射列表",
"fontSize": "16px",
"fontWeight": "bold"
}
},
{
"widgettype": "Tabular",
"id": "map_table",
"options": {
"width": "100%",
"height": "400px",
"data_url": "{{entire_url('./api/llm_api_map_list.dspy')}}",
"data_method": "GET",
"page_rows": 20,
"row_options": {
"fields": [
{
"name": "llm_name",
"title": "模型名称",
"width": 180
},
{
"name": "catelog_name",
"title": "分类",
"width": 120
},
{
"name": "apiname",
"title": "API接口",
"width": 150
},
{
"name": "query_apiname",
"title": "查询API",
"width": 180
},
{
"name": "query_period",
"title": "间隔(秒)",
"width": 80
},
{
"name": "ppid_name",
"title": "计费项目",
"width": 150
},
{
"name": "actions",
"title": "操作",
"width": 100,
"uitype": "button",
"data": [
{
"text": "删除",
"event": "delete_map"
}
]
}
]
}
},
"binds": [
{
"wid": "self",
"event": "delete_map",
"actiontype": "urlwidget",
"target": "PopupWindow",
"popup_options": {
"archor": "cc",
"width": "30%",
"height": "20%"
},
"options": {
"url": "{{entire_url('./api/llm_api_map_delete.dspy')}}",
"params": {
"id": "$[event.params.id]$"
}
}
}
]
}
]
}
]
}