feat(api): 添加获取平均通话时长和有效通话时长的接口
添加了获取平均通话时长的接口 getAvgCallTime 和获取有效通话时长的接口 getGroupCallDuration 更新了相关视图组件以使用新接口数据
This commit is contained in:
@@ -80,7 +80,8 @@ import RawDataCards from "../person/components/RawDataCards.vue";
|
||||
import CustomerDetail from "../person/components/CustomerDetail.vue";
|
||||
import { useUserStore } from "@/stores/user";
|
||||
import { useRouter } from "vue-router";
|
||||
import {getGroupAbnormalResponse, getWeekTotalCall, getWeekAddCustomerTotal, getWeekAddDealTotal, getWeekAddFeeTotal, getGroupFunnel,getPayDepositToMoneyRate,getGroupRanking } from "@/api/manager.js";
|
||||
import {getGroupAbnormalResponse, getWeekTotalCall, getWeekAddCustomerTotal, getWeekAddDealTotal,
|
||||
getWeekAddFeeTotal, getGroupFunnel,getPayDepositToMoneyRate,getGroupRanking, getGroupCallDuration} from "@/api/manager.js";
|
||||
|
||||
// 缓存系统
|
||||
const cache = new Map()
|
||||
@@ -189,7 +190,7 @@ const weekTotalData = ref({
|
||||
week_add_fee_total: {},
|
||||
pay_deposit_to_money_rate: {},
|
||||
group_funnel: {},
|
||||
week_add_fee_total: {},
|
||||
group_call_duration: {},
|
||||
});
|
||||
// 团队异常预警
|
||||
const groupAbnormalResponse = ref({})
|
||||
@@ -248,6 +249,16 @@ async function TeamGetWeekTotalCall() {
|
||||
weekTotalData.value.week_total_call = res.data
|
||||
}
|
||||
}
|
||||
// 有效通话时长
|
||||
async function TeamGetGroupCallDuration() {
|
||||
const params = getRequestParams()
|
||||
const hasParams = params.user_name
|
||||
const res = await withCache('getGroupCallDuration', () => getGroupCallDuration(hasParams ? params : undefined), hasParams ? params : {})
|
||||
console.log(res)
|
||||
if (res.code === 200) {
|
||||
weekTotalData.value.group_call_duration = res.data
|
||||
}
|
||||
}
|
||||
// 新增客户
|
||||
async function TeamGetWeekAddCustomerTotal() {
|
||||
const params = getRequestParams()
|
||||
@@ -381,6 +392,7 @@ async function forceRefreshAllData() {
|
||||
await Promise.all([
|
||||
TeamGetGroupAbnormalResponse(),
|
||||
TeamGetWeekTotalCall(),
|
||||
TeamGetGroupCallDuration(),
|
||||
TeamGetWeekAddCustomerTotal(),
|
||||
TeamGetWeekAddDealTotal(),
|
||||
TeamGetWeekAddFeeTotal(),
|
||||
@@ -399,6 +411,7 @@ onMounted(async () => {
|
||||
|
||||
await TeamGetGroupAbnormalResponse()
|
||||
await TeamGetWeekTotalCall()
|
||||
await TeamGetGroupCallDuration()
|
||||
await TeamGetWeekAddCustomerTotal()
|
||||
await TeamGetWeekAddDealTotal()
|
||||
await TeamGetWeekAddFeeTotal()
|
||||
|
||||
Reference in New Issue
Block a user