Commit 52504fc6 by 胡悦

客流转化

1 parent 24b85236
...@@ -3,11 +3,13 @@ ...@@ -3,11 +3,13 @@
* @Author: huyue * @Author: huyue
* @Date: 2022-06-23 17:38:33 * @Date: 2022-06-23 17:38:33
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2022-06-24 14:44:19 * @LastEditTime: 2022-06-27 14:42:09
*/ */
const DefaultData = { const DefaultData = {
defaultLineHeight: '19.8', defaultLineHeight: '19.8',
defaultPieHeight: '16.6' defaultPieHeight: '16.6',
directionTimer: 3000,
delayTimer: 3000
} }
const Customer = { const Customer = {
......
...@@ -3,24 +3,73 @@ ...@@ -3,24 +3,73 @@
* @Author: huyue * @Author: huyue
* @Date: 2022-06-23 15:05:21 * @Date: 2022-06-23 15:05:21
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2022-06-24 16:26:20 * @LastEditTime: 2022-06-27 15:45:19
--> -->
<template> <template>
<div class="flow-box"> <div class="flow-box">
<div class="flow-left">
<div class="title inline">客流转化</div> <div class="title inline">客流转化</div>
<div class="chart-box"> <div class="chart-box">
<div id="flow" :style="{ height: height - 3.1 + 'vh' }"></div> <div id="flow" :style="{ height: height - 4.1 + 'vh' }"></div>
</div>
</div>
<div class="flow-right">
<div class="ranking-title">
<div @click="isActive = 1" :class="isActive == 1 ? 'active' : ''">前5品牌</div>
<div @click="isActive = 2" :class="isActive == 2 ? 'active' : ''">后5品牌</div>
</div>
<div class="ranking-content">
<div class="ranking-item" v-for="(item, index) in flowData" :key="index">
<span>{{ item.id }}</span>
<span class="ranking-name">
<marquee :direction="directionTimer" :delay="delayTimer" :text="item.name" />
</span>
<span class="ranking-text">{{ item.num }}</span>
</div>
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import datas from '../../utils/data'
import * as echarts from 'echarts' import * as echarts from 'echarts'
export default { export default {
name: 'Flow', name: 'Flow',
props: ['height'], props: ['height'],
data() { data() {
return {} return {
directionTimer: datas.DefaultData.directionTimer,
delayTimer: datas.DefaultData.delayTimer,
flowData: [
{
id: 1,
name: '林则徐:苟利国家生死以岂因祸福避趋之',
num: 33234
},
{
id: 2,
name: '林则徐',
num: 33234
},
{
id: 3,
name: 'fg',
num: 33234
},
{
id: 4,
name: '售后客户价值分析',
num: 33234
},
{
id: 5,
name: '林则徐:苟利国家生死以岂因祸福避趋之',
num: 33234
}
],
isActive: 1
}
}, },
mounted() { mounted() {
this.getChart() this.getChart()
...@@ -36,6 +85,7 @@ export default { ...@@ -36,6 +85,7 @@ export default {
trigger: 'item', trigger: 'item',
formatter: '{a} <br/>{b} : {c}%' formatter: '{a} <br/>{b} : {c}%'
}, },
// color: [''],
series: [ series: [
{ {
name: 'Funnel', name: 'Funnel',
...@@ -80,7 +130,6 @@ export default { ...@@ -80,7 +130,6 @@ export default {
} }
] ]
} }
option && myChart.setOption(option) option && myChart.setOption(option)
} }
} }
...@@ -89,15 +138,63 @@ export default { ...@@ -89,15 +138,63 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.flow-box { .flow-box {
display: flex;
padding: 0 8px 1vh; padding: 0 8px 1vh;
box-sizing: border-box; box-sizing: border-box;
.flow-left {
padding-bottom: 1vh;
width: 50%;
}
.flow-right {
flex: 1;
color: #fff;
font-size: 10px;
padding: 1vh 8px 1vh 20px;
.ranking-title {
display: flex;
width: 100%;
margin-right: 20px;
.active {
background-color: #eb6001;
color: #fff;
}
div {
width: 50%;
text-align: center;
background-color: #353535;
line-height: 20px;
}
}
.ranking-content {
background-color: #262525;
}
.ranking-item {
display: flex;
width: 100%;
align-items: center;
line-height: 2.2vh;
height: 2.2vh;
.ranking-name {
width: calc(100% - 33% - 24px);
}
.ranking-text {
width: 33%;
// width: calc(100% - 50px);
}
span {
display: inline-block;
&:first-child {
padding: 0 8px;
}
}
}
}
} }
.chart-box { .chart-box {
width: 148px; width: 100%;
height: 11.7vh; box-sizing: border-box;
// height: 11.7vh;
background-color: #262525; background-color: #262525;
padding: 0 25px; padding: 0 25px;
// margin: 0 20px 1vh 8px;
// box-sizing: border-box;
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!