回复率
This commit is contained in:
@@ -88,8 +88,9 @@ export default {
|
||||
this.getEcharts1()
|
||||
this.getEcharts2()
|
||||
this.getEcharts3()
|
||||
this.getPrivateChat()
|
||||
this.getGroupChat()
|
||||
// this.getPrivateChat()
|
||||
// this.getGroupChat()
|
||||
console.log(this.replyData.replyPercentage,'hhhh');
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
@@ -97,6 +98,7 @@ export default {
|
||||
this.$http.post(`/app/wxgroupstatistic/replyPercentage`).then(res=> {
|
||||
if(res?.data) {
|
||||
this.replyData = res.data
|
||||
this.$forceUpdate()
|
||||
}
|
||||
})
|
||||
this.getPrivateData()
|
||||
@@ -137,14 +139,14 @@ export default {
|
||||
},
|
||||
getEcharts1() {
|
||||
let echarts1 = document.getElementById('echarts1');
|
||||
let myChart = echarts.init(echarts1);
|
||||
let myChart1 = echarts.init(echarts1);
|
||||
let option = {
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
},
|
||||
title: {
|
||||
zlevel: 0,
|
||||
text: [`{name|昨日}\n{value|${ this.replyData?.replyPercentage || 0 } %}`],
|
||||
text: [`{name|昨日}\n{value|${ this.replyData.replyPercentage } %}`],
|
||||
top: 'center',
|
||||
left: '46%',
|
||||
textAlign: 'center',
|
||||
@@ -175,24 +177,24 @@ export default {
|
||||
show: false,
|
||||
},
|
||||
data: [
|
||||
{ value: this.replyData?.replyPercentage, name: '已回复聊天比' },
|
||||
{ value: 100 - this.replyData?.replyPercentage, name: '未回复聊天比' },
|
||||
{ value: this.replyData.replyPercentage, name: '已回复聊天比' },
|
||||
{ value: 100 - this.replyData.replyPercentage, name: '未回复聊天比' },
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
option && myChart1.setOption(option);
|
||||
},
|
||||
getEcharts2() {
|
||||
let echarts2 = document.getElementById('echarts2');
|
||||
let myChart = echarts.init(echarts2);
|
||||
let myChart2 = echarts.init(echarts2);
|
||||
let option = {
|
||||
tooltip: {
|
||||
trigger: "item",
|
||||
},
|
||||
title: {
|
||||
zlevel: 0,
|
||||
text: [`{name|近7天}\n{value|${ this.replyData?.weekSum || 0 } %}`],
|
||||
text: [`{name|近7天}\n{value|${ this.replyData.weekSum } %}`],
|
||||
top: 'center',
|
||||
left: '46%',
|
||||
textAlign: 'center',
|
||||
@@ -211,7 +213,7 @@ export default {
|
||||
},
|
||||
},
|
||||
},
|
||||
color: ['#3975C6','#F0F2F5'],
|
||||
color: ['#3975C6','#C7C7C7'],
|
||||
series: [
|
||||
{
|
||||
name: '近7天',
|
||||
@@ -223,24 +225,24 @@ export default {
|
||||
show: false,
|
||||
},
|
||||
data: [
|
||||
{ value: this.replyData?.weekSum, name: '近7天回复率' },
|
||||
{ value: 100 - this.replyData?.weekSum, name: '女' },
|
||||
{ value: this.replyData.weekSum, name: '近7天回复率' },
|
||||
{ value: 100 - this.replyData.weekSum, name: '近7天未回复率' },
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
option && myChart2.setOption(option);
|
||||
},
|
||||
getEcharts3() {
|
||||
let echarts3 = document.getElementById('echarts3');
|
||||
let myChart = echarts.init(echarts3);
|
||||
let myChart3 = echarts.init(echarts3);
|
||||
let option = {
|
||||
tooltip: {
|
||||
trigger: "item",
|
||||
},
|
||||
title: {
|
||||
zlevel: 0,
|
||||
text: [`{name|近30天}\n{value|${ this.replyData?.monthSum || 0 } %}`],
|
||||
text: [`{name|近30天}\n{value|${ this.replyData.monthSum } %}`],
|
||||
top: 'center',
|
||||
left: '46%',
|
||||
textAlign: 'center',
|
||||
@@ -271,17 +273,17 @@ export default {
|
||||
show: false,
|
||||
},
|
||||
data: [
|
||||
{ value: this.replyData?.monthSum, name: '近一个月回复率' },
|
||||
{ value: 100 - this.replyData?.monthSum, name: '近一个月未回复率' },
|
||||
{ value: this.replyData.monthSum, name: '近一个月回复率' },
|
||||
{ value: 100 - this.replyData.monthSum, name: '近一个月未回复率' },
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
option && myChart3.setOption(option);
|
||||
},
|
||||
getPrivateChat() {
|
||||
let privateDom = document.getElementById('privateChat');
|
||||
let myChart = echarts.init(privateDom);
|
||||
let myChartPrivate = echarts.init(privateDom);
|
||||
let option = {
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
@@ -335,11 +337,11 @@ export default {
|
||||
}
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
option && myChartPrivate.setOption(option);
|
||||
},
|
||||
getGroupChat() {
|
||||
let groupDom = document.getElementById('groupChat');
|
||||
let myChart = echarts.init(groupDom);
|
||||
let myChartGroup = echarts.init(groupDom);
|
||||
let option = {
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
@@ -393,7 +395,7 @@ export default {
|
||||
}
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
option && myChartGroup.setOption(option);
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -409,8 +411,6 @@ export default {
|
||||
font-size: 32px;
|
||||
color: #333333;
|
||||
font-weight: 600;
|
||||
color: #5d5c5c;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user