feat(crm): 新增关系图谱和统计概览页面 + UI/UX 全面优化
后端: - manifest.rs 新增 Graph 和 Dashboard 页面类型到 PluginPageType 枚举 - 添加 graph 页面验证逻辑(entity/relationship_entity/source_field/target_field) CRM 插件: - plugin.toml 新增关系图谱页面(graph 类型,基于 customer_relationship 实体) - plugin.toml 新增统计概览页面(dashboard 类型) - 侧边栏菜单从 5 项扩展到 7 项 前端 — 关系图谱 (PluginGraphPage): - 渐变节点 + 曲线箭头连线 + 关系类型色彩区分 - 鼠标悬停高亮 + Canvas Tooltip + 点击设为中心节点 - 2-hop 邻居视图 + 统计卡片(客户总数/关系总数/当前中心) - 关系类型图例(可点击筛选)+ 暗色主题适配 - ResizeObserver 自适应 + requestAnimationFrame 动画循环 前端 — 统计概览 (PluginDashboardPage): - 5 实体统计卡片(渐变色条 + 图标 + 数字动画) - 可筛选字段分布卡片(Progress 进度条 + Tag 标签) - 响应式栅格布局 + 骨架屏加载态 + 错误状态持久展示
This commit is contained in:
@@ -407,3 +407,19 @@ type = "crud"
|
||||
entity = "customer_relationship"
|
||||
label = "客户关系"
|
||||
icon = "apartment"
|
||||
|
||||
[[ui.pages]]
|
||||
type = "graph"
|
||||
entity = "customer"
|
||||
label = "关系图谱"
|
||||
icon = "apartment"
|
||||
relationship_entity = "customer_relationship"
|
||||
source_field = "from_customer_id"
|
||||
target_field = "to_customer_id"
|
||||
edge_label_field = "relationship_type"
|
||||
node_label_field = "name"
|
||||
|
||||
[[ui.pages]]
|
||||
type = "dashboard"
|
||||
label = "统计概览"
|
||||
icon = "DashboardOutlined"
|
||||
|
||||
Reference in New Issue
Block a user