永城市12345 (县级市)- 来源于虞城县12345 - 所有县级统一API

publicSentimentAnalysis.html 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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="../js/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. .th-bar{
  40. height: initial;
  41. }
  42. </style>
  43. </head>
  44. <body class="gray-bg">
  45. <div class="daoHang clearfix">
  46. <div class="dhLeft">
  47. <sapn>
  48. <i class="syIcon"></i>位置:
  49. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  50. <a href="javaScript:;">业务统计</a>&gt;
  51. <a class="nowPosition">舆情分析</a>
  52. </sapn>
  53. </div>
  54. <div class="dhRight">
  55. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  56. </div>
  57. </div>
  58. <div class="wrapper wrapper-content">
  59. <div class="Content_box">
  60. <div class="complain Shows">
  61. <div class="th-top clearfix">
  62. <div class="form-inline th-bar clearfix">
  63. <div class="time-box form-group" >
  64. <i class="tub fa fa-calendar"></i>
  65. <input class="form-control" type="text" id="startTime" placeholder="请选择时间">
  66. </div>
  67. <div class="time-box form-group" >
  68. <span class="text-danger" style="padding-left: 10px;line-height: 30px;">默认显示当前月的信息</span>
  69. </div>
  70. <div class="form-group tool_bars pull-right">
  71. <botton class="btns search_1">搜索</botton>
  72. <a class="btns export" id="exportPublicSentiments">导出</a>
  73. </div>
  74. </div>
  75. </div>
  76. <!--table1-->
  77. <div style="width: 100%;padding: 10px;">
  78. <table id="publicSATable" class="tables" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  79. <thead>
  80. <tr>
  81. <th data-field="TypeName" data-align="center">关键词</th>
  82. <th data-field="Count" data-align="center">统计数量</th>
  83. <th data-field="Sort" data-align="center">排名</th>
  84. </tr>
  85. </thead>
  86. </table>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. <script>
  92. $(document).ready(function () {
  93. laydate.render({
  94. elem: '#startTime',
  95. range: '~',
  96. theme: '#00a1cb',
  97. });
  98. initTable();
  99. });
  100. //表格
  101. function initTable() {
  102. $.ajax({
  103. url: huayi.config.callcenter_url + 'DataAnalysis/GetKeyCountReport',
  104. type: 'get',
  105. data: {
  106. sdate: ($('#startTime').val() ? $('#startTime').val().split('~')[0]:""),
  107. edate: ($('#startTime').val() ? $('#startTime').val().split('~')[1]:""),
  108. token: $.cookie("token")
  109. },
  110. dataType: "json",
  111. async: true,
  112. success: function (returnValue) {
  113. //异步获取数据
  114. //debugger;
  115. var resultData = returnValue.data.KeyCountReport;
  116. $('#publicSATable').bootstrapTable('load', resultData);
  117. }
  118. });
  119. $('#publicSATable').bootstrapTable('destroy').bootstrapTable({ striped: true });
  120. }
  121. //搜索
  122. $(".search_1").click(function () {
  123. initTable();
  124. });
  125. //导出
  126. $('#exportPublicSentiments').click(function () {
  127. dcexcelDispath(this);
  128. });
  129. function dcexcelDispath(obj) {
  130. var url = huayi.config.callcenter_url + "DataAnalysis/GetKeyCountReport?token=" + $.cookie("token");
  131. url += "&sdate=" + ($('#startTime').val() ? $('#startTime').val().split('~')[0]:"") + "&edate=" + ($('#startTime').val() ? $('#startTime').val().split('~')[1]:"") + "&isdc=1";
  132. obj.href = url;
  133. }
  134. </script>
  135. </body>
  136. </html>