From fd7dbde492353f8d8d85c1889dde600399717d7e Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 30 一月 2026 15:42:37 +0800
Subject: [PATCH] 进销存升级 1.备件管理未做分页
---
src/views/reportAnalysis/financialAnalysis/components/center-bottom.vue | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/src/views/reportAnalysis/financialAnalysis/components/center-bottom.vue b/src/views/reportAnalysis/financialAnalysis/components/center-bottom.vue
index 1d15a39..c8eeeb9 100644
--- a/src/views/reportAnalysis/financialAnalysis/components/center-bottom.vue
+++ b/src/views/reportAnalysis/financialAnalysis/components/center-bottom.vue
@@ -22,6 +22,7 @@
import { ref, onMounted } from 'vue'
import Echarts from '@/components/Echarts/echarts.vue'
import PanelHeader from './PanelHeader.vue'
+import { profitTrendAnalysis } from '@/api/viewIndex.js'
const chartStyle = { width: '100%', height: '150%' }
const grid = { left: '3%', right: '4%', bottom: '3%', top: '4%', containLabel: true }
@@ -70,10 +71,22 @@
const yAxis1 = [{ type: 'value', axisLabel: { color: '#B8C8E0' } }]
+const fetchData = () => {
+ profitTrendAnalysis()
+ .then((res) => {
+ if (res.code === 200 && Array.isArray(res.data)) {
+ const list = res.data
+ xAxis1.value[0].data = list.map((d) => d.name)
+ barSeries1.value[0].data = list.map((d) => parseFloat(d.value) || 0)
+ }
+ })
+ .catch((err) => {
+ console.error('鑾峰彇鍒╂鼎瓒嬪娍鍒嗘瀽澶辫触:', err)
+ })
+}
+
onMounted(() => {
- // 鍏堢敤鏈湴鍋囨暟鎹紙鍚庣画濡傛湁鎺ュ彛鍙浛鎹級
- xAxis1.value[0].data = ['1鏈�', '2鏈�', '3鏈�', '4鏈�', '5鏈�', '6鏈�']
- barSeries1.value[0].data = [12000, 18000, 9000, 16000, 14000, 20000]
+ fetchData()
})
</script>
--
Gitblit v1.9.3