Keine Beschreibung

newSeats.js 2.9KB

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