EquityTop.vue
1.32 KB
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
<template>
<div class="pie-box">
<TotalBill :totalBillData="numProportion" :totalNum="totalNum"></TotalBill>
<TotalMerchant :totalMerchantData="merProportion" :totalMerchant="totalMerchant"></TotalMerchant>
</div>
</template>
<script>
import TotalBill from './components/TotalBill.vue'
import TotalMerchant from './components/TotalMerchant.vue'
export default {
name: 'EquityTop',
components: {
TotalBill,
TotalMerchant
},
data() {
return {
totalNum: 0,
totalMerchant: 0,
merProportion: [],
numProportion: [],
month: ''
}
},
created() {
this.$bus.$on('selectMonthChange', val => {
if (val === '全部') val = ''
this.month = val
this.getWholesaleNum()
})
this.getWholesaleNum()
},
mounted() {},
methods: {
async getWholesaleNum() {
const params = {
statMonth: this.month
}
const _result = await this.api.equity.getWholesaleNum(params)
const { merProportion, numProportion, totalNum, totalMerchant } = _result.data.dataList[0]
this.merProportion = merProportion
this.numProportion = numProportion
this.totalNum = totalNum
this.totalMerchant = totalMerchant
}
}
}
</script>
<style lang="scss" scoped>
.pie-box {
display: flex;
justify-content: space-between;
}
</style>