説明なし

newSeats.js 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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" style="display:inline-block">'
  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. // $(".zx_people").on('click','.people_list .group_btn',function(){
  36. // $(this).siblings("dl").toggle()
  37. //
  38. // })
  39. $(".group_btn").click(function(){
  40. $(this).siblings("dl").toggle()
  41. console.log("点击了")
  42. })
  43. }
  44. })
  45. //实时话务统计
  46. new doAjax({
  47. url: huayi.config.callcenter_url + "/InfoNew/GetHWTypeCount24ByNow",
  48. data: {},
  49. callBack: function (res) {
  50. getRealTimeTraffi(res.data.hours, res.data.hrcount[0], res.data.hccount[0])
  51. }
  52. });
  53. //开始坐席监控
  54. $('.star_btn').click(function (e) {
  55. obj.AgentID = zxNum;
  56. $(userAway).each(function (i, n) {
  57. obj.Type = "SubScribe";
  58. obj.SubParmer = n * 1;
  59. obj.AgentExten = 1
  60. obj.SubType = "0";//根据工号订阅坐席状态
  61. Send();
  62. obj.SubType = "1";//根据工号订阅线路状态
  63. Send();
  64. })
  65. e.stopPropagation()
  66. })
  67. //关闭坐席监控
  68. $('.stop_btn').click(function (e) {
  69. $(userAway).each(function (i, n) {
  70. top.obj.Type = "SubScribeCancel";
  71. top.obj.SubParmer = "-1";
  72. top.obj.SubType = "0";//根据工号取消订阅坐席状态
  73. top.Send();
  74. top.obj.SubType = "1";//根据工号取消订阅线路状态
  75. top.Send();
  76. })
  77. e.stopPropagation()
  78. })
  79. //关闭坐席页面时结束坐席监控
  80. $('.close_zxicon').click(function (e) {
  81. $('.bulletFrame').hide();
  82. $('.bulletFrameT').hide();
  83. if ($('.bulletFrame').css('display') == 'none') {
  84. $('.body').css('opacity', '1')
  85. }
  86. if ($('.bulletFrameT').css('display') == 'none') {
  87. $('.body').css('opacity', '1')
  88. }
  89. $(userAway).each(function (i, n) {
  90. top.obj.Type = "SubScribeCancel";
  91. top.obj.SubParmer = "-1";
  92. top.obj.SubType = "0";//根据工号取消订阅坐席状态
  93. top.Send();
  94. top.obj.SubType = "1";//根据工号取消订阅线路状态
  95. top.Send();
  96. })
  97. e.stopPropagation()
  98. })
  99. e.stopPropagation()
  100. })