- Add table_top_users_count.ui: user call count ranking (Top 5) - Add table_top_providers_amount.ui: provider transaction amount ranking (Top 5) - Add table_top_providers_count.ui: provider call count ranking (Top 5) - Update index.ui: integrate three new monitoring cards - User call ranking full-width card - Provider amount + count rankings side-by-side in HBox layout
78 lines
2.3 KiB
XML
78 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": {
|
|
"text": "暂无数据",
|
|
"color": "#64748B",
|
|
"fontSize": "14px",
|
|
"textAlign": "center",
|
|
"padding": "20px 0"
|
|
}
|
|
}
|
|
{% endif %}
|
|
]
|
|
}
|