expandedGoldContent.vue
3.43 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
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
<template>
<div class='expande-wrap'>
<order-info />
<div class='rank-wrap'>
<order-rank
:analysisList='topLeftList'
:title='topLeftTitle'
:domId="'orderNumFiveDom'"
:labelName='topLeftLabel'
:revese='true'></order-rank>
<order-rank
:analysisList='topRightList'
:title='topRightTitle'
:domId="'discountCouponFiveDom'"
:labelName='topRightLabel'
:revese='true'></order-rank>
</div>
<div class='rank-wrap'>
<order-rank
:analysisList='top10LeftList'
:title='top10LeftTitle'
:domId="'orderNumTenDom'"
:labelName='top10LeftLabel'
:revese='true'></order-rank>
<order-rank
:analysisList='top10RightList'
:title='top10RightTitle'
:domId="'discountCouponTenDom'"
:labelName='top10RightLabel'
:revese='true'></order-rank>
</div>
<monthly-trend class='monthly-trend' :boxHeight="'20vh'"></monthly-trend>
</div>
</template>
<script>
import OrderInfo from 'views/sassPlus/conversionPlus/orderInfo'
import OrderRank from 'views/sassPlus/expandedGold/orderRank'
import data from 'utils/data'
import MonthlyTrend from 'views/sassPlus/conversionPlus/monthlyTrend'
export default {
name: 'ExpandedGoldContent',
components: { MonthlyTrend, OrderRank, OrderInfo },
data() {
return {
topLeftList: [],
topRightList: [],
topLeftTitle: '',
topRightTitle: '',
topLeftLabel: '',
topRightLabel: '',
top10LeftList: [],
top10RightList: [],
top10LeftTitle: '',
top10RightTitle: '',
top10LeftLabel: '',
top10RightLabel: ''
}
},
mounted() {
this.$bus.$on('topFiveRankingTopLeft', data => {
const { list, bussinessType } = data
this.topLeftList = list
this.topLeftTitle = bussinessType == 'expandedGold' ? '月订单量排名前五的活动' : '每月商品订单排名前5'
this.topLeftLabel = bussinessType == 'expandedGold' ? 'activityName' : 'goodsName'
})
this.$bus.$on('topFiveRankingTopRight', data => {
const { list, bussinessType } = data
this.topRightList = list
this.topRightTitle = bussinessType == 'expandedGold' ? '月优惠订单排名前5' : '每月各车型订单排名前5'
this.topRightLabel = bussinessType == 'expandedGold' ? 'couponName' : 'vehicleBrand'
})
this.$bus.$on('Top10Right', data => {
const { list, bussinessType } = data
this.top10RightList = list
this.top10RightTitle = bussinessType == 'expandedGold' ? '优惠券订单量排名前10' : '各车型订单排名前10'
this.top10RightLabel = bussinessType == 'expandedGold' ? 'couponName' : 'vehicleBrand'
})
this.$bus.$on('Top10Left', data => {
const { list, bussinessType } = data
this.top10LeftList = list
this.top10LeftTitle = bussinessType == 'expandedGold' ? '订单量排名前10的活动' : '商品订单排名前10'
this.top10LeftLabel = bussinessType == 'expandedGold' ? 'activityName' : 'goodsName'
})
}
}
</script>
<style lang='scss' scoped>
.expande-wrap {
height: 85vh;
background-image: url('./../../../assets/images/bg-1.png');
background-repeat: no-repeat;
background-size: 100% 100%;
overflow: hidden;
padding: 0 16px;
.rank-wrap {
display: grid;
grid-template-columns: 50% 50%;
//justify-content: space-between;
}
.monthly-trend {
margin-top: 3vh;
}
}
</style>