| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573 |
- Ajax1();
- //part 1 //投诉类别月统计 对接完毕
- var part_1 = echarts.init(document.getElementById('part_1'));
- part_1.setOption({
- color: ['#69e1a9', '#6a91e0', '#ceba5f', '#f06e84', '#569d4e', '#7d55ba', '#ce5aba', '#345cdd', '#569d4e'],
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- label: {
- show: true,
- backgroundColor: '#333'
- }
- }
- },
- grid: {
- left: '2%',
- right: '5%',
- bottom: '6%',
- containLabel: true
- },
- legend: {
- top: 'top',
- left: '180px',
- data: [],
- textStyle: {
- color: '#00e9ff'
- }
- },
- xAxis: {
- name: '月份',
- data: [],
- axisLine: {
- lineStyle: {
- color: '#3061a2'
- }
- },
- axisTick: {
- alignWithLabel: true,
- show: false
- },
- axisLabel: { //横轴字体颜色
- show: true,
- textStyle: {
- color: '#eff0f4'
- }
- }
- },
- yAxis: {
- name: '(数量)',
- splitLine: {
- show: false
- },
- axisLine: {
- lineStyle: {
- color: '#3061a2'
- }
- },
- axisLabel: { //横轴字体颜色
- show: true,
- textStyle: {
- color: '#eff0f4'
- }
- }
- },
- series: []
- });
- function partTwo() {
- // var index = layer.load(1, {
- // shade: [0.5, '#030303'] //0.1透明度的白色背景
- // });
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "info/GetTypeCountMonthByDate",
- async: true,
- dataType: 'json',
- data: {
- start: "",
- end: "",
- branchcode: ""
- },
- success: function(data) {
- if(data.state.toLowerCase() == 'success') {
- // layer.close(index);
- var con = data.data;
- var counts = con.counts;
- var sers = [];
- $(counts).each(function(i, n) {
- var obj = {};
- obj.name = con.cols[i];
- obj.type = "line";
- obj.smooth = true;
- obj.showAllSymbol = true;
- obj.symbol = "emptyCircle";
- obj.symbolSize = 10;
- obj.data = n;
- sers.push(obj)
- });
- part_1.setOption({
- xAxis: {
- data: con.months
- },
- legend: {
- data: con.cols
- },
- series: sers
- });
- }
- }
- });
- }
- //part 2
- var phoneTimeCount = echarts.init(document.getElementById('phoneTimeCount'));
- phoneTimeCount.setOption({
- color: ['#ceba5f', '#4da991', '#f06e84', '#6a91e0'],
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- label: {
- show: true,
- backgroundColor: '#333'
- }
- }
- },
- grid: {
- left: '2%',
- right: '5%',
- bottom: '6%',
- containLabel: true
- },
- legend: {
- top: 'top',
- left: '180px',
- data: ["来电数量", "接通数量", "放弃数量", "黑名单拒接数量"],
- textStyle: {
- color: '#00e9ff'
- }
- },
- xAxis: {
- name: '时',
- data: [],
- axisLine: {
- lineStyle: {
- color: '#3061a2'
- }
- },
- axisTick: {
- alignWithLabel: true,
- show: false
- },
- axisLabel: { //横轴字体颜色
- show: true,
- textStyle: {
- color: '#eff0f4'
- }
- }
- },
- yAxis: {
- name: '数量',
- splitLine: {
- show: false
- },
- axisLine: {
- lineStyle: {
- color: '#3061a2'
- }
- },
- axisLabel: { //横轴字体颜色
- show: true,
- textStyle: {
- color: '#eff0f4'
- }
- }
- },
- series: []
- });
- function partOne() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "info/GetTelCount24ByDate",
- async: true,
- dataType: "json",
- data: {
- date: "2019-07-23",
- branchcode: ""
- },
- success: function(data) {
- if(data.state.toLowerCase() == "success") {
- // layer.close(index);
- var con = data.data;
- phoneTimeCount.setOption({
- xAxis: {
- data: con.hours
- },
- series: [{
- name: "来电数量",
- type: "line",
- smooth: true,
- showAllSymbol: true,
- symbol: "emptyCircle",
- symbolSize: 10,
- data: con.rcounts
- }, {
- name: "接通数量",
- type: "line",
- smooth: true,
- showAllSymbol: true,
- symbol: "emptyCircle",
- symbolSize: 10,
- data: con.ccounts
- },
- {
- name: "放弃数量",
- type: "line",
- smooth: true,
- showAllSymbol: true,
- symbol: "emptyCircle",
- symbolSize: 10,
- data: con.gcounts
- },
- {
- name: "黑名单拒接数量",
- type: "line",
- smooth: true,
- showAllSymbol: true,
- symbol: "emptyCircle",
- symbolSize: 10,
- data: con.scounts
- }
- ]
- })
- }
- }
- });
- }
- // part3 受理区域统计
- var part3 = echarts.init(document.getElementById('part3'));
- part3.setOption({
- color: ['#6ce7ac', '#6a91e0', '#ceba5f', '#cb5f79', '#ae765a', '#569d4e', '#7d55ba', '#ce5aba', '#355cdd', '#44c1c6', '#ceba5e', '#c64444'],
- title: {
- text: '各区县占比',
- x: 'center',
- y: '45%',
- textStyle: {
- fontWeight: 'normal',
- fontSize: 16,
- color: '#fff'
- }
- },
- tooltip: {
- trigger: 'item',
- formatter: "{a} <br/>{b} : {c} ({d}%)",
- axisPointer: {
- crossStyle: {
- color: '#fff'
- }
- }
- },
- series: [{
- name: '数据',
- type: 'pie',
- radius: ['30%', '60%'],
- center: ['50%', '50%'],
- data: [],
- itemStyle: {
- emphasis: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: 'rgba(0, 0, 0, 0.5)'
- },
- normal: {
- label: {
- show: true,
- // formatter: '{b} : {c} ({d}%)'
- formatter: '{d}%'
- },
- labelLine: {
- show: true
- }
- }
- },
- label: {
- normal: {
- textStyle: {
- color: '#fff'
- }
- }
- }
- }]
- });
- function partThree() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "info/GetAreaCountByDate",
- async: true,
- dataType: 'json',
- data: {
- start: "2019-07-01",
- end: "2019-07-31",
- branchcode: ""
- },
- success: function(data) {
- if(data.state.toLowerCase() == 'success') {
- // layer.close(index);
- $('.complaint_typeL').html('');
- $('.complaint_typeR').html('');
- var con = data.data;
- var part_1_legend = [];
- var part_1_ser = [];
- $(con).each(function(i, n) {
- part_1_legend.push(n.AreaName)
- var part_1_obj = {};
- part_1_obj.value = n.Count;
- part_1_obj.name = n.AreaName;
- part_1_ser.push(part_1_obj)
- if(n.AreaName.indexOf('城乡一体') != -1) {
- n.AreaName = "城乡示范"
- }
- var str = '<li>' +
- '<span class="type_name">' + n.AreaName + '</span> <span class="type_count">' + n.Count + '</span>' +
- '</li>'
- if(i <= 5) {
- $(str).appendTo('.complaint_typeL');
- } else if(i <= 11 && i > 5) {
- $(str).appendTo('.complaint_typeR');
- }
- })
- part3.setOption({
- series: [{
- data: part_1_ser
- }]
- })
- }
- }
- });
- }
- //part4
- //var todyPhoneCouny = echarts.init(document.getElementById('todyPhoneCouny'));
- //todyPhoneCouny.setOption({
- // tooltip: {
- // trigger: 'axis',
- // axisPointer: {
- // type: false,
- // label: {
- // show: true,
- // backgroundColor: '#030917'
- // }
- // },
- // },
- // xAxis: {
- // name: '类型',
- // data: ["话务量(通)", "来电(通)", "接通量(通)", "平均通话时长(秒)"],
- // axisLine: {
- // lineStyle: {
- // color: '#3061a2'
- // }
- // },
- // axisTick: {
- // alignWithLabel: true,
- // show: false
- // },
- // axisLabel: { //横轴字体颜色
- // show: true,
- // textStyle: {
- // color: '#eff0f4'
- // }
- // }
- // },
- // yAxis: {
- // name: '数量',
- // splitLine: {
- // show: false
- // },
- // axisLine: {
- // lineStyle: {
- // color: '#3061a2'
- // }
- // },
- // axisLabel: { //横轴字体颜色
- // show: true,
- // textStyle: {
- // color: '#eff0f4'
- // }
- // }
- //
- // },
- // series: [{
- // name: '数量',
- // type: 'bar',
- // barWidth: 18,
- // itemStyle: {
- // normal: {
- // color: function(params) {
- // // build a color map as your need.
- // var colorList = [
- // '#368cab', '#54b793', '#4b6ab0', '#2531a9'
- // ];
- // return colorList[params.dataIndex]
- // }
- // }
- // },
- // label: {
- // normal: {
- // show: true,
- // position: 'top', //顶部数据显示位置
- // textStyle: {
- // color: '#fff' //顶部数据颜色
- // },
- // formatter: '{c}' // 这里是数据展示的时候显示的数据
- // }
- // },
- // data: []
- // }]
- //
- //});
- //function partFour() {
- // $.ajax({
- // type: "get",
- // url: huayi.config.callcenter_url + "info/GetTelCountByDate",
- // async: true,
- // dataType: "json",
- // data: {
- // date: "",
- // branchcode: ""
- // },
- // success: function(data) {
- // if(data.state.toLowerCase() == "success") {
- // // layer.close(index);
- // var con = data.data;
- // todyPhoneCouny.setOption({
- // series: [{
- // data: [9, 8, 7, 6]
- // }]
- //
- // })
- //
- // }
- // }
- //
- // });
- //
- //}
- //part4
- //var todyPhoneCount = echarts.init(document.getElementById('todyPhoneCount'));
- //todyPhoneCount.setOption({
- // tooltip: {
- // trigger: 'axis',
- // axisPointer: {
- // type: false,
- // label: {
- // show: true,
- // backgroundColor: '#030917'
- // }
- // },
- // },
- // xAxis: {
- // name: '类型',
- // data: ["话务量(通)", "来电(通)", "接通量(通)", "平均通话时长(秒)"],
- // axisLine: {
- // lineStyle: {
- // color: '#3061a2'
- // }
- // },
- // axisTick: {
- // alignWithLabel: true,
- // show: false
- // },
- // axisLabel: { //横轴字体颜色
- // show: true,
- // textStyle: {
- // color: '#eff0f4'
- // }
- // }
- // },
- // yAxis: {
- // name: '数量',
- // splitLine: {
- // show: false
- // },
- // axisLine: {
- // lineStyle: {
- // color: '#3061a2'
- // }
- // },
- // axisLabel: { //横轴字体颜色
- // show: true,
- // textStyle: {
- // color: '#eff0f4'
- // }
- // }
- //
- // },
- // series: [{
- // name: '数量',
- // type: 'bar',
- // barWidth: 18,
- // itemStyle: {
- // normal: {
- // color: function(params) {
- // // build a color map as your need.
- // var colorList = [
- // '#368cab', '#54b793', '#4b6ab0', '#2531a9'
- // ];
- // return colorList[params.dataIndex]
- // }
- // }
- // },
- // label: {
- // normal: {
- // show: true,
- // position: 'top', //顶部数据显示位置
- // textStyle: {
- // color: '#fff' //顶部数据颜色
- // },
- // formatter: '{c}' // 这里是数据展示的时候显示的数据
- // }
- // },
- // data: []
- // }]
- //
- //});
- //function partFive() {
- // $.ajax({
- // type: "get",
- // url: huayi.config.callcenter_url + "info/GetTelCountByDate",
- // async: true,
- // dataType: "json",
- // data: {
- // date: "",
- // branchcode: ""
- // },
- // success: function(data) {
- // if(data.state.toLowerCase() == "success") {
- // // layer.close(index);
- // var con = data.data;
- // todyPhoneCount.setOption({
- // series: [{
- // data: [99, 88, 77, 66]
- // }]
- //
- // })
- //
- // }
- // }
- //
- // });
- //
- //}
- function Ajax1() {
- partTwo();
- partOne();
- partThree();
- //partFour();
- //partFive();
- }
|