Sin descripción

resultStatistics.html 7.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  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. <style>
  12. .LY:hover {
  13. color: #fff;
  14. }
  15. .LY:active {
  16. color: #fff!important;
  17. }
  18. #Task thead td {
  19. color: #fff;
  20. background-color: #00a1cb;
  21. text-align: center;
  22. }
  23. .table-head table thead {
  24. width: calc( 100% - 5px);
  25. }
  26. table thead,
  27. tbody tr {
  28. /*display: table;*/
  29. width: 100%;
  30. table-layout: fixed;
  31. text-align: center;
  32. }
  33. .table {
  34. margin-bottom: 0;
  35. }
  36. .table-body {
  37. width: 100%;
  38. height: 515px;
  39. overflow-y: scroll;
  40. overflow-x: scroll;
  41. }
  42. #ss_kssj{
  43. width: 220px;
  44. font-size: 14px;
  45. }
  46. .tub{
  47. position: absolute;
  48. top: 10px;
  49. right: 10px ;
  50. color: #00a1cb;
  51. }
  52. .sc_btn{
  53. padding: 8px 10px;
  54. line-height: 30px;
  55. }
  56. </style>
  57. </head>
  58. <body class="gray-bg">
  59. <div class="wrapper wrapper-content animated fadeInRight">
  60. <div class="daoHang clearfix">
  61. <div class="dhLeft">
  62. <sapn><i class="syIcon"></i>位置:
  63. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  64. <a href="javaScript:;">问卷调查</a>&gt;
  65. <a href="" style="color: #000;">问卷结果统计</a>
  66. </sapn>
  67. </div>
  68. </div>
  69. <div class="th-box clearfix">
  70. <div class="th-bar">
  71. <div class="seach-box fl">
  72. <ul>
  73. <li style="position: relative;">
  74. 时间:
  75. <i class="tub fa fa-calendar"></i>
  76. <input type="text" id="ss_kssj" class="photo laydate-icon" placeholder="请选择开始时间和结束时间" />
  77. </li>
  78. <li>任务列表:
  79. <select id="cljg" class="x-color select"></select>
  80. </li>
  81. <li>问题列表:
  82. <select id="Wt" class="x-color select"></select>
  83. </li>
  84. <li>乡镇或单位:
  85. <select id="country" class="x-color select">
  86. <option value="">--全部--</option>
  87. </select>
  88. </li>
  89. <li>
  90. <a class="sc_btn seach">搜索</a>
  91. </li>
  92. <li>
  93. <a class="sc_btn export">导出</a>
  94. </li>
  95. </ul>
  96. </div>
  97. </div>
  98. </div>
  99. <div style="width: 100%;padding: 10px;">
  100. <div class="table-head">
  101. <table id="Task" class="table table-hover table-striped table-bordered table-condensed">
  102. <!--<colgroup>
  103. <col style="width: 80px;" />
  104. <col/>
  105. </colgroup>-->
  106. <thead>
  107. <tr>
  108. <td>问题</td>
  109. <td>选项</td>
  110. <td>数量</td>
  111. <td>比例</td>
  112. </tr>
  113. </thead>
  114. </table>
  115. </div>
  116. <div class="table-body">
  117. <table class="thTable hwbb table table-hover table-striped table-bordered table-condensed">
  118. <colgroup>
  119. <col style="width: 80px;" />
  120. <col/>
  121. </colgroup>
  122. <tbody>
  123. </tbody>
  124. </table>
  125. </div>
  126. </div>
  127. </div>
  128. <script src="../js/laydate/laydate.js"></script>
  129. <script>
  130. $(document).ready(function() {
  131. // taskSelect();
  132. // questionnaireSelect();
  133. // getCountry();
  134. laydate.render({
  135. elem: '#ss_kssj',
  136. range: '~',
  137. //value: st,
  138. calendar: true,
  139. theme: '#00a1cb',
  140. });
  141. $(".sc_btn").click(function() {
  142. // getDataList();
  143. })
  144. //导出功能
  145. $('.export').click(function() {
  146. dcexcel(this);
  147. })
  148. });
  149. //查询条件中获取任务列表
  150. function taskSelect() {
  151. $.ajax({
  152. type: "get",
  153. url: huayi.config.callcenter_url + "Questionnaire/GetTaskList",
  154. dataType: 'json',
  155. data: {
  156. token: $.cookie("token")
  157. },
  158. async: true,
  159. success: function(data) {
  160. if(data.state.toLowerCase() == "success") {
  161. var Count = data.data;
  162. if(Count.length > 0) {
  163. //$("<option value=''>--全部--</option>").appendTo($("#cljg"));
  164. for(var i = 0; i < Count.length; i++) {
  165. $("<option value='" + Count[i].F_TaskID + "'>" + Count[i].F_TaskName + "</option>").appendTo($("#cljg"));
  166. }
  167. } else {
  168. $("<option value=''>--暂无数据--</option>").appendTo($("#cljg"));
  169. }
  170. }
  171. }
  172. });
  173. }
  174. ///查询条件问题任务列表
  175. function questionnaireSelect() {
  176. $.ajax({
  177. type: "get",
  178. url: huayi.config.callcenter_url + "Questionnaire/GetQList",
  179. dataType: 'json',
  180. data: {
  181. token: $.cookie("token")
  182. },
  183. async: true,
  184. success: function(data) {
  185. if(data.state.toLowerCase() == "success") {
  186. var Count = data.data;
  187. // $("<option value=''>--全部--</option>").appendTo($("#Wt"));
  188. for(var i = 0; i < Count.length; i++) {
  189. $("<option value='" + Count[i].F_QuestionId + "'>" + Count[i].F_Title + "</option>").appendTo($("#Wt"));
  190. }
  191. } else {
  192. $("<option value=''>--暂无数据--</option>").appendTo($("#Wt"));
  193. }
  194. }
  195. })
  196. .then(function(){
  197. // getDataList();
  198. });
  199. }
  200. //获取乡镇或单位下拉
  201. function getCountry(){
  202. $.ajax({
  203. type: "get",
  204. url: huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag",
  205. dataType: 'json',
  206. data: {
  207. flag: 'JBDW',
  208. token: $.cookie("token")
  209. },
  210. async: true,
  211. success: function(data) {
  212. if(data.state.toLowerCase() == "success") {
  213. var res = data.data;
  214. for(var i = 0; i < res.length; i++) {
  215. $('<option value="'+ res[i].F_DictionaryValueId +'">'+ res[i].F_Name +'</option>').appendTo($("#country"));
  216. }
  217. }else{
  218. $("<option value=''>--暂无数据--</option>").appendTo($("#country"));
  219. }
  220. }
  221. });
  222. }
  223. //获取数据
  224. function getDataList() {
  225. $.ajax({
  226. type: "get",
  227. url: huayi.config.callcenter_url + "CallOutReport/GetReport",
  228. dataType: 'json',
  229. data: {
  230. TaskID: $("#cljg").val(), //string 是 任务id
  231. quesid: $('#Wt').val(), // string 是 问题id
  232. countryid: $('#country').val(), // string 否 乡镇或单位id
  233. sdate: $("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[0],// string 否 开始时间
  234. edate: $("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[1],//string 否 结束时间
  235. token: $.cookie("token")
  236. },
  237. async: true,
  238. success: function(data) {
  239. $(".thTable tbody").empty();
  240. if(data.state.toLowerCase() == "success") {
  241. var Count = data.data;
  242. if(Count.length > 0) {
  243. for(var i = 0; i < Count.length; i++) {
  244. $('<tr><td>' + Count[i].wenti + ' </td>' +
  245. '<td> ' + Count[i].xuanxiang + ' </td>' +
  246. '<td> ' + Count[i].shuliang + ' </td>' +
  247. '<td> ' + Count[i].bili + ' </td>' +
  248. '</tr>').appendTo(".hwbb tbody");
  249. }
  250. } else {
  251. $(".thTable tbody").html('<p class="text-center">没有找到您想要的记录呢!我会努力的...</p>');
  252. }
  253. } else {
  254. $(".thTable tbody").html('<p class="text-center">没有找到您想要的记录呢!我会努力的...</p>');
  255. }
  256. }
  257. });
  258. }
  259. function dcexcel(obj) {
  260. var url = huayi.config.callcenter_url + "CallOutReport/GetReportExpt?token=" + $.cookie("token");
  261. url += "&TaskID=" + $("#cljg").val();
  262. url += "&quesid=" + $("#Wt").val();
  263. url += "&countryid=" + $("#country").val();
  264. url += "&sdate=" + ($("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[0]);// string 否 开始时间
  265. url += "&edate=" + ($("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[1]);// string 否 开始时间
  266. obj.href = url;
  267. }
  268. </script>
  269. </body>
  270. </html>