$(function() { loginTimeLimit(); //登录 var mySwiper = new Swiper('.swiper-container', { // loop: true, // autoplay: { // delay: 60000, // }, pagination: { /* 分页器*/ el: '.swiper-pagination', clickable: true, }, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, // followFinger : false, // speed:800, on: { init: function() { swiperAnimateCache(this); //隐藏动画元素 swiperAnimate(this); //初始化完成开始动画 }, transitionEnd: function() { swiperAnimate(this); //每个slide切换结束时也运行当前slide动画 }, } }) Ajax(); deprtment();// 第五屏部门下拉 laydate.render({ elem: '#time1', range: '~', format: 'yyyy-MM-dd', theme: '#114a97', done: function(value, date) { oneScreen(value && value.split(' ~ ')[0], value && value.split(' ~ ')[1]) } }); laydate.render({ elem: '#time2', range: '~', format: 'yyyy-MM-dd', theme: '#114a97', done: function(value, date) { twoScreen(value && value.split(' ~ ')[0], value && value.split(' ~ ')[1],$(".areaTwo").val()) satisfaction(value && value.split(' ~ ')[0], value && value.split(' ~ ')[1],$(".areaTwo").val()) } }); laydate.render({ elem: '#time3', format: 'yyyy-MM-dd', theme: '#114a97', done: function(value) { threeScreen(value,$(".areaThree").val()) } }); laydate.render({ elem: '#test6', range: '~', format: 'yyyy-MM-dd', theme: '#114a97', done: function(value, date) { fiveScreen(value && value.split(' ~ ')[0], value && value.split(' ~ ')[1],$(".areaFive").val()) } }); }) var cityObj = { ele1: "sqs_count", ele2: "syq_count", ele3: "lyq_count", ele4: "ycs_count", ele5: "mqx_count", ele6: "sx_count", ele7: "nlx_count", ele8: "zcx_count", ele9: "ycx_count", ele10: "xyx_count", ele11: "cxyt_count", ele12: "lhpz_count", ele13: "saz_count", ele14: "djbl_count" } var vars = {}; getCountUp(cityObj) function getCountUp(obj1) { var options = {   useEasing: true,   useGrouping: true,   separator: ',',   decimal: '.', }; $.each(obj1, function(k, v) { new CountUp(v, 0, 0, 0, 2, options).start() vars[v] = new CountUp(v, 0, 0, 0, 2, options) }) } var myDate = new Date(); function turn(aa) { if(aa < 10) { aa = "0" + aa; } return aa } // 第三屏 第四屏 发光外框 定时 (function() { var i = 0; var length = $(".orderState_ul >li").length; var j = 0; var length_1 = $(".orderTtype_Con li").length; setInterval(function() { if(i == length) { i = 0; $(".orderState_ul >li").removeClass('active'); } $(".orderState_ul >li").eq(i).addClass('active').siblings().removeClass('active'); if(i == 5) { $(".orderState_ul >li").eq(4).removeClass('active'); } i++; if(j == length_1) { j = 0; } $(".orderTtype_Con li").eq(j).addClass('active').siblings().removeClass('active'); j++; }, 2000); })(); //第一屏幕 开始 function oneScreen(sd,ed) { $.ajax({ type: "get", url: huayi.config.callcenter_url + "/info/GetAreaCountByDateNew", async: true, dataType: 'json', data: { start: sd, end: ed, }, success: function(data) { if(data.state.toLowerCase() == 'success') { var con = data.data; $(con).each(function(i, n) { if(n.AreaName.indexOf('安阳市') != -1) { $(".AY_num").html(n.SLCount) } if(n.AreaName.indexOf('文峰区') != -1) { $(".WFQ_num").html(n.SLCount) } if(n.AreaName.indexOf('北关区') != -1) { $(".BGQ_num").html(n.SLCount) } if(n.AreaName.indexOf('殷都区') != -1) { $(".YDQ_num").html(n.SLCount) } if(n.AreaName.indexOf('龙安区') != -1) { $(".LAQ_num").html(n.SLCount) } if(n.AreaName.indexOf('安阳县') != -1) { $(".AYX_num").html(n.SLCount) } if(n.AreaName.indexOf('汤阴县') != -1) { $(".TYX_num").text(n.SLCount) } if(n.AreaName.indexOf('内黄县') != -1) { $(".NHX_num").html(n.SLCount) } if(n.AreaName.indexOf('滑县') != -1) { $(".HX_num").html(n.SLCount) } if(n.AreaName.indexOf('林州市') != -1) { $(".LZS_num").html(n.SLCount) } if(n.AreaName.indexOf('总计') != -1) { $(".allSLCount").html(n.SLCount); //受理量 $(".allJACount").html(n.JACount); //结案量 //$(".allJARate").html(n.JARate); //结案量 $(".allJARate").html("93%"); //结案量 $(".allMYRate").html('94.09%'); //满意度 } }) } } }); } //第二屏 function twoScreen(start, end, areaTwoVal) { // if(!areaTwoVal) { // areaTwoVal = "sqs12345" // } $.ajax({ type: "get", url: huayi.config.callcenter_url + "info/GetSourceByDateNew", async: true, dataType: 'json', data: { start: start, end: end, branchcode: areaTwoVal }, success: function(data) { if(data.state.toLowerCase() == 'success') { //layer.close(index); $('.orderSource ul li .rectangle').remove(); var con = data.data; var obj=con[0]; var con_list=[]; con_list=con.shift(); con.splice(3,0,obj); var Percent; $(con).each(function(i, n) { if(n.Source.indexOf('信箱') != -1) { n.Source = '信箱' } if(n.Source.indexOf('APP') != -1) { n.Source = 'APP' } if(n.Source.indexOf('政务') != -1) { n.Source = '政务网' } var str = '
' + '
' + '
' + '
' + '
' + '

' + n.Rate.split('%')[0] + '

%

占总量

' + '
' + '
' + '
' + '

' + '' + n.Source + '' + n.Count + '' + '

' + '
' $('.orderSource ul li').eq(i).prepend(str) }) } } }); } //第三屏 function threeScreen(sd,areaTwoVal) { //alert(sd) $.ajax({ type: "get", url: huayi.config.callcenter_url + "Info/GetTypeCountNew", async: true, dataType: 'json', data: { date: sd, branchcode: areaTwoVal }, success: function(data) { if(data.state.toLowerCase() == 'success') { $('.orderTtype_Con ul').html(''); // layer.close(index); var con = data.data; var img_name = ''; $(con).each(function(i, n) { if(n.TypeName.indexOf('咨询') != -1) { img_name = 'order_ZX.png' } if(n.TypeName.indexOf('求助') != -1) { img_name = 'order_QZ.png' } if(n.TypeName.indexOf('投诉') != -1) { img_name = 'order_TS.png' } if(n.TypeName.indexOf('建议') != -1) { img_name = 'order_JY.png' } if(n.TypeName.indexOf('表扬') != -1) { img_name = 'order_BY.png' } if(n.TypeName.indexOf('其他') != -1) { img_name = 'order_QT.png' } $('
  • ' + '
    ' + n.TypeName + '
    ' + '' + '

    数据展示

    ' + '

    ' + n.DayCount + '

    ' + '

    今日' + n.TypeName + '量

    ' + '

    ' + n.MonthCount + '

    ' + '

    本月' + n.TypeName + '量

    ' + '

    ' + n.TotalCount + '

    ' + '

    ' + n.TypeName + '总量

    ' + '
    ' + '
    ' + n.Percent + '
    ' + '
    ' + '

    总计类型占比

    ' + '
  • ').appendTo('.orderTtype_Con ul'); }) } } }); } //第五屏js function fiveScreen(sd,ed,areaTwoVal) { // if(!sd){ // sd="2019-11-01" // }if(!ed){ // ed="2019-11-30" // } keyWord(sd, ed,areaTwoVal); } $(".depart").change(function() { keyWordDetail($('#test6').val() && $('#test6').val().split(' ~ ')[0], $('#test6').val() && $('#test6').val().split(' ~ ')[1],$(".areaFive").val()); }) // 第二屏 $(".areaTwo").change(function() { var areaTwoVal=$(this).val(); twoScreen($('#time2').val() && $('#time2').val().split(' ~ ')[0], $('#time2').val() && $('#time2').val().split(' ~ ')[1],areaTwoVal); satisfaction($('#time2').val() && $('#time2').val().split(' ~ ')[0], $('#time2').val() && $('#time2').val().split(' ~ ')[1],areaTwoVal) }); //第三屏 $(".areaThree").change(function() { var areaTwoVal=$(this).val(); threeScreen($('#time3').val(),areaTwoVal); }); //第五屏 $(".areaFive").change(function() { var areaTwoVal=$(this).val(); fiveScreen($('#test6').val() && $('#test6').val().split(' ~ ')[0], $('#test6').val() && $('#test6').val().split(' ~ ')[1],areaTwoVal); deprtment () }); //部门下拉框 function deprtment () { $.getJSON( huayi.config.callcenter_url +"info/GetDeptList", { branchcode: $(".areaFive").val() }, function(result) { if(result.state.toLowerCase() == "success") { goodslist = result.data; $(".depart").empty(); $('').appendTo($(".depart")); $(goodslist).each(function(i, n) { $('').appendTo($(".depart")); }) } }); } //区县筛选 //areaSelect (); function areaSelect () { $.getJSON( huayi.config.callcenter_url +"CountyBranch/GetBranchListS", function(result) { if(result.state.toLowerCase() == "success") { goodslist = result.data; // 第五屏 $(".areaFive").empty(); $(goodslist).each(function(i, n) { $('').appendTo($(".areaFive")); }); //第3屏 $(".areaThree").empty(); $(goodslist).each(function(i, n) { $('').appendTo($(".areaThree")); }); //第2屏 $(".areaTwo").empty(); $(goodslist).each(function(i, n) { $('').appendTo($(".areaTwo")); }); } }); } // 左侧关键词 function keyWord(sd, ed,areaTwoVal) { $.ajax({ type: "get", url: huayi.config.callcenter_url + "info/GetKeyCountRankByDate", async: true, dataType: 'json', data: { start: sd, end: ed, branchcode: areaTwoVal }, success: function(data) { if(data.state.toLowerCase() == 'success') { var con = data.data; if (con.length>0) { // $(".keyW_t").text(con[0].TypeName) $('.tagcloud').html(''); $(con).each(function(k, j) { if(k < 12) { var strs = '
    ' + '

    ' + j.TypeName + '

    ' + '

    ' + j.Count + '

    ' + '
    ' $('.tagcloud').append(strs); } }) $(".tagcloud div:first-child").removeClass("tagcloud_bj"); $(".tagcloud div:first-child").addClass("tagcloud_bjShine"); keyWordDetail(sd, ed,areaTwoVal); }else{ $('.tagcloud').html(''); } } } }); } // 右侧部门 function keyWordDetail(sd, ed,areaTwoVal) { $.ajax({ type: "get", url: huayi.config.callcenter_url + "info/GetDeptKeyCountByDateNew", async: true, dataType: 'json', data: { start: sd, end: ed, branchcode: areaTwoVal, deptid: $('.depart').val(), keyid: $(".tagcloud_bjShine").eq(0).attr("index") }, success: function(data) { if(data.state.toLowerCase() == 'success') { $('.scroll_table tbody').html(''); var con = data.data; $(con).each(function (j, n) { var rate = ''; if (n.rate) { rate = n.rate;} var str = '' + n.deptname + '' + n.acceptcount + '' + rate + '' $('.scroll_table tbody').append(str); }) $(".scroll_table").Scroll({ line: 1, speed: 500, timer: 2000 }); } } }); } $(".tagcloud").on("click","div",function(){ $(".tagcloud div").addClass("tagcloud_bj"); $(".tagcloud div").removeClass("tagcloud_bjShine"); $(this).removeClass("tagcloud_bj"); $(this).addClass("tagcloud_bjShine"); keyWordDetail($('#test6').val() && $('#test6').val().split(' ~ ')[0], $('#test6').val() && $('#test6').val().split(' ~ ')[1],$(".areaFive").val()); }); function Ajax() { oneScreen($('#time1').val() && $('#time1').val().split(' ~ ')[0], $('#time1').val() && $('#time1').val().split(' ~ ')[1]) twoScreen($('#time2').val() && $('#time2').val().split(' ~ ')[0], $('#time2').val() && $('#time2').val().split(' ~ ')[1]) satisfaction($('#time2').val() && $('#time2').val().split(' ~ ')[0], $('#time2').val() && $('#time2').val().split(' ~ ')[1]) threeScreen($('#time3').val(),$(".areaThree").val()); fiveScreen($('#test6').val() && $('#test6').val().split(' ~ ')[0], $('#test6').val() && $('#test6').val().split(' ~ ')[1],$(".areaFive").val()) } function loginTimeLimit(){ $.ajax({ type:"get", url: huayi.config.callcenter_url + "Login/GetAuAuthDate", async:false, success:function(res){ var res=$.parseJSON(res) if(res.state== "success") { } else { layer.confirm(res.message, { icon: 2, btn: ['确定'], yes: function(index, layero) { $("#wrap").hide() $(".timeLimit-wrapper").show() $(".nav_middle ul a").attr('href', '#') layer.close(index) }, }); } } }); }