refactor: 模型上线检查UI改为VScrollPanel+HBox按钮布局

- UI: 检查结果区域改为VScrollPanel(filler),两个按钮用HBox并排
- check_pricing_program.dspy: 优先显示display_text字段,回退到name字段
This commit is contained in:
Hermes Agent 2026-06-18 16:26:51 +08:00
parent 5ab8171552
commit 2efb1268b7
2 changed files with 99 additions and 77 deletions

View File

@ -19,7 +19,11 @@ else:
pregs = await psor.sqlExe( pregs = await psor.sqlExe(
"select * from pricing_program where id=${ppid}$", {'ppid': ppid}) "select * from pricing_program where id=${ppid}$", {'ppid': ppid})
if pregs: 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: else:
text = f"❌ 定价项目(pricing_program): ppid={ppid} 未找到" text = f"❌ 定价项目(pricing_program): ppid={ppid} 未找到"

View File

@ -15,6 +15,13 @@
"level": 2 "level": 2
} }
}, },
{
"widgettype": "VScrollPanel",
"options": {
"css": "filler",
"width": "100%"
},
"subwidgets": [
{ {
"widgettype": "Text", "widgettype": "Text",
"options": { "options": {
@ -80,14 +87,6 @@
} }
] ]
}, },
{
"widgettype": "Button",
"options": {
"name": "test_btn",
"label": "体验一次",
"i18n": false
}
},
{ {
"widgettype": "Text", "widgettype": "Text",
"options": { "options": {
@ -96,14 +95,6 @@
"i18n": false "i18n": false
} }
}, },
{
"widgettype": "Button",
"options": {
"name": "charge_btn",
"label": "检查计费",
"i18n": false
}
},
{ {
"widgettype": "Text", "widgettype": "Text",
"options": { "options": {
@ -112,6 +103,33 @@
"i18n": false "i18n": false
} }
} }
]
},
{
"widgettype": "HBox",
"options": {
"spacing": 10,
"alignItems": "center"
},
"subwidgets": [
{
"widgettype": "Button",
"options": {
"name": "test_btn",
"label": "体验一次",
"i18n": false
}
},
{
"widgettype": "Button",
"options": {
"name": "charge_btn",
"label": "检查计费",
"i18n": false
}
}
]
}
], ],
"binds": [ "binds": [
{ {