Нет описания

publicSentimentAnalysis.html 6.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  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 href="../css/WorkOrder/Search.css" rel="stylesheet">
  10. <link href="../css/init.css" rel="stylesheet" />
  11. <script src="../css/laydate/laydate.js"></script>
  12. <style>
  13. table td {
  14. word-break: break-all;
  15. word-wrap: break-word;
  16. }
  17. .Shows {
  18. display: block !important;
  19. }
  20. .complain {
  21. display: none;
  22. }
  23. .toolLeft input {
  24. width: 200px;
  25. }
  26. th {
  27. padding: 5px;
  28. text-align: center;
  29. }
  30. td {
  31. padding: 5px;
  32. }
  33. .Borders {
  34. border: 1px solid #d7d7d7;
  35. }
  36. .daoHang {
  37. margin-bottom: 15px;
  38. }
  39. </style>
  40. </head>
  41. <body class="gray-bg">
  42. <div class="wrapper wrapper-content animated fadeInRight">
  43. <div class="daoHang clearfix">
  44. <div class="dhLeft">
  45. <sapn>
  46. <i class="syIcon"></i>位置:
  47. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  48. <a href="javaScript:;">业务统计</a>&gt;
  49. <a href="" class="nowPosition">舆情分析</a>
  50. </sapn>
  51. </div>
  52. <div class="dhRight">
  53. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  54. </div>
  55. </div>
  56. <div class="Content_box">
  57. <div class="complain Shows">
  58. <div class="toolBar clearfix">
  59. <div class="toolLeft">
  60. 开始时间:
  61. <input class="photo x-color inputs laydate-icon" type="text" id="squeryTime" />
  62. 结束时间:
  63. <input class="photo x-color inputs laydate-icon" type="text" id="equeryTime" />
  64. 来源:
  65. <select class="select_" id="source"></select>
  66. <button class="btns search_1">查询</button>
  67. <a class="btns" id="exportPublicSentiments">导出</a>
  68. <span class="text-danger" style="padding-left: 10px;">默认显示当前月的信息</span>
  69. </div>
  70. </div>
  71. <!--table1-->
  72. <div style="width: 100%;padding: 10px;">
  73. <table id="publicSATable" class="tables" data-row-style="rowStyle" data-query-params="queryParams"
  74. data-pagination="true">
  75. <thead>
  76. <tr>
  77. <th data-field="" data-formatter="serialNumber" data-align="center">序号</th>
  78. <th data-field="TypeName" data-align="center">关键词</th>
  79. <th data-field="Count" data-align="center">统计数量</th>
  80. <th data-field="Sort" data-align="center">排名</th>
  81. </tr>
  82. </thead>
  83. </table>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. <script>
  89. $(document).ready(function () {
  90. laydate.skin('blue');
  91. laydate({
  92. elem: '#squeryTime',
  93. event: 'focus'
  94. });
  95. laydate({
  96. elem: '#equeryTime',
  97. event: 'focus'
  98. });
  99. //来源
  100. LY($("#source"));
  101. initTable();
  102. });
  103. //表格
  104. function initTable() {
  105. $.ajax({
  106. url: huayi.config.callcenter_url + 'DataAnalysis/GetKeyCountReport',
  107. type: 'get',
  108. data: {
  109. sdate: $('#squeryTime').val(),
  110. edate: $('#equeryTime').val(),
  111. source: $("#source").val(),
  112. token: $.cookie("token")
  113. },
  114. dataType: "json",
  115. async: true,
  116. success: function (returnValue) {
  117. //异步获取数据
  118. //debugger;
  119. var resultData = returnValue.data.KeyCountReport;
  120. $('#publicSATable').bootstrapTable('load', resultData);
  121. }
  122. });
  123. $('#publicSATable').bootstrapTable('destroy').bootstrapTable({
  124. striped: true
  125. });
  126. }
  127. //序号
  128. function serialNumber(val, row, index) {
  129. return index + 1;
  130. }
  131. //来源
  132. function LY(obj) {
  133. obj.empty();
  134. obj.append(
  135. '<option selected="selected" value="">请选择</option>'
  136. );
  137. $.getJSON(
  138. huayi.config.callcenter_url +
  139. "Dictionary/GetDicValueListById", {
  140. token: $.cookie("token"),
  141. id: 1,
  142. },
  143. function (data) {
  144. if (data.state.toLowerCase() == "success") {
  145. var content = data.data;
  146. $(content).each(function (i, n) {
  147. $(
  148. "<option value='" +
  149. n.F_ValueId +
  150. "'>" +
  151. n.F_Value +
  152. "</option>"
  153. ).appendTo(obj);
  154. });
  155. }
  156. }
  157. );
  158. }
  159. //搜索
  160. $(".search_1").click(function () {
  161. initTable();
  162. });
  163. //导出
  164. $('#exportPublicSentiments').click(function () {
  165. dcexcelDispath(this);
  166. });
  167. function dcexcelDispath(obj) {
  168. var source = $("#source").val();
  169. var url = huayi.config.callcenter_url + "DataAnalysis/GetKeyCountReport?token=" + $.cookie("token");
  170. url += "&sdate=" + $('#squeryTime').val() + "&edate=" + $('#equeryTime').val() + "&source=" + source + "&isdc=1";
  171. obj.href = url;
  172. }
  173. </script>
  174. </body>
  175. </html>