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'},