| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568 |
- var bigdataList = null;
- var sd = "";
- var ed = "";
- gettraffic(sd, ed);
- getAgentData(sd, ed);
-
- //轮播
- banner1()
-
- //轮播
- function banner1(){
- var i=0;
- var Timer;
- $(function(){
- $(".trafficImg").eq(0).show().siblings().hide(); //默认第一个div片显示,其他的隐藏
- //自动轮播
- TimerBanner();
- //点击红圈
- $(".trafficImg").hover(function(){ //鼠标移动上去
- clearInterval(Timer); //让计时器暂时停止 清除计时器
- i=$(this).index(); //获取该圈的索引
- showPic(); //调用显示图片的方法,显示该索引对应的图片
- },function(){ //鼠标离开
- TimerBanner(); //继续轮播 计时器开始
- });
- $(".trafficTabs .aaa").hover(function(){ //鼠标移动上去
- clearInterval(Timer); //让计时器暂时停止 清除计时器
- i=$(this).index(); //获取该圈的索引
- showPic(); //调用显示图片的方法,显示该索引对应的图片
- },function(){ //鼠标离开
- TimerBanner(); //继续轮播 计时器开始
- });
- //点击左右按钮
- $(".btn1").click(function(){
- clearInterval(Timer);
- i--; //往左
- if(i==-1){
- i=4;
- }
- showPic();
- TimerBanner();
- });
- $(".btn2").click(function(){
- clearInterval(Timer);
- i++; //往右
- if(i==4){
- i=0;
- }
- showPic();
- TimerBanner();
- });
- });
- //轮播部分
- function TimerBanner(){
- Timer = setInterval(function(){
- i++;
- if(i==4){
- i=0;
- }
- showPic()
- },5000);
- }
- //显示div
- function showPic() {
- $(".trafficImg").eq(i).show().siblings().hide();
- $(".trafficBg").hide();
- $(".trafficTabs .aaa").eq(i).children(".trafficBg").show();
- }
- }
- function gettraffic(sd,ed) {
- var myChartaaa = echarts.init(document.getElementById('smallAppealTotal'));
- var myChartbbb = echarts.init(document.getElementById('smallCallConnected'));
- var myChartppp = echarts.init(document.getElementById('smallAppeal'));
-
- var myChreti = echarts.init(document.getElementById('trafficAppeal'));
- var myKouc = echarts.init(document.getElementById('trafficCallConnected'));
- var myKucot = echarts.init(document.getElementById('trafficAppealTotal'));
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "Business/GetTelephoneList",
- async: true,
- dataType: "json",
- data: {
- stime:sd,
- endtime:ed,
- },
- success: function(data) {
- if (data.state.toLowerCase() == "success") {
- var con = data.data;
- var type = con.type;
- var conversations = con.conversations;
- var dates = con.dates;
-
- //诉求占比统计
- var type_data_type = [];
- $(type).each(function(i, n){
- var type_data_type_name_total = {};
- type_data_type_name_total.value = n.total;
- type_data_type_name_total.name = n.name;
- type_data_type.push(type_data_type_name_total);
- })
-
- //24小时来电量/接通量统计
- var type_data_conversations_time = [];
- var type_data_conversations_Incomingcall = [];
- var type_data_conversations_Connect = [];
- $(conversations).each(function(i, n) {
- type_data_conversations_time.push(n.time);
- type_data_conversations_Incomingcall.push(n.Incomingcall);
- type_data_conversations_Connect.push(n.Connect);
- })
-
- //话务总体数据统计展示
- var type_data_dates_total= [];
- $(dates).each(function(i, n) {
- type_data_dates_total.push(n.average);
- type_data_dates_total.push(n.connection);
- type_data_dates_total.push(n.traffic);
- })
-
- myChreti.setOption({
- title : {
- text: '诉求占比统计',
- x: 'center',
- textStyle: {
- "color": "#FFFFFF"
- }
- },
- tooltip : {
- trigger: 'item',
- formatter: "{a} <br/>{b} : {c} ({d}%)"
- },
- series : [
- {
- name: '诉求占比',
- type: 'pie',
- radius : '55%',
- data: type_data_type,
- itemStyle: {
- normal: {
- color: function(params) {
- //自定义颜色
- var colorList = [
- '#1890FF', '#2EC25B', '#FACC14', '#04D9FF', '#8543E0', '#13C2C2',
- '#00C0FF', '#05EB78', '#D141D9', '#05EB61', '#2FCDCD', '#BEEB30',
- '#EB9005', '#FFFF00', '#FF7F50', '#3CB371', '#00BFFF', '#9932CC',
- ];
- return colorList[params.dataIndex]
- }
- }
- }
- }
- ]
- })
-
- myChartppp.setOption({
- tooltip : {
- trigger: 'item',
- formatter: "{a} <br/>{b} : {c} ({d}%)"
- },
- series : [
- {
- name: '诉求占比',
- type: 'pie',
- radius : '55%',
- data: type_data_type,
- label: {
- normal: {
- show: false
- }
- },
- itemStyle: {
- normal: {
- color: function(params) {
- //自定义颜色
- var colorList = [
- '#1890FF', '#2EC25B', '#FACC14', '#04D9FF', '#8543E0', '#13C2C2',
- '#00C0FF', '#05EB78', '#D141D9', '#05EB61', '#2FCDCD', '#BEEB30',
- '#EB9005', '#FFFF00', '#FF7F50', '#3CB371', '#00BFFF', '#9932CC',
- ];
- return colorList[params.dataIndex]
- }
- }
- }
- }
- ]
- })
-
- myKouc.setOption({
- title: {
- text: '24小时来电量/接通量统计',
- x: 'center',
- textStyle: {
- "color": "#FFFFFF"
- }
- },
- tooltip: {
- trigger: 'axis'
- },
- legend: {
- data: ['来电量', '接通量'],
- bottom: 5,
- textStyle: {
- color: "#FFFAF0"
- }
- },
- xAxis: {
- type: 'category',
- data: type_data_conversations_time,
- axisLine: {
- lineStyle: {
- color: '#FFFFFF',//坐标线的颜色
- }
- },
- },
- yAxis: {
- type: 'value',
- axisLine: {
- lineStyle: {
- color: '#FFFFFF',//坐标线的颜色
- }
- },
- splitLine :{ //网格线
- lineStyle:{
- type:'dashed' //设置网格线类型 dotted:虚线 solid:实线
- },
- show:true //隐藏或显示
- }
- },
- series: [
- {
- name: '来电量',
- data: type_data_conversations_Incomingcall,
- type: 'line',
- itemStyle: {
- normal: {
- color: '#1890FF',
- }
- },
- },
- {
- name: '接通量',
- data: type_data_conversations_Connect,
- type: 'line',
- itemStyle: {
- normal: {
- color: '#13C2C2',
- }
- },
- },
- ]
- });
- myChartbbb.setOption({
- tooltip: {
- trigger: 'axis'
- },
- xAxis: {
- type: 'category',
- data: type_data_conversations_time,
- axisLine: {
- lineStyle: {
- color: '#FFFFFF',//坐标线的颜色
- }
- },
- },
- yAxis: {
- show: false,
- },
- series: [
- {
- name: '来电量',
- data: type_data_conversations_Incomingcall,
- type: 'line',
- itemStyle: {
- normal: {
- color: '#1890FF',
- }
- },
- },
- {
- name: '接通量',
- data: type_data_conversations_Connect,
- type: 'line',
- itemStyle: {
- normal: {
- color: '#13C2C2',
- }
- },
- },
- ]
- });
-
- myKucot.setOption({
- title: {
- text: '话务总体数据统计展示',
- x: 'center',
- textStyle: {
- "color": "#FFFFFF"
- }
- },
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- }
- },
- xAxis: {
- type: 'category',
- data: ['平均通话时长(秒)', '接通量', '话务数'],
- axisLine: {
- lineStyle: {
- color: '#FFFFFF',//坐标线的颜色
- }
- },
- },
- yAxis: {
- type: 'value',
- boundaryGap: [0, 0.01],
- axisLine: {
- lineStyle: {
- color: '#FFFFFF',//坐标线的颜色
- }
- },
- splitLine: { //网格线
- show: false //隐藏或显示
- },
- },
- series: [
- {
- name: '数量',
- type: 'bar',
- barWidth: 30,
- itemStyle: {
- normal: {
- color: function(params) {
- //自定义颜色
- var colorList = [
- '#1890FF', '#2EC25B', '#FACC14', '#04D9FF', '#8543E0', '#13C2C2',
- '#00C0FF', '#05EB78', '#D141D9', '#05EB61', '#2FCDCD', '#BEEB30',
- '#EB9005', '#FFFF00', '#FF7F50', '#3CB371', '#00BFFF', '#9932CC',
- ];
- return colorList[params.dataIndex]
- },
- }
- },
- data: type_data_dates_total,
- },
- ]
- })
- myChartaaa.setOption({
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- }
- },
- xAxis: {
- type: 'category',
- data: ['平均通话时长', '接通量', '话务数'],
- axisLine: {
- lineStyle: {
- color: '#FFFFFF',//坐标线的颜色
- },
- },
- },
- yAxis: {
- show: false,
- },
- series: [
- {
- name: '数量',
- type: 'bar',
- barWidth: 20,
- itemStyle: {
- normal: {
- color: function(params) {
- //自定义颜色
- var colorList = [
- '#1890FF', '#2EC25B', '#FACC14', '#04D9FF', '#8543E0', '#13C2C2',
- '#00C0FF', '#05EB78', '#D141D9', '#05EB61', '#2FCDCD', '#BEEB30',
- '#EB9005', '#FFFF00', '#FF7F50', '#3CB371', '#00BFFF', '#9932CC',
- ];
- return colorList[params.dataIndex]
- },
- },
- },
- data: type_data_dates_total,
- },
- ]
- })
-
- }
- }
- });
- }
-
- // 坐席实时数据
- function getAgentData(sd,ed) {
- var myTou = echarts.init(document.getElementById('trafficAgentBusy'));
- var myChart = echarts.init(document.getElementById('smallAgentBusy'));
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "Business/GetAgentTelCount",
- async: true,
- dataType: "json",
- data: {
- stime:sd,
- endtime:ed,
- },
- success: function(data){
- if (data.state.toLowerCase() == "success") {
- var con = data.data;
- var inconnectcount = con.inconnectcount; //呼入接通
- var incount = con.incount; //呼入
- var outconnectcount = con.outconnectcount; //呼出接通
- var outcount = con.outcount; //呼出
- var users = con.users; //坐席
-
- myTou.setOption({
- title: {
- text: '坐席实时数据',
- x: 'center',
- textStyle: {
- "color": "#FFFFFF"
- }
- },
- tooltip: {
- trigger: 'axis'
- },
- legend: {
- data: ['呼入', '呼入接通', '呼出', '呼出接通'],
- bottom: 5,
- textStyle: {
- color: "#FFFAF0"
- }
- },
- xAxis: {
- type: 'category',
- data: users,
- axisLine: {
- lineStyle: {
- color: '#FFFFFF',//坐标线的颜色
- }
- },
- },
- yAxis: {
- type: 'value',
- axisLine: {
- lineStyle: {
- color: '#FFFFFF',//坐标线的颜色
- }
- },
- splitLine :{ //网格线
- lineStyle:{
- type:'dashed' //设置网格线类型 dotted:虚线 solid:实线
- },
- show:true //隐藏或显示
- }
- },
- series: [
- {
- name: '呼入',
- data: incount,
- type: 'line',
- itemStyle: {
- normal: {
- color: '#1890FF',
- }
- },
- },
- {
- name: '呼入接通',
- data: inconnectcount,
- type: 'line',
- itemStyle: {
- normal: {
- color: '#8543E0',
- }
- },
- },
- {
- name: '呼出',
- data: outcount,
- type: 'line',
- itemStyle: {
- normal: {
- color: '#2EC25B',
- }
- },
- },
- {
- name: '呼出接通',
- data: outconnectcount,
- type: 'line',
- itemStyle: {
- normal: {
- color: '#FACC14',
- }
- },
- },
- ]
- });
- myChart.setOption({
- tooltip: {
- trigger: 'axis'
- },
- xAxis: {
- type: 'category',
- data: users,
- axisLine: {
- lineStyle: {
- color: '#FFFFFF',//坐标线的颜色
- }
- },
- },
- yAxis: {
- show: false,
- },
- series: [
- {
- name: '呼入',
- data: incount,
- type: 'line',
- itemStyle: {
- normal: {
- color: '#1890FF',
- }
- },
- },
- {
- name: '呼入接通',
- data: inconnectcount,
- type: 'line',
- itemStyle: {
- normal: {
- color: '#8543E0',
- }
- },
- },
- {
- name: '呼出',
- data: outcount,
- type: 'line',
- itemStyle: {
- normal: {
- color: '#2EC25B',
- }
- },
- },
- {
- name: '呼出接通',
- data: outconnectcount,
- type: 'line',
- itemStyle: {
- normal: {
- color: '#FACC14',
- }
- },
- },
- ]
- });
- }
- }
- })
- }
|