kfjiankong.html 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>客服监控</title>
  7. <link rel="shortcut icon" href="favicon.ico">
  8. <link href="__CSS__/bootstrap.min.css?v=3.3.6" rel="stylesheet">
  9. <link href="__CSS__/font-awesome.min.css?v=4.4.0" rel="stylesheet">
  10. <link href="__CSS__/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
  11. <link href="__CSS__/animate.min.css" rel="stylesheet">
  12. <link href="__CSS__/style.min.css?v=4.1.0" rel="stylesheet">
  13. </head>
  14. <body class="gray-bg">
  15. <div class="wrapper wrapper-content animated fadeInRight">
  16. <!-- Panel Other -->
  17. <div class="ibox float-e-margins">
  18. <div class="ibox-title">
  19. <h5>客服监控</h5>
  20. </div>
  21. <div class="ibox-content">
  22. <!--搜索框开始-->
  23. <form id='commentForm' role="form" method="get" class="form-inline">
  24. <div class="content clearfix m-b">
  25. <div class="form-group">
  26. <select name="type1" id="type1" class="form-control">
  27. <option value="0">所有分组</option>
  28. {volist name="kfgroup" id="vo" key="k" }
  29. <option value="{$k}">{$vo}</option>
  30. {/volist}
  31. </select>
  32. </div>
  33. <div class="form-group">
  34. <lable>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</lable>
  35. <select name="type2" id="type2" class="form-control">
  36. <option value="0">所有状态</option>
  37. <option value="1">在线状态</option>
  38. <option value="2">休息状态</option>
  39. <option value="3">隐身状态</option>
  40. </select>
  41. </div>
  42. <div class="form-group">
  43. <lable>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</lable>
  44. <select name="type3" id="type3" class="form-control">
  45. <option value="0">所有会话</option>
  46. <option value="1">正常会话</option>
  47. <option value="2">报警回话</option>
  48. </select>
  49. </div>
  50. <div class="form-group">
  51. <lable>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</lable>
  52. <button class="btn btn-primary" type="button" style="margin-top:5px" id="search"><strong>搜 索</strong>
  53. </button>
  54. </div>
  55. </div>
  56. </form>
  57. <!--搜索框结束-->
  58. <div class="example-wrap">
  59. <div class="example">
  60. <table id="cusTable">
  61. <thead>
  62. <th data-field="id">客服</th>
  63. <th data-field="hhl">会话量</th>
  64. <th data-field="jdl">接待量</th>
  65. <th data-field="pjhhsc">平均会话时长</th>
  66. <th data-field="cpl">参评率</th>
  67. <th data-field="mydl">满意度率</th>
  68. <th data-field="pjxysc">平均响应时长</th>
  69. <th data-field="jrxxsc">今日休息时长</th>
  70. <th data-field="">发消息</th>
  71. </thead>
  72. </table>
  73. </div>
  74. </div>
  75. <!-- End Example Pagination -->
  76. </div>
  77. </div>
  78. </div>
  79. <!-- End Panel Other -->
  80. <script src="__JS__/jquery.min.js?v=2.1.4"></script>
  81. <script src="__JS__/bootstrap.min.js?v=3.3.6"></script>
  82. <script src="__JS__/content.min.js?v=1.0.0"></script>
  83. <script src="__JS__/plugins/bootstrap-table/bootstrap-table.min.js"></script>
  84. <script src="__JS__/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
  85. <script src="__JS__/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
  86. <script src="__JS__/plugins/layer/layer.min.js"></script>
  87. <script type="text/javascript">
  88. function initTable() {
  89. //先销毁表格
  90. $('#cusTable').bootstrapTable('destroy');
  91. //初始化表格,动态从服务器加载数据
  92. $("#cusTable").bootstrapTable({
  93. method: "get", //使用get请求到服务器获取数据
  94. url: "{:url('kfonitoring/kfjiankong')}", //获取数据的地址
  95. striped: true, //表格显示条纹
  96. pagination: true, //启动分页
  97. pageSize: 20, //每页显示的记录数
  98. pageNumber:1, //当前第几页
  99. pageList: [5, 10, 15, 20, 25], //记录数可选列表
  100. sidePagination: "server", //表示服务端请求
  101. paginationFirstText: "首页",
  102. paginationPreText: "上一页",
  103. paginationNextText: "下一页",
  104. paginationLastText: "尾页",
  105. queryParamsType : "undefined",
  106. queryParams: function queryParams(params) { //设置查询参数
  107. var param = {
  108. pageNumber: params.pageNumber,
  109. pageSize: params.pageSize,
  110. searchText:$('#type1').val() + ','+ $('#type2').val()+ ',' + $('#type3').val()
  111. };
  112. return param;
  113. },
  114. onLoadSuccess: function(res){ //加载成功时执行
  115. if(111 == res.code){
  116. window.location.reload();
  117. }
  118. layer.msg("加载成功", {time : 1000});
  119. },
  120. onLoadError: function(){ //加载失败时执行
  121. layer.msg("加载数据失败");
  122. }
  123. });
  124. }
  125. $(document).ready(function () {
  126. //调用函数,初始化表格
  127. initTable();
  128. //当点击查询按钮的时候执行
  129. $("#search").bind("click", initTable);
  130. });
  131. function Del(id) {
  132. layer.confirm('确认删除记录?', {icon: 3, title: '提示'}, function (index) {
  133. //do something
  134. $.getJSON("{:url('kfnotice/del')}", {'id': id}, function (res) {
  135. if (1 == res.code) {
  136. layer.alert(res.msg, {title: '友情提示', icon: 1, closeBtn: 0}, function () {
  137. initTable();
  138. });
  139. } else if (111 == res.code) {
  140. window.location.reload();
  141. } else {
  142. layer.alert(res.msg, {title: '友情提示', icon: 2});
  143. }
  144. });
  145. layer.close(index);
  146. })
  147. }
  148. </script>
  149. </body>
  150. </html>