Commit 400dc1a2 by 李伟康

Merge branch 'dev_v1.0.0' of http://192.168.3.233:8090/gh/data-view into dev_v1.0.0

2 parents 6c44a6bd 0447caf7
/*
* @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 }
......@@ -98,7 +98,18 @@ img {
margin-right: 6px;
}
}
.container {
margin-top:0.5vh;
.container{
margin:0 8px;
}
.empty {
display: flex;
width: 100%;
height: calc(100% - 4.1vh);
align-items: center;
justify-content: center;
img {
width: 20vh;
height: 9.5vh;
}
}
\ No newline at end of file
<template>
<div class="pie-box">
<div :id="id" :style="{ width: width, height: height }" class="pie-chart"></div>
<div :id="id" :style="{ height: height }" class="pie-chart"></div>
<div class="center-content">
<div :class="[id, 'center-content-num']"></div>
<div class="center-content-desc">{{ numDesc }}</div>
......
<template>
<div class="ranking-container">
<div class="title">品牌排名</div>
<div class="ranking-title">品牌排名</div>
<div class="ranking">
<div class="brand flex" v-for="(item, index) in brandList" :key="index">
<span class="brand-num">{{ index + 1 }}</span>
......@@ -36,27 +36,27 @@ export default {
</script>
<style lang="scss" scoped>
.ranking-container {
margin-left: 0.6vw;
flex: 1;
margin-left: 8px;
box-sizing: border-box;
height: 12.7vh;
background: #262525;
.title {
width: 6.7vw;
.ranking-title {
width: 100%;
background: rgba(53, 53, 53, 0.6);
font-size: 10px;
color: #eb6001;
font-weight: 400;
text-align: center;
line-height: 2.4vh;
padding: 0.4vh 0;
box-sizing: border-box;
}
.ranking {
font-size: 10px;
color: #ffffff;
letter-spacing: 0;
font-weight: 400;
padding-left: 0.6vw;
padding-top: 0.1vh;
padding-bottom: 0.4vh;
padding:0.1vh 0 0.4vh 8px;
.brand {
line-height: 1.9vh;
.brand-num {
......@@ -64,7 +64,7 @@ export default {
margin-right: 0.6vw;
}
.marquee {
width: calc(100% - 2.2vw);
// width: calc(100% - 2.2vw);
height: 1.9vh;
}
}
......
......@@ -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-29 11:30:36
-->
<template>
<div>
......@@ -13,8 +13,9 @@
<div id="analyzeBar" style="height: 100%"></div>
</div>
<div class="contetn-right bg">
<pie-chart :id="chart.id" :list="analyzeData" :height="height - 4.9 + 'vh'" :radius="chart.radius" @pieAction="pieAction"></pie-chart>
</div>
<!-- <pie-chart :id="chart.id" :list="analyzeData" :height="height - 4.9 + 'vh'" :radius="chart.radius" @pieAction="pieAction">
</pie-chart> -->
</div>
</div>
</div>
</template>
......@@ -27,25 +28,40 @@ export default {
props: ['height'],
data() {
return {
barChart: '',
analyzeData: [],
chart: {
id: 'analyzePie',
radius:['60%', '78%']
radius: ['60%', '78%']
},
analyzeData:[],
barChart: '',
option: {},
barData: []
}
},
mounted() {
this.getChart()
this.barChart = echarts.init(document.getElementById('analyzeBar'))
// resize
window.addEventListener('resize', () => {
this.barChart.resize()
})
this.init()
},
methods: {
pieAction(data) {
// let distributionRank = this.distributionRank[data.name]
// for (const key in distributionRank) {
// this.rankingData.push({
// brand: key,
// value: distributionRank[key]
// })
// }
// console.log(this.rankingData, '================')
},
init() {
this.getValueType()
},
getChart() {
var chartDom = document.getElementById('analyzeBar')
var myChart = echarts.init(chartDom)
var option
option = {
this.option = {
grid: {
left: '3%',
right: '4%',
......@@ -55,7 +71,7 @@ export default {
},
yAxis: {
type: 'category',
data: this.yData,
data: datas.Customer.valueType.value.map(item => item.name),
splitLine: {
show: false
},
......@@ -77,7 +93,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: {
......@@ -119,20 +136,17 @@ export default {
}
}
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()
})
},
pieAction(data){
}
}
}
......
......@@ -77,7 +77,7 @@ export default {
})
},
handleRankChange(value) {
console.log(value)
// console.log(value)
}
}
}
......
......@@ -53,7 +53,7 @@ export default {
})
})
this.distributionRank = JSON.parse(res.data.dataList[0].distributionRank)
console.log(this.distributionRank, 'mileage')
// console.log(this.distributionRank, 'mileage')
})
},
pieAction(data) {
......@@ -64,7 +64,7 @@ export default {
value: distributionRank[key]
})
}
console.log(this.rankingData, '================')
// console.log(this.rankingData, '================')
}
}
}
......
......@@ -12,7 +12,7 @@
<span>客户级别</span>
</div>
<div class="flex container">
<pie-chart :id="chart.id"></pie-chart>
<!-- <pie-chart :id="chart.id"></pie-chart> -->
<ran-king></ran-king>
</div>
</div>
......
......@@ -12,7 +12,7 @@
<span>进店类型</span>
</div>
<div class="container flex">
<pie-chart :id="chart.id" :list="salesData" @pieAction="pieAction"></pie-chart>
<!-- <pie-chart :id="chart.id" :list="salesData" @pieAction="pieAction"></pie-chart> -->
<ran-king :list="brandList"></ran-king>
</div>
</div>
......
......@@ -3,28 +3,36 @@
* @Author: huyue
* @Date: 2022-06-23 15:05:21
* @LastEditors: huyue
* @LastEditTime: 2022-06-28 18:41:37
* @LastEditTime: 2022-06-29 14:39:49
-->
<template>
<div class="flow-box">
<div class="flow-left">
<div class="title inline">客流转化</div>
<div class="chart-box">
<div id="flow" :style="{ height: height - 4.1 + 'vh' }"></div>
<div>
<!-- <div v-show="!hasData">
<div class="title">客流转化</div>
<div class="empty">
<img src="../../assets/images/empty.png" alt="" />
</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="flow-box">
<div class="flow-left">
<div class="title inline">客流转化{{ hasData }}</div>
<div class="chart-box">
<div id="flow" :style="{ height: height - 4.1 + 'vh' }"></div>
</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 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>
......@@ -32,10 +40,12 @@
</template>
<script>
import { changeMixin } from '@/mixins'
import datas from '../../utils/data'
import * as echarts from 'echarts'
export default {
name: 'Flow',
mixins: [changeMixin],
props: ['height'],
data() {
return {
......@@ -98,7 +108,8 @@ export default {
],
option: {},
echartsFunnel: '',
funnelDom: ''
funnelDom: '',
hasData: false
}
},
mounted() {
......@@ -111,8 +122,9 @@ export default {
this.init()
},
methods: {
init() {
this.getSaleTrans()
init(val) {
console.log(val)
this.getSaletTotal()
},
getSaleTrans() {
const params = {
......@@ -123,12 +135,13 @@ export default {
}
}
this.api.sales.saleTotal(params).then(res => {
console.log(res.data)
// console.log(res.data)
if (res.code === '0') {
res.data.dataList[0].num.forEach((item, index) => {
this.funnelData[index].value = item
})
this.draw()
this.hasData = res.data.dataList[0].num.every(i => i != 0)
if (this.hasData) this.draw()
}
})
},
......@@ -193,7 +206,7 @@ export default {
this.echartsFunnel.setOption(this.option)
// 鼠标划入
this.echartsFunnel.on('mouseover', data => {
console.log(data.data)
// console.log(data.data)
})
}
}
......
......@@ -12,7 +12,7 @@
<span>信息来源</span>
</div>
<div class="container flex">
<pie-chart :id="chart.id"></pie-chart>
<!-- <pie-chart :id="chart.id"></pie-chart> -->
<ran-king></ran-king>
</div>
</div>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!