| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- //坐席
- $('#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 +='<li class="people_list" style="display:inline-block">'
- if(v["坐席"]&&v["坐席"].length>0){
- str += '<div class="group_btn">'+ v.F_Value+'组</div><dl>'
- v["坐席"].forEach(function(m,n){
- str += '<dt class="seatList '+ m.F_WorkNumber +
- '"><div class="seatBox"><div style="margin-right: 3px;"><span class="g-num">'+m.F_UserCode+
- '</span></div><div><div class="bg_person"></div><p><span class="g-name">'+m.F_UserName+
- '</span></p><i class="dg" zxGroup="'+m.F_UserCode+
- '" zx_item="0" xl_item="0"></i></div></div></dt>'
- userAway.push(m.F_UserCode)
- })
- str += '</dl>'
- }
- str += '</li>'
- }
- })
- 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()
- })
|