From 6f977450c962214210176741a608c97709e39ed1 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Thu, 18 Jun 2026 13:58:05 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E8=AE=B0=E8=B4=A6=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E8=AE=B0=E5=BD=95=E4=BC=98=E5=8C=96=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=20-=20userid/userorgid/llmid=E6=98=BE=E7=A4=BA=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=20-=20=E7=A7=BB=E9=99=A4cost/use=5Fdate=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=20-=20InlineForm=E7=B4=A7=E5=87=91=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/llmusage_accounting_failed.json | 18 +++++ wwwroot/llmusage_accounting_failed/index.ui | 84 +++++++++++---------- 2 files changed, 64 insertions(+), 38 deletions(-) diff --git a/models/llmusage_accounting_failed.json b/models/llmusage_accounting_failed.json index 45866e5..a8cf4a3 100644 --- a/models/llmusage_accounting_failed.json +++ b/models/llmusage_accounting_failed.json @@ -129,6 +129,24 @@ "valuefield": "k", "textfield": "v", "cond": "parentid='handled_flg'" + }, + { + "field": "userid", + "table": "users", + "valuefield": "userid", + "textfield": "username" + }, + { + "field": "userorgid", + "table": "organization", + "valuefield": "id", + "textfield": "orgname" + }, + { + "field": "llmid", + "table": "llm", + "valuefield": "id", + "textfield": "name" } ] } diff --git a/wwwroot/llmusage_accounting_failed/index.ui b/wwwroot/llmusage_accounting_failed/index.ui index 6206da8..9b0ae67 100644 --- a/wwwroot/llmusage_accounting_failed/index.ui +++ b/wwwroot/llmusage_accounting_failed/index.ui @@ -1,8 +1,10 @@ { "widgettype": "VBox", "options": { - "css": "filler", "height": "100%", - "width": "100%" + "height": "100%", + "width": "100%", + "padding": "8px", + "gap": "8px" }, "subwidgets": [ { @@ -11,7 +13,6 @@ "options": { "css": "card", "padding": "8px", - "show_label": true, "submit_label": "查询", "submit_css": "primary", "fields": [ @@ -40,12 +41,6 @@ "placeholder": "用户ID", "cwidth": 12 }, - { - "name": "use_date", - "label": "使用日期", - "uitype": "date", - "cwidth": 12 - }, { "name": "failed_reason", "label": "失败原因", @@ -160,42 +155,66 @@ }, { "name": "llmid", - "title": "模型id", + "title": "模型", "type": "str", "length": 32, "cwidth": 18, - "uitype": "str", + "uitype": "code", + "valueField": "llmid", + "textField": "llmid_text", + "params": { + "dbname": "llmage", + "table": "llm", + "tblvalue": "id", + "tbltext": "name", + "valueField": "llmid", + "textField": "llmid_text" + }, + "dataurl": "{{entire_url('/appbase/get_code.dspy')}}", "datatype": "str", - "label": "模型id" + "label": "模型" }, { "name": "userid", - "title": "用户id", + "title": "用户", "type": "str", "length": 32, "cwidth": 18, - "uitype": "str", + "uitype": "code", + "valueField": "userid", + "textField": "userid_text", + "params": { + "dbname": "sage", + "table": "users", + "tblvalue": "userid", + "tbltext": "username", + "valueField": "userid", + "textField": "userid_text" + }, + "dataurl": "{{entire_url('/appbase/get_code.dspy')}}", "datatype": "str", - "label": "用户id" + "label": "用户" }, { "name": "userorgid", - "title": "用户机构id", + "title": "机构", "type": "str", "length": 32, "cwidth": 18, - "uitype": "str", + "uitype": "code", + "valueField": "userorgid", + "textField": "userorgid_text", + "params": { + "dbname": "sage", + "table": "organization", + "tblvalue": "id", + "tbltext": "orgname", + "valueField": "userorgid", + "textField": "userorgid_text" + }, + "dataurl": "{{entire_url('/appbase/get_code.dspy')}}", "datatype": "str", - "label": "用户机构id" - }, - { - "name": "use_date", - "title": "使用日期", - "type": "date", - "length": 0, - "uitype": "date", - "datatype": "date", - "label": "使用日期" + "label": "机构" }, { "name": "use_time", @@ -217,17 +236,6 @@ "datatype": "double", "label": "交易金额" }, - { - "name": "cost", - "title": "交易成本", - "type": "double", - "length": 18, - "dec": 5, - "cwidth": 18, - "uitype": "float", - "datatype": "double", - "label": "交易成本" - }, { "name": "failed_reason", "title": "失败原因",