Commit 530d57fd by 前端

commit

1 parent ac4bd30c
......@@ -108,7 +108,8 @@ img {
}
.container {
margin: 0 8px;
height:8.54vh;
margin: 8px 6px 8px 8px;
}
.empty {
......
<template>
<div class="legend">
<div class="legend-item flex" v-for="item in 5">
<span></span>
湘
</div>
</div>
</template>
<script>
export default {
name: 'Legend',
data() {
return {}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.legend {
display: flex;
align-items: center;
flex-wrap: wrap;
width: 7.7vw;
height: 8.54vh;
margin-left: 0.42vw;
.legend-item {
width: 3.68vw;
height: 2.44vh;
background: #0d133b;
align-items: center;
font-size: 9px;
color: #fff;
margin: 0 2px 2px 0;
box-sizing: border-box;
line-height: 2.44vh;
margin: 2px 2px 0 0;
span {
width: 5px;
height: 5px;
background: #bf98ff;
border-radius: 50%;
margin: 4px;
}
}
}
</style>
......@@ -4,10 +4,10 @@
<div class="center-content" :style="{ fontSize: size }">
<div :class="[id, 'center-content-num', 'center-content-num-color']"></div>
</div>
<div class="content-desc">
<!-- <div class="content-desc">
<div class="content-desc-icon" :style="{ background: descColor }"></div>
{{ numDesc }}
</div>
</div> -->
</div>
</template>
......@@ -27,7 +27,7 @@ export default {
},
height: {
type: String,
default: '12.7vh'
default: '8.54vh'
},
list: {
type: Array,
......@@ -35,7 +35,7 @@ export default {
},
radius: {
type: Array,
default: () => ['50%', '70%']
default: () => ['60%', '89%']
},
colors: {
type: Array,
......
......@@ -2,7 +2,13 @@ import { changeMixin } from './index'
export default {
data() {
return {
clientData: [],
clientData: [
{ value: 1048, name: 'Search Engine' },
{ value: 735, name: 'Direct' },
{ value: 580, name: 'Email' },
{ value: 484, name: 'Union Ads' },
{ value: 300, name: 'Video Ads' }
],
brandList: [],
distributionRank: '',
isBrand: false,
......@@ -37,7 +43,7 @@ export default {
this.clientData.push({
name: item,
// value: distribution[item]
value: (distribution[item] / total * 100).toFixed(1)
value: ((distribution[item] / total) * 100).toFixed(1)
})
})
console.log(this.clientData)
......
......@@ -6,7 +6,8 @@
<span>区域分布</span>
</div>
<div class="container flex">
<pie-chart :id="chart.id" :list="clientData"></pie-chart>
<Legend></Legend>
</div>
</div>
</template>
......@@ -18,7 +19,9 @@ export default {
mixins: [clientMixin],
data() {
return {
chart: {
id: 'area',
}
}
}
}
......
......@@ -6,7 +6,8 @@
<span>品牌分布</span>
</div>
<div class="container flex">
<pie-chart :id="chart.id" :list="clientData"></pie-chart>
<Legend></Legend>
</div>
</div>
</template>
......@@ -19,7 +20,7 @@ export default {
return {
type: 'gender',
chart: {
id: 'sex-pie',
id: 'brand',
colors: ['#EB6001', '#BF98FF', '#FF6E76']
}
}
......
<!--
* @Description: 客户购车年限
* @Author: huyue
* @Date: 2022-06-23 15:06:32
* @LastEditors: huyue
* @LastEditTime: 2022-06-23 17:03:19
-->
<template>
<div>
<div class="title title-icon">
<span class="icon"></span>
<span>门店类型</span>
</div>
<div class="container flex">
<div class="container flex">
<pie-chart :id="chart.id" :list="clientData"></pie-chart>
<Legend></Legend>
</div>
</div>
</template>
......@@ -26,7 +20,7 @@ export default {
return {
type: 'buycarRange',
chart: {
id: 'car-pie'
id: 'store'
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!