| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895 |
- var areaOneVal = helper.cookies.get("areaOneVal");
- var areaOneText = helper.cookies.get("areaOneText");
- // 如果浏览器不支持websocket,会使用这个flash自动模拟websocket协议,此过程对开发者透明
- WEB_SOCKET_SWF_LOCATION = "./js/websocket/WebSocketMain.swf";
- // 开启flash的websocket debug
- WEB_SOCKET_DEBUG = true;
- var ws, n = 0,
- timer;
- var lockReconnect = false; //避免重复连接
- var obj = {};
- var Statess;
- var cls = 0;
- var lasttime = new Date().getTime();
- var cons;
- var person='';
- if (areaOneVal) {
- var areaOneVal = helper.cookies.get("areaOneVal");
-
- } else{
- var areaOneVal="sqs12345"
-
- }
- //创建scoket连接
- function createWebSocket() {
- try {
-
- Connect();
- } catch (e) {
- reconnect();
- }
- }
- //连接
- function Connect() {
- // debugger
- ws = new WebSocket("ws://" + huayi.config.socket_ip + ":" + huayi.config.socket_port);
- ws.onopen = function () {
- console.log(new Date() + " " + "建立连接");
- //心跳检测重置
- heartCheck.reset().start();
- cls = 0;
- // $(".Login").addClass("active");
- lasttime = new Date().getTime();
-
- join()
- SayBusy()
- //自动签入
- // if ($.cookie("socket_state") != null) {
- // SetLogin($.cookie("socket_state"));
- // }
- //$(".hwzt").text('连接成功!');
- };
- //接收到消息的回调方法
- ws.onmessage = function (evt) {
- //如果获取到消息,心跳检测重置
- //拿到任何消息都说明当前连接是正常的
- heartCheck.reset().start();
- var myDate = new Date();
- console.log(myDate + " receive " + evt.data);
- var data = JSON.parse(evt.data)[0];
- if (data) {
- var rlt = data.Result;
- var type = data.Type;
- if (rlt == true) {
-
- switch (type.toLowerCase()) {
- //case "heart": HeartBack(); break;//心跳
- case "login":
- LoginBack();
- break; //签入
- // case "logout":
- // LogoutBack();
- // break; //签出
- // case "dropcall":
- // DropCallBack();
- // break; //挂断
- case "makecall":
- MakeCallBack();
- break; //外呼
- case "setstate":
- SetState(data);
- break; //置忙置闲
- //case "saybusy": SayBusyBack(data); break;
- //case "sayfree": SayFreeBack(data); break;
- case "meeting":
- MeetingBack();
- break; //多方通话
- case "transfer":
- TransferBack();
- break; //转移
- case "hold":
- HoldBack();
- break; //保持
- case "retrieve":
- RetrieveBack();
- break; //接回
- // case "incoming":
- // IncomingBack(data);
- // break; //来电
- case "subscribe":
- SubScribeBack();
- break; //监测
- case "subscribecancel":
- SubScribeCancelBack();
- break; //停止监测
- case "agentstate":
- AgentStateBack(data);
- break; //坐席状态
- case "linestate":
- LineStateBack(data);
- break; //线路状态
- case "motorsetstate":
- SayFreeBack();
- break; //班长置闲
- // case "linestateagent":
- // LineStateAgentBack(data);
- // break; //线路状态通知
- case "agentstateagent":
- AgentStateAgentBack(data);
- break; //坐席状态通知
- //case "callid":
- // CallIDBack(data);
- // break; //获取callid
- //case "recordpath":
- // RecordPathBack(data);
- // break; //录音返回
- case "getagentlist":
- GetAgentListBack(data);
- break;//在线坐席信息
- case "confirmtransfer":
- ConfirmTransfer(data);
- break;//确认转移 取消转移
- case "consult":
- ConsultationCall();
- break;//协商呼叫
-
- }
- } else {
- if (rlt == false) {
- //layer.confirm('操作失败!', {
- // btn: ['确定']
- //});
- $(".hwzt").text('操作失败!');
- } else {
- $(".hwzt").text(rlt);
- //layer.confirm(rlt, {
- // btn: ['确定']
- //});
- if(type.toLowerCase()=='waitcount') {
- backstageQueue(data);
- }
- }
- }
- }
- };
-
- //连接关闭的回调方法
- ws.onclose = function (evt) {
- if (cls == 0) {
- cls = 1;
- //console.log("连接关闭!");
- //layer.confirm('连接关闭!', {
- // btn: ['确定']
- //});
- $(".hwzt").text('连接关闭!');
- $("#top-search li i").removeClass("active");
- reconnect();
- }
- };
- //连接发生错误的回调方法
- ws.onerror = function (evt) {
- //产生异常
- $(".hwzt").text('连接出现异常!');
- console.log(ws);
- if (ws == null || ws.readyState != ws.OPEN) {
- console.log(new Date() + "开始重连");
- reconnect();
- }
-
- };
- }
- //重连
- function reconnect() {
-
- if (lockReconnect) return;
- lockReconnect = true;
- //没连接上会一直重连,设置延迟避免请求过多
- setTimeout(function () {
- console.log(new Date() + " " + "重连中……");
- createWebSocket("ws://" + huayi.config.socket_ip + ":" + huayi.config.socket_port);
- lockReconnect = false;
- SayBusy()
- }, 2000);
- }
-
- //发送
- function Send() {
- if (ws.readyState != ws.OPEN) {
- reconnect();
- }
- if (ws.readyState == ws.OPEN) {
- console.log(new Date() + " send " + JSON.stringify(obj));
- ws.send(JSON.stringify(obj));
- }
- }
- //心跳检测
- var heartCheck = {
- timeout: 25000, //25秒
- timeoutObj: null,
- serverTimeoutObj: null,
- reset: function () {
- clearTimeout(this.timeoutObj);
- clearTimeout(this.serverTimeoutObj);
- return this;
- },
- start: function () {
- var self = this;
- this.timeoutObj = setTimeout(function () {
- //这里发送一个心跳,后端收到后,返回一个心跳消息,
- //onmessage拿到返回的心跳就说明连接正常
- obj.Type = "Heart";
- Send();
- self.serverTimeoutObj = setTimeout(function () { //如果超过一定时间还没重置,说明后端主动断开了
- ws.close(); //如果onclose会执行reconnect,我们执行ws.close()就行了.如果直接执行reconnect 会触发onclose导致重连两次
- }, self.timeout)
- }, this.timeout)
- }
- }
- // 签入
- function SayBusy() {
- obj.Type = "SayBusy";
- Send();
- console.log('置忙')
- }
-
- //签入
- function LoginBack() {
-
- obj.Type = "SayBusy";
- Send();
- console.log('置忙')
- }
- // 点击签入
- function join(){
- obj.Type ='Login',
- obj.AgentID='9898',
- obj.AgentExten='1015',
- obj.AgentType='0',
- obj.AgentGroup='364'
-
-
- // console.log(scoketDatas)
- Send()
- }
- //监测
- function SubScribeBack() {
- var obj = $("iframe:visible")
- if (obj.attr("data-id") == "./TelCall/SeatMonitor.html") {
- window.frames[obj.attr("name")].Start();
- }
- if (obj.attr("data-id") == "./TelCall/zxKong.html") {
- window.frames[obj.attr("name")].Start();
- }
- }
- //取消监测
- function SubScribeCancelBack() {
- // var obj = $("iframe:visible")
- // if (obj.attr("data-id") == "./TelCall/SeatMonitor.html") {
- // window.frames[obj.attr("name")].Stop();
- // }
- // if (obj.attr("data-id") == "./TelCall/zxKong.html") {
- // window.frames[obj.attr("name")].Stop();
- // }
- $('.yuan_one').addClass("lx")
- $('.yuan_two').addClass("lx")
- }
- //班长监测返回状态
- //坐席状态
-
- function AgentStateBack(data) {
- $('.yuan_one').removeClass("lx")
- $('.yuan_two').removeClass("lx")
- $(cons).each(function (i, n) {
- if(n.F_UserCode==data.AgentID){
- if(data.State=='0'){
- $('.yuan_one').eq(i).addClass("lx")
- $('.yuan_two').eq(i).addClass("lx")
- }else if(data.State=='2'){
- $('.yuan_one').eq(i).addClass("kx")
- $('.yuan_two').eq(i).addClass("kx")
- }else if(data.State=='3'){
- $('.yuan_one').eq(i).addClass("hc")
- $('.yuan_two').eq(i).addClass("hc")
- }else if(data.State=='4'){
- $('.yuan_one').eq(i).addClass("hh")
- $('.yuan_two').eq(i).addClass("hh")
- }else if(data.State=='5'){
- $('.yuan_one').eq(i).addClass("ml")
- $('.yuan_two').eq(i).addClass("ml")
- }else if(data.State=='6'){
- $('.yuan_one').eq(i).addClass("zl")
- $('.yuan_two').eq(i).addClass("zl")
- }
-
- }
- })
- // var obj = $("iframe:visible")
- // if (obj.attr("data-id") == "./TelCall/SeatMonitor.html") {
- // window.frames[obj.attr("name")].UpdateAgentState(data.AgentID, data.State);
- // }
- // if (obj.attr("data-id") == "./TelCall/zxKong.html") {
- // window.frames[obj.attr("name")].UpdateAgentState(data.AgentID, data.State);
- // }
- }
- //线路状态
- function LineStateBack(data) {
- var obj = $("iframe:visible")
- if (obj.attr("data-id") == "./TelCall/SeatMonitor.html") {
- window.frames[obj.attr("name")].UpdateLineState(data.AgentID, data.State);
- }
- if (obj.attr("data-id") == "./TelCall/zxKong.html") {
- window.frames[obj.attr("name")].UpdateLineState(data.AgentID, data.State);
- }
- }
- //后台排队
- function backstageQueue(data) {
-
- person=data.WaitCount
- console.log(person)
- // if (obj.attr("data-id") == "./widgets.html") {
- // window.frames[obj.attr("name")].realTimeMonitorQueue(data.WaitCount);
- // }
- }
- //坐席状态通知
- function AgentStateAgentBack(data) {
- var strr = '';
- console.log('坐席状态'+ data.State );
- switch (data.State+"") {
- case "0":
- strr = "离线";
- $(".zxzt").removeClass("br").removeClass("bl").removeClass("by");
- break; //离线
- case "1":
- break; //登录中
- case "2":
- strr = "空闲";
- $(".zxzt").removeClass("br").removeClass("by").addClass("bl");
- break; //空闲
- case "3":
- strr = "通话中";
- $(".zxzt").removeClass("bl").removeClass("by").addClass("br");
- break; //通话中
- case "4":
- strr = "话后处理中";
- $(".zxzt").removeClass("bl").removeClass("br").addClass("by");
- break; //话后处理中
- case "5":
- strr = "忙碌";
- $(".zxzt").removeClass("bl").removeClass("br").addClass("by");
- break; //小休
- case "6":
- strr = "振铃";
- break; //被请求
- case "7":
- strr = "注销";
- $(".zxzt").removeClass("br").removeClass("bl").removeClass("by");
- break; //注销
- }
-
- $(".hxzt").text(strr);
- }
-
- //置忙 置闲
- function SetState(obj) {
- if (obj.State == '5') {
- $(".SayBusy").removeClass("active");
- $(".SayFree").addClass("active");
- $(".zxzt").removeClass("bl").removeClass("br").addClass("by");
- $(".hwzt").text('忙碌');
- $("#isml").val(1);
- // SetStateCookie(1);
- }
- if (obj.State == '2') {
- $(".SayBusy").addClass("active");
- $(".SayFree").removeClass("active");
- $(".zxzt").removeClass("br").removeClass("by").addClass("bl");
- $(".hwzt").text('空闲');
- $("#isml").val(0);
- // SetStateCookie(0);
- }
- }
- $(function() {
- createWebSocket()
- SayBusy()
- laydate.render({
- elem: '#time1',
- range: '~',
- theme: '#114a97',
- done: function(value, date) {
- var areaOneVal=$(".areaOne").val();
- partOne(value && value.split(' ~ ')[0], value && value.split(' ~ ')[1],areaOneVal);
- }
- });
- laydate.render({
- elem: '#time2',
- theme: '#114a97',
- done: function(value, date) {
- var areaOneVal=$(".areaOne").val();
- partTwo(value,areaOneVal)
- }
- });
- laydate.render({
- elem: '#time3',
- theme: '#114a97',
- done: function(value, date) {
- var areaOneVal=$(".areaOne").val();
- partThree(value,areaOneVal)
- }
- });
- Ajax();
- $(".areaOne").change(function() {
- var areaOneVal=$(this).val();
- var areaOneText=$(".areaOne").find("option:selected").text();
- helper.cookies.set("areaOneVal", areaOneVal, 7);
- helper.cookies.set("areaOneText", areaOneText, 7);
- partOne($('#time1').val() && $('#time1').val().split(' ~ ')[0], $('#time1').val() && $('#time1').val().split(' ~ ')[1],areaOneVal);
- partTwo($('#time2').val(),areaOneVal);
- partThree( $('#time3').val(),areaOneVal);
- // Ajax()
- });
- })
- // 跳轉
- $(".index").click(function(){
- window.open('detail.html','_self')
- })
- $(".second").click(function(){
- window.open('second.html','_self')
- })
- $(".third").click(function(){
- window.open('third.html','_self')
- })
- $(".fourth").click(function(){
- window.open('fourth.html','_self')
- })
- $(".nav_middle").click(function(){
- window.open('index.html','_self')
- })
- $("#department").click(function(){
- window.open('receiptDepartment.html','_self')
- })
- $("#sourceChannel").click(function(){
- window.open('sourceChannel.html','_self')
- })
- // $("#call").click(function(){
- // window.open('TelephoneDetails.html','_self')
- // })
- $("#complaint").click(function(){
- window.open('complaintsReport.html','_self')
- })
-
- //区县筛选
- //deprtment();
- function deprtment() {
- $.getJSON( huayi.config.callcenter_url +"CountyBranch/GetBranchListS", function(result) {
- if(result.state.toLowerCase() == "success") {
- goodslist = result.data;
- // 第五屏
- $(".areaOne").empty();
- $(goodslist).each(function(i, n) {
- $('<option value="' + n.F_Code
- + '">' + n.F_Name
- + '</option>').appendTo($(".areaOne"));
- });
- if (areaOneVal) {
- $(".areaOne").val(areaOneVal);
- }
- }
- });
- }
- // var sitProportion = echarts.init(document.getElementById('sitProportion')); //坐席闲忙比例
- // sitProportion.setOption({
- // color: ['#4ab7c7', '#2484d9', '#2e39c1'],
- // 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: 'top',
- // left: '135px',
- // data: ['置忙', '通话', '空闲'],
- // textStyle: {
- // color: '#00e9ff'
- // }
- // },
- // grid: {
- // left: '1%',
- // right: '3%',
- // bottom: '5%',
- // containLabel: true
- // },
- // 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',
- // data: []
- // }, {
- // name: '通话',
- // type: 'bar',
- // data: []
- // }, {
- // name: '空闲',
- // type: 'bar',
- // data: []
- // }]
- // });
- function partOne(starts, ends,areaOneVal) {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "SeatMonitoring/getlist",
- async: true,
- dataType: 'json',
- data: {
- // start: starts,
- // end: ends,
- // branchcode:areaOneVal
- },
- success: function(data) {
- if(data.state.toLowerCase() == 'success') {
- // layer.close(index);
- cons = data.data;
- $(".users").html('')
- $(cons).each(function(i, n) {
- var str=' <li class="touxiang"><ol class="tx"><li class="person"><span class="yuan_one "></span><span class="yuan_two"></span></li><li class="userid">'+n.F_UserCode+'</li></ol></li>';
- var a=$(str)
- a.appendTo($(".users"))
- })
-
- }
- }
-
- });
- }
- // 开始检测
- $(".kqc").click(function () {
- // if (!$(this).hasClass("dis")) {
- $('.kqc').addClass('kqc_active')
- $('.jqc').removeClass('dis')
- $(cons).each(function (i, n) {
- obj.Type = "SubScribe";
- obj.SubParmer = n.F_WorkNumber * 1;
- obj.SubType = "0";//根据工号订阅坐席状态
- Send();
- obj.SubType = "1";//根据工号订阅线路状态
- Send();
- })
- //top.obj.Type = "SubScribe";
- //top.obj.SubParmer = "8003";
- //top.obj.SubType = "0";//根据工号订阅坐席状态
- //top.Send();
- //top.obj.SubType = "1";//根据工号订阅线路状态
- //top.Send();
- // }
- })
-
-
- //停止监测
- $(".jqc").click(function () {
- $('.kqc').removeClass('kqc_active')
- $('.jqc').addClass('dis')
- //$(user).each(function (i, n) {
- // obj.Type = "SubScribeCancel";
- // obj.SubParmer = n.F_WorkNumber;
-
- // obj.SubType = "0";//根据工号取消订阅坐席状态
- // Send();
- // obj.SubType = "1";//根据工号取消订阅线路状态
- // Send();
- //})
- obj.Type = "SubScribeCancel";
- obj.SubParmer = "-1";
-
- obj.SubType = "0";//根据工号取消订阅坐席状态
- Send();
- obj.SubType = "1";//根据工号取消订阅线路状态
- Send();
-
- })
- //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 partTwo(dates,areaOneVal) {
- // var index = layer.load(1, {
- // shade: [0.5, '#030303'] //0.1透明度的白色背景
- // });
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "info/GetTelCount24ByDate",
- async: true,
- dataType: "json",
- data: {
- date: dates,
- branchcode:areaOneVal
- },
- 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 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','#a93d19'
- ];
- return colorList[params.dataIndex]
- }
- }
- },
- label: {
- normal: {
- show: true,
- position: 'top', //顶部数据显示位置
- textStyle: {
- color: '#fff' //顶部数据颜色
- },
- formatter: '{c}' // 这里是数据展示的时候显示的数据
- }
- },
- data: []
- }]
- });
- function partThree(dates,areaOneVal) {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "info/GetTelCountByDate",
- async: true,
- dataType: "json",
- data: {
- date: dates,
- branchcode:areaOneVal
- },
- success: function(data) {
- if(data.state.toLowerCase() == "success") {
- // layer.close(index);
- var con = data.data;
- con.person=person
- console.log(con)
- todyPhoneCount.setOption({
- series: [{
- data: [con.hwcon, con.lhcon, con.jtcon, con.pjthtimes,con.person]
- }]
- })
- }
- }
- });
- }
- function Ajax() {
- var areaOneVal = helper.cookies.get("areaOneVal");
- var areaOneText = helper.cookies.get("areaOneText");
- partOne($('#time1').val() && $('#time1').val().split(' ~ ')[0], $('#time1').val() && $('#time1').val().split(' ~ ')[1],areaOneVal);
- partTwo($('#time2').val(),areaOneVal)
- partThree($('#time3').val(),areaOneVal);
- }
|