From 4be4015e30f8d4405ad72a188d7312b6fe5fe2d9 Mon Sep 17 00:00:00 2001 From: zhouxueli <2841188632@qq.com> Date: Mon, 8 Jul 2024 14:24:31 +0800 Subject: [PATCH] =?UTF-8?q?task#14196=EF=BC=8C=E6=95=B0=E6=8D=AE=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/kpi/kpiIndex.vue | 80 +++++++++++++++++++++++--------------- 1 file changed, 48 insertions(+), 32 deletions(-) diff --git a/src/views/kpi/kpiIndex.vue b/src/views/kpi/kpiIndex.vue index 34b6373b..ee89e09f 100644 --- a/src/views/kpi/kpiIndex.vue +++ b/src/views/kpi/kpiIndex.vue @@ -2,7 +2,7 @@
KPI.数据看板
-
{{ current }}月-{{indexData && indexData.supplierName}}
+
{{ current }}月-{{supplierName}}
@@ -156,6 +156,16 @@
+
@@ -223,6 +233,7 @@ export default { isMobile: false, isZd: '', current: dayjs(new Date()).format('M'), + supplierName:'', value: '1', options: [ {value: '1', label: '师傅接单时效'}, @@ -232,9 +243,10 @@ export default { pageSize: 10, total: 0, swithVal: true, - supplierId:'', + supplierId:'',//1128 selectLoading: false, selectOption: [], + driverId:'',//68517 } }, async mounted() { @@ -727,6 +739,7 @@ export default { supplierId: this.supplierId, }); this.indexData = res.data; + this.supplierName=res.data?.supplierName } else if ([1, 2].includes(this.active)) { let res = await getStatisticsKpi({ startTime: this.active === 1 ? this.startMonthTime : this.startTime, @@ -736,20 +749,23 @@ export default { }) this.detailList = res.data?.map(item => { let formatVal = dayjs(item.statisticsDate).format('DD'); - let formatVal1 = dayjs(item.statisticsDate).format('MM'); - return {...item, date: formatVal, month: formatVal1}; + let formatVal1 = dayjs(item.statisticsDate).format('M'); + return {...item, date: formatVal, month: (formatVal1 == this.current) ? '本月' : (formatVal1 + '月')}; }); this.loading = false this.detailList?.map(item => { - this.xAxisArr.unshift(item.month) + this.xAxisArr.push(item.month) }) + this.xAxisArr[this.xAxisArr.length - 1] = '本月' await this.twoTabHanldeData() } else if ([3, 4].includes(this.active)) { let res = await getDriverStatisticsKpi({ startTime: this.startTime , endTime: this.endTime, statisticsType: this.active === 3 ? 1 : 2, - driverId: 68517, + driverId: this.driverId, + /* pageNum: this.pageNum, + pageSize: this.pageSize*/ }) this.detailList = res.data this.loading = false; @@ -879,10 +895,10 @@ export default { if (this.active === 1) { if (this.activeIndex === 0) {//接单指标 this.detailList?.map(item => { - this.v1.unshift(item.dispatchOrderCount) - this.v2.unshift(item.refuseOrderRate) - this.v3.unshift(item.timeoutOrderRate) - this.v4.unshift(item.cancelrate) + this.v1.push(item.dispatchOrderCount) + this.v2.push(item.refuseOrderRate) + this.v3.push(item.timeoutOrderRate) + this.v4.push(item.cancelrate) }) this.labelList = [ {label: '月', prop: 'month'}, @@ -897,9 +913,9 @@ export default { ] } else if (this.activeIndex === 1) { this.detailList?.map(item => { - this.v1.unshift(item.customerEvaluateRate) - this.v2.unshift(item.customerSatisfaction) - this.v3.unshift(item.complainOrderRate) + this.v1.push(item.customerEvaluateRate) + this.v2.push(item.customerSatisfaction) + this.v3.push(item.complainOrderRate) }) this.labelList = [ {label: '月', prop: 'month'}, @@ -910,12 +926,12 @@ export default { ] } else if (this.activeIndex === 2) { this.detailList?.map(item => { - this.v1.unshift(item.appRate) - this.v2.unshift(item.threeMinutesContactRate) - this.v3.unshift(item.pinganPolymerizationSuccessRate) - this.v4.unshift(item.zhonghuaPolymerizationSuccessRate) - this.v5.unshift(item.zdPolymerizationSuccessRate) - this.v6.unshift(item.polymerizationSuccessRate) + this.v1.push(item.appRate) + this.v2.push(item.threeMinutesContactRate) + this.v3.push(item.pinganPolymerizationSuccessRate) + this.v4.push(item.zhonghuaPolymerizationSuccessRate) + this.v5.push(item.zdPolymerizationSuccessRate) + this.v6.push(item.polymerizationSuccessRate) }) this.labelList = [ {label: '月', prop: 'month'}, @@ -930,32 +946,32 @@ export default { if (this.isMobile) { if (this.value == 1) { this.detailList?.map(item => { - this.v1.unshift(item.receiving) - this.v2.unshift(item.threeMinutesReceivingRate) + this.v1.push(item.receiving) + this.v2.push(item.threeMinutesReceivingRate) }) } else { this.detailList?.map(item => { - this.v1.unshift(item.arriving) - this.v2.unshift(item.polymerizationSuccessArriving) - this.v3.unshift(item.fortyMinutesArrivalRate) + this.v1.push(item.arriving) + this.v2.push(item.polymerizationSuccessArriving) + this.v3.push(item.fortyMinutesArrivalRate) }) } } else { this.detailList?.map(item => { - this.v1.unshift(item.receiving) - this.v2.unshift(item.threeMinutesReceivingRate) + this.v1.push(item.receiving) + this.v2.push(item.threeMinutesReceivingRate) }) if (this.swithVal) { this.detailList?.map(item => { - this.v3.unshift(item.trailArriving) - this.v4.unshift(item.trailPolymerizationSuccessArriving) - this.v5.unshift(item.trailFortyMinutesArrivalRate) + this.v3.push(item.trailArriving) + this.v4.push(item.trailPolymerizationSuccessArriving) + this.v5.push(item.trailFortyMinutesArrivalRate) }) } else { this.detailList?.map(item => { - this.v3.unshift(item.minorArriving) - this.v4.unshift(item.minorPolymerizationSuccessArriving) - this.v5.unshift(item.minorFortyMinutesArrivalRate) + this.v3.push(item.minorArriving) + this.v4.push(item.minorPolymerizationSuccessArriving) + this.v5.push(item.minorFortyMinutesArrivalRate) }) } }