bugfix 修改
This commit is contained in:
@@ -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]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user