| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- //trafficDataChart('timeTraffic', daySeatName, callDate, callDate[0])
- getworkOrder()
- $('.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 getworkOrder() {
- let workOrderData = [];
- let workOrderName = []
- new doAjax({
- url: huayi.config.callcenter_url + "/InfoNew/GetTelCountByNow",
- data: {},
- callBack: function (res) {
- var data = res.data.hw[0]
- console.log(data)
- trafficDataChart(data)
- }
- });
- }
- function trafficDataChart(getdata) {
- let hotThings = echarts.init(document.getElementById("timeTraffic"));
- console.log(hotThings)
- window.onresize = function() {
- hotThings.resize()
- }
- option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- },
- },
- // tooltip: {
- // show: true,
- // formatter(params) {
- // 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: '15%',
- containLabel: true
- },
- xAxis: [{
- type: 'category',
- axisLine:{
- lineStyle:{
- color:'#ffffff'
- }
- },
- axisLabel: {
- show: true,
- rotate: -30, // 角度值:Number
- fontSize: 11, // 顺便调小一点字体大小
- textStyle: {
- color: '#ffffff'
- }
- },
- // hwcount: 0 呼入量
- // jtcount: 0 人工接通 zzcount: 0 自助接通量 hbcount: 0 未接通回拨量
- // hbbili: "33.33%" 回拨率 zzbili: "33.33%" 自助率 jtbili: "33.33%" 接通率
- // hccount: 0 呼出数量 hcjtcount: 0 呼出接通量
- // hcbili: "100%" 呼出接通量
-
- 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} %'
- }
- }
- ],
- series: [{
- name: '呼入量',
- type: 'bar',
- stack: 'A',
- barWidth : 15,
- data: [getdata.hwcount,0,0,0,0,0]
- },
- {
- name: '未接通回拨量',
- type: 'bar',
- stack: 'A',
- barWidth : 15,
- data: [0,getdata.hbcount,0,0,0,0]
- },
- {
- name: '自助接听量',
- type: 'bar',
- stack: 'A',
- barWidth : 15,
- data: [0,getdata.zzcount,0,0,0,0]
- },
- {
- name: '人工接通量',
- type: 'bar',
- stack: 'A',
- barWidth : 15,
- data: [0,getdata.jtcount,0,0,0,0]
- },
- {
- name: '回拨率',
- type: 'bar',
- stack: 'A',
- yAxisIndex: 1,
- barWidth : 15,
- data: [0,0,getdata.hbbili,0,0,0]
- },
- {
- name: '自助率',
- type: 'bar',
- stack: 'A',
- yAxisIndex: 1,
- barWidth : 15,
- data: [0,0,getdata.zzbili,0,0,0]
- },
- {
- name: '人工率',
- type: 'bar',
- stack: 'A',
- yAxisIndex: 1,
- barWidth : 15,
- data: [0,0,getdata.jtbili,0,0,0]
- },
- {
- name: '呼出量',
- type: 'bar',
- stack: 'A',
- barWidth : 15,
- data: [0,0,0,getdata.hccount,0,0]
- },
- {
- name: '呼出接通量',
- type: 'bar',
- stack: 'A',
- barWidth : 15,
- data: [0,0,0,0,getdata.hcjtcount,0]
- },
- {
- name: '呼出接通率',
- type: 'bar',
- stack: 'A',
- yAxisIndex: 1,
- barWidth :15,
- data: [0,0,0,0,0,getdata.hcbili]
- },
- ]
- };
- hotThings.setOption(option);
- }
|