dashboard_for_sage/wwwroot/table_top_users_count.ui
yumoqing cdd812f935 i18n: convert dashboard text fields to otext+i18n:true for translation
All Chinese text strings converted to use otext with i18n:true so
bricks framework can look up translations. Template strings with
{{...}} left as text (correct - dynamic content).

Affected files:
- index.ui: 数据概览, 快捷入口, 模型管理, 用户管理, 知识库, 异常记录,
  用户消费排行, 用户调用排行, 供应商交易排行, 供应商调用排行, Top 3 模型
- stat_*.ui: 今日活跃用户, 在线用户, 记账异常, 本月新增用户, 今日消费金额,
  今日调用笔数, 组织机构数, 用户总数
- today_amount.ui, today_usage.ui: 今日交易金额, 今日调用笔数
- accounting_errors.ui, concurrent_users.ui, total_users.ui
- table_top_*.ui: 暂无数据
- top_users_amount.ui: 用户金额TOP5, 排名, 用户, 金额, 调用次数
2026-05-28 14:53:20 +08:00

80 lines
2.3 KiB
XML

{% set users = get_top_users_by_count(request) %}
{
"widgettype": "VBox",
"options": {
"width": "100%"
},
"subwidgets": [
{% for u in users %}
{
"widgettype": "HBox",
"options": {
"width": "100%",
"padding": "12px 0",
{% if not loop.first %}
"borderTop": "1px solid #334155",
{% endif %}
"alignItems": "center"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "{{loop.index}}",
"width": "30px",
"color": "#64748B",
"fontSize": "14px",
"textAlign": "center"
}
},
{
"widgettype": "Text",
"options": {
"text": "{{u.user_name}}",
"flex": "1",
"color": "#F1F5F9",
"fontSize": "14px",
"fontWeight": "500"
}
},
{
"widgettype": "Text",
"options": {
"text": "{{u.cnt}} 笔",
"width": "80px",
"color": "#60A5FA",
"fontSize": "14px",
"fontWeight": "600",
"textAlign": "right"
}
},
{
"widgettype": "Text",
"options": {
"text": "¥{{u.total_amount}}",
"width": "100px",
"color": "#22C55E",
"fontSize": "13px",
"textAlign": "right"
}
}
]
}{% if not loop.last %},{% endif %}
{% endfor %}
{% if not users %}
{
"widgettype": "Text",
"options": {
"otext": "暂无数据",
"i18n": true,
"color": "#64748B",
"fontSize": "14px",
"textAlign": "center",
"padding": "20px 0"
}
}
{% endif %}
]
}