Commit bbc23bf3 by 姜雷

修改注册活跃人数展示

parent e27b28da
...@@ -26,14 +26,16 @@ ...@@ -26,14 +26,16 @@
>搜索</el-button> >搜索</el-button>
</search-item> </search-item>
</div> </div>
<div class="more-info">
{{ reportYear }}年注册人数为:{{ registeYearTotal }}人;平台注册会员总数: {{ registeTotal }}人;平台活跃会员总数:{{ activeTotal }}
</div>
<div class="Dashboard-CampusData"> <div class="Dashboard-CampusData">
<div <div
class="Dashboard-CampusItem" class="Dashboard-CampusItem"
v-loading="loading.regist" v-loading="loading.regist"
> >
<div class="Dashboard-title"> <div class="Dashboard-title">
<span>{{ reportYear }}年每月注册数据</span> {{ reportYear }}年每月注册数据
<span class="more-info">{{ reportYear }}年注册人数为: {{ registeYearTotal }}人;截止到目前为止注册会员总数: {{ registeTotal }}</span>
</div> </div>
<RegisterByMonth <RegisterByMonth
:data="registePerMonth" :data="registePerMonth"
...@@ -58,8 +60,7 @@ ...@@ -58,8 +60,7 @@
v-loading="loading.regist" v-loading="loading.regist"
> >
<div class="Dashboard-title"> <div class="Dashboard-title">
<span>{{ reportYear }}年每月活跃数据</span> {{ reportYear }}年每月活跃数据
<span class="more-info">截止{{ today }},系统总活跃人数为:{{ activeTotal }}</span>
</div> </div>
<ActiveUserByMonth :data="activeUser" /> <ActiveUserByMonth :data="activeUser" />
</div> </div>
...@@ -101,6 +102,7 @@ export default { ...@@ -101,6 +102,7 @@ export default {
'reportMounted', 'reportMounted',
'filters', 'filters',
'registeTotal', 'registeTotal',
'activeTotal',
]), ]),
registeYearTotal() { registeYearTotal() {
return this.registePerMonth.reduce((pre, curItem) => { return this.registePerMonth.reduce((pre, curItem) => {
...@@ -189,6 +191,11 @@ export default { ...@@ -189,6 +191,11 @@ export default {
margin-right: 0; margin-right: 0;
} }
} }
.more-info {
margin: 15px;
font-weight: normal;
color: #f70707;
}
.Dashboard-SearchBar { .Dashboard-SearchBar {
display: flex; display: flex;
padding: 10px 0 20px; padding: 10px 0 20px;
...@@ -205,12 +212,9 @@ export default { ...@@ -205,12 +212,9 @@ export default {
.Dashboard-CampusData { .Dashboard-CampusData {
display: flex; display: flex;
padding: 0 15px; padding: 0 15px;
margin-bottom: 16px;
.Dashboard-title { .Dashboard-title {
position: relative; position: relative;
.more-info {
margin-left: 20px;
font-weight: normal;
}
} }
.Dashboard-title::before { .Dashboard-title::before {
content: ''; content: '';
......
...@@ -62,6 +62,7 @@ const state = () => ({ ...@@ -62,6 +62,7 @@ const state = () => ({
registePerMonth: [], registePerMonth: [],
activeUser: [], activeUser: [],
customerCount: 0, customerCount: 0,
activeCount: 0,
}, },
title: { title: {
activeCount: 0, activeCount: 0,
...@@ -77,6 +78,7 @@ const getters = { ...@@ -77,6 +78,7 @@ const getters = {
registePerDay: state => state.report.registePerDay, registePerDay: state => state.report.registePerDay,
registePerMonth: state => state.report.registePerMonth, registePerMonth: state => state.report.registePerMonth,
registeTotal: state => state.report.customerCount, registeTotal: state => state.report.customerCount,
activeTotal: state => state.report.activeCount,
activeUser: state => state.report.activeUser, activeUser: state => state.report.activeUser,
titleData: state => state.title, titleData: state => state.title,
areaInfo: state => state.consume.areaInfo, areaInfo: state => state.consume.areaInfo,
...@@ -236,6 +238,7 @@ const mutations = { ...@@ -236,6 +238,7 @@ const mutations = {
}, },
[GET_REPORT_DATA]: (state, data) => { [GET_REPORT_DATA]: (state, data) => {
state.report.customerCount = data.customerCount ? data.customerCount : 0; state.report.customerCount = data.customerCount ? data.customerCount : 0;
state.report.activeCount = data.activeCount ? data.activeCount : 0;
state.report.year = data.year; state.report.year = data.year;
state.report.month = data.month; state.report.month = data.month;
......
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