|
|
@@ -250,23 +250,29 @@ |
|
|
|
danwei: '单位(次)', |
|
|
|
totalTimeShow: false, |
|
|
|
activeTab: 0, |
|
|
|
numlist: [{ |
|
|
|
name: '有效接待', |
|
|
|
num: '' |
|
|
|
}, |
|
|
|
|
|
|
|
numlist: [ |
|
|
|
{ |
|
|
|
name: '接待量', |
|
|
|
num: '' |
|
|
|
num: '', |
|
|
|
setName: 'sumCustomer' |
|
|
|
},{ |
|
|
|
name: '有效接待', |
|
|
|
num: '', |
|
|
|
setName: 'receptionCount' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '平均执行率', |
|
|
|
num: '' |
|
|
|
num: '', |
|
|
|
setName: 'fraction' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '录音时长', |
|
|
|
num: '' |
|
|
|
name: '平均接待时长', |
|
|
|
num: '', |
|
|
|
setName: 'sumDuration' |
|
|
|
}, |
|
|
|
], |
|
|
|
|
|
|
|
lineOptsect: { |
|
|
|
"categories": ["2016", "2017", "2018", "2019", "2020", "2021"], |
|
|
|
"series": [{ |
|
|
@@ -286,21 +292,31 @@ |
|
|
|
}] |
|
|
|
}, |
|
|
|
newlistoj: [], |
|
|
|
newlistoj1: [{ |
|
|
|
name: "接待客户", |
|
|
|
id: 1 |
|
|
|
|
|
|
|
newlistoj1: [ |
|
|
|
{ |
|
|
|
name: "接待量", |
|
|
|
id: 3, |
|
|
|
title: '单位(个)', |
|
|
|
setName: 'sumCustomer' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: "平均执行率", |
|
|
|
id: 2 |
|
|
|
name: "有效接待", |
|
|
|
id: 1, |
|
|
|
title: '单位(次)', |
|
|
|
setName: 'receptionCount' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: "接待量", |
|
|
|
id: 3 |
|
|
|
name: "平均执行率", |
|
|
|
id: 2, |
|
|
|
title: '单位(%)', |
|
|
|
setName: 'fraction' |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: "录音时长", |
|
|
|
id: 5 |
|
|
|
name: "平均接待时长", |
|
|
|
id: 5, |
|
|
|
title: '单位(min)', |
|
|
|
setName: 'sumDuration' |
|
|
|
}, |
|
|
|
], |
|
|
|
bocindex: 0, |
|
|
@@ -464,16 +480,11 @@ |
|
|
|
lastStartDate: this.lastStartDate |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
// 接待量 |
|
|
|
this.numlist[0].num = res.receptionCount || 0 |
|
|
|
// 接待客户 |
|
|
|
this.numlist[1].num = res.sumCustomer || 0 |
|
|
|
// 执行率 |
|
|
|
this.numlist[2].num = (res.fraction || 0) + '%' |
|
|
|
// 录音时长 |
|
|
|
this.numlist[3].num = Math.floor(res.sumDuration / 60) || 0 |
|
|
|
// util.formatSecond()||0 |
|
|
|
|
|
|
|
res.sumDuration = Math.floor(res.sumDuration / 60) || 0 |
|
|
|
res.fraction = (res.fraction || 0) + '%' |
|
|
|
this.numlist.map(item => { |
|
|
|
item.num = res[item.setName] |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取团队列表 |
|
|
@@ -605,7 +616,7 @@ |
|
|
|
}, |
|
|
|
//指标执行率分析tab |
|
|
|
tapspagek2(index) { |
|
|
|
// console.log(index) |
|
|
|
console.log(index) |
|
|
|
// 对数据进行分析和处理 |
|
|
|
// 先处理日期 |
|
|
|
let allobj = { |
|
|
@@ -615,39 +626,14 @@ |
|
|
|
data: [] |
|
|
|
}] |
|
|
|
} |
|
|
|
if (index == 0) { |
|
|
|
// 接待量 |
|
|
|
this.danwei = '单位(次)' |
|
|
|
allobj.series[0].name = '接待客户' |
|
|
|
this.allechar.map(item => { |
|
|
|
allobj.categories.push(item.statDate.slice(5, 10)) |
|
|
|
allobj.series[0].data.push(item.receptionCount) |
|
|
|
}) |
|
|
|
} else if (index == 1) { |
|
|
|
// 平均执行率 |
|
|
|
this.danwei = '单位(%)' |
|
|
|
allobj.series[0].name = '平均执行率' |
|
|
|
this.allechar.map(item => { |
|
|
|
allobj.categories.push(item.statDate.slice(5, 10)) |
|
|
|
allobj.series[0].data.push(item.fraction) |
|
|
|
}) |
|
|
|
} else if (index == 2) { |
|
|
|
// 接待客户 |
|
|
|
this.danwei = '单位(个)' |
|
|
|
allobj.series[0].name = '接待量' |
|
|
|
this.allechar.map(item => { |
|
|
|
allobj.categories.push(item.statDate.slice(5, 10)) |
|
|
|
allobj.series[0].data.push(item.sumCustomer) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
// 录音时长 |
|
|
|
this.danwei = '单位(min)' |
|
|
|
allobj.series[0].name = '录音时长' |
|
|
|
this.allechar.map(item => { |
|
|
|
allobj.categories.push(item.statDate.slice(5, 10)) |
|
|
|
allobj.series[0].data.push(item.sumDuration) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
this.danwei = this.newlistoj1[index].title |
|
|
|
allobj.series[0].name = this.newlistoj1[index].name |
|
|
|
this.allechar.map(item => { |
|
|
|
allobj.categories.push(item.statDate.slice(5, 10)) |
|
|
|
allobj.series[0].data.push(item[this.newlistoj1[index].setName]) |
|
|
|
}) |
|
|
|
|
|
|
|
this.bocindex = index; |
|
|
|
this.lineOptsect = allobj |
|
|
|
this.$forceUpdate() |
|
|
@@ -763,4 +749,4 @@ |
|
|
|
.grid:nth-child(3) { |
|
|
|
border-right: none; |
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |