From df7b96871d485eb1e0146eabe0e61277be8c7853 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期四, 05 三月 2026 16:17:58 +0800
Subject: [PATCH] fix: 去除金额改成产量
---
src/views/reportAnalysis/productionAnalysis/components/right-bottom.vue | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/views/reportAnalysis/productionAnalysis/components/right-bottom.vue b/src/views/reportAnalysis/productionAnalysis/components/right-bottom.vue
index 57b87d0..cd4992a 100644
--- a/src/views/reportAnalysis/productionAnalysis/components/right-bottom.vue
+++ b/src/views/reportAnalysis/productionAnalysis/components/right-bottom.vue
@@ -73,7 +73,7 @@
formatter(params) {
let result = params[0].axisValueLabel + '<br/>'
params.forEach((item) => {
- result += `<div>${item.marker} ${item.seriesName}: ${item.value} 鍏�</div>`
+ result += `<div>${item.marker} ${item.seriesName}: ${item.value} 浠�</div>`
})
return result
},
@@ -83,7 +83,7 @@
{ type: 'category', axisTick: { show: false }, axisLabel: { color: '#B8C8E0' }, data: [] },
])
const yAxis1 = [
- { type: 'value', name: '鍗曚綅: 鍏�', axisLabel: { color: '#B8C8E0' }, nameTextStyle: { color: '#B8C8E0' }, splitLine: { lineStyle: { color: 'rgba(184, 200, 224, 0.2)' } } },
+ { type: 'value', name: '鍗曚綅: 浠�', axisLabel: { color: '#B8C8E0' }, nameTextStyle: { color: '#B8C8E0' }, splitLine: { lineStyle: { color: 'rgba(184, 200, 224, 0.2)' } } },
]
const handleDateTypeChange = () => {
@@ -93,16 +93,20 @@
const fetchData = () => {
productionAccountingAnalysis({ dateType: dateType.value })
.then((res) => {
- if (res.code !== 200 || !Array.isArray(res.data)) return
- const items = res.data
- xAxis1.value[0].data = items.map((d) => d.name)
- chartSeries.value[0].data = items.map((d) => parseFloat(d.value) || 0)
+ if (res.code !== 200) return
+
+ const items = Array.isArray(res.data) ? res.data : []
+
+ // 鍏煎瀛楁锛氭湁鐨勬帴鍙h繑鍥� dateStr锛屾湁鐨勮繑鍥� date
+ xAxis1.value[0].data = items.map((d) => d.dateStr ?? d.date ?? '')
+ chartSeries.value[0].data = items.map((d) => parseFloat(d.numberOfCompleted) || 0)
})
.catch((err) => {
console.error('鑾峰彇鐢熶骇鏍哥畻鍒嗘瀽澶辫触:', err)
})
}
+
onMounted(() => {
fetchData()
})
--
Gitblit v1.9.3