1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<template>
<div class="Dashboard-CustomerMoneyData">
<div class="Dashboard-SearchBar bothSearch">
<search-item label="运营商">
<operator-select
:accessType="1"
:value="filters.operateId"
@input="val => updateFilters({operateId: val,areaId:undefined})"
/>
</search-item>
<search-item label="区域">
<dashboard-area-select
:operateId="filters.operateId"
:value="filters.areaId"
@input="val => updateFilters({areaId: val})"
/>
</search-item>
<el-radio-group
class="Dashboard-Radio"
:value="filters.timeType"
@input="val => updateFilters({timeType: val})"
>
<el-radio
class="Dashboard-Radio-item"
:label="0"
>本日</el-radio>
<el-radio
class="Dashboard-Radio-item"
:label="1"
>本月</el-radio>
<el-radio
class="Dashboard-Radio-item"
:label="2"
>本年</el-radio>
</el-radio-group>
<el-button
:loading="consumptionLoading||rechargeLoading"
type="primary"
@click="fetchAllData"
>搜索</el-button>
</div>
<div class="Dashboard-CustomerMoneyData-chart">
<CustomerRecharge />
<CustomerConsumption />
</div>
</div>
</template>
<script>
import CustomerRecharge from '../CustomerRecharge/CustomerRecharge';
import CustomerConsumption from '../CustomerConsumption/CustomerConsumption';
import { mapGetters, mapActions } from 'vuex';
import { getFilters } from '@/utils/index';
export default {
name: 'CustomerMoneyData',
components: {
CustomerRecharge,
CustomerConsumption,
},
computed: {
...mapGetters('Dashboard/customerData', ['filters']),
...mapGetters('Dashboard/customerData/customerConsumption', {
consumptionLoading: 'loading',
}),
...mapGetters('Dashboard/customerData/customerRecharge', {
rechargeLoading: 'loading',
}),
},
methods: {
...mapActions('Dashboard/customerData', ['updateFilters']),
...mapActions('Dashboard/customerData/customerConsumption', [
'getConsumeOrderList',
]),
...mapActions('Dashboard/customerData/customerRecharge', [
'getRechargeOrderList',
]),
fetchAllData() {
this.getConsumeOrderList();
this.getRechargeOrderList();
},
},
};
</script>
<style lang="scss">
.Dashboard-CustomerMoneyData {
.Dashboard & .Dashboard-SearchBar.bothSearch {
justify-content: flex-start;
align-items: center;
.Dashboard-Radio {
margin-left: 20px;
}
}
.Dashboard-CustomerMoneyData-chart {
display: flex;
width: 100%;
.CustomerRecharge {
flex: 1;
position: relative;
margin-right: 30px;
}
.CustomerRecharge::after {
content: '';
position: absolute;
height: 80%;
top: 10%;
right: -25px;
border-right: 1px dotted #eee;
}
.CustomerConsumption {
flex: 1;
}
}
}
</style>