TotalNumRank.vue
1.04 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
<template>
<div class='product'>
<div class='title title-icon'>
<span class='icon'></span>
<span>总订单量占比</span>
</div>
<div class='container flex' v-if='totalNumData'>
<pie-chart height='12vh' :id="'totalNum'" :list='totalNumData' :keys='chart.keys'></pie-chart>
<Legend :list='totalNumData' :showName="'modelname'"></Legend>
</div>
</div>
</template>
<script>
export default {
name: 'TotalNumRank',
props: {
showType: {
type: String,
default: ''
}
},
data() {
return {
chart: {
id: 'totalNumRank',
keys: ['modelname', 'totalNum'],
// colors: ['#4FA0FF', '#7CFFB2', '#FDF006', '#EB6001', '#EB6001']
},
totalNumData: null,
// ghProductData: [],
}
},
mounted() {
this.$bus.$on('totalRank', data => {
this.totalNumData = data.datalist
})
},
methods:{
}
}
</script>
<style scoped lang='scss'>
.product{
background: #0b0e31;
width: 20vw;
height: 21vh;
.container{
margin-top:3vh;
}
}
</style>