task#14196,数据显示优化
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
<div class="wrap">
|
||||
<div v-if="isMobile" class="headWrap">
|
||||
<div class="title">KPI.数据看板</div>
|
||||
<div class="titleName">{{ current }}月-{{indexData && indexData.supplierName}}</div>
|
||||
<div class="titleName">{{ current }}月-{{supplierName}}</div>
|
||||
</div>
|
||||
<div v-else class="webHeadWrap" :style="'justify-content:'+(isZd==1 ? 'space-between':'center')">
|
||||
<div class="empty" v-if="isZd==1"></div>
|
||||
@ -156,6 +156,16 @@
|
||||
<div :class="{'comTab':true}">
|
||||
<noFit-table :is-mobile='isMobile' :table-data="detailList" :label-list="labelList"></noFit-table>
|
||||
</div>
|
||||
<!-- <el-pagination
|
||||
v-if="active !== 2"
|
||||
small
|
||||
:current-page.sync="pageNum"
|
||||
:page-size.sync="pageSize"
|
||||
@current-change="getKpiData"
|
||||
@size-change="getKpiData"
|
||||
layout="prev, pager, next"
|
||||
:total="total">
|
||||
</el-pagination>-->
|
||||
</div>
|
||||
<div v-loading="loadingData" class="contentWrap monthTotal" v-if="[5,6,7,8,9].includes(active)">
|
||||
<div :class="{'comTab':true,'detailTable':isMobile}">
|
||||
@ -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)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user