From 2efb1268b7d330462f8978b48b52f7d34f34f882 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Thu, 18 Jun 2026 16:26:51 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=A8=A1=E5=9E=8B=E4=B8=8A?= =?UTF-8?q?=E7=BA=BF=E6=A3=80=E6=9F=A5UI=E6=94=B9=E4=B8=BAVScrollPanel+HBo?= =?UTF-8?q?x=E6=8C=89=E9=92=AE=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - UI: 检查结果区域改为VScrollPanel(filler),两个按钮用HBox并排 - check_pricing_program.dspy: 优先显示display_text字段,回退到name字段 --- wwwroot/check_pricing_program.dspy | 6 +- wwwroot/llm_launch_check.ui | 170 ++++++++++++++++------------- 2 files changed, 99 insertions(+), 77 deletions(-) diff --git a/wwwroot/check_pricing_program.dspy b/wwwroot/check_pricing_program.dspy index 7f9a6fe..8663997 100644 --- a/wwwroot/check_pricing_program.dspy +++ b/wwwroot/check_pricing_program.dspy @@ -19,7 +19,11 @@ else: pregs = await psor.sqlExe( "select * from pricing_program where id=${ppid}$", {'ppid': ppid}) if pregs: - text = f"✅ 定价项目(pricing_program): {pregs[0].name} (id={ppid})" + p = pregs[0] + display_name = getattr(p, 'display_text', '') or getattr(p, 'name', '') + text = f"✅ 定价项目(pricing_program): {display_name}" + if hasattr(p, 'id'): + text += f" (id={p.id})" else: text = f"❌ 定价项目(pricing_program): ppid={ppid} 未找到" diff --git a/wwwroot/llm_launch_check.ui b/wwwroot/llm_launch_check.ui index 7e89702..811b9f8 100644 --- a/wwwroot/llm_launch_check.ui +++ b/wwwroot/llm_launch_check.ui @@ -16,101 +16,119 @@ } }, { - "widgettype": "Text", + "widgettype": "VScrollPanel", "options": { - "name": "check_status", - "text": "检查中...", - "i18n": false - } - }, - { - "widgettype": "VBox", - "options": { - "name": "checks_list", - "spacing": 5 + "css": "filler", + "width": "100%" }, "subwidgets": [ { - "widgettype": "urlwidget", + "widgettype": "Text", "options": { - "url": "/llmage/check_model_record.dspy?llmid={{llmid}}" + "name": "check_status", + "text": "检查中...", + "i18n": false } }, { - "widgettype": "urlwidget", + "widgettype": "VBox", "options": { - "url": "/llmage/check_date_status.dspy?llmid={{llmid}}" + "name": "checks_list", + "spacing": 5 + }, + "subwidgets": [ + { + "widgettype": "urlwidget", + "options": { + "url": "/llmage/check_model_record.dspy?llmid={{llmid}}" + } + }, + { + "widgettype": "urlwidget", + "options": { + "url": "/llmage/check_date_status.dspy?llmid={{llmid}}" + } + }, + { + "widgettype": "urlwidget", + "options": { + "url": "/llmage/check_upapp.dspy?llmid={{llmid}}" + } + }, + { + "widgettype": "urlwidget", + "options": { + "url": "/llmage/check_uapi.dspy?llmid={{llmid}}" + } + }, + { + "widgettype": "urlwidget", + "options": { + "url": "/llmage/check_uapiio.dspy?llmid={{llmid}}" + } + }, + { + "widgettype": "urlwidget", + "options": { + "url": "/llmage/check_llm_api_map.dspy?llmid={{llmid}}" + } + }, + { + "widgettype": "urlwidget", + "options": { + "url": "/llmage/check_pricing_program.dspy?llmid={{llmid}}" + } + }, + { + "widgettype": "urlwidget", + "options": { + "url": "/llmage/check_pricing_data.dspy?llmid={{llmid}}" + } + } + ] + }, + { + "widgettype": "Text", + "options": { + "name": "test_result", + "text": "", + "i18n": false } }, { - "widgettype": "urlwidget", + "widgettype": "Text", "options": { - "url": "/llmage/check_upapp.dspy?llmid={{llmid}}" - } - }, - { - "widgettype": "urlwidget", - "options": { - "url": "/llmage/check_uapi.dspy?llmid={{llmid}}" - } - }, - { - "widgettype": "urlwidget", - "options": { - "url": "/llmage/check_uapiio.dspy?llmid={{llmid}}" - } - }, - { - "widgettype": "urlwidget", - "options": { - "url": "/llmage/check_llm_api_map.dspy?llmid={{llmid}}" - } - }, - { - "widgettype": "urlwidget", - "options": { - "url": "/llmage/check_pricing_program.dspy?llmid={{llmid}}" - } - }, - { - "widgettype": "urlwidget", - "options": { - "url": "/llmage/check_pricing_data.dspy?llmid={{llmid}}" + "name": "charge_result", + "text": "", + "i18n": false } } ] }, { - "widgettype": "Button", + "widgettype": "HBox", "options": { - "name": "test_btn", - "label": "体验一次", - "i18n": false - } - }, - { - "widgettype": "Text", - "options": { - "name": "test_result", - "text": "", - "i18n": false - } - }, - { - "widgettype": "Button", - "options": { - "name": "charge_btn", - "label": "检查计费", - "i18n": false - } - }, - { - "widgettype": "Text", - "options": { - "name": "charge_result", - "text": "", - "i18n": false - } + "spacing": 10, + "alignItems": "center" + }, + "subwidgets": [ + { + "widgettype": "Button", + "options": { + "name": "test_btn", + "label": "体验一次", + "i18n": false + } + }, + { + "widgettype": "Button", + "options": { + "name": "charge_btn", + "label": "检查计费", + "i18n": false + } + } + ] } ], "binds": [