Browse Source

优化销讲数据

Jyt
wangshuai 2 years ago
parent
commit
4c3ff5ff75
1 changed files with 39 additions and 57 deletions
  1. +39
    -57
      pages/center/Piabodata/index.vue

+ 39
- 57
pages/center/Piabodata/index.vue View File

@@ -256,24 +256,30 @@
danwei: '单位(次)',
totalTimeShow: false,
activeTab: 0,
numlist: [{
name: '平均执行率',
num: ''
num: '',
setName: 'fraction',
},
{
name: '平均接待时长',
num: ''
num: '',
setName: 'avgDuration',
},
{
name: '接待量',
num: ''
num: '',
setName: 'receptionCount',
},
{
name: '有效接待',
num: ''
num: '',
setName: 'activeCustomer',
},
],
lineOptsect: {
"categories": [],
"series": []
@@ -287,24 +293,35 @@
"series": []
},
newlistoj: [],

newlistoj1: [{
name: "平均执行率",
id: 2
id: 2,
title: '单位(%)',
setName: 'fraction'
},
{
name: "平均接待时长",
id: 5
id: 5,
title: '单位(min)',
setName: 'sumDuration'
},

{
name: "接待量",
id: 3
id: 3,
title: '单位(个)',
setName: 'sumCustomer'
},
{
name: "有效接待",
id: 1
id: 1,
title: '单位(次)',
setName: 'receptionCount'
},
],
bocindex: 0,
newlisttabinfo: [{
name: '接待量',
@@ -468,16 +485,10 @@
lastStartDate: this.lastStartDate
})
.then(res => {
// 执行率
this.numlist[0].num = (res.fraction || 0) + '%'
// 平均接待时长
this.numlist[1].num = res.avgDuration || 0
// 接待量
this.numlist[2].num = res.receptionCount || 0
// 有效接待
this.numlist[3].num = res.activeCustomer || 0

res.fraction = (res.fraction || 0) + '%'
this.numlist.map(item => {
item.num = res[item.setName] || 0
})
})
},
// 获取团队列表
@@ -610,9 +621,6 @@
},
//指标执行率分析tab
tapspagek2(index) {
// console.log(index)
// 对数据进行分析和处理
// 先处理日期
let allobj = {
"categories": [],
"series": [{
@@ -620,40 +628,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.fraction)
})
} else if (index == 1) {
// 平均接待时长
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)
})
} 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 = '单位(次)'
allobj.series[0].name = '有效接待'
this.allechar.map(item => {
allobj.categories.push(item.statDate.slice(5, 10))
allobj.series[0].data.push(item.receptionCount)
})
}
// 平均执行率
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
},


Loading…
Cancel
Save