From a5378ba9d7f0aac37092c43eecdf54782d714bc5 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 29 一月 2026 17:58:25 +0800
Subject: [PATCH] fix: 财务大屏接口联调90%

---
 src/views/reportAnalysis/financialAnalysis/components/left-top.vue |   51 ++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 40 insertions(+), 11 deletions(-)

diff --git a/src/views/reportAnalysis/financialAnalysis/components/left-top.vue b/src/views/reportAnalysis/financialAnalysis/components/left-top.vue
index 1c9f085..c735dba 100644
--- a/src/views/reportAnalysis/financialAnalysis/components/left-top.vue
+++ b/src/views/reportAnalysis/financialAnalysis/components/left-top.vue
@@ -20,7 +20,7 @@
 
 <script setup>
 import { ref, onMounted } from 'vue'
-import { productSalesAnalysis } from '@/api/viewIndex.js'
+import { getAmountHalfYear } from '@/api/viewIndex.js'
 import PanelHeader from './PanelHeader.vue'
 import Echarts from '@/components/Echarts/echarts.vue'
 
@@ -30,13 +30,16 @@
 }
 
 const grid = { left: '3%', right: '4%', bottom: '3%', top: '10%', containLabel: true }
-const barLegend = { show: true, textStyle: { color: '#B8C8E0' }, data: ['閲戦'] }
+const barLegend = {
+  show: true,
+  textStyle: { color: '#B8C8E0' },
+  data: ['寮�绁ㄩ噾棰�', '鍥炴閲戦'],
+}
 const barSeries1 = ref([
   {
-    name: '閲戦',
+    name: '寮�绁ㄩ噾棰�',
     type: 'bar',
-    barGap: 0,
-    barWidth: 30,
+    barWidth: 20,
     emphasis: { focus: 'series' },
     itemStyle: {
       color: {
@@ -46,8 +49,29 @@
         x2: 0,
         y2: 1,
         colorStops: [
-          { offset: 1, color: '#00A4ED' },
-          { offset: 0, color: '#4EE4FF' },
+          { offset: 1, color: 'rgba(0, 164, 237, 0)' },
+          { offset: 0, color: 'rgba(78, 228, 255, 1)' },
+        ],
+      },
+    },
+    data: [],
+  },
+  {
+    name: '鍥炴閲戦',
+    type: 'bar',
+    barGap: '40%',
+    barWidth: 20,
+    emphasis: { focus: 'series' },
+    itemStyle: {
+      color: {
+        type: 'linear',
+        x: 0,
+        y: 0,
+        x2: 0,
+        y2: 1,
+        colorStops: [
+          { offset: 1, color: 'rgba(83, 126, 245, 0.19)' },
+          { offset: 0, color: 'rgba(144, 97, 248, 1)' },
         ],
       },
     },
@@ -71,16 +95,21 @@
 const yAxis1 = [{ type: 'value', axisLabel: { color: '#B8C8E0' } }]
 
 const fetchData = () => {
-  productSalesAnalysis()
+  getAmountHalfYear()
     .then((res) => {
       if (res.code === 200 && Array.isArray(res.data)) {
         const items = res.data
-      xAxis1.value[0].data = items.map((item) => item.name)
-      barSeries1.value[0].data = items.map((item) => parseFloat(item.value) || 0)
+        xAxis1.value[0].data = items.map((item) => item.month)
+        barSeries1.value[0].data = items.map(
+          (item) => parseFloat(item.invoiceAmount) || 0
+        )
+        barSeries1.value[1].data = items.map(
+          (item) => parseFloat(item.receiptAmount) || 0
+        )
       }
     })
     .catch((err) => {
-      console.error('鑾峰彇浜у搧閿�鍞噾棰濆垎鏋愬け璐�:', err)
+      console.error('鑾峰彇杩戝崐骞村洖娆句笌寮�绁ㄦ暟鎹け璐�:', err)
     })
 }
 

--
Gitblit v1.9.3