| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333 |
- function showTools(a){
- if($(a).find(".tooltips").css("display") == 'none') {
- $(a).find(".tooltips").show();
- $(a).parents('tr').siblings().find(".tooltips").hide();
- }else{
- $(a).find(".tooltips").hide();
- }
-
- }
- $(document).ready(function(){
-
-
- laydate.render({
- elem: '#time1',
- theme: '#00a1cb'
- });
- laydate.render({
- elem: '#time2',
- theme: '#00a1cb'
- });
- laydate.render({
- elem: '#time3',
- theme: '#00a1cb'
- });
- // 工单状态part1
- var jiedan = echarts.init(document.getElementById('jiedan1'));
- jiedan.setOption({
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- label: {
- show: true,
- backgroundColor: '#333'
- }
- }
- },
- legend: {
- bottom:'bottom',
- data: [],
- textStyle: {
- color: '#ccc'
- }
- },
- xAxis: {
- name: '月份',
- data: [],
- axisLine: {
- lineStyle: {
- color: '#ccc'
- }
- }
- },
- yAxis: {
- name: '数量',
- // min: 0,
- // max: 400,
- // interval: 50,
- splitLine: {
- show: false
- },
- axisLine: {
- lineStyle: {
- color: '#ccc'
- }
- }
- },
- series: []
- });
-
- function partOne(){
- var index = layer.load(1, {
- shade: [0.5, '#030303'] //0.1透明度的白色背景
- });
- $.ajax({
- type:"get",
- url: huayi.config.callcenter_url + "info/GetStateCountMonthByDate",
- async:true,
- dataType:'json',
- success:function(data){
- if(data.state.toLowerCase()=='success'){
- layer.close(index);
- var con=data.data;
- // var jieDans = result.data.a;
- 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)
- });
- jiedan.setOption({
- xAxis: {
- data: con.months
- },
- legend: {
- data: con.cols
- },
- series: sers
- });
-
-
-
- }
- }
- });
- }
- //受理渠道24小时统计 part2
- var part2 = echarts.init(document.getElementById('timefb'));
- part2.setOption({
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow',
- label: {
- show: true,
- backgroundColor: '#333'
- }
- },
- formatter: function(datas)
- {
- var res = datas[0].name + '<br/>', val;
- for(var i = 0, length = datas.length; i < length; i++) {
- val = (datas[i].value);
- res += datas[i].seriesName + ':' + val + '<br/>';
- }
- return res;
- }
- },
- legend: {
- // top: 30,
- // orient: 'vertical',
- bottom:'bottom',
- data: ['受理工单数','处理工单数'],
- textStyle: {
- color: '#fff'
- }
- },
- xAxis: {
- name: '时',
- data: [],
- axisLine: {
- lineStyle: {
- color: '#ccc'
- }
- },
- },
- yAxis: {
- name: '数量',
- splitLine: {
- show: false
- },
- axisLine: {
- lineStyle: {
- color: '#ccc'
- }
- }
- },
- series: [{
- name: '受理工单数',
- type: 'bar',
- barWidth: '20%',
- itemStyle: {
- normal: {
- color: new echarts.graphic.LinearGradient(
- 0, 0, 0, 1, [{offset: 0, color: '#83bff6'},
- {offset: 0.5, color: '#188df0'},
- {offset: 1, color: '#188df0'}
- ]
- )
- }
- },
- label: {
- normal: {
- show: true,
- position: 'top', //顶部数据显示位置
- formatter: '{c}' // 这里是数据展示的时候显示的数据
- }
- },
- data: []
- },{
- name: '处理工单数',
- type: 'bar',
- barWidth: '20%',
- itemStyle: {
- normal: {
- color: new echarts.graphic.LinearGradient(
- 0, 0, 0, 1, [{
- offset: 0,
- color: '#14c8d4'
- },
- {
- offset: 1,
- color: '#43eec6'
- }
- ]
- )
- }
- },
- label: {
- normal: {
- show: true,
- position: 'top', //顶部数据显示位置
- formatter: '{c}' // 这里是数据展示的时候显示的数据
- }
- },
- data: []
- }]
- });
- function partTwo(){
- var index = layer.load(1, {
- shade: [0.5, '#030303'] //0.1透明度的白色背景
- });
- $.ajax({
- type:"get",
- url: huayi.config.callcenter_url + "info/GetDealCount24ByDate",
- dataType: 'json',
- async: true,
- data:{
- date:$('#time1').val(),
- },
- success:function(data){
- if(data.state.toLowerCase()=='success'){
- layer.close(index);
- var con=data.data;
- // var qd_legend = [];
- // var qd_sers = [];
- // var ser_data = [];
- // var qd_label = {
- // normal: {
- // show: true,
- // position: 'inside',
- // formatter: '{c}%'
- // }
- // };
- part2.setOption({
- xAxis: {
- data:con.hours
- },
- series: [{
- data: con.acounts
- },{
- data:con.fcounts
- }]
- });
- }
- }
- });
- }
- $('.part1Btn').click(function(){
- partTwo();
- })
- //part 3
- //部门下拉框
- $.getJSON(huayi.config.callcenter_url + "info/GetDeptList ", function(result) {
- if(result.state.toLowerCase() == "success") {
- goodslist = result.data;
- bindseat($("#dep"));
- }
- });
- //下拉框
- function bindseat(obj) {
- obj.empty();
- obj.append('<option value="" >请选择</option>');
- $(goodslist).each(function(i, n) {
- obj.append('<option value="' + n.F_DeptId + '">' + n.F_DeptName + '</option>');
- })
- }
-
- partThree();
- function partThree(){
- var index = layer.load(1, { shade: [0.5,'#030303'] //0.1透明度的白色背景
- });
- $('.table1 tbody').html('');
- $.ajax({
- type:"get",
- url:huayi.config.callcenter_url + "info/GetDeptCountByDate",
- async:true,
- dataType:'json',
- data:{
- start:$('#time2').val(),
- end:$('#time3').val(),
- deptid:$('#dep').val()
- },
- success:function(data){
- if(data.state.toLowerCase()=='success'){
- layer.close(index);
- var con=data.data;
- $(con).each(function(i,n){
- var html="";
- // $('<tr>'+
- // '<td>1</td>'+
- // '<td>' + n.AreaName + '</td>'+
- // '<td>' + n.Count + '</td>'+
- // '</tr>').appendTo('.table1 tbody');
- html = '<tr><td>' +
- '<div class="tool_count" onClick="showTools(this)">' + n.AreaName + '<div class="tooltips clearfix">'+
- '<div class="toolsTitle">'+ n.AreaName +'</div>'
- $(n.Item).each(function(j, m) {
- html += '<p>' + m.TypeName + ':' + m.Count + '</p>'
- })
- html += '</div>' +
- '</div>' +
- '</td>' +
- '<td>' + n.Count + '</td>' +
- '</tr>';
- $('.table1 tbody').append(html);
- })
- }
- }
- });
- }
- $('.part3Btn').click(function(){
- partThree();
- })
- Ajax();
- function Ajax(){
- partOne()
- partTwo();
- partThree();
- }
- setInterval(Ajax, huayi.config.indextime);//Ajax调用函数
- })
|