夏邑12345_前端

keywordsStatisticsScope.html 5.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  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/zTree/zTreeStyle.css" />
  10. <link href="../css/WorkOrder/Search.css" rel="stylesheet">
  11. <link href="../css/init.css" rel="stylesheet" />
  12. <script src="../js/laydate/laydate.js"></script>
  13. <script src="../My97DatePicker/WdatePicker.js"></script>
  14. <style>
  15. table td {
  16. word-break: break-all;
  17. word-wrap: break-word;
  18. }
  19. .ld-service li {
  20. float: left;
  21. font-size: 14px;
  22. color: #000;
  23. padding: 5px 15px;
  24. cursor: pointer;
  25. border-bottom: 1px solid #ccc;
  26. }
  27. .cr-click {
  28. border: 1px solid #ccc;
  29. background-color: #fff;
  30. border-bottom: none !important;
  31. border-bottom-left-radius: 5px;
  32. border-bottom-right-radius: 5px;
  33. }
  34. .Shows {
  35. display: block !important;
  36. }
  37. .complain {
  38. display: none;
  39. }
  40. .toolLeft input{
  41. width: 200px;
  42. }
  43. th {
  44. padding: 5px;
  45. text-align: center;
  46. }
  47. td {
  48. padding: 5px;
  49. }
  50. .Borders {
  51. border: 1px solid #d7d7d7;
  52. }
  53. .cx {
  54. display: block;
  55. }
  56. .daoHang{
  57. margin-bottom: 15px;
  58. }
  59. .keyMargin{
  60. margin-bottom: 0;
  61. }
  62. </style>
  63. </head>
  64. <body class="gray-bg">
  65. <div class="daoHang clearfix">
  66. <div class="dhLeft">
  67. <sapn>
  68. <i class="syIcon"></i>位置:
  69. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  70. <a href="javaScript:;">业务统计</a>&gt;
  71. <a class="nowPosition">关键词统计</a>
  72. </sapn>
  73. </div>
  74. <div class="dhRight">
  75. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  76. </div>
  77. </div>
  78. <div class="wrapper wrapper-content">
  79. <div class="Content_box">
  80. <div class="complain Shows">
  81. <div class="th-top clearfix">
  82. <div class="form-inline th-bar clearfix">
  83. <div class="time-box form-group" >
  84. <i class="tub fa fa-calendar"></i>
  85. <input class="form-control" type="text" id="queryTime" placeholder="请选择时间">
  86. </div>
  87. <div class="form-group tool_bars pull-right">
  88. <button class="btns search_1">查询</button>
  89. </div>
  90. </div>
  91. </div>
  92. <div class="tab-content">
  93. <div class="tab-pane fade active in" id="import_from_file">
  94. <div class="toolBar keyMargin clearfix">
  95. <button class="fr btns" id="print_1">打印预览</button>
  96. </div>
  97. <!--table1-->
  98. <div style="width: 100%;padding: 10px;">
  99. <table id="table1" class="tables" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  100. <thead>
  101. <tr>
  102. <th data-field="keyname" data-align="center">关键词</th>
  103. <th data-field="count" data-align="center">统计数量</th>
  104. <th data-field="sort" data-align="center">排名</th>
  105. </tr>
  106. </thead>
  107. </table>
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. </div>
  114. <script>
  115. var keyWordsIndex = 1;
  116. $(document).ready(function () {
  117. laydate.render({
  118. elem: '#queryTime',
  119. range: '-',
  120. theme: '#00a1cb',
  121. });
  122. initTable();
  123. $('.ul_tab li').click(function(){
  124. keyWordsIndex = $(this).index()+1;
  125. $(document).off('click','#print_'+keyWordsIndex+'',previewKeyWords);
  126. $(document).on('click','#print_'+keyWordsIndex+'',previewKeyWords);
  127. })
  128. });
  129. //表格
  130. function initTable(){
  131. $.ajax({
  132. url: huayi.config.callcenter_url + 'DataAnalysis/GetKeyReportNew',
  133. type: 'get',
  134. data: {
  135. dateParty: $('#queryTime').val().replace(/\s*/g,""),
  136. token: $.cookie("token")
  137. },
  138. dataType: "json",
  139. async: true,
  140. success: function (returnValue) {
  141. //异步获取数据
  142. var resultData1 = returnValue.data.ds;
  143. $('#table1').bootstrapTable('load',resultData1);
  144. }
  145. });
  146. $('#table1').bootstrapTable('destroy').bootstrapTable({striped: true});
  147. }
  148. //代办搜索
  149. $(".search_1").click(function () {
  150. initTable();
  151. });
  152. //打印预览
  153. $(document).on('click','#print_'+keyWordsIndex+'',previewKeyWords);
  154. function previewKeyWords(){
  155. console.log($('#queryTime').val())
  156. layer.open({
  157. type: 2,
  158. content: "../CommonHtml/PrintPreviewKeyWordsScope.html?kWIndex=" + keyWordsIndex +"&Qdate=" + $('#queryTime').val().replace(/\s*/g,""), //iframe的url,no代表不显示滚动条
  159. title: '打印预览',
  160. area: ['80%', '90%'], //宽高
  161. });
  162. }
  163. </script>
  164. </body>
  165. </html>