From 149cc67e240b69585a562ba16c288bfb75f56fda Mon Sep 17 00:00:00 2001 From: cy <1664593601@qq.com> Date: 星期六, 09 十二月 2023 17:19:06 +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