main
parent
059728f38f
commit
f57270c50a
@ -0,0 +1,11 @@ |
||||
import request from './request' |
||||
/** |
||||
* @description 数据统计 |
||||
*/ |
||||
export function getStatisticList(data) { |
||||
return request.get('statistics/all_data', data) |
||||
} |
||||
// 惠通宝转让记录
|
||||
export function getHuitongbao(data) { |
||||
return request.get('user/huitong_list', data) |
||||
} |
@ -0,0 +1,26 @@ |
||||
import Layout from '@/layout' |
||||
import { roterPre } from '@/settings' |
||||
const statisticRoute = |
||||
{ |
||||
path: `${roterPre}/dataStatistic`, |
||||
name: 'data_statistic', |
||||
meta: { |
||||
icon: 'dashboard', |
||||
title: '数据统计' |
||||
}, |
||||
alwaysShow: true, |
||||
component: Layout, |
||||
children: [ |
||||
{ |
||||
path: 'statistic', |
||||
name: 'statistic', |
||||
meta: { |
||||
title: '数据统计', |
||||
noCache: true |
||||
}, |
||||
component: () => import('@/views/dataStatistic/statistic') |
||||
}, |
||||
|
||||
] |
||||
} |
||||
export default statisticRoute |
@ -0,0 +1,159 @@ |
||||
<template> |
||||
<div class="statistic"> |
||||
<el-button type="primary">导出数据统计</el-button> |
||||
<div class="contentContainer"> |
||||
<div class="section" v-for="(item,index) in list" :key="index"> |
||||
<div class="sectionTitle">{{item.title}}</div> |
||||
<div class="content"> |
||||
<div v-for="(p,i) in item.data" class="sectionDesc"> |
||||
<div class="item">{{p.name}}</div> |
||||
<div class="num" v-if="index==0">{{huitong[p.countText]}}</div> |
||||
<div class="num" v-if="index==1">{{welfare[p.countText]}}</div> |
||||
<div class="num" v-if="index==2">{{consume[p.countText]}}</div> |
||||
<div class="num" v-if="index==3">{{contribution[p.countText]}}</div> |
||||
<div class="num" v-if="index==4">{{share_point[p.countText]}}</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
<script> |
||||
import {getStatisticList} from '@/api/statistic' |
||||
export default{ |
||||
data(){ |
||||
return{ |
||||
list:[ |
||||
{ |
||||
title:'惠通宝数据统计', |
||||
data:[ |
||||
{name:'发放惠通宝总数',obj:'huitong',countText:'total'}, |
||||
{name:'可用惠通宝总数',obj:'huitong',countText:'available'}, |
||||
{name:'冻结惠通宝总数',obj:'huitong',countText:'frozen'}, |
||||
{name:'燃烧惠通宝总数',obj:'huitong',countText:'burned'}, |
||||
{name:'昨日发放惠通宝总数',obj:'huitong',countText:'total_yesterday'}, |
||||
{name:'昨日燃烧惠通宝总数',obj:'huitong',countText:'burned_yesterday'}, |
||||
] |
||||
}, |
||||
{ |
||||
title:'福利积分数据统计', |
||||
data:[ |
||||
{name:'发放福利积分总数',countText:'total'}, |
||||
{name:'可用福利积分总数',countText:'available'}, |
||||
{name:'冻结福利积分总数',countText:'frozen'}, |
||||
{name:'昨日发放福利积分总数',countText:'total_yesterday'}, |
||||
{name:'订单平台账户福利积分总数',countText:'platform'}, |
||||
] |
||||
}, |
||||
{ |
||||
title:'消费积分数据统计', |
||||
data:[ |
||||
{name:'发放消费积分总数',countText:'total'}, |
||||
{name:'可用消费积分总数',countText:'available'}, |
||||
{name:'冻结消费积分总数',countText:'frozen'}, |
||||
{name:'昨日发放消费积分总数',countText:'total_yesterday'}, |
||||
] |
||||
}, |
||||
{ |
||||
title:'贡献值数据统计', |
||||
data:[ |
||||
{name:'发放贡献值总数',countText:'total'}, |
||||
{name:'可用贡献值总数',countText:'available'}, |
||||
{name:'冻结贡献值总数',countText:'frozen'}, |
||||
{name:'昨日发放贡献值总数',countText:'total_yesterday'}, |
||||
] |
||||
}, |
||||
{ |
||||
title:'分红点数据统计', |
||||
data:[ |
||||
{name:'分红点用户总数',countText:'user_total'}, |
||||
{name:'分红点总数',countText:'total'}, |
||||
{name:'昨日新增分红点用户',countText:'user_yesterday'}, |
||||
{name:'昨日新增分红点总数',countText:'total_yesterday'}, |
||||
] |
||||
}, |
||||
], |
||||
consume:{ |
||||
available:0, |
||||
frozen:0, |
||||
total:0, |
||||
total_yesterday:0, |
||||
}, |
||||
contribution:{ |
||||
available:0, |
||||
frozen:0, |
||||
total:0, |
||||
total_yesterday:0, |
||||
}, |
||||
huitong:{ |
||||
available:0, |
||||
burned:0, |
||||
burned_yesterday:0, |
||||
frozen:0, |
||||
total:0, |
||||
total_yesterday:0, |
||||
}, |
||||
share_point:{ |
||||
total:0, |
||||
total_yesterday:0, |
||||
user_total:0, |
||||
user_yesterday:0, |
||||
}, |
||||
welfare:{ |
||||
available:0, |
||||
frozen:0, |
||||
platform:0, |
||||
total:0, |
||||
total_yesterday:0 |
||||
}, |
||||
|
||||
|
||||
} |
||||
}, |
||||
methods:{ |
||||
getStatisticListHandle(){ |
||||
getStatisticList().then(res=>{ |
||||
|
||||
Object.keys(res.data).forEach(item=>{ |
||||
Object.keys(res.data[item]).forEach(i=>{ |
||||
this.$set(this[item],i,res.data[item][i]) |
||||
}) |
||||
|
||||
}) |
||||
}) |
||||
} |
||||
}, |
||||
created(){ |
||||
this.getStatisticListHandle() |
||||
} |
||||
|
||||
} |
||||
</script> |
||||
<style lang="scss" scoped> |
||||
.statistic{ |
||||
padding: 20px 10px; |
||||
.contentContainer{ |
||||
.section{ |
||||
display: flex; |
||||
align-items: center; |
||||
margin: 40px 0; |
||||
.sectionTitle{ |
||||
font-size: 18px; |
||||
font-weight: bold; |
||||
width: 160px; |
||||
flex-shrink: 0; |
||||
} |
||||
.content{ |
||||
display: flex; |
||||
.sectionDesc{ |
||||
width:200px; |
||||
.num{ |
||||
font-size: 24px; |
||||
margin-top: 8px; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
</style> |
Loading…
Reference in new issue