From 689156e450f342a5da77bf4384a3a3c6c4e36bfe Mon Sep 17 00:00:00 2001 From: douzhuo <17611323298@163.com> Date: Thu, 7 Jul 2022 20:04:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/page/wel.vue | 2 +- src/views/Statistics/ConsultantBrand.vue | 634 +++++++++++++++++------ 2 files changed, 465 insertions(+), 171 deletions(-) diff --git a/src/page/wel.vue b/src/page/wel.vue index 34f4fbc..5d371cf 100644 --- a/src/page/wel.vue +++ b/src/page/wel.vue @@ -806,7 +806,7 @@ -
+
diff --git a/src/views/Statistics/ConsultantBrand.vue b/src/views/Statistics/ConsultantBrand.vue index 40ce8c7..96ec1fc 100644 --- a/src/views/Statistics/ConsultantBrand.vue +++ b/src/views/Statistics/ConsultantBrand.vue @@ -22,7 +22,7 @@
筛选日期:
-
+
- +
- +
团队
-
+
- - 销讲统计 - 违禁统计 - + + 销讲统计 + 违禁统计 +
导出
- + @@ -641,7 +932,7 @@ export default { teamAllLeve2id: "", teamAllLeve2: [], teamAllLevels: [], - teamAllLevelsId: '', + teamAllLevelsId: "", sum1: "", avg1: "", num1: "", @@ -670,9 +961,9 @@ export default { }, created() { if (this.$route.query.types) { - let arr = this.$route.query.types.split(","); - this[arr[0]] = arr[1]; - console.log(arr); + let arr = this.$route.query.types.split(","); + this[arr[0]] = arr[1]; + console.log(arr); } this.sta_men_downLoad = this.permissions["sta_men_downLoad"]; }, @@ -690,23 +981,23 @@ export default { methods: { // 排名颜色 topThreeColor(index) { - let str = '' + let str = ""; switch (index) { case 0: - str = '#F54D3F' - break + str = "#F54D3F"; + break; case 1: - str = '#FF981E' - break + str = "#FF981E"; + break; case 2: - str = '#FFCC00' - break + str = "#FFCC00"; + break; default: - str = '#E5F0FF' - break + str = "#E5F0FF"; + break; } - return str + return str; }, downLoad() { @@ -748,7 +1039,6 @@ export default { this.avg4 = ""; this.num4 = ""; - this.sum5 = ""; this.avg5 = ""; this.num5 = ""; @@ -783,7 +1073,7 @@ export default { teamAllLeve() { this.teamAllLevel = [{ name: "平均执行", value: "" }]; this.teamAllLeve2 = [{ name: "总次数", value: "" }]; - this.teamAllLevels = [{name: '总次数', value: ''}] + this.teamAllLevels = [{ name: "总次数", value: "" }]; let pamaet = { houseId: this.houseId, dateType: 0, @@ -865,6 +1155,7 @@ export default { this["num" + type] = res.data.num || 0; this["avg" + type] = res.data.avg || 0; let arr = []; + let max1 = 0; let max = 0; let newarr = res.data.list || []; if (newarr.length != 0) { @@ -873,6 +1164,9 @@ export default { if (type == 1) { obj.name = item.accountName; obj.zxl = item.activeCustomer; + if (max1 < item.activeCustomer) { + max1 = obj.zxl; + } arr.push(obj); } else if (type == 2) { obj.name = item.accountName; @@ -885,7 +1179,7 @@ export default { obj.name = item.accountName; obj.zxl = item.fraction; arr.push(obj); - } else if(type == 5) { + } else if (type == 5) { obj.name = item.accountName; obj.zxl = item.unTagCustomer; arr.push(obj); @@ -896,6 +1190,9 @@ export default { } }); } + if (type == 1) { + arr = this.dealData(arr); + } if (type == 2) { arr.forEach((item) => { @@ -908,10 +1205,6 @@ export default { } if (type == 4) { - console.log( - arr, - "arr4,ajdklsajkldjaskldjakslajdklsajkldjaskldjakslajdklsajkldjaskldjakslajdklsajkldjaskldjakslajdklsajkldjaskldjakslajdklsajkldjaskldjaksl" - ); arr = this.dealData(arr); } if (type == 5) { @@ -1016,11 +1309,12 @@ export default { "#5789D0", ], legend: { - icon:"roundRect"}, + icon: "roundRect", + }, grid: { left: "3%", right: "4%", - bottom:18, + bottom: 18, containLabel: true, }, xAxis: { @@ -1051,9 +1345,9 @@ export default { //切换时间 tabtimetap(index) { if (index == 0) { - this.customtime = [] + this.customtime = []; } - + if (index == 4) { let starTime = new Date().getTime() - 24 * 60 * 60 * 1000 * 7; let startDate = `${new Date(starTime).getFullYear()}-${ @@ -1113,25 +1407,25 @@ export default {