//坐席 $('#timeTraffic').click(function (e) { let zxNum = Math.floor(Math.random() * 10000 + 10000) let userAway = []; $('.bulletFrame').show(); if ($('.bulletFrame').css('display') == 'block') { $('.body').css('opacity', '0.4') } $('.seatMonitor').show(); $('.seatMonitor').siblings().hide() //坐席列表展示 GetSeatflagList $.getJSON(huayi.config.callcenter_url + 'SeatMonitoring/GetSeatGroupList', { token: $.cookie("token"), }, function (res) { if (res.state.toLowerCase() == "success") { let str = '' res.data.forEach(function (v, n) { if (v.F_WorkNumber != 8071 && v.F_WorkNumber != 8069 && v.F_WorkNumber != 8062) { str +='
  • ' if(v["坐席"]&&v["坐席"].length>0){ str += '
    '+ v.F_Value+'组
    ' v["坐席"].forEach(function(m,n){ str += '
    '+m.F_UserCode+ '

    '+m.F_UserName+ '

    ' userAway.push(m.F_UserCode) }) str += '
    ' } str += '
  • ' } }) console.log(userAway) $('.zx_people').html(str) // $(".zx_people").on('click','.people_list .group_btn',function(){ // $(this).siblings("dl").toggle() // // }) $(".group_btn").click(function(){ $(this).siblings("dl").toggle() console.log("点击了") }) } }) //实时话务统计 new doAjax({ url: huayi.config.callcenter_url + "/InfoNew/GetHWTypeCount24ByNow", data: { token: $.cookie("token"), }, callBack: function (res) { getRealTimeTraffi(res.data.hours, res.data.hrcount[0], res.data.hccount[0]) } }); //开始坐席监控 $('.star_btn').click(function (e) { obj.AgentID = zxNum; $(userAway).each(function (i, n) { obj.Type = "SubScribe"; obj.SubParmer = n * 1; obj.AgentExten = 1 obj.SubType = "0";//根据工号订阅坐席状态 Send(); obj.SubType = "1";//根据工号订阅线路状态 Send(); }) e.stopPropagation() }) //关闭坐席监控 $('.stop_btn').click(function (e) { $(userAway).each(function (i, n) { top.obj.Type = "SubScribeCancel"; top.obj.SubParmer = "-1"; top.obj.SubType = "0";//根据工号取消订阅坐席状态 top.Send(); top.obj.SubType = "1";//根据工号取消订阅线路状态 top.Send(); }) e.stopPropagation() }) //关闭坐席页面时结束坐席监控 $('.close_zxicon').click(function (e) { $('.bulletFrame').hide(); $('.bulletFrameT').hide(); if ($('.bulletFrame').css('display') == 'none') { $('.body').css('opacity', '1') } if ($('.bulletFrameT').css('display') == 'none') { $('.body').css('opacity', '1') } $(userAway).each(function (i, n) { top.obj.Type = "SubScribeCancel"; top.obj.SubParmer = "-1"; top.obj.SubType = "0";//根据工号取消订阅坐席状态 top.Send(); top.obj.SubType = "1";//根据工号取消订阅线路状态 top.Send(); }) e.stopPropagation() }) e.stopPropagation() })