Нет описания

newSeats.js 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. //坐席
  2. $('#timeTraffic').click(function (e) {
  3. let zxNum = Math.floor(Math.random() * 10000 + 10000)
  4. let userAway = [];
  5. $('.bulletFrame').show();
  6. if ($('.bulletFrame').css('display') == 'block') {
  7. $('.body').css('opacity', '0.4')
  8. }
  9. $('.seatMonitor').show();
  10. $('.seatMonitor').siblings().hide()
  11. //坐席列表展示 GetSeatflagList
  12. $.getJSON(huayi.config.callcenter_url + 'SeatMonitoring/GetSeatGroupList', {
  13. token: $.cookie("token"),
  14. }, function (res) {
  15. if (res.state.toLowerCase() == "success") {
  16. let str = ''
  17. res.data.forEach(function (v, n) {
  18. if (v.F_WorkNumber != 8071 && v.F_WorkNumber != 8069 && v.F_WorkNumber != 8062) {
  19. str +='<li class="people_list" style="display:inline-block">'
  20. if(v["坐席"]&&v["坐席"].length>0){
  21. str += '<div class="group_btn">'+ v.F_Value+'组</div><dl>'
  22. v["坐席"].forEach(function(m,n){
  23. str += '<dt class="seatList '+ m.F_WorkNumber +
  24. '"><div class="seatBox"><div style="margin-right: 3px;"><span class="g-num">'+m.F_UserCode+
  25. '</span></div><div><div class="bg_person"></div><p><span class="g-name">'+m.F_UserName+
  26. '</span></p><i class="dg" zxGroup="'+m.F_UserCode+
  27. '" zx_item="0" xl_item="0"></i></div></div></dt>'
  28. userAway.push(m.F_UserCode)
  29. })
  30. str += '</dl>'
  31. }
  32. str += '</li>'
  33. }
  34. })
  35. console.log(userAway)
  36. $('.zx_people').html(str)
  37. // $(".zx_people").on('click','.people_list .group_btn',function(){
  38. // $(this).siblings("dl").toggle()
  39. //
  40. // })
  41. $(".group_btn").click(function(){
  42. $(this).siblings("dl").toggle()
  43. console.log("点击了")
  44. })
  45. }
  46. })
  47. //实时话务统计
  48. new doAjax({
  49. url: huayi.config.callcenter_url + "/InfoNew/GetHWTypeCount24ByNow",
  50. data: {
  51. token: $.cookie("token"),
  52. },
  53. callBack: function (res) {
  54. getRealTimeTraffi(res.data.hours, res.data.hrcount[0], res.data.hccount[0])
  55. }
  56. });
  57. //开始坐席监控
  58. $('.star_btn').click(function (e) {
  59. obj.AgentID = zxNum;
  60. $(userAway).each(function (i, n) {
  61. obj.Type = "SubScribe";
  62. obj.SubParmer = n * 1;
  63. obj.AgentExten = 1
  64. obj.SubType = "0";//根据工号订阅坐席状态
  65. Send();
  66. obj.SubType = "1";//根据工号订阅线路状态
  67. Send();
  68. })
  69. e.stopPropagation()
  70. })
  71. //关闭坐席监控
  72. $('.stop_btn').click(function (e) {
  73. $(userAway).each(function (i, n) {
  74. top.obj.Type = "SubScribeCancel";
  75. top.obj.SubParmer = "-1";
  76. top.obj.SubType = "0";//根据工号取消订阅坐席状态
  77. top.Send();
  78. top.obj.SubType = "1";//根据工号取消订阅线路状态
  79. top.Send();
  80. })
  81. e.stopPropagation()
  82. })
  83. //关闭坐席页面时结束坐席监控
  84. $('.close_zxicon').click(function (e) {
  85. $('.bulletFrame').hide();
  86. $('.bulletFrameT').hide();
  87. if ($('.bulletFrame').css('display') == 'none') {
  88. $('.body').css('opacity', '1')
  89. }
  90. if ($('.bulletFrameT').css('display') == 'none') {
  91. $('.body').css('opacity', '1')
  92. }
  93. $(userAway).each(function (i, n) {
  94. top.obj.Type = "SubScribeCancel";
  95. top.obj.SubParmer = "-1";
  96. top.obj.SubType = "0";//根据工号取消订阅坐席状态
  97. top.Send();
  98. top.obj.SubType = "1";//根据工号取消订阅线路状态
  99. top.Send();
  100. })
  101. e.stopPropagation()
  102. })
  103. e.stopPropagation()
  104. })