Commit 9e398386 by 王志慧

commit

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