PingAnYeXianSZCG_Web 前端代码

Tasks.html 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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. <link href="../css/init.css" rel="stylesheet" />
  8. <script src="../Script/Common/huayi.load.js"></script>
  9. <script src="../Script/Common/huayi.config.js"></script>
  10. <link href="../css/Table/table1.css" rel="stylesheet" />
  11. <script src="../css/laydate/laydate.js"></script>
  12. <style>
  13. .LY:hover {
  14. color: #fff;
  15. }
  16. .LY:active {
  17. color: #fff!important;
  18. }
  19. #Task thead td {
  20. color: #fff;
  21. background-color: #1ab394;
  22. text-align: center;
  23. }
  24. .table-head table thead {
  25. width: calc( 100% - 5px);
  26. }
  27. table thead,
  28. tbody tr {
  29. display: table;
  30. width: 100%;
  31. table-layout: fixed;
  32. text-align: center;
  33. }
  34. .table {
  35. margin-bottom: 0;
  36. }
  37. .table-body {
  38. width: 100%;
  39. height: 515px;
  40. overflow-y: scroll;
  41. overflow-x: scroll;
  42. }
  43. </style>
  44. </head>
  45. <body class="gray-bg">
  46. <div class="wrapper wrapper-content animated fadeInRight">
  47. <div class="daoHang clearfix">
  48. <div class="dhLeft">
  49. <sapn><i class="syIcon"></i>位置:
  50. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  51. <a href="javaScript:;">问卷管理</a>&gt;
  52. <a href="" style="color: #000;">问卷报表</a>
  53. </sapn>
  54. </div>
  55. </div>
  56. <div class="th-box">
  57. <div class="th-bar">
  58. <div class="seach-box fr">
  59. <ul>
  60. <li>任务列表:
  61. <select name="" id="cljg" class="x-color select">
  62. </select>
  63. </li>
  64. <li>
  65. <a class="sc_btn seach">搜索</a>
  66. </li>
  67. </ul>
  68. </div>
  69. </div>
  70. </div>
  71. <div style="width: 100%;padding: 10px;">
  72. <div class="table-head">
  73. <table id="Task" class="table table-hover table-striped table-bordered table-condensed">
  74. <colgroup>
  75. <col style="width: 80px;" />
  76. <col/>
  77. </colgroup>
  78. <thead>
  79. <tr>
  80. <td>问题</td>
  81. <td>选项</td>
  82. <td>数量</td>
  83. <td>比例</td>
  84. </tr>
  85. </thead>
  86. </table>
  87. </div>
  88. <div class="table-body">
  89. <table class="thTable hwbb table table-hover table-striped table-bordered table-condensed">
  90. <colgroup>
  91. <col style="width: 80px;" />
  92. <col/>
  93. </colgroup>
  94. <tbody>
  95. </tbody>
  96. </table>
  97. </div>
  98. <div>
  99. </div>
  100. </div>
  101. </div>
  102. <script>
  103. $(document).ready(function() {
  104. Task();
  105. $(".sc_btn").click(function() {
  106. GetColumnList();
  107. Number()
  108. })
  109. ///查询条件中获取任务列表
  110. function Task() {
  111. $.ajax({
  112. type: "get",
  113. url: huayi.config.callcenter_url + "Questionnaire/GetTaskList",
  114. dataType: 'json',
  115. data: {
  116. token: $.cookie("token")
  117. },
  118. async: true,
  119. success: function(data) {
  120. var Count = data.data;
  121. $("<option value=''>--全部--</option>").appendTo($("#cljg"));
  122. for(var i = 0; i < Count.length; i++) {
  123. console.log(Count[i].F_UserName);
  124. $("<option value='" + Count[i].F_TaskName + "'>" + Count[i].F_TaskName + "</option>").appendTo($("#cljg"));
  125. }
  126. console.log(Count)
  127. }
  128. });
  129. }
  130. //任务查询获取表头
  131. function GetColumnList() {
  132. $("#Task tbody").empty();
  133. $.ajax({
  134. type: "get",
  135. url: huayi.config.callcenter_url + "/Questionnaire/GetReport?",
  136. dataType: 'json',
  137. data: {
  138. taskname: $("#cljg").val(),
  139. token: $.cookie("token")
  140. },
  141. async: true,
  142. success: function(data) {
  143. var Count = data.data;
  144. for(var i = 0; i < Count.length; i++) {
  145. $('<tr><td>' + Count[i].wenti + ' </td>' +
  146. '<td> ' + Count[i].xuanxiang + ' </td>' +
  147. '<td> ' + Count[i].shuliang + ' </td>' +
  148. '<td> ' + Count[i].bili + ' </td>' +
  149. '</tr>').appendTo(".hwbb tbody");
  150. }
  151. console.log(Count)
  152. }
  153. });
  154. }
  155. //获取数据
  156. function Number(){
  157. $.ajax({
  158. type: "get",
  159. url: huayi.config.callcenter_url + "Questionnaire/GetDataList",
  160. dataType: 'json',
  161. data: {
  162. taskname: $("#cljg").val(),
  163. token: $.cookie("token")
  164. },
  165. async: true,
  166. success: function(data) {
  167. var Count = data.data;
  168. console.log(Count)
  169. }
  170. });
  171. }
  172. })
  173. //音频
  174. </script>
  175. </body>
  176. </html>