EquityRight.vue
2.4 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
<template>
<div>
<!-- 第一个盒子 -->
<div class="rank-box">
<box-title title="门店产值排名"></box-title>
<div class="rank-content" v-if="storeOutputList.length">
<Ranking :id="'storeOutput'" :rankingsList="storeOutputList" :rankingDataObj="rankingDataObj"></Ranking>
</div>
<div v-else class="empty">
<Empty></Empty>
</div>
</div>
<!-- 第二个盒子 -->
<div class="rank-box">
<box-title title="门店转化率排行"></box-title>
<div class="rank-content" v-if="storePercentList.length">
<Ranking :id="'storePercent'" :rankingsList="storePercentList" :rankingDataObj="rankPercentObj"></Ranking>
</div>
<div v-else class="empty">
<Empty></Empty>
</div>
</div>
<!-- 第三个盒子 -->
<div class="rank-box">
<box-title title="门店客单价排行"></box-title>
<div class="rank-content" v-if="storePriceList.length">
<Ranking :id="'storePrice'" :rankingsList="storePriceList" :rankingDataObj="rankingDataObj"></Ranking>
</div>
<div v-else class="empty">
<Empty></Empty>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'EquityRight',
props: {
// 门店产值排名数据
storeOutputList: {
type: Array,
default: () => []
},
// 门店转化率排名数据
storePercentList: {
type: Array,
default: () => []
},
// 门店客单价排名数据
storePriceList: {
type: Array,
default: () => []
}
},
data() {
return {
// rankingDataObj
rankingDataObj: [
{
name: 'merchantname',
width: '17vw'
},
{
name: 'num',
width: '7vw',
type: 'number',
preunit: '¥'
}
],
rankPercentObj: [
{
name: 'merchantname',
width: '18vw',
action: true
},
{
name: 'num',
width: '3vw',
type: 'decimal'
}
]
}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.rank-box {
width: 31.39vw;
height: 26.78vh;
box-shadow: inset 0 0 20px 0 #3d57ff69;
&:nth-child(-n + 2) {
margin-bottom: 1.78vh;
}
.rank-content {
padding: 1.67vh 1.39vw;
}
.empty {
height: 24.45vh;
display: flex;
align-items: center;
}
}
</style>