From 710bcdab858d407d3be9e7a1df32282379c29df6 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 28 一月 2026 17:58:00 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_New' into dev_New

---
 src/views/reportAnalysis/dataDashboard/components/basic/left-bottom.vue |   72 ++++++++++++++++++++++++-----------
 1 files changed, 49 insertions(+), 23 deletions(-)

diff --git a/src/views/reportAnalysis/dataDashboard/components/basic/left-bottom.vue b/src/views/reportAnalysis/dataDashboard/components/basic/left-bottom.vue
index e4ebc30..da736e1 100644
--- a/src/views/reportAnalysis/dataDashboard/components/basic/left-bottom.vue
+++ b/src/views/reportAnalysis/dataDashboard/components/basic/left-bottom.vue
@@ -9,6 +9,8 @@
           placeholder="璇烽�夋嫨瀹㈡埛"
           clearable
           filterable
+          popper-class="customer-select-dropdown"
+          :teleported="false"
           @change="handleFilterChange"
         >
           <el-option
@@ -42,18 +44,16 @@
 import Echarts from '@/components/Echarts/echarts.vue'
 import PanelHeader from '../PanelHeader.vue'
 import DateTypeSwitch from '../DateTypeSwitch.vue'
-import { qualityStatistics } from '@/api/viewIndex.js'
+import { customerRevenueAnalysis } from '@/api/viewIndex.js'
 import { listCustomer } from '@/api/basicData/customerFile.js'
 
 const dateType = ref(1) // 1=鍛� 2=鏈� 3=瀛e害
 const customerValue = ref(null)
 const customerOptions = ref([])
 
-// 璐ㄦ缁熻瀵硅薄
-const qualityStatisticsObject = ref({
-  supplierNum: 0,
-  processNum: 0,
-  factoryNum: 0,
+// 钀ユ敹鍒嗘瀽鏁版嵁
+const revenueData = ref({
+  items: []
 })
 
 const chartStyle = {
@@ -108,7 +108,7 @@
   formatter: function (params) {
     let result = params[0].axisValueLabel + '<br/>'
     params.forEach((item) => {
-      result += `<div style="color: #B8C8E0">${item.marker} ${item.seriesName}: ${item.value}</div>`
+      result += `<div>${item.marker} ${item.seriesName}: ${item.value}</div>`
     })
     return result
   },
@@ -130,25 +130,34 @@
   },
 ]
 
-// 璐ㄦ缁熻
-const qualityStatisticsInfo = () => {
-  qualityStatistics()
+// 鑾峰彇瀹㈡埛钀ユ敹鍒嗘瀽鏁版嵁
+const getCustomerRevenueAnalysis = () => {
+  if (customerOptions.value.length > 0 && !customerValue.value) {
+    // 榛樿閫変腑绗竴涓鎴�
+    customerValue.value = customerOptions.value[0].value
+  }
+
+  if (!customerValue.value) return
+
+  const params = {
+    customerId: customerValue.value,
+    type: dateType.value
+  }
+
+  customerRevenueAnalysis(params)
     .then((res) => {
-      // 鍒囨崲绛涢�夋潯浠舵椂锛屽厛娓呯┖鍐嶅~鍏咃紝閬垮厤閲嶅 push
       xAxis1.value[0].data = []
       barSeries1.value[0].data = []
 
-      res.data.item.forEach((item) => {
-        xAxis1.value[0].data.push(item.date)
-        // 杩欓噷鏆傜敤 supplierNum 浣滀负鏌辩姸鍥炬暟鍊硷紙鎺ュ彛杩斿洖閲屽綋鍓嶄篃鏈夎繖涓変釜瀛楁锛�
-        barSeries1.value[0].data.push(item.supplierNum)
+      const items = res.data?.items || []
+      items.forEach((item) => {
+        xAxis1.value[0].data.push(item.name)
+        barSeries1.value[0].data.push(item.value)
       })
-      qualityStatisticsObject.value.supplierNum = res.data.supplierNum
-      qualityStatisticsObject.value.processNum = res.data.processNum
-      qualityStatisticsObject.value.factoryNum = res.data.factoryNum
+      revenueData.value = res.data
     })
     .catch((error) => {
-      console.error('鑾峰彇璐ㄦ缁熻澶辫触:', error)
+      console.error('鑾峰彇瀹㈡埛钀ユ敹鍒嗘瀽澶辫触:', error)
     })
 }
 
@@ -161,6 +170,12 @@
       label: r.customerName || r.name || r.customer || '-',
       value: r.id ?? r.customerId ?? r.customerCode ?? r.customerName,
     }))
+    
+    // 鑾峰彇鍒伴�夐」鍚庯紝濡傛灉杩樻病閫変腑锛岄粯璁ら�変腑绗竴涓�
+    if (customerOptions.value.length > 0 && !customerValue.value) {
+      customerValue.value = customerOptions.value[0].value
+      getCustomerRevenueAnalysis()
+    }
   } catch (e) {
     // 鎺ュ彛寮傚父鏃剁粰涓�缁勬ā鎷熷鎴凤紝淇濊瘉UI鍙敤
     customerOptions.value = [
@@ -174,14 +189,11 @@
 }
 
 const handleFilterChange = () => {
-  // 鐩墠 qualityStatistics 鎺ュ彛鏈惡甯︾瓫閫夊弬鏁帮紝杩欓噷鍏堢粺涓�瑙﹀彂鍒锋柊锛岄伩鍏嶉噸澶嶆暟鎹�
-  // 鑻ュ悗绔悗缁敮鎸� customerId/type锛屽彲鍦� qualityStatistics() 澶勬敼涓轰紶鍙�
-  qualityStatisticsInfo()
+  getCustomerRevenueAnalysis()
 }
 
 onMounted(() => {
   fetchCustomerOptions()
-  qualityStatisticsInfo()
 })
 </script>
 
@@ -232,3 +244,17 @@
   height: 478px;
 }
 </style>
+
+<style>
+/* 鍏ㄥ睆妯″紡涓嬩笅鎷夋灞傜骇淇 */
+.customer-select-dropdown {
+  z-index: 10001 !important;
+}
+
+/* 纭繚鍦ㄥ叏灞忓鍣ㄥ唴鐨勪笅鎷夋涔熻兘姝e父鏄剧ず */
+.scale-container:fullscreen .customer-select-dropdown,
+.scale-container:-webkit-full-screen .customer-select-dropdown,
+.scale-container:-ms-fullscreen .customer-select-dropdown {
+  z-index: 10001 !important;
+}
+</style>

--
Gitblit v1.9.3