unified_dashboard/wwwroot/dashboard.ui

255 lines
11 KiB
XML

{
"widgettype": "Page",
"options": {
"title": "仪表板",
"height": "100%",
"padding": "0"
},
"subwidgets": [
{
"widgettype": "VBox",
"options": {
"padding": "16px",
"flex": 1,
"overflow": "auto"
},
"subwidgets": [
{
"widgettype": "HBox",
"options": {
"marginBottom": "16px",
"gap": "12px",
"flexWrap": "wrap"
},
"subwidgets": [
{
"widgettype": "VBox",
"options": {
"flex": 1,
"minWidth": "200px",
"bgcolor": "#fff",
"borderRadius": "8px",
"padding": "16px",
"boxShadow": "0 2px 4px rgba(0,0,0,0.1)"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "客户总数",
"fontSize": "14px",
"color": "#666"
}
},
{
"widgettype": "Text",
"id": "kpi_customers",
"options": {
"text": "--",
"fontSize": "28px",
"fontWeight": "bold",
"color": "#1E40AF"
}
}
]
},
{
"widgettype": "VBox",
"options": {
"flex": 1,
"minWidth": "200px",
"bgcolor": "#fff",
"borderRadius": "8px",
"padding": "16px",
"boxShadow": "0 2px 4px rgba(0,0,0,0.1)"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "活跃商机",
"fontSize": "14px",
"color": "#666"
}
},
{
"widgettype": "Text",
"id": "kpi_opportunities",
"options": {
"text": "--",
"fontSize": "28px",
"fontWeight": "bold",
"color": "#059669"
}
}
]
},
{
"widgettype": "VBox",
"options": {
"flex": 1,
"minWidth": "200px",
"bgcolor": "#fff",
"borderRadius": "8px",
"padding": "16px",
"boxShadow": "0 2px 4px rgba(0,0,0,0.1)"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "合同总数",
"fontSize": "14px",
"color": "#666"
}
},
{
"widgettype": "Text",
"id": "kpi_contracts",
"options": {
"text": "--",
"fontSize": "28px",
"fontWeight": "bold",
"color": "#D97706"
}
}
]
},
{
"widgettype": "VBox",
"options": {
"flex": 1,
"minWidth": "200px",
"bgcolor": "#fff",
"borderRadius": "8px",
"padding": "16px",
"boxShadow": "0 2px 4px rgba(0,0,0,0.1)"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "应收总额",
"fontSize": "14px",
"color": "#666"
}
},
{
"widgettype": "Text",
"id": "kpi_receivables",
"options": {
"text": "--",
"fontSize": "28px",
"fontWeight": "bold",
"color": "#DC2626"
}
}
]
}
]
},
{
"widgettype": "HBox",
"options": {
"gap": "16px",
"flexWrap": "wrap"
},
"subwidgets": [
{
"widgettype": "VBox",
"options": {
"flex": 2,
"minWidth": "400px",
"bgcolor": "#fff",
"borderRadius": "8px",
"padding": "16px",
"boxShadow": "0 2px 4px rgba(0,0,0,0.1)"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "销售漏斗",
"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": {
"flex": 1,
"minWidth": "300px",
"bgcolor": "#fff",
"borderRadius": "8px",
"padding": "16px",
"boxShadow": "0 2px 4px rgba(0,0,0,0.1)"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "最新商机",
"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
}
]
}
}
]
}
]
}
]
}
]
}