Commit 9e398386 by 王志慧

commit

1 parent 888b7577
......@@ -63,6 +63,9 @@ export default {
.brand-num {
color: #606266;
margin-right: 0.6vw;
display: inline-block;
width: 0.3vw;
text-align: center;
}
.marquee {
width: 80%;
......
......@@ -9,7 +9,7 @@
<div>
<div class="title">售后客户价值分析</div>
<template v-if="barData.length > 0">
<div class="analyze-content" :style="{ height: height - 5 + 'vh'}">
<div class="analyze-content" :style="{ height: height - 5 + 'vh' }">
<div class="content-left bg">
<div id="analyzeBar" style="height: 100%"></div>
</div>
......@@ -47,8 +47,7 @@ export default {
brandName: ''
}
},
mounted() {
},
mounted() {},
methods: {
getChart() {
this.barChart = echarts.init(document.getElementById('analyzeBar'))
......@@ -131,7 +130,8 @@ export default {
const params = {
req: {
queryItem: 'valueanalyse',
queryTime: this.getCurrentDate(),
// queryTime: "2022-06-23",
queryTime: this.getCurrentDate(),
queryType: this.watchReportParams.reportType
}
}
......@@ -154,7 +154,7 @@ export default {
})
},
initPieData(name) {
this.analyzeData = []
this.analyzeData = []
datas.Customer.valueType.value.map(item => {
if (item.name == name) {
const distributionRank = this.distributionRank[item.value]
......@@ -180,8 +180,8 @@ export default {
</script>
<style lang="scss" scoped>
.title{
padding:1vh 0.556vw;
.title {
padding: 1vh 0.556vw;
}
.analyze-content {
display: flex;
......
......@@ -63,6 +63,7 @@ export default {
const params = {
req: {
queryItem: 'mileage',
queryTime: this.getCurrentDate(),
queryType: this.watchReportParams.reportType
}
......@@ -87,12 +88,16 @@ export default {
},
pieAction(data) {
let distributionRank = this.distributionRank[data.name]
this.rankingData = []
for (const key in distributionRank) {
this.rankingData.push({
brand: key,
value: distributionRank[key]
})
}
this.rankingData.sort(function (a, b) {
return b.value - a.value //倒序
})
},
init(newVal) {
this.isBrand = false
......@@ -146,6 +151,9 @@ export default {
.brand-num {
color: #606266;
margin-right: 8px;
display: inline-block;
width: 0.3vw;
text-align: center;
}
.marquee {
width: 4.9vw;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!