From 1156fbe1fa77e4a6b7d890604d25e98edf8a7059 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期三, 28 一月 2026 17:40:09 +0800
Subject: [PATCH] Merge branch 'dev_New' of http://114.132.189.42:9002/r/product-inventory-management into dev_New
---
src/views/reportAnalysis/PSIDataAnalysis/components/center-bottom.vue | 37 +++++++++++++++++++++++++++----------
1 files changed, 27 insertions(+), 10 deletions(-)
diff --git a/src/views/reportAnalysis/PSIDataAnalysis/components/center-bottom.vue b/src/views/reportAnalysis/PSIDataAnalysis/components/center-bottom.vue
index 3b04ffa..8277650 100644
--- a/src/views/reportAnalysis/PSIDataAnalysis/components/center-bottom.vue
+++ b/src/views/reportAnalysis/PSIDataAnalysis/components/center-bottom.vue
@@ -28,6 +28,7 @@
import Echarts from '@/components/Echarts/echarts.vue'
import PanelHeader from './PanelHeader.vue'
import ProductTypeSwitch from './ProductTypeSwitch.vue'
+import { productInOutAnalysis } from '@/api/viewIndex.js'
const productType = ref(1) // 1=鍘熸潗鏂� 2=鍗婃垚鍝� 3=鎴愬搧
@@ -58,9 +59,9 @@
const xAxis1 = ref([
{
type: 'category',
- data: ['6/9', '6/10', '6/11', '6/12', '6/13', '6/14', '6/15'],
+ data: [],
axisTick: { show: false },
- axisLine: { show: false,lineStyle: { color: 'rgba(184, 200, 224, 0.3)' } },
+ axisLine: { show: false, lineStyle: { color: 'rgba(184, 200, 224, 0.3)' } },
axisLabel: { color: '#B8C8E0', fontSize: 12 },
splitLine: { show: false, lineStyle: { type: 'dashed', color: 'rgba(184, 200, 224, 0.2)' } },
},
@@ -74,7 +75,7 @@
axisLine: { show: false },
axisTick: { show: false },
axisLabel: { color: '#B8C8E0', fontSize: 12 },
- splitLine: { lineStyle: { color: '#B8C8E0' } },
+ splitLine: { lineStyle: { color: '#B8C8E0' } },
},
]
@@ -86,7 +87,7 @@
showSymbol: true,
symbol: 'circle',
symbolSize: 8,
- lineStyle: { color: 'rgba(11, 137, 254,1', width: 2 },
+ lineStyle: { color: 'rgba(11, 137, 254, 1)', width: 2 },
itemStyle: { color: 'rgba(11, 137, 254, 1)', borderWidth: 0 },
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
@@ -94,7 +95,7 @@
{ offset: 1, color: 'rgba(11, 137, 254, 0.05)' },
]),
},
- data: [80, 100, 140, 160, 120, 150, 180],
+ data: [],
emphasis: { focus: 'series' },
},
{
@@ -104,7 +105,6 @@
showSymbol: true,
symbol: 'circle',
symbolSize: 8,
-
lineStyle: { color: 'rgba(11, 249, 254, 1)', width: 2 },
itemStyle: { color: 'rgba(11, 249, 254, 1)', borderWidth: 0 },
areaStyle: {
@@ -113,7 +113,7 @@
{ offset: 1, color: 'rgba(11, 249, 254, 0.05)' },
]),
},
- data: [160, 200, 200, 200, 170, 200, 200],
+ data: [],
emphasis: { focus: 'series' },
},
])
@@ -132,11 +132,28 @@
},
}
-const handleFilterChange = () => {
- // 鍙寜 productType 鍒囨崲鍚庤姹傚嚭鍏ュ簱鎺ュ彛锛屾澶勪粎棰勭暀
+const fetchData = () => {
+ productInOutAnalysis({ type: productType.value })
+ .then((res) => {
+ if (res.code === 200 && Array.isArray(res.data)) {
+ const list = res.data
+ xAxis1.value[0].data = list.map((d) => d.date)
+ lineSeries.value[0].data = list.map((d) => Number(d.outCount) || 0)
+ lineSeries.value[1].data = list.map((d) => Number(d.inCount) || 0)
+ }
+ })
+ .catch((err) => {
+ console.error('鑾峰彇浜у搧鍑哄叆搴撳垎鏋愬け璐�:', err)
+ })
}
-onMounted(() => {})
+const handleFilterChange = () => {
+ fetchData()
+}
+
+onMounted(() => {
+ fetchData()
+})
</script>
<style scoped>
--
Gitblit v1.9.3