Commit 06262297 by 胡悦

优化价值分析

1 parent 01d076ec
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @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-29 19:09:07 * @LastEditTime: 2022-06-29 19:47:34
*/ */
const DefaultData = { const DefaultData = {
defaultLineHeight: '19.8', defaultLineHeight: '19.8',
...@@ -83,14 +83,14 @@ const Customer = { ...@@ -83,14 +83,14 @@ const Customer = {
valueType: { valueType: {
name: '价值类型', name: '价值类型',
value: [ value: [
{ name: '重要价值', value: 37 }, { name: '重要价值', value: 1 },
{ name: '重要发展', value: 37 }, { name: '重要发展', value: 2 },
{ name: '重要召回', value: 37 }, { name: '重要召回', value: 3 },
{ name: '重要挽留', value: 37 }, { name: '重要挽留', value: 4 },
{ name: '一般价值', value: 37 }, { name: '一般价值', value: 5 },
{ name: '一般发展', value: 37 }, { name: '一般发展', value: 6 },
{ name: '一般召回', value: 37 }, { name: '一般召回', value: 7 },
{ name: '一般挽留', value: 37 } { name: '一般挽留', value: 8 }
] ]
} }
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @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-29 11:30:36 * @LastEditTime: 2022-06-29 19:47:17
--> -->
<template> <template>
<div> <div>
...@@ -115,6 +115,10 @@ export default { ...@@ -115,6 +115,10 @@ export default {
] ]
} }
this.barChart.setOption(this.option) this.barChart.setOption(this.option)
// 鼠标划入
this.barChart.on('mouseover', data => {
this.initPieData(data.name)
})
}, },
getValueType() { getValueType() {
const params = { const params = {
...@@ -137,7 +141,7 @@ export default { ...@@ -137,7 +141,7 @@ export default {
this.initPieData() this.initPieData()
}) })
}, },
initPieData() { initPieData(name) {
const distributionRank = this.distributionRank[this.key] const distributionRank = this.distributionRank[this.key]
Object.keys(distributionRank).forEach(item => { Object.keys(distributionRank).forEach(item => {
this.analyzeData.push({ this.analyzeData.push({
...@@ -161,7 +165,7 @@ export default { ...@@ -161,7 +165,7 @@ export default {
flex: 1; flex: 1;
} }
.contetn-right { .contetn-right {
width: 43%; width: 50%;
margin-left: 8px; margin-left: 8px;
} }
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @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-29 19:28:03 * @LastEditTime: 2022-06-29 19:45:27
--> -->
<template> <template>
<div> <div>
...@@ -82,7 +82,6 @@ export default { ...@@ -82,7 +82,6 @@ export default {
], ],
option: {}, option: {},
echartsFunnel: '', echartsFunnel: '',
funnelDom: '',
hasData: true, hasData: true,
paramsData: {}, paramsData: {},
topList: [], topList: [],
...@@ -91,8 +90,7 @@ export default { ...@@ -91,8 +90,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.funnelDom = document.getElementById('flow') this.echartsFunnel = echarts.init(document.getElementById('flow'))
this.echartsFunnel = echarts.init(this.funnelDom)
// resize // resize
window.addEventListener('resize', () => { window.addEventListener('resize', () => {
this.echartsFunnel.resize() this.echartsFunnel.resize()
...@@ -207,60 +205,63 @@ export default { ...@@ -207,60 +205,63 @@ export default {
api = 'storeSaleTrans' api = 'storeSaleTrans'
} }
this.api.sales[api](params).then(res => { this.api.sales[api](params).then(res => {
this.topList = [ const { topList, lastList } = res.data.dataList[0]
{ this.topList = topList ? JSON.parse(topList) : []
id: 1, this.lastList = lastList ? JSON.parse(lastList) : []
name: '林则徐:苟利国家生死以岂因祸福避趋之', // this.topList = [
num: 3323425 // {
}, // id: 1,
{ // name: '林则徐:苟利国家生死以岂因祸福避趋之',
id: 2, // num: 3323425
name: '林则徐', // },
num: 9999999 // {
}, // id: 2,
{ // name: '林则徐',
id: 3, // num: 9999999
name: 'fg', // },
num: 33234 // {
}, // id: 3,
{ // name: 'fg',
id: 4, // num: 33234
name: '售后客户价值分析', // },
num: 33234 // {
}, // id: 4,
{ // name: '售后客户价值分析',
id: 5, // num: 33234
name: '林则徐:苟利国家生死以岂因祸福避趋之', // },
num: 33234 // {
} // id: 5,
] // name: '林则徐:苟利国家生死以岂因祸福避趋之',
this.lastList = [ // num: 33234
{ // }
id: 1, // ]
name: '广汇集团BI数据看板-前端-交互', // this.lastList = [
num: 3323425 // {
}, // id: 1,
{ // name: '广汇集团BI数据看板-前端-交互',
id: 2, // num: 3323425
name: '广汇集团BI数据看板-前端-交互广汇集团BI数据看板-前端-交互', // },
num: 9999999 // {
}, // id: 2,
{ // name: '广汇集团BI数据看板-前端-交互广汇集团BI数据看板-前端-交互',
id: 3, // num: 9999999
name: 'fsdfasdg', // },
num: 33234 // {
}, // id: 3,
{ // name: 'fsdfasdg',
id: 4, // num: 33234
name: '广汇集团BI数据看板-前端-交互', // },
num: 33234 // {
}, // id: 4,
{ // name: '广汇集团BI数据看板-前端-交互',
id: 5, // num: 33234
name: '广汇集团BI数据看板-前端-交互', // },
num: 33234 // {
} // id: 5,
] // name: '广汇集团BI数据看板-前端-交互',
// num: 33234
// }
// ]
this.flowData = this.topList this.flowData = this.topList
}) })
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!