Commit 75c12b58 by 胡悦

提交

1 parent 2a9b6e7d
/*
* @Description: 售后数据
* @Author: huyue
* @Date: 2022-06-28 16:55:48
* @LastEditors: huyue
* @LastEditTime: 2022-06-28 19:13:34
*/
import Request from '../request'
var request = new Request()
......@@ -6,4 +13,9 @@ const getAfterSale = params => {
return request.get('brand/aftersale', params)
}
export default { getAfterSale }
// 获取品牌售后其他信息
const aftersaleother = params => {
return request.get('brand/aftersaleother', params)
}
export default { getAfterSale, aftersaleother }
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-06-23 15:05:21
* @LastEditors: huyue
* @LastEditTime: 2022-06-28 11:40:13
* @LastEditTime: 2022-06-28 19:35:21
-->
<template>
<div>
......@@ -25,18 +25,25 @@ export default {
props: ['height'],
data() {
return {
yData: datas.Customer.valueType.value.map(item => item.name)
barChart: '',
option: {},
barData: []
}
},
mounted() {
this.getChart()
this.barChart = echarts.init(document.getElementById('analyzeBar'))
// resize
window.addEventListener('resize', () => {
this.echartsFunnel.resize()
})
this.init()
},
methods: {
init() {
this.getValueType()
},
getChart() {
var chartDom = document.getElementById('analyzeBar')
var myChart = echarts.init(chartDom)
var option
option = {
this.option = {
grid: {
left: '3%',
right: '4%',
......@@ -46,7 +53,7 @@ export default {
},
yAxis: {
type: 'category',
data: this.yData,
data: datas.Customer.valueType.value.map(item => item.name),
splitLine: {
show: false
},
......@@ -68,7 +75,8 @@ export default {
},
series: [
{
data: [120, 200, 150, 80, 70, 110, 130, 300],
// data: [120, 200, 150, 80, 70, 110, 130, 300],
data: this.barData,
type: 'bar',
barWidth: 12,
itemStyle: {
......@@ -98,7 +106,29 @@ export default {
}
]
}
option && myChart.setOption(option)
this.barChart.setOption(this.option)
},
getValueType() {
const params = {
req: {
corporateGroupName: '集团1',
queryItem: 'valueanalyse',
queryTime: '2022-06-23',
queryType: 0
}
}
this.api.afterSales.aftersaleother(params).then(res => {
console.log(res)
const reqData = JSON.parse(res.data.dataList[0].distribution)
console.log(reqData)
this.barData = []
for (let i in reqData) {
this.barData.push(reqData[i])
}
console.log(this.barData)
this.getChart()
})
}
}
}
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-06-23 15:05:21
* @LastEditors: huyue
* @LastEditTime: 2022-06-28 18:41:37
* @LastEditTime: 2022-06-28 19:10:50
-->
<template>
<div class="flow-box">
......@@ -112,9 +112,9 @@ export default {
},
methods: {
init() {
this.getSaleTrans()
this.getSaletTotal()
},
getSaleTrans() {
getSaletTotal() {
const params = {
req: {
corporateGroupName: '集团1',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!