- Updated core.py, init.py, mysql.ddl.sql - Added __init__.py - Added API files: dashboard_kpi, report_list - Added UI files: base.ui, dashboard.ui, reports.ui
84 lines
4.6 KiB
XML
84 lines
4.6 KiB
XML
{
|
|
"widgettype": "Page",
|
|
"options": {
|
|
"title": "仪表板",
|
|
"style": {"height": "100%", "padding": "0"}
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {"style": {"padding": "16px", "flex": 1, "overflow": "auto"}},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "HBox",
|
|
"options": {"style": {"marginBottom": "16px", "gap": "12px", "flexWrap": "wrap"}},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {"style": {"flex": 1, "minWidth": "200px", "backgroundColor": "#fff", "borderRadius": "8px", "padding": "16px", "boxShadow": "0 2px 4px rgba(0,0,0,0.1)"}},
|
|
"subwidgets": [
|
|
{"widgettype": "Text", "options": {"text": "客户总数", "style": {"fontSize": "14px", "color": "#666"}}},
|
|
{"widgettype": "Text", "id": "kpi_customers", "options": {"text": "--", "style": {"fontSize": "28px", "fontWeight": "bold", "color": "#1E40AF"}}}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {"style": {"flex": 1, "minWidth": "200px", "backgroundColor": "#fff", "borderRadius": "8px", "padding": "16px", "boxShadow": "0 2px 4px rgba(0,0,0,0.1)"}},
|
|
"subwidgets": [
|
|
{"widgettype": "Text", "options": {"text": "活跃商机", "style": {"fontSize": "14px", "color": "#666"}}},
|
|
{"widgettype": "Text", "id": "kpi_opportunities", "options": {"text": "--", "style": {"fontSize": "28px", "fontWeight": "bold", "color": "#059669"}}}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {"style": {"flex": 1, "minWidth": "200px", "backgroundColor": "#fff", "borderRadius": "8px", "padding": "16px", "boxShadow": "0 2px 4px rgba(0,0,0,0.1)"}},
|
|
"subwidgets": [
|
|
{"widgettype": "Text", "options": {"text": "合同总数", "style": {"fontSize": "14px", "color": "#666"}}},
|
|
{"widgettype": "Text", "id": "kpi_contracts", "options": {"text": "--", "style": {"fontSize": "28px", "fontWeight": "bold", "color": "#D97706"}}}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {"style": {"flex": 1, "minWidth": "200px", "backgroundColor": "#fff", "borderRadius": "8px", "padding": "16px", "boxShadow": "0 2px 4px rgba(0,0,0,0.1)"}},
|
|
"subwidgets": [
|
|
{"widgettype": "Text", "options": {"text": "应收总额", "style": {"fontSize": "14px", "color": "#666"}}},
|
|
{"widgettype": "Text", "id": "kpi_receivables", "options": {"text": "--", "style": {"fontSize": "28px", "fontWeight": "bold", "color": "#DC2626"}}}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "HBox",
|
|
"options": {"style": {"gap": "16px", "flexWrap": "wrap"}},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {"style": {"flex": 2, "minWidth": "400px", "backgroundColor": "#fff", "borderRadius": "8px", "padding": "16px", "boxShadow": "0 2px 4px rgba(0,0,0,0.1)"}},
|
|
"subwidgets": [
|
|
{"widgettype": "Text", "options": {"text": "销售漏斗", "style": {"fontSize": "16px", "fontWeight": "bold", "marginBottom": "12px"}}},
|
|
{"widgettype": "DataGrid", "id": "funnel_grid", "options": {"url": "{{entire_url('api/dashboard_kpi.dspy')}}?type=sales_funnel", "columns": [
|
|
{"field": "stage", "header": "阶段", "width": 120},
|
|
{"field": "count", "header": "数量", "width": 80},
|
|
{"field": "amount", "header": "金额", "width": 120}
|
|
]}}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {"style": {"flex": 1, "minWidth": "300px", "backgroundColor": "#fff", "borderRadius": "8px", "padding": "16px", "boxShadow": "0 2px 4px rgba(0,0,0,0.1)"}},
|
|
"subwidgets": [
|
|
{"widgettype": "Text", "options": {"text": "最新商机", "style": {"fontSize": "16px", "fontWeight": "bold", "marginBottom": "12px"}}},
|
|
{"widgettype": "DataGrid", "id": "recent_opp_grid", "options": {"url": "{{entire_url('api/dashboard_kpi.dspy')}}?type=recent_opportunities", "columns": [
|
|
{"field": "customer_name", "header": "客户", "width": 120},
|
|
{"field": "estimated_amount", "header": "金额", "width": 100},
|
|
{"field": "current_stage", "header": "阶段", "width": 80}
|
|
]}}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|