| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325 |
- $(function() {
- var mySwiper = new Swiper('.swiper-container', {
- pagination: { /* 分页器*/
- el: '.swiper-pagination',
- clickable: true,
- },
- navigation: {
- nextEl: '.swiper-button-next',
- prevEl: '.swiper-button-prev',
- },
- on: {
- init: function() {
- swiperAnimateCache(this); //隐藏动画元素
- swiperAnimate(this); //初始化完成开始动画
- },
- transitionEnd: function() {
- swiperAnimate(this); //每个slide切换结束时也运行当前slide动画
- },
- }
- })
- Ajax();
- laydate.render({
- elem: '#time1',
- range: '~',
- format: 'yyyy-MM-dd',
- theme: '#114a97',
- done: function(value, date) {
- oneScreen(value && value.split(' ~ ')[0], value && value.split(' ~ ')[1])
- oneSel(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())
- }
- });
- laydate.render({
- elem: '#time3',
- range: '~',
- format: 'yyyy-MM-dd',
- theme: '#114a97',
- done: function(value) {
- threeScreen(value && value.split(' ~ ')[0], value && value.split(' ~ ')[1],$(".areaTwo").val())
- }
- });
- })
- var myDate = new Date();
- var typeSelc;
- var oneType;
- 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) {
- if (oneType) {
- typeSelc=oneType;
- }else{
- typeSelc=5;
- }
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + 'WOReport/GetFeedbacklList',
- async: true,
- dataType: 'json',
- data: {
- start: sd,
- end: ed,
- type: typeSelc
- },
- success: function(data) {
-
- if(data.state == "success") {
- var sorceData=data.rows;
-
- var option = {
- tooltip: {
- formatter: "{b} : {c} ({d}%)"
- },
- legend: {
- orient: 'vertical',
- top: 'middle',
- x: 'top',
- left: 10,
- top: 0,
- },
- series: [{
- type: 'pie',
- radius: '70%',
- selectedMode: 'single',
- center: ['50%', '50%'],
- label: {
- normal: {
- show: true,
- }
- },
- itemStyle: {
- normal: {
- color:'#159FE9',
- opacity:0.3,
- },
- emphasis: {
- opacity:1, opacity:1
- }
- },
- labelLine: {
- normal: {
- show: true,
- }
- },
-
- data: [{
- value: sorceData[0].number,
- name: sorceData[0].name,
- },
- {
- value: sorceData[1].number,
- name: sorceData[1].name,
- },
- {
- value: sorceData[2].number,
- name: sorceData[2].name,
- },
- {
- value: sorceData[3].number,
- name: sorceData[3].name,
- }
- ],
-
- }]
- };
- echartsPie = echarts.init(document.getElementById('oneScreenPie'));
-
- echartsPie.setOption(option);
- }
- },
- error: function(data) {
- console.log(data.message);
- }
- });
- }
- function oneSel(sd,ed){
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + 'WOReport/GetFeedbacklList',
- async: true,
- dataType: 'json',
- data: {
- start: sd,
- end: ed
- },
- success: function(data) {
-
- if(data.state == "success") {
- var sorceData=data.rows;
- $(".onescreenText").html(sorceData[4].number);
- $(".twoscreenText").html(sorceData[3].number);
- $(".threescreenText").html(sorceData[2].number);
- $(".fourscreenText").html(sorceData[1].number);
- $(".fivescreenText").html(sorceData[0].number);
- }
- }
- })
- }
- $(".oneScrClick ul li").click(function(){
- oneType=$(this).attr("index")
- oneScreen($('#time1').val() && $('#time1').val().split(' ~ ')[0], $('#time1').val() && $('#time1').val().split(' ~ ')[1]);
- })
- //第二屏
- function twoScreen(start,end) {
- keyWord(start, end)
- }
- // 左侧关键词
- function keyWord(start, end) {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "WOReport/GetComplainthandlList",
- async: true,
- dataType: 'json',
- data: {
- start: start,
- end: end
- },
- success: function(data) {
- if(data.state.toLowerCase() == 'success') {
- var con = data.rows;
- if (con.length>0) {
- $(".keyW_t").text(con[0].name)
- $('.tagcloud').html('');
- $(con).each(function(k, j) {
- if(k < 9) {
- var strs = '<div index="'+j.Id+'" class="tagcloud_bj">' +
- '<p class="tag_title">' + j.name + '</p>' +
- '<p class="imgs">' + j.number + '</p>' +
- '</div>'
- $('.tagcloud').append(strs);
- }
- })
- $(".tagcloud div:first-child").removeClass("tagcloud_bj");
- $(".tagcloud div:first-child").addClass("tagcloud_bjShine");
- keyWordDetail(start, end);
- }else{
- $('.tagcloud').html('');
- }
-
- }
- }
- });
- }
- // 右侧部门
- function keyWordDetail(start,end) {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "WOReport/GetComplainthandlList",
- async: true,
- dataType: 'json',
- data: {
- stime: start,
- endtime: end,
- questionName:$(".quesType").val()
- },
- success: function(data) {
- if(data.state.toLowerCase() == 'success') {
- $('.scroll_table tbody').html('');
- var con = data.rows;
- $(con).each(function (j, n) {
- var rate = '';
- if (n.rate) { rate = n.rate;}
- var str = '<tr><td>'
- + n.name + '</td><td style="width:60px;">'
- + n.number + '</td><td style="width:90px;">'
- + n.ongesttime + '</td><td style="width:90px;">'
- + n.minimumtime + '</td><td style="width:90px;">'
- + n.averageTime + '</td><td style="width:75px;">'
- + n.median + '</td><td style="width:90px;">'
- + n.Overdue + '</td><td style="width:110px;">'
- + n.efficiency + '</td></tr>'
- $('.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($('#time2').val() && $('#time2').val().split(' ~ ')[0], $('#time2').val() && $('#time2').val().split(' ~ ')[1]);
- });
- quesTypeSel();
- $(".quesType").change(function() {
- keyWordDetail($('#test6').val() && $('#test6').val().split(' ~ ')[0], $('#test6').val() && $('#test6').val().split(' ~ ')[1],$(".areaFive").val());
- })
- //部门下拉框
- function quesTypeSel() {
- $.getJSON( huayi.config.callcenter_url +"WOReport/GetComplainthandlList",
- {
- branchcode: $(".areaFive").val()
- },
- function(result) {
- if(result.state.toLowerCase() == "success") {
- goodslist = result.rows;
- $(".depart").empty();
- $('<option value="">请选择部门</option>').appendTo($(".quesType"));
- $(goodslist).each(function(i, n) {
- $('<option value="' + n.name
- + '">' + n.name
- + '</option>').appendTo($(".quesType"));
- })
- }
- });
- }
- //第三屏
- function threeScreen(start, end) {
- partOne();
- partTwo();
- partThree();
- partFour();
- }
- $(".channelSel").change(function() {
- partFour();
- })
- function Ajax() {
- oneScreen($('#time1').val() && $('#time1').val().split(' ~ ')[0], $('#time1').val() && $('#time1').val().split(' ~ ')[1])
- oneSel($('#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])
- threeScreen();
- }
|