From 3f0228da470c797e7339964cc4c3df3ed86415da Mon Sep 17 00:00:00 2001
From: 石广澎 <shiguangpeng@163.com>
Date: 星期三, 13 十二月 2023 19:01:02 +0800
Subject: [PATCH] feat: 物品规格管理 接口对接

---
 admin-web/src/views/dashboard/components/XYZC.vue |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/admin-web/src/views/dashboard/components/XYZC.vue b/admin-web/src/views/dashboard/components/XYZC.vue
index 89be963..08bbf4f 100644
--- a/admin-web/src/views/dashboard/components/XYZC.vue
+++ b/admin-web/src/views/dashboard/components/XYZC.vue
@@ -9,6 +9,7 @@
   </div>
 </template>
 <script>
+import {getGoodsNumByMonth} from '@/api/dashboard'
 import * as echarts from 'echarts';
 
 export default {
@@ -75,7 +76,7 @@
             emphasis: {
               focus: 'series',
             },
-            data: [320, 332, 301, 334, 320, 332, 301, 334, 320, 332, 301, 334],
+            data: [],
             lineStyle: {
               width: 2, // 澶栬竟绾垮搴�
               color: '#5BE1FD'// 澶栬竟绾块鑹�
@@ -103,7 +104,7 @@
             emphasis: {
               focus: 'series',
             },
-            data: [220, 182, 191, 234, 220, 182, 191, 234, 220, 182, 191, 234],
+            data: [],
             lineStyle: {
               width: 2, // 澶栬竟绾垮搴�
               color: '#FFD15C'// 澶栬竟绾块鑹�
@@ -127,6 +128,17 @@
         ],
       };
       this.options && this.myChart.setOption(this.options);
+      getGoodsNumByMonth().then(res=>{
+        let xAxis0 = []
+        let xAxis1 = []
+        res.map(item=>{
+          xAxis0.push(item.addTotalNum)
+          xAxis1.push(item.reduceTotalNum)
+        })
+        this.options.series[0].data = xAxis0
+        this.options.series[1].data = xAxis1
+        this.myChart.setOption(this.options);
+      })
     },
     changeWidth() {
       this.myChart.resize();

--
Gitblit v1.9.1