Нет описания

resultStatistics.html 8.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  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 th {
  19. color: #fff;
  20. background-color: #293846;
  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: #293846;
  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">
  83. <option>居住在哪里</option>
  84. <option>您的年龄</option>
  85. </select>
  86. </li>
  87. <li>乡镇或单位:
  88. <select id="country" class="x-color select">
  89. <option value="">--全部--</option>
  90. </select>
  91. </li>
  92. <li>
  93. <a class="sc_btn seach">搜索</a>
  94. </li>
  95. <li>
  96. <a class="sc_btn export" href="./jieguotongji.xlsx" download="./jieguotongji.xlsx">导出</a>
  97. </li>
  98. </ul>
  99. </div>
  100. </div>
  101. </div>
  102. <div style="width: 100%;padding: 10px;">
  103. <div class="table-head">
  104. <table id="Task" class="table table-hover table-striped table-bordered table-condensed">
  105. <!--<colgroup>
  106. <col style="width: 80px;" />
  107. <col/>
  108. </colgroup>-->
  109. <thead>
  110. <tr>
  111. <th>问题</th>
  112. <th>选项</th>
  113. <th>数量</th>
  114. <th>比例</th>
  115. </tr>
  116. <tr>
  117. <td>居住在哪里</td>
  118. <td>平顶山市</td>
  119. <td>100</td>
  120. <td>70%</td>
  121. </tr>
  122. <tr>
  123. <td>您的年龄</td>
  124. <td>20</td>
  125. <td>5</td>
  126. <td>80%</td>
  127. </tr>
  128. </thead>
  129. </table>
  130. </div>
  131. <div class="table-body">
  132. <table class="thTable hwbb table table-hover table-striped table-bordered table-condensed">
  133. <colgroup>
  134. <col style="width: 80px;" />
  135. <col/>
  136. </colgroup>
  137. <tbody>
  138. </tbody>
  139. </table>
  140. </div>
  141. </div>
  142. </div>
  143. <script src="../js/laydate/laydate.js"></script>
  144. <script>
  145. $(document).ready(function() {
  146. // taskSelect();
  147. // questionnaireSelect();
  148. // getCountry();
  149. laydate.render({
  150. elem: '#ss_kssj',
  151. range: '~',
  152. //value: st,
  153. calendar: true,
  154. theme: '#293846',
  155. });
  156. $(".sc_btn").click(function() {
  157. // getDataList();
  158. })
  159. //导出功能
  160. $('.export').click(function() {
  161. dcexcel(this);
  162. })
  163. });
  164. //查询条件中获取任务列表
  165. function taskSelect() {
  166. $.ajax({
  167. type: "get",
  168. url: huayi.config.callcenter_url + "Questionnaire/GetTaskList",
  169. dataType: 'json',
  170. data: {
  171. token: $.cookie("token")
  172. },
  173. async: true,
  174. success: function(data) {
  175. if(data.state.toLowerCase() == "success") {
  176. var Count = data.data;
  177. if(Count.length > 0) {
  178. //$("<option value=''>--全部--</option>").appendTo($("#cljg"));
  179. for(var i = 0; i < Count.length; i++) {
  180. $("<option value='" + Count[i].F_TaskID + "'>" + Count[i].F_TaskName + "</option>").appendTo($("#cljg"));
  181. }
  182. } else {
  183. $("<option value=''>--暂无数据--</option>").appendTo($("#cljg"));
  184. }
  185. }
  186. }
  187. });
  188. }
  189. ///查询条件问题任务列表
  190. function questionnaireSelect() {
  191. $.ajax({
  192. type: "get",
  193. url: huayi.config.callcenter_url + "Questionnaire/GetQList",
  194. dataType: 'json',
  195. data: {
  196. token: $.cookie("token")
  197. },
  198. async: true,
  199. success: function(data) {
  200. if(data.state.toLowerCase() == "success") {
  201. var Count = data.data;
  202. // $("<option value=''>--全部--</option>").appendTo($("#Wt"));
  203. for(var i = 0; i < Count.length; i++) {
  204. $("<option value='" + Count[i].F_QuestionId + "'>" + Count[i].F_Title + "</option>").appendTo($("#Wt"));
  205. }
  206. } else {
  207. $("<option value=''>--暂无数据--</option>").appendTo($("#Wt"));
  208. }
  209. }
  210. })
  211. .then(function(){
  212. // getDataList();
  213. });
  214. }
  215. //获取乡镇或单位下拉
  216. function getCountry(){
  217. $.ajax({
  218. type: "get",
  219. url: huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag",
  220. dataType: 'json',
  221. data: {
  222. flag: 'JBDW',
  223. token: $.cookie("token")
  224. },
  225. async: true,
  226. success: function(data) {
  227. if(data.state.toLowerCase() == "success") {
  228. var res = data.data;
  229. for(var i = 0; i < res.length; i++) {
  230. $('<option value="'+ res[i].F_DictionaryValueId +'">'+ res[i].F_Name +'</option>').appendTo($("#country"));
  231. }
  232. }else{
  233. $("<option value=''>--暂无数据--</option>").appendTo($("#country"));
  234. }
  235. }
  236. });
  237. }
  238. //获取数据
  239. function getDataList() {
  240. $.ajax({
  241. type: "get",
  242. url: huayi.config.callcenter_url + "CallOutReport/GetReport",
  243. dataType: 'json',
  244. data: {
  245. TaskID: $("#cljg").val(), //string 是 任务id
  246. quesid: $('#Wt').val(), // string 是 问题id
  247. countryid: $('#country').val(), // string 否 乡镇或单位id
  248. sdate: $("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[0],// string 否 开始时间
  249. edate: $("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[1],//string 否 结束时间
  250. token: $.cookie("token")
  251. },
  252. async: true,
  253. success: function(data) {
  254. $(".thTable tbody").empty();
  255. if(data.state.toLowerCase() == "success") {
  256. var Count = data.data;
  257. if(Count.length > 0) {
  258. for(var i = 0; i < Count.length; i++) {
  259. $('<tr><td>' + Count[i].wenti + ' </td>' +
  260. '<td> ' + Count[i].xuanxiang + ' </td>' +
  261. '<td> ' + Count[i].shuliang + ' </td>' +
  262. '<td> ' + Count[i].bili + ' </td>' +
  263. '</tr>').appendTo(".hwbb tbody");
  264. }
  265. } else {
  266. $(".thTable tbody").html('<p class="text-center">没有找到您想要的记录呢!我会努力的...</p>');
  267. }
  268. } else {
  269. $(".thTable tbody").html('<p class="text-center">没有找到您想要的记录呢!我会努力的...</p>');
  270. }
  271. }
  272. });
  273. }
  274. function dcexcel(obj) {
  275. var url='./jieguotongji.xlsx';
  276. obj.herf=url;
  277. // var url = huayi.config.callcenter_url + "CallOutReport/GetReportExpt?token=" + $.cookie("token");
  278. // url += "&TaskID=" + $("#cljg").val();
  279. // url += "&quesid=" + $("#Wt").val();
  280. // url += "&countryid=" + $("#country").val();
  281. // url += "&sdate=" + ($("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[0]);// string 否 开始时间
  282. // url += "&edate=" + ($("#ss_kssj").val() && $("#ss_kssj").val().split(' ~ ')[1]);// string 否 开始时间
  283. // obj.href = url;
  284. }
  285. </script>
  286. </body>
  287. </html>