feat(api): 添加获取平均通话时长和有效通话时长的接口
添加了获取平均通话时长的接口 getAvgCallTime 和获取有效通话时长的接口 getGroupCallDuration 更新了相关视图组件以使用新接口数据
This commit is contained in:
@@ -128,7 +128,7 @@ import UserDropdown from "@/components/UserDropdown.vue";
|
||||
import Loading from "@/components/Loading.vue";
|
||||
import {getCustomerAttendance,getTodayCall,getProblemDistribution,getTableFillingRate,getAverageResponseTime,
|
||||
getWeeklyActiveCommunicationRate,getTimeoutResponseRate,getCustomerCallInfo,getCustomerChatInfo,getCustomerFormInfo,
|
||||
getConversionRateAndAllocatedData,getCustomerAttendanceAfterClass4,getPayMoneyCustomers,getSalesFunnel,getGoldContactTime} from "@/api/api.js"
|
||||
getConversionRateAndAllocatedData,getCustomerAttendanceAfterClass4,getPayMoneyCustomers,getSalesFunnel,getGoldContactTime,getAvgCallTime} from "@/api/api.js"
|
||||
|
||||
// 缓存系统
|
||||
const cache = new Map();
|
||||
@@ -330,7 +330,12 @@ async function getCoreKpi() {
|
||||
kpiDataState.assignedData = conversionRes.data.all_count || 0
|
||||
kpiDataState.wechatAddRate = conversionRes.data.plus_v_conversion_rate || 0
|
||||
}
|
||||
|
||||
|
||||
// 平均通话时长
|
||||
const avgCallTimeRes = await withCache('getAvgCallTime', () => getAvgCallTime(hasParams ? params : undefined), hasParams ? params : {})
|
||||
if (avgCallTimeRes.code === 200) {
|
||||
kpiDataState.avgDuration = avgCallTimeRes.data.call_time || 0
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取核心KPI数据失败:', error)
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user