| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- trafficDataChart('timeTraffic', daySeatName, callDate, callDate[0])
- $('.btn_time').click(function(e) {
- if(e.target.tagName == 'SPAN') {
- console.log("哈哈哈哈,点我揍你")
- if($(e.target).attr('data-state') == '1') {
- $('.daySeat').css('display', 'none')
- $('.timeTraffic').css('display', 'inline-block')
- $('#traffic').css('display', 'none')
- $('#timeTraffic').css('display', 'block')
- $('.act').html('当日数据')
- $('.call_situation h2').text('话务数据统计')
- trafficDataChart('timeTraffic', ['登陆坐席数量1', '呼叫排队数量1', '话务量1', '呼入接通量1'], callDate, callDate[0])
- trafficState = 0
- }
- }
- e.stopPropagation();
- })
- function trafficDataChart(dom, data, count, count1, rotate = 0) {
- let hotThings = echarts.init(document.getElementById("timeTraffic"));
- console.log(hotThings)
- window.onresize = function() {
- hotThings.resize()
- }
- option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- },
- show: true,
- formatter(params) {
- console.log((params.name,params.value)
- if(params.value === '-') {
- return `${params.name}: 0`;
- }
- return `${params.name}: ${params.value}`
- }
- },
- // legend: {
- // textStyle: {
- // fontSize: 12, //字体大小
- // color: '#ffffff' //字体颜色
- // },
- // lineStyle: {
- // color: '#ffffff'
- // }
- // },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis: [{
- type: 'category',
- axisLine:{
- lineStyle:{
- color:'#ffffff'
- }
- },
- axisLabel: {
- show: true,
- textStyle: {
- color: '#ffffff'
- }
- },
- data: ['呼入量', '接通量', '呼入接通率', '呼出量', '呼出接通量', '呼出接通率']
- }],
- // tooltip: {
- // show: true,
- // },
- yAxis: [
- {
- type: 'value',
- axisLine:{
- lineStyle:{
- color:'#ffffff'
- }
- },
- // interval: 5,
- // splitLine:{ show:false} ,
- // axisLine: {show: false},
- // axisTick: {show: false}
- },
- {
- type: 'value',
- axisLine:{
- lineStyle:{
- color:'#ffffff'
- }
- },
- // interval: 5,
- splitLine:{ show:false} ,
- min: 0,
- max: 100,
- axisLabel: {
- formatter: '{value} 100%'
- }
- }
- ],
- series: [{
- name: '呼入量',
- type: 'bar',
- stack: 'A',
- barWidth : 15,
- data: [320,'-','-','-','-','-']
- },
- {
- name: '未接通回拨量',
- type: 'bar',
- stack: 'A',
- barWidth : 15,
- data: ['-',20,'-','-','-','-']
- },
- {
- name: '自助接听量',
- type: 'bar',
- stack: 'A',
- barWidth : 15,
- data: ['-',80,'-','-','-','-']
- },
- {
- name: '人工接通量',
- type: 'bar',
- stack: 'A',
- barWidth : 15,
- data: ['-',220,'-','-','-','-']
- },
- {
- name: '回拨率',
- type: 'bar',
- stack: 'A',
- yAxisIndex: 1,
- barWidth : 15,
- data: ['-','-',20,'-','-','-']
- },
- {
- name: '自助率',
- type: 'bar',
- stack: 'A',
- yAxisIndex: 1,
- barWidth : 15,
- data: ['-','-',30,'-','-','-']
- },
- {
- name: '人工率',
- type: 'bar',
- stack: 'A',
- yAxisIndex: 1,
- barWidth : 15,
- data: ['-','-',50,'-','-','-']
- },
- {
- name: '呼出量',
- type: 'bar',
- stack: 'A',
- barWidth : 15,
- data: ['-','-','-',150,'-','-']
- },
- {
- name: '呼出接通量',
- type: 'bar',
- stack: 'A',
- barWidth : 15,
- data: ['-','-','-','-',150,'-']
- },
- {
- name: '呼出接通率',
- type: 'bar',
- stack: 'A',
- yAxisIndex: 1,
- barWidth :15,
- data: ['-','-','-','-','-',99]
- },
- ]
- };
- hotThings.setOption(option);
- }
|