From cd02c44fcaf52372923a457fb83afb6826a7cc8c Mon Sep 17 00:00:00 2001 From: zhouxueli <2841188632@qq.com> Date: Wed, 25 Dec 2024 17:29:22 +0800 Subject: [PATCH] =?UTF-8?q?task#=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=B8=88?= =?UTF-8?q?=E5=82=85=E6=BB=A1=E6=84=8F=E5=BA=A6=E6=8E=A5=E5=8F=A3=E6=9B=B4?= =?UTF-8?q?=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/kpi.js | 8 ++++++++ src/views/kpi/kpiIndex.vue | 40 ++++++++++++++++++++++++++++---------- 2 files changed, 38 insertions(+), 10 deletions(-) diff --git a/src/api/kpi.js b/src/api/kpi.js index bc75a611..6165bc29 100644 --- a/src/api/kpi.js +++ b/src/api/kpi.js @@ -27,6 +27,14 @@ export function getDriverStatisticsKpi(data){ data }) } +export function querySupplierDriverStatisticsScore(data){ + return request({ + url: '/supplier/supplierKPI/querySupplierDriverStatisticsScore', + method:'POST', + // contentType: 'application/json', + data + }) +} // 各种详情数据 export function getKpiDetailsData(data){ return request({ diff --git a/src/views/kpi/kpiIndex.vue b/src/views/kpi/kpiIndex.vue index ed6ff271..f941b88b 100644 --- a/src/views/kpi/kpiIndex.vue +++ b/src/views/kpi/kpiIndex.vue @@ -274,7 +274,7 @@ import { getDriverStatisticsKpi, getSupplierId, getDriverName, - getRecentSupplierKpi + getRecentSupplierKpi, querySupplierDriverStatisticsScore } from "@/api/kpi.js" import {myMixins} from "@/utils/myMixins" import CircleChar from "@/views/kpi/components/circleChar.vue"; @@ -1037,11 +1037,33 @@ export default { // console.log(" this.xAxisArr", this.xAxisArr) // this.xAxisArr[this.xAxisArr.length - 1] = '本月' await this.twoTabHanldeData() - } else if ([3,4,5].includes(this.active)) { + }else if (this.active === 3) { + let res = await querySupplierDriverStatisticsScore({ + startTime: this.startTime , + endTime: this.endTime, + statisticsType: 1, + supplierId: this.supplierId, + driverId: this.driverId, + driverName:this.driverName, + pageNum: this.pageNum, + pageSize: this.pageSize + }) + this.total = res.total + this.detailList = res.data?.map(item => { + let formatVal = dayjs(item.statisticsDate).format('DD'); + return {...item, date: formatVal}; + }); + this.labelList = [ + {label: '师傅姓名', prop: 'driverName'}, + {label: '案件总量', prop: 'orderCount'}, + {label: '满意度得分 ', prop: 'driverSatisfaction'}, + ] + this.loading = false; + }else if ([4,5].includes(this.active)) { let res = await getDriverStatisticsKpi({ startTime: this.startTime , endTime: this.endTime, - statisticsType: (this.active === 3 || this.active === 4) ? 1 : 2, + statisticsType:this.active === 4 ? 1 : 2, supplierId: this.supplierId, driverId: this.driverId, driverName:this.driverName, @@ -1406,13 +1428,11 @@ export default { {label: '聚合成功到达时效(分)', prop: 'polymerizationSuccessArriving'}, ] } - } else if(this.active === 3){ - this.labelList = [ - {label: '师傅姓名', prop: 'driverName'}, - {label: '案件总量', prop: 'orderCount'}, - {label: '满意度得分 ', prop: 'driverSatisfaction'}, - ] - } else if (this.active === 4) { + } + /* else if(this.active === 3){ + + } */ + else if (this.active === 4) { if (this.activeIndex === 0) { this.labelList = [ {label: '师傅姓名', prop: 'driverName'},