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