2
0

2 کامیت‌ها 464f30f04b ... 920fbe7f12

نویسنده SHA1 پیام تاریخ
  DESKTOP-H1V7IUO\51019 920fbe7f12 Merge branch 'master' of http://gitee.vandh.cn/walvax/fxc-wecat.git 3 سال پیش
  DESKTOP-H1V7IUO\51019 3812466d3e 2 3 سال پیش
1فایلهای تغییر یافته به همراه18 افزوده شده و 5 حذف شده
  1. 18 5
      pages/index/index.js

+ 18 - 5
pages/index/index.js

@@ -1501,17 +1501,30 @@ Page({
       option.grid.bottom='13%';
       option.series = [];
       option.xAxis.data = [];
-      list.map((item,index)=>{
-        const {stack,end,trans,} = item;
-        option.xAxis.data.push(item.productName);
+      const echartsData = [
+        {
+          name:'在库',
+          data:list.map(item=>item.stack)
+        },
+        {
+          name:'结束',
+          data:list.map(item=>item.end)
+        },
+        {
+          name:'在途',
+          data:list.map(item=>item.trans)
+        }
+      ]
+      option.xAxis.data = list.map(item=>item.productName);
+      echartsData.map((item,index)=>{
         option.series.push({
-          name:item.productName,
+          name:item.name,
           type: "bar",
           stack: "Ad",
           emphasis: {
             focus: "series",
           },
-          data:[stack,trans,end]
+          data:item.data
         })
       })
       console.log(option);