feat: add user call count top5 and provider transaction top5 monitoring cards
- 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
This commit is contained in:
parent
be1ac95ac7
commit
e7fc646372
@ -406,6 +406,104 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"bgcolor": "#1E293B",
|
||||
"borderRadius": "12px",
|
||||
"padding": "20px",
|
||||
"border": "1px solid #334155",
|
||||
"marginTop": "20px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Title4",
|
||||
"options": {
|
||||
"text": "用户调用排行(Top 5)",
|
||||
"color": "#F1F5F9",
|
||||
"fontWeight": "600",
|
||||
"marginBottom": "16px"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "RefreshWidget",
|
||||
"id": "table_top_users_count",
|
||||
"options": {
|
||||
"period_seconds": 30,
|
||||
"url": "{{entire_url('table_top_users_count.ui')}}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "HBox",
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"gap": "20px",
|
||||
"marginTop": "20px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"width": "50%",
|
||||
"bgcolor": "#1E293B",
|
||||
"borderRadius": "12px",
|
||||
"padding": "20px",
|
||||
"border": "1px solid #334155"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Title4",
|
||||
"options": {
|
||||
"text": "供应商交易排行(金额 Top 5)",
|
||||
"color": "#F1F5F9",
|
||||
"fontWeight": "600",
|
||||
"marginBottom": "16px"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "RefreshWidget",
|
||||
"id": "table_top_providers_amount",
|
||||
"options": {
|
||||
"period_seconds": 30,
|
||||
"url": "{{entire_url('table_top_providers_amount.ui')}}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"width": "50%",
|
||||
"bgcolor": "#1E293B",
|
||||
"borderRadius": "12px",
|
||||
"padding": "20px",
|
||||
"border": "1px solid #334155"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Title4",
|
||||
"options": {
|
||||
"text": "供应商调用排行(数量 Top 5)",
|
||||
"color": "#F1F5F9",
|
||||
"fontWeight": "600",
|
||||
"marginBottom": "16px"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "RefreshWidget",
|
||||
"id": "table_top_providers_count",
|
||||
"options": {
|
||||
"period_seconds": 30,
|
||||
"url": "{{entire_url('table_top_providers_count.ui')}}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
77
wwwroot/table_top_providers_amount.ui
Normal file
77
wwwroot/table_top_providers_amount.ui
Normal file
@ -0,0 +1,77 @@
|
||||
{% set providers = get_top_providers_by_amount(request) %}
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"width": "100%"
|
||||
},
|
||||
"subwidgets": [
|
||||
{% for p in providers %}
|
||||
{
|
||||
"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": "{{p.provider_name}}",
|
||||
"flex": "1",
|
||||
"color": "#F1F5F9",
|
||||
"fontSize": "14px",
|
||||
"fontWeight": "500"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"text": "{{p.cnt}} 笔",
|
||||
"width": "80px",
|
||||
"color": "#94A3B8",
|
||||
"fontSize": "13px",
|
||||
"textAlign": "right"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"text": "¥{{p.total_amount}}",
|
||||
"width": "100px",
|
||||
"color": "#22C55E",
|
||||
"fontSize": "14px",
|
||||
"fontWeight": "600",
|
||||
"textAlign": "right"
|
||||
}
|
||||
}
|
||||
]
|
||||
}{% if not loop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
{% if not providers %}
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"text": "暂无数据",
|
||||
"color": "#64748B",
|
||||
"fontSize": "14px",
|
||||
"textAlign": "center",
|
||||
"padding": "20px 0"
|
||||
}
|
||||
}
|
||||
{% endif %}
|
||||
]
|
||||
}
|
||||
77
wwwroot/table_top_providers_count.ui
Normal file
77
wwwroot/table_top_providers_count.ui
Normal file
@ -0,0 +1,77 @@
|
||||
{% set providers = get_top_providers_by_count(request) %}
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"width": "100%"
|
||||
},
|
||||
"subwidgets": [
|
||||
{% for p in providers %}
|
||||
{
|
||||
"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": "{{p.provider_name}}",
|
||||
"flex": "1",
|
||||
"color": "#F1F5F9",
|
||||
"fontSize": "14px",
|
||||
"fontWeight": "500"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"text": "{{p.cnt}} 笔",
|
||||
"width": "80px",
|
||||
"color": "#60A5FA",
|
||||
"fontSize": "14px",
|
||||
"fontWeight": "600",
|
||||
"textAlign": "right"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"text": "¥{{p.total_amount}}",
|
||||
"width": "100px",
|
||||
"color": "#22C55E",
|
||||
"fontSize": "13px",
|
||||
"textAlign": "right"
|
||||
}
|
||||
}
|
||||
]
|
||||
}{% if not loop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
{% if not providers %}
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"text": "暂无数据",
|
||||
"color": "#64748B",
|
||||
"fontSize": "14px",
|
||||
"textAlign": "center",
|
||||
"padding": "20px 0"
|
||||
}
|
||||
}
|
||||
{% endif %}
|
||||
]
|
||||
}
|
||||
77
wwwroot/table_top_users_count.ui
Normal file
77
wwwroot/table_top_users_count.ui
Normal file
@ -0,0 +1,77 @@
|
||||
{% 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 %}
|
||||
]
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user