Commit 16fb9102 by 姜雷

添加每月注册数据填充

parent 0b992051
...@@ -218,7 +218,15 @@ const mutations = { ...@@ -218,7 +218,15 @@ const mutations = {
dayList[idx].count = val.count; dayList[idx].count = val.count;
}); });
state.report.registePerDay = dayList; state.report.registePerDay = dayList;
state.report.registePerMonth = data.list;
let registerList = new Array(12)
.fill({ count: 0, mark: null })
.map((v, idx) => ({ ...v, month: idx + 1 }));
data.list.map(val => {
let idx = val.month - 1;
registerList[idx].count += val.count;
});
state.report.registePerMonth = registerList;
let activeList = new Array(12) let activeList = new Array(12)
.fill({ count: 0, mark: 'total' }) .fill({ count: 0, mark: 'total' })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment