From 6c7375701b519377752df5da89e8c3910c1661d8 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 27 一月 2026 17:40:23 +0800
Subject: [PATCH] Merge branch 'dev_New' of http://114.132.189.42:9002/r/product-inventory-management into dev_New

---
 src/views/reportAnalysis/dataDashboard/components/basic/left-top.vue |   31 ++++++++++++++++++++++++++++---
 1 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/src/views/reportAnalysis/dataDashboard/components/basic/left-top.vue b/src/views/reportAnalysis/dataDashboard/components/basic/left-top.vue
index 998bfef..3840aa0 100644
--- a/src/views/reportAnalysis/dataDashboard/components/basic/left-top.vue
+++ b/src/views/reportAnalysis/dataDashboard/components/basic/left-top.vue
@@ -33,6 +33,18 @@
 // 棰滆壊鍒楄〃
 const landColors = ['#26FFCB', '#24CBFF', '#35FBF4', '#2651FF', '#D1E4F5', '#5782F7', '#2F67EF', '#82BAFF']
 
+// label 瀵屾枃鏈細涓烘瘡涓鑹茬敓鎴愪竴涓皬鍦嗙偣鏍峰紡锛堢‘淇濆湪 label 涓彲瑙侊級
+const dotRich = landColors.reduce((acc, color, idx) => {
+  acc[`dot${idx}`] = {
+    width: 8,
+    height: 8,
+    borderRadius: 8,
+    backgroundColor: color,
+    align: 'center',
+  }
+  return acc
+}, {})
+
 // 鍥句緥閰嶇疆锛堝彸渚х珫鎺掞級
 const landLegend = {
 // 鍦ㄥ埗鍝佸伐搴忔煴鐘跺浘閰嶇疆
@@ -111,14 +123,27 @@
     center: ['50%', '50%'],
     label: {
       show: true,
+      position: 'outside',
       color: '#fff',
       fontSize: 12,
       lineHeight: 18,
+      rich: {
+        ...dotRich,
+        parent: { fontSize: 14, fontWeight: 600, color: '#fff', lineHeight: 20 },
+        child: { fontSize: 12, color: '#fff', lineHeight: 18 },
+      },
       formatter: function (params) {
         const children = params?.data?.children || []
-        if (!children.length) return ''
-        // label 灞曠ず children 鐨� name + value
-        return children.map((c) => `${c.name} ${c.value}`).join('\n')
+        const parentName = params?.data?.name || ''
+        const parentValue = params?.data?.value ?? 0
+        const dotKey = `dot${(params?.dataIndex || 0) % landColors.length}`
+        const dot = `{${dotKey}|} `
+        if (!children.length) return `${dot}{parent|${parentName} ${parentValue}}`
+        // 鐢� marker 鏄剧ず涓庢墖鍖哄悓鑹茬殑灏忓渾鐐癸紝鍐嶆樉绀虹埗绾у悕绉帮紝鍚庨潰鍒楀嚭 children 鐨� name + value
+        return [
+          `${dot}{parent|${parentName} ${parentValue}}`,
+          ...children.map((c) => `{child|${c.name} ${c.value || 0}}`),
+        ].join('\n')
       },
     },
     labelLine: {

--
Gitblit v1.9.3