Commit 9b07d996 by 胡悦

提交客流转化

1 parent 8f20ebe3
......@@ -12,7 +12,9 @@ module.exports = {
title: '广汇汽车服务',
request: {
// baseURL: 'http://192.168.3.126:8081', // 本地测试项目地址,
baseURL: 'http://192.168.1.152:8081', // 本地开发项目地址,
// baseURL: 'http://192.168.1.160:8081', // 本地开发项目地址,
// baseURL: 'http://192.168.1.158:9996',
baseURL: 'http://192.168.1.152:9996',
// 设置超时时间
timeout: 180000,
// 携带凭证
......
......@@ -18,9 +18,10 @@
</div>
</div>
<div class="flow-right">
<!-- <div class="ranking-value">{{currentName}}{{ isBrand ? '门店' : '品牌' }}排名</div> -->
<div class="ranking-title">
<div @click="changeRank(1)" :class="isActive == 1 ? 'active' : ''">前5{{ isBrand ? '门店' : '品牌' }}</div>
<div @click="changeRank(2)" :class="isActive == 2 ? 'active' : ''">后5{{ isBrand ? '门店' : '品牌' }}</div>
<div @click="changeRank(1)" :class="isActive == 1 ? 'active' : ''">{{currentName}}前5{{ isBrand ? '门店' : '品牌' }}</div>
<div @click="changeRank(2)" :class="isActive == 2 ? 'active' : ''">{{currentName}}后5{{ isBrand ? '门店' : '品牌' }}</div>
</div>
<div class="ranking-content">
<div class="ranking-item" v-for="(item, index) in flowData" :key="index">
......@@ -93,7 +94,8 @@ export default {
paramsData: {},
topList: [],
lastList: [],
isBrand: false
isBrand: false,
currentName: ''
}
},
mounted() {
......@@ -150,7 +152,7 @@ export default {
},
borderWidth: 0
},
color: ['rgba(235, 96, 2, 1)', 'rgba(235, 96, 2, .8)', 'rgba(235, 96, 2, .6)', 'rgba(235, 96, 2, .4)', 'rgba(245, 170, 2, .8)'],
color: ['#BF98FF', '#E60115', '#4FA0FF', '#EB6001', '#F5AA01'],
series: [
{
name: '漏斗图',
......@@ -193,12 +195,12 @@ export default {
this.echartsFunnel.on(
'mouseover',
utils.debounce(data => {
this.getSaleTrans(this.paramsData, data.data.type)
this.getSaleTrans(this.paramsData, data.data.type, data.data.name)
}),
1000 / 60
)
},
getSaleTrans(val, queryItem = 'enter') {
getSaleTrans(val, queryItem = 'enter', name = '客流') {
const params = {
req: {
queryItem: queryItem,
......@@ -232,6 +234,7 @@ export default {
}
}
this.flowData = this.isActive == 1 ? this.topList : this.lastList
this.currentName = name
})
},
// 切换品牌排序
......
......@@ -112,7 +112,7 @@ export default {
return txt
}
},
color: ['#4FA0FF', '#FF6E76', '#7CFFB2', '#FDF006', '#EB6001'],
color: ['#BF98FF', '#E60115', '#4FA0FF', '#EB6001', '#F5AA01'],
grid: {
left: '3%',
right: '4%',
......@@ -132,7 +132,7 @@ export default {
type: 'value',
splitLine: {
lineStyle: {
color: 'rgba(96,98,102,0.2)'
color: 'rgba(96,98,102,0.2)'
}
},
splitNumber: 4
......@@ -190,6 +190,14 @@ export default {
this.option.series[index].data = this.dataList[index].map(item => item.num)
})
this.echartsTrend.setOption(this.option)
this.chartAction()
},
chartAction(type) {
this.echartsTrend.dispatchAction({
type: type || 'showTip',
seriesIndex: 0,
dataIndex: this.dataList[0].length - 1
})
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!