From 84d7be872e96547becfbd1647ec77ed56f9f2dde Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 22 九月 2026 10:02:11 +0800
Subject: [PATCH] 新疆-融邦环保 1.大屏展示数据修改 2.销售台账展示字段修改

---
 src/views/reportAnalysis/dataDashboard/components/basic/right-top.vue |   36 ++++++++++++++++++++++++++++++------
 1 files changed, 30 insertions(+), 6 deletions(-)

diff --git a/src/views/reportAnalysis/dataDashboard/components/basic/right-top.vue b/src/views/reportAnalysis/dataDashboard/components/basic/right-top.vue
index 357a452..b5c56f0 100644
--- a/src/views/reportAnalysis/dataDashboard/components/basic/right-top.vue
+++ b/src/views/reportAnalysis/dataDashboard/components/basic/right-top.vue
@@ -21,7 +21,7 @@
 </template>
 
 <script setup>
-import { ref, onMounted, computed } from 'vue'
+import { ref, onMounted, computed, inject, watch } from 'vue'
 import Echarts from '@/components/Echarts/echarts.vue'
 import PanelHeader from '../PanelHeader.vue'
 import DateTypeSwitch from '../DateTypeSwitch.vue'
@@ -32,7 +32,15 @@
   height: '100%',
 }
 
-const radio1 = ref(1)
+// 澶嶇敤鏈粍浠剁殑椤甸潰鍙寚瀹氬垵濮嬪懆鏈燂紝涓嶄紶浠嶆寜銆屽懆銆嶅睍绀猴紙dataDashboard 涓嶅彈褰卞搷锛�
+const props = defineProps({
+  defaultDateType: {
+    type: Number,
+    default: 1, // 1=鍛� 2=鏈� 3=瀛e害
+  },
+})
+
+const radio1 = ref(props.defaultDateType)
 
 // 椋炴満鍥炬爣 SVG path
 const aircraft =
@@ -120,7 +128,7 @@
     textStyle: { fontSize: '100%' },
     formatter: function (params) {
       let result = params[0].axisValueLabel + '<br/>'
-      result += `<div style="">${params[0].marker}${params[0].value}</div>`
+      result += `<div>${params[0].marker}${params[0].value}鍏�</div>`
       return result
     },
   }
@@ -151,12 +159,21 @@
       inverse: false,
       data: xdataName.value,
       axisLabel: {
-        formatter: (params) => {
-          return `{a|${params}}`
+        formatter: (value) => {
+          if (!value) return ''
+          const maxLen = 6 // 姣忚鏈�澶氬瓧绗︽暟锛屽彲鎸夐渶璋冩暣
+          if (value.length <= maxLen) return `{a|${value}}`
+
+          const lines = []
+          for (let i = 0; i < value.length; i += maxLen) {
+            lines.push(value.slice(i, i + maxLen))
+          }
+          // 澶氳鏂囨湰锛屾瘡琛岄兘濂楀悓涓�涓� rich 鏍峰紡
+          return lines.map((line) => `{a|${line}}`).join('\n')
         },
         rich: {
           a: {
-            width: 160,
+            width: 120,
             fontSize: 14,
             color: '#fff',
             padding: [5, 4, 5, 0],
@@ -322,6 +339,13 @@
   fetchSupplierRanking()
 }
 
+const dataDashboardRefreshTick = inject('dataDashboardRefreshTick', null)
+if (dataDashboardRefreshTick) {
+  watch(dataDashboardRefreshTick, () => {
+    fetchSupplierRanking()
+  })
+}
+
 onMounted(() => {
   fetchSupplierRanking()
 })

--
Gitblit v1.9.3