From b2429057ae17e9f5b357435b0bff5f6cc0040b69 Mon Sep 17 00:00:00 2001 From: 石广澎 <shiguangpeng@163.com> Date: 星期五, 05 一月 2024 10:09:22 +0800 Subject: [PATCH] 1、分页查询问题修复 2、库管员选择问题修复 --- 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