load_dashboard.py: - get_customer_users_today: 今日各用户调用次数+金额,含总计行 - get_customer_users_month: 本月各用户调用次数+金额,含总计行 customer_usage.ui: 底部嵌入 customer_users_table.ui customer_users_table.ui: 左右双栏 Tabular(今日|本月) api/: customer_users_today.dspy + customer_users_month.dspy scripts/load_path.py: +3条路径注册
121 lines
4.8 KiB
XML
121 lines
4.8 KiB
XML
{
|
|
"widgettype": "VBox",
|
|
"options": {
|
|
"css": "card",
|
|
"width": "100%",
|
|
"borderRadius": "12px",
|
|
"padding": "20px",
|
|
"marginBottom": "20px"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "HBox",
|
|
"options": {
|
|
"width": "100%",
|
|
"alignItems": "center",
|
|
"marginBottom": "16px"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Title4",
|
|
"options": {
|
|
"fontWeight": "600",
|
|
"otext": "按用户统计",
|
|
"i18n": true
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Filler"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "HBox",
|
|
"options": {
|
|
"width": "100%",
|
|
"gap": "20px"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {
|
|
"width": "50%"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Text",
|
|
"options": {
|
|
"otext": "今日",
|
|
"i18n": true,
|
|
"fontSize": "14px",
|
|
"fontWeight": "600",
|
|
"marginBottom": "8px"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Tabular",
|
|
"options": {
|
|
"data_url": "{{entire_url('api/customer_users_today.dspy')}}",
|
|
"data_method": "GET",
|
|
"width": "100%",
|
|
"height": "auto",
|
|
"row_options": {
|
|
"browserfields": {
|
|
"exclouded": [],
|
|
"cwidth": {}
|
|
},
|
|
"fields": [
|
|
{"name": "user_name", "title": "用户", "type": "str", "uitype": "str", "label": "用户", "cwidth": 20},
|
|
{"name": "call_cnt", "title": "调用次数", "type": "int", "uitype": "int", "label": "调用次数", "cwidth": 12},
|
|
{"name": "total_amount", "title": "金额", "type": "float", "uitype": "float", "label": "金额", "cwidth": 12}
|
|
]
|
|
},
|
|
"page_rows": 50
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {
|
|
"width": "50%"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Text",
|
|
"options": {
|
|
"otext": "本月",
|
|
"i18n": true,
|
|
"fontSize": "14px",
|
|
"fontWeight": "600",
|
|
"marginBottom": "8px"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Tabular",
|
|
"options": {
|
|
"data_url": "{{entire_url('api/customer_users_month.dspy')}}",
|
|
"data_method": "GET",
|
|
"width": "100%",
|
|
"height": "auto",
|
|
"row_options": {
|
|
"browserfields": {
|
|
"exclouded": [],
|
|
"cwidth": {}
|
|
},
|
|
"fields": [
|
|
{"name": "user_name", "title": "用户", "type": "str", "uitype": "str", "label": "用户", "cwidth": 20},
|
|
{"name": "call_cnt", "title": "调用次数", "type": "int", "uitype": "int", "label": "调用次数", "cwidth": 12},
|
|
{"name": "total_amount", "title": "金额", "type": "float", "uitype": "float", "label": "金额", "cwidth": 12}
|
|
]
|
|
},
|
|
"page_rows": 50
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|