Bez popisu

statistics.html 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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. <script src="../Script/Common/huayi.load.js"></script>
  7. <script src="../Script/Common/huayi.config.js"></script>
  8. <link href="../css/init.css" rel="stylesheet" />
  9. <link href="../css/Table/table1.css" rel="stylesheet" />
  10. <link rel="stylesheet" href="../js/layui/css/layui.css">
  11. <title>统计</title>
  12. </head>
  13. <body class="gray-bg">
  14. <div class="container-fluid wrapper-content animated fadeInRight">
  15. <div class="daoHang clearfix">
  16. <div class="dhLeft">
  17. <sapn><i class="syIcon"></i>位置:
  18. <a id="ReIndex" href="javaScript:;">首页</a>&gt;
  19. <a href="javaScript:;">专题管理</a>&gt;
  20. <a href="" class="nowPosition">统计</a>
  21. </sapn>
  22. </div>
  23. <div class="dhRight">
  24. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  25. </div>
  26. </div>
  27. <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
  28. <ul class="layui-tab-title">
  29. <li class="layui-this" onclick="changeTab(1)">专题统计</li>
  30. <li onclick="changeTab(2)">周主题统计</li>
  31. <li onclick="changeTab(3)">月主题统计</li>
  32. </ul>
  33. <div class="layui-tab-content">
  34. <div class="layui-tab-item layui-show">
  35. </div>
  36. <div class="layui-tab-item"></div>
  37. <div class="layui-tab-item"></div>
  38. </div>
  39. </div>
  40. <div class="th-box">
  41. <div class="th-bar clearfix">
  42. <div class="seach-box fr">
  43. <ul>
  44. <li>名称:<input class="photo x-color" type="text" id="name" placeholder="请输入名称" /></li>
  45. <li>
  46. <a class="sc_btn" id="sc_btns">搜索</a>
  47. </li>
  48. </ul>
  49. </div>
  50. </div>
  51. </div>
  52. <div style="width: 100%;padding: 10px;">
  53. <table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  54. <thead>
  55. <tr>
  56. <th data-align="center" data-formatter="setCode">编号</th>
  57. <th data-field="F_Name" data-formatter="themeName">名称</th>
  58. <th data-field="F_Number" data-formatter="orderNumber">工单数量</th>
  59. </tr>
  60. </thead>
  61. <tbody id="tbody"></tbody>
  62. </table>
  63. </div>
  64. </div>
  65. <script src="../js/layui/layui.js"></script>
  66. <script>
  67. var type = 1; // 1专题 2周主题 3月主题
  68. $(document).ready(function() {
  69. initTable();
  70. })
  71. function changeTab(t) {
  72. type = t;
  73. console.log(t)
  74. initTable();
  75. }
  76. function orderNumber(val, row) {
  77. return '<div class="imgs" ><a class="" onclick="viewList(' + row.F_ID + ')" >' + (val == null ? 0 : val) +
  78. '</a></div>';
  79. }
  80. // 查看列表
  81. function viewList(id) {
  82. layer.open({
  83. type: 2,
  84. content: "./orderList.html?themeId=" + id + "&type=" + type, //iframe的url,no代表不显示滚动条
  85. title: '回访管理',
  86. area: ['90%', '90%'], //宽高
  87. });
  88. }
  89. function themeName(val, item) {
  90. var res = val;
  91. if(item.F_Cycle) {
  92. res = item.F_Cycle + '【' + res + '】'
  93. }
  94. return res
  95. }
  96. function initTable() {
  97. //先销毁表格
  98. $('#list').bootstrapTable('destroy');
  99. //初始化表格,动态从服务器加载数据
  100. $("#list").bootstrapTable({
  101. method: "get", //使用get请求到服务器获取数据
  102. url: huayi.config.callcenter_url + "Theme/GetList", //获取数据的Servlet地址
  103. contentType: "application/x-www-form-urlencoded",
  104. striped: true, //表格显示条纹
  105. pagination: true, //启动分页
  106. pageSize: 10, //每页显示的记录数
  107. pageNumber: 1, //当前第几页
  108. pageList: [10, 20, 50, 100], //记录数可选列表
  109. search: false, //是否启用查询
  110. showColumns: false, //显示下拉框勾选要显示的列
  111. showRefresh: false, //显示刷新按钮
  112. sidePagination: "server", //表示服务端请求
  113. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  114. //设置为limit可以获取limit, offset, search, sort, order
  115. queryParamsType: "undefined",
  116. queryParams: function queryParams(params) { //设置查询参数
  117. var param = {
  118. page: params.pageNumber,
  119. pagesize: params.pageSize,
  120. name: $("#name").val(),
  121. token: $.cookie("token")
  122. };
  123. if(type === 1) {
  124. param.type = 2;
  125. param.types = '';
  126. }
  127. if(type === 2) {
  128. param.type = 1;
  129. param.types = 1;
  130. }
  131. if(type === 3) {
  132. param.type = 1;
  133. param.types = 2;
  134. }
  135. return param;
  136. },
  137. onLoadSuccess: function(data) { //加载成功时执行
  138. //layer.msg("加载成功");
  139. },
  140. onLoadError: function() { //加载失败时执行
  141. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  142. }
  143. });
  144. }
  145. //编号
  146. function setCode(val, row, index) {
  147. return index + 1;
  148. }
  149. </script>
  150. </body>
  151. </html>