回复率
This commit is contained in:
@@ -68,7 +68,6 @@ export default {
|
|||||||
name: 'message',
|
name: 'message',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
replyData: {},
|
|
||||||
privateCard: {},
|
privateCard: {},
|
||||||
privateData: [],
|
privateData: [],
|
||||||
privateDate: [],
|
privateDate: [],
|
||||||
@@ -79,18 +78,18 @@ export default {
|
|||||||
groupDate: [],
|
groupDate: [],
|
||||||
groupMsg: [],
|
groupMsg: [],
|
||||||
groupCurrent: 0,
|
groupCurrent: 0,
|
||||||
|
replyData: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getData()
|
this.getData()
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getEcharts1()
|
this.getPrivateChat()
|
||||||
this.getEcharts2()
|
this.getGroupChat()
|
||||||
this.getEcharts3()
|
|
||||||
// this.getPrivateChat()
|
|
||||||
// this.getGroupChat()
|
|
||||||
console.log(this.replyData.replyPercentage,'hhhh');
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getData() {
|
getData() {
|
||||||
@@ -98,7 +97,9 @@ export default {
|
|||||||
this.$http.post(`/app/wxgroupstatistic/replyPercentage`).then(res=> {
|
this.$http.post(`/app/wxgroupstatistic/replyPercentage`).then(res=> {
|
||||||
if(res?.data) {
|
if(res?.data) {
|
||||||
this.replyData = res.data
|
this.replyData = res.data
|
||||||
this.$forceUpdate()
|
this.getEcharts1(this.replyData)
|
||||||
|
this.getEcharts2(this.replyData)
|
||||||
|
this.getEcharts3(this.replyData)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.getPrivateData()
|
this.getPrivateData()
|
||||||
@@ -137,16 +138,16 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getEcharts1() {
|
getEcharts1({replyPercentage}) {
|
||||||
let echarts1 = document.getElementById('echarts1');
|
let echarts1 = document.getElementById('echarts1');
|
||||||
let myChart1 = echarts.init(echarts1);
|
let myChart1 = echarts.init(echarts1);
|
||||||
let option = {
|
let option = {
|
||||||
tooltip: {
|
// tooltip: {
|
||||||
trigger: 'item',
|
// trigger: 'item',
|
||||||
},
|
// },
|
||||||
title: {
|
title: {
|
||||||
zlevel: 0,
|
zlevel: 0,
|
||||||
text: [`{name|昨日}\n{value|${ this.replyData.replyPercentage } %}`],
|
text: [`{name|昨日}\n{value|${ replyPercentage } %}`],
|
||||||
top: 'center',
|
top: 'center',
|
||||||
left: '46%',
|
left: '46%',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
@@ -165,7 +166,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
color: ['#3975C6','#5d5c5c'],
|
color: ['#3975C6','#C7C7C7'],
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '昨天',
|
name: '昨天',
|
||||||
@@ -177,24 +178,24 @@ export default {
|
|||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
data: [
|
data: [
|
||||||
{ value: this.replyData.replyPercentage, name: '已回复聊天比' },
|
{ value: replyPercentage, name: '' },
|
||||||
{ value: 100 - this.replyData.replyPercentage, name: '未回复聊天比' },
|
{ value: 100 - replyPercentage, name: '' },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
option && myChart1.setOption(option);
|
option && myChart1.setOption(option);
|
||||||
},
|
},
|
||||||
getEcharts2() {
|
getEcharts2({weekSum}) {
|
||||||
let echarts2 = document.getElementById('echarts2');
|
let echarts2 = document.getElementById('echarts2');
|
||||||
let myChart2 = echarts.init(echarts2);
|
let myChart2 = echarts.init(echarts2);
|
||||||
let option = {
|
let option = {
|
||||||
tooltip: {
|
// tooltip: {
|
||||||
trigger: "item",
|
// trigger: "item",
|
||||||
},
|
// },
|
||||||
title: {
|
title: {
|
||||||
zlevel: 0,
|
zlevel: 0,
|
||||||
text: [`{name|近7天}\n{value|${ this.replyData.weekSum } %}`],
|
text: [`{name|近7天}\n{value|${ weekSum } %}`],
|
||||||
top: 'center',
|
top: 'center',
|
||||||
left: '46%',
|
left: '46%',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
@@ -225,24 +226,24 @@ export default {
|
|||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
data: [
|
data: [
|
||||||
{ value: this.replyData.weekSum, name: '近7天回复率' },
|
{ value: weekSum, name: '' },
|
||||||
{ value: 100 - this.replyData.weekSum, name: '近7天未回复率' },
|
{ value: 100 - weekSum, name: '' },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
option && myChart2.setOption(option);
|
option && myChart2.setOption(option);
|
||||||
},
|
},
|
||||||
getEcharts3() {
|
getEcharts3({monthSum}) {
|
||||||
let echarts3 = document.getElementById('echarts3');
|
let echarts3 = document.getElementById('echarts3');
|
||||||
let myChart3 = echarts.init(echarts3);
|
let myChart3 = echarts.init(echarts3);
|
||||||
let option = {
|
let option = {
|
||||||
tooltip: {
|
// tooltip: {
|
||||||
trigger: "item",
|
// trigger: "item",
|
||||||
},
|
// },
|
||||||
title: {
|
title: {
|
||||||
zlevel: 0,
|
zlevel: 0,
|
||||||
text: [`{name|近30天}\n{value|${ this.replyData.monthSum } %}`],
|
text: [`{name|近30天}\n{value|${ monthSum } %}`],
|
||||||
top: 'center',
|
top: 'center',
|
||||||
left: '46%',
|
left: '46%',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
@@ -261,7 +262,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
color: ['#3975C6','#F0F2F5'],
|
color: ['#3975C6','#C7C7C7'],
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '近30天',
|
name: '近30天',
|
||||||
@@ -273,8 +274,8 @@ export default {
|
|||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
data: [
|
data: [
|
||||||
{ value: this.replyData.monthSum, name: '近一个月回复率' },
|
{ value: monthSum, name: '' },
|
||||||
{ value: 100 - this.replyData.monthSum, name: '近一个月未回复率' },
|
{ value: 100 - monthSum, name: '' },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user