bugfix 修改
This commit is contained in:
@@ -83,6 +83,16 @@ export function getDriverName(key) {
|
||||
});
|
||||
}
|
||||
|
||||
export function getVehicleName(key) {
|
||||
return request({
|
||||
url: '/supplier/select/vehicle',
|
||||
method: 'GET',
|
||||
params: {
|
||||
key: key ,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 车辆 总览
|
||||
export function vehicleTotalInfo(data) {
|
||||
return request({
|
||||
|
||||
@@ -107,6 +107,27 @@
|
||||
</div>
|
||||
<!--日总 e -->
|
||||
<div v-loading="loadingData" class="contentWrap monthTotal" v-if="!([0,1,2, 3].includes(active))">
|
||||
<div class="searchDriverName" v-if="active == 5">
|
||||
<el-select
|
||||
v-model="vehicleId"
|
||||
filterable
|
||||
remote
|
||||
clearable
|
||||
reserve-keyword
|
||||
placeholder="请输入后选择"
|
||||
:remote-method="driverremoteMethod"
|
||||
@change="selectSupplierNameHandle"
|
||||
:loading="driverselectLoading"
|
||||
:style="isMobile ? 'width:100%' : 'width:50%'"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in driverselectOption"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="comTab">
|
||||
<noFit-table :active='active' :is-mobile='isMobile' :table-data="detailList" :label-list="labelList"></noFit-table>
|
||||
</div>
|
||||
@@ -149,7 +170,8 @@ import {
|
||||
vehicleTotalInfo,
|
||||
vehicleInfoBySupplier,
|
||||
vehicleInfoByVehicle,
|
||||
getKpiDetailsData
|
||||
getKpiDetailsData,
|
||||
getVehicleName
|
||||
} from "@/api/kpi.js"
|
||||
import {kpiMixins} from "@/utils/kpiMixins"
|
||||
import {myMixins} from "@/utils/myMixins";
|
||||
@@ -190,6 +212,7 @@ export default {
|
||||
selectOption: [],
|
||||
driverId:'',//68517
|
||||
driverName:'',
|
||||
vehicleId: '',
|
||||
driverselectLoading: false,
|
||||
driverselectOption: [],
|
||||
leftArr:'<<<',
|
||||
@@ -304,12 +327,15 @@ export default {
|
||||
]
|
||||
}
|
||||
},
|
||||
async getVehicleInfoByVehicle(type) {
|
||||
async getVehicleInfoByVehicle(type, vehicleId) {
|
||||
let res = await vehicleInfoByVehicle({
|
||||
startTime: this.startTime,
|
||||
endTime: this.endTime,
|
||||
statisticsType: type,
|
||||
supplierId: this.supplierId,
|
||||
pageNum: this.pageNum,
|
||||
pageSize: this.pageSize,
|
||||
vehicleId
|
||||
});
|
||||
this.detailList = res.data?.map(item => {
|
||||
let formatVal =item.createTime ? dayjs(item.createTime).format('DD') : '';
|
||||
@@ -346,17 +372,6 @@ export default {
|
||||
{label: '在线时长', prop: 'onlineDuration'},
|
||||
]
|
||||
}
|
||||
|
||||
/* this.detailList = res.data?.map(item => {
|
||||
|
||||
item.timeoutRate=this.formatPercentage(item.timeoutRate) || 0;
|
||||
let formatVal = dayjs(new Date(item.statisticsTime)).format('DD');
|
||||
let formatVal1 = dayjs(new Date(item.statisticsTime)).format('MM');
|
||||
return {...item, date: formatVal, month: formatVal1 + '月'};
|
||||
});*/
|
||||
|
||||
|
||||
console.log('rererewrew', res);
|
||||
},
|
||||
async getSupplierKpiByOrigin(type) {
|
||||
let result = await getKpiDetailsData({
|
||||
@@ -449,6 +464,21 @@ export default {
|
||||
this.selectOption = [];
|
||||
}
|
||||
},
|
||||
async driverremoteMethod(query){
|
||||
if (query !== '') {
|
||||
this.driverselectLoading = true;
|
||||
try {
|
||||
const result = await getVehicleName(query);
|
||||
this.driverselectOption = result.data || []
|
||||
} catch (error) {
|
||||
this.driverselectOption = [];
|
||||
} finally {
|
||||
this.driverselectLoading = false;
|
||||
}
|
||||
} else {
|
||||
this.driverselectOption = [];
|
||||
}
|
||||
},
|
||||
async selectSupplierNameHandle() { // 下拉切换服务商时调用的接口
|
||||
if( this.active == 0 ) {
|
||||
await this.getVehicleTotalInfo();
|
||||
@@ -462,7 +492,23 @@ export default {
|
||||
} else if(this.active == 4){
|
||||
await this.getVehicleInfoByVehicle(1);
|
||||
} else if(this.active == 5) {
|
||||
await this.getVehicleInfoByVehicle(2);
|
||||
if( this.vehicleId ) {
|
||||
await this.getVehicleInfoByVehicle(2, this.vehicleId);
|
||||
} else {
|
||||
this.labelList = [
|
||||
{label: '车辆名称', prop: 'vehicleName'},
|
||||
{label: '日期', prop: 'statisticsTime'},
|
||||
{label: '案件量', prop: 'orderCount'},
|
||||
{label: '完成量', prop: 'finishOrderCount'},
|
||||
{label: '取消量', prop: 'cancelOrderCount'},
|
||||
{label: '取消率', prop: 'cancelRate'},
|
||||
{label: '上游聚合量', prop: 'upMixinCount'},
|
||||
{label: '中道聚合量', prop: 'zdJuheOrderCount'},
|
||||
{label: '传统派工量', prop: 'traditionOrderCount'},
|
||||
{label: '在线时长', prop: 'onlineDuration'},
|
||||
];
|
||||
this.detailList = [];
|
||||
}
|
||||
} else if(this.active == 6) {
|
||||
await this.getSupplierKpiByOrigin(1);
|
||||
} else if(this.active == 7) {
|
||||
@@ -544,7 +590,7 @@ export default {
|
||||
yAxisIndex: 0, // 绑定左Y轴
|
||||
stack: 'order', // 堆积分组(同组内数据堆积)
|
||||
data: seriesData['完成量'],
|
||||
itemStyle: { color: '#4895ef' }, // 柱状图颜色
|
||||
itemStyle: { color: '#4299e1' }, // 柱状图颜色
|
||||
label: {
|
||||
show: true, // 显示数值标签
|
||||
position: 'insideTop', // 标签位置:柱顶内部
|
||||
@@ -560,7 +606,7 @@ export default {
|
||||
yAxisIndex: 0, // 绑定左Y轴
|
||||
stack: 'order', // 与「线上订单」同堆积组
|
||||
data: seriesData['取消量'],
|
||||
itemStyle: { color: '#38b2ac' }, // 柱状图颜色
|
||||
itemStyle: { color: '#ed8936' }, // 柱状图颜色
|
||||
label: {
|
||||
show: true,
|
||||
position: 'insideTop',
|
||||
@@ -576,12 +622,12 @@ export default {
|
||||
data: seriesData['在线率'],
|
||||
symbol: 'circle', // 标记点形状:圆形
|
||||
symbolSize: 6, // 标记点大小
|
||||
lineStyle: { color: '#e53e3e', width: 2 }, // 线条样式
|
||||
itemStyle: { color: '#e53e3e' }, // 标记点颜色
|
||||
lineStyle: { color: '#48bb78', width: 2 }, // 线条样式
|
||||
itemStyle: { color: '#48bb78' }, // 标记点颜色
|
||||
label: {
|
||||
show: true, // 显示数值标签
|
||||
position: 'top', // 标签位置:点上方
|
||||
color: '#e53e3e',
|
||||
color: '#48bb78',
|
||||
fontSize: 10
|
||||
}
|
||||
}
|
||||
@@ -632,6 +678,11 @@ export default {
|
||||
type: 'pie',
|
||||
radius: ['75%'], // 增大饼图半径范围
|
||||
data: charData,
|
||||
color: [
|
||||
'#1890FF', // 中道聚合案件 - 蓝色(ECharts默认主色)
|
||||
'#FAAD14', // 上游聚合案件 - 黄色(ECharts默认辅助色)
|
||||
'#52C41A' // 传统派工案件 - 绿色(ECharts默认成功色)
|
||||
],
|
||||
label: {
|
||||
show: false // 隐藏文本标签[citation:1]
|
||||
},
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<van-tabs v-model="active" sticky @click="tabClickHandle">
|
||||
<van-tab v-for="(item,index) in tabArr" :key="index" :title="item.name"></van-tab>
|
||||
<div v-if="isMobile && !([0,1,2,3].includes(active))" class="tipArrow left">{{ leftArr }}</div>
|
||||
<div v-if="isMobile && !([9,10, 11].includes(active))" class="tipArrow right">>>></div>
|
||||
<div v-if="isMobile && !([7,8, 9].includes(active))" class="tipArrow right">>>></div>
|
||||
</van-tabs>
|
||||
<div v-loading="loadingData" :class="{'contentWrap':true,'webcontentWrap':!isMobile}" v-if="active===0">
|
||||
<!--<div :class="{'reciceOrder':true,'webCom':!isMobile}">
|
||||
@@ -232,13 +232,13 @@
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
<div v-loading="loadingData" class="contentWrap monthTotal" v-if="[5,6,7,8,9,10, 11].includes(active)">
|
||||
<div v-loading="loadingData" class="contentWrap monthTotal" v-if="[5,6,7,8,9].includes(active)">
|
||||
<div :class="{'comTab':true,'detailTable':isMobile}">
|
||||
<noFit-table :active='active' :is-mobile='isMobile' :table-data="detailList" :label-list="labelList"
|
||||
></noFit-table>
|
||||
</div>
|
||||
<el-pagination
|
||||
v-if="active !== 10"
|
||||
v-if="active !== 8"
|
||||
small
|
||||
:page-sizes="[20, 50, 100]"
|
||||
:current-page.sync="pageNum"
|
||||
@@ -279,8 +279,8 @@ export default {
|
||||
activeIndex: 0,
|
||||
//
|
||||
tabArr: [
|
||||
{name: '总览',value:0}, {name: '月/总'}, {name: '日/总'},{name: '月/师傅'}, {name: '日/师傅'}, {name: '拒单明细'},
|
||||
{name: '超时明细'}, {name: '催促明细'},{name: '投诉明细'}, {name: '不使用APP案件明细'}, {name: '车辆在线情况'} , {name: '聚合失败案件明细'}
|
||||
{name: '总览',value:0}, {name: '月/总'}, {name: '日/总'},{name: '月/师傅'}, {name: '日/师傅'}, /*{name: '拒单明细'},*/
|
||||
/*{name: '超时明细'},*/ {name: '催促明细'},{name: '投诉明细'}, {name: '不使用APP案件明细'}, {name: '车辆在线情况'} , {name: '聚合失败案件明细'}
|
||||
],
|
||||
list: [ {name: '服务评价'}, {name: 'APP使用情况'}, {name: ' 时效 '}],
|
||||
// driverList: [{name: '得分总览'},{name: '接单情况'}, {name: '服务评价'}, {name: 'APP使用情况'}, {name: '时效 '}],
|
||||
@@ -1096,7 +1096,7 @@ export default {
|
||||
|
||||
this.loading = false;
|
||||
} */
|
||||
else if ([ 5,6,7, 8,9,10,11].includes(this.active)) {
|
||||
else if ([ 5,6,7, 8,9].includes(this.active)) {
|
||||
this.detailList = []
|
||||
this.labelList = []
|
||||
let result = await getKpiDetailsData({
|
||||
@@ -1113,7 +1113,7 @@ export default {
|
||||
return {...item, date: formatVal};
|
||||
});
|
||||
this.loading = false
|
||||
if (this.active === 5) {//拒单明细
|
||||
/*if (this.active === 5) {//拒单明细
|
||||
this.labelList = [
|
||||
{label: '案件编号', prop: 'orderCode'},
|
||||
{label: '服务内容', prop: 'serviceName'},
|
||||
@@ -1133,7 +1133,8 @@ export default {
|
||||
{label: '超时时间', prop: 'time'},
|
||||
{label: '超时原因', prop: 'reason'},
|
||||
]
|
||||
} else if (this.active === 7) {//催促明细
|
||||
} else */
|
||||
if (this.active === 5) {//催促明细
|
||||
this.labelList = [
|
||||
{label: '案件编号', prop: 'orderCode'},
|
||||
{label: '二级合同名称', prop: 'contractName'},
|
||||
@@ -1150,7 +1151,7 @@ export default {
|
||||
{label: '市(B)', prop: 'bCity'},
|
||||
{label: '区(B)', prop: 'area'},
|
||||
]
|
||||
} else if (this.active === 8) {//投诉明细
|
||||
} else if (this.active === 6) {//投诉明细
|
||||
this.labelList = [
|
||||
{label: '案件编号', prop: 'orderCode'},
|
||||
{label: '服务内容', prop: 'serviceName'},
|
||||
@@ -1159,7 +1160,7 @@ export default {
|
||||
{label: '投诉类型', prop: 'complainTypeString'},
|
||||
{label: '责任供应商扣罚金额', prop: 'compensateFee'},
|
||||
]
|
||||
} else if (this.active === 9) {//不使用App案件明细
|
||||
} else if (this.active === 7) {//不使用App案件明细
|
||||
this.labelList = [
|
||||
{label: '案件编号', prop: 'orderCode'},
|
||||
{label: '服务内容', prop: 'serviceName'},
|
||||
@@ -1168,7 +1169,7 @@ export default {
|
||||
{label: '案件创建时间', prop: 'orderCreateTime'},
|
||||
{label: '事发地', prop: 'vehiclePointAddress'},
|
||||
]
|
||||
} else if (this.active === 10) {//车辆在线情况
|
||||
} else if (this.active === 8) {//车辆在线情况
|
||||
this.labelList = [
|
||||
// {label: '总车辆数', prop: 'totalCount'},
|
||||
{label: '在线车辆数(取每日的12点)', prop: 'twelveClockVehicleCount'},
|
||||
@@ -1177,7 +1178,7 @@ export default {
|
||||
{label: '在线率(在线车辆数/总车辆数)', prop: 'onlineRate'},
|
||||
// {label: '车辆平均在线时长', prop: ''},
|
||||
]
|
||||
} else if (this.active === 11) {//聚合失败案件明细
|
||||
} else if (this.active === 9) {//聚合失败案件明细
|
||||
this.labelList = [
|
||||
{label: '案件编号', prop: 'orderCode'},
|
||||
{label: '服务内容', prop: 'serviceName'},
|
||||
@@ -1605,19 +1606,19 @@ export default {
|
||||
},
|
||||
setType(type) {
|
||||
switch (type) {
|
||||
case 5:
|
||||
/*case 5:
|
||||
return 1;
|
||||
case 6:
|
||||
return 2;
|
||||
case 7:
|
||||
return 2;*/
|
||||
case 5:
|
||||
return 7;
|
||||
case 8:
|
||||
case 6:
|
||||
return 3;
|
||||
case 9:
|
||||
case 7:
|
||||
return 4;
|
||||
case 10:
|
||||
case 8:
|
||||
return 5;
|
||||
case 11:
|
||||
case 9:
|
||||
return 6;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user