安图前端代码

zxSatisfaction.html 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>坐席满意度评价</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <script src="../Script/Common/huayi.load.js"></script>
  8. <script src="../Script/Common/huayi.config.js"></script>
  9. <link rel="stylesheet" href="../js/layui/css/layui.css" />
  10. <link rel="stylesheet" href="../css/init.css" />
  11. <style>
  12. .toolBox {
  13. background: #f3f3f4;
  14. height: 60px;
  15. padding: 10px 20px;
  16. }
  17. .th-content {
  18. width: 90%;
  19. margin: 0 auto;
  20. }
  21. </style>
  22. </head>
  23. <body class="gray-bg" style="background: #fefefe;">
  24. <div class="daoHang clearfix">
  25. <div class="dhLeft">
  26. <sapn><i class="syIcon"></i>位置:
  27. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  28. <a href="javaScript:;">报表管理</a>&gt;
  29. <a href="" style="color: #000;">坐席满意度评价</a>
  30. </sapn>
  31. </div>
  32. <div class="dhRight">
  33. <a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
  34. </div>
  35. </div>
  36. <div class="toolBox">
  37. <div class="th-bar clearfix">
  38. <div class="pull-right">
  39. <div class="form-inline">
  40. <div class="time-box form-group">
  41. <i class="tub fa fa-calendar"></i>
  42. <input class="form-control" type="text" id="startTime" placeholder="请选择起始时间" style="width: 228px;">
  43. </div>
  44. <div class="pull-right">
  45. <button class="btns search">搜索</button>
  46. <a href="" class="btns export">导出</a>
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. <div class="th-content">
  53. <table class="layui-hide" id="t_callTotal"></table>
  54. </div>
  55. <script src="../js/layui/layui.js"></script>
  56. <script>
  57. var token = $.cookie("token");
  58. var stime = ''; //开始时间
  59. var endtime = ''; //结束时间
  60. $(document).ready(function() {
  61. layui.use('laydate', function() {
  62. var laydate = layui.laydate;
  63. //日期
  64. laydate.render({
  65. elem: '#startTime',
  66. range: '~',
  67. theme: '#1ab394',
  68. calendar: 'true'
  69. });
  70. });
  71. getTableDataList(); //获取表格数据
  72. /*搜索*/
  73. $(".search").click(function() {
  74. stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
  75. endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
  76. getTableDataList(); //获取表格数据
  77. })
  78. //导出
  79. $('.export').click(function() {
  80. stime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[0];
  81. endtime = $('#startTime').val() && $('#startTime').val().split(' ~ ')[1];
  82. dcexcel(this);
  83. });
  84. });
  85. function dcexcel(obj) {
  86. var url = huayi.config.callcenter_url + "ZuoXiManYiDu/ExptList?token=" + token;
  87. url += "&stime=" + stime + "&endtime=" + endtime;
  88. obj.href = url;
  89. }
  90. //加载表格
  91. function getTableDataList() {
  92. layui.use('table', function() {
  93. var table = layui.table;
  94. //方法级渲染
  95. table.render({
  96. elem: '#t_callTotal',
  97. url: huayi.config.callcenter_url + "ZuoXiManYiDu/GetDataList",
  98. method: 'get', //如果无需自定义HTTP类型,可不加该参数
  99. skin: 'row', //line (行边框风格) row (列边框风格) nob (无边框风格)
  100. even: true, //开启隔行背景
  101. size: 'lg', //sm,lg尺寸的表格
  102. cellMinWidth: 160,
  103. where: {
  104. stime: stime,
  105. endtime: endtime,
  106. token: token,
  107. }, //如果无需传递额外参数,可不加该参数
  108. //request: {}, //如果无需自定义请求参数,可不加该参数
  109. response: {
  110. statusName: 'state', //数据状态的字段名称,默认:code
  111. statusCode: 'success', //成功的状态码,默认:0
  112. msgName: 'message', //状态信息的字段名称,默认:msg
  113. //countName: 'total', //数据总数的字段名称,默认:count
  114. //dataName: 'rows', //数据列表的字段名称,默认:data
  115. }, //如果无需自定义数据响应名称,可不加该参数
  116. /* page: true, //是否显示分页
  117. limits: [5, 20, 50, 100],
  118. limit: 5, //每页默认显示的数量
  119. request: {
  120. pageName: 'pageNumber', //页码的参数名称,默认:page
  121. limitName: 'pageSize' //每页数据量的参数名,默认:limit
  122. },
  123. */ cols: [
  124. [{
  125. field: '坐席姓名',
  126. title: '坐席姓名',
  127. align: 'center',
  128. fixed: true,
  129. //sort: true,
  130. width: 150,
  131. },
  132. {
  133. field: '非常满意',
  134. title: '非常满意',
  135. align: 'center',
  136. },
  137. {
  138. field: '非常满意占比',
  139. title: '非常满意占比',
  140. align: 'center',
  141. templet: function(d){
  142. return Number(d.非常满意占比 * 100).toFixed(2) + '%';
  143. },
  144. sort: true,
  145. },
  146. {
  147. field: '基本满意',
  148. title: '基本满意',
  149. align: 'center',
  150. },
  151. {
  152. field: '基本满意占比',
  153. title: '基本满意占比',
  154. align: 'center',
  155. templet: function(d){
  156. return Number(d.基本满意占比 * 100).toFixed(2) + '%';
  157. },
  158. sort: true,
  159. },
  160. {
  161. field: '不满意',
  162. title: '不满意',
  163. align: 'center',
  164. },
  165. {
  166. field: '不满意占比',
  167. title: '不满意占比',
  168. align: 'center',
  169. templet: function(d){
  170. return Number(d.不满意占比 * 100).toFixed(2) + '%';
  171. },
  172. sort: true,
  173. },
  174. {
  175. field: '未评价',
  176. title: '未评价',
  177. align: 'center',
  178. },
  179. {
  180. field: '未评价占比',
  181. title: '未评价占比',
  182. align: 'center',
  183. templet: function(d){
  184. return Number(d.未评价占比 * 100).toFixed(2) + '%';
  185. },
  186. sort: true,
  187. },
  188. ]
  189. ],
  190. height: 'full-150'
  191. });
  192. });
  193. }
  194. </script>
  195. </body>
  196. </html>