12345市长热线标准版-前端

riLiuLiang.html 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <script src="../Script/Common/huayi.load.js"></script>
  7. <script src="../Script/Common/huayi.config.js"></script>
  8. <link href="../css/init.css" rel="stylesheet" />
  9. <script src="../css/laydate/laydate.js"></script>
  10. <link rel="stylesheet" href="../css/init.css" />
  11. <title>日流量统计</title>
  12. </head>
  13. <style>
  14. @font-face {
  15. font-family: 'iconfont';
  16. src: url('fonts/iconfont.eot');
  17. /* IE9*/
  18. src: url('fonts/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
  19. url('fonts/iconfont.woff') format('woff'), /* chrome、firefox */
  20. url('fonts/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
  21. url('fonts/iconfont.svg#iconfont') format('svg');
  22. /* iOS 4.1- */
  23. }
  24. .iconfont {
  25. font-family: "iconfont";
  26. font-style: normal;
  27. }
  28. ul,
  29. li,
  30. ol {
  31. list-style: none;
  32. }
  33. a {
  34. text-decoration: none
  35. }
  36. .clearfix:after {
  37. content: "";
  38. display: block;
  39. clear: both;
  40. }
  41. .hut-top{
  42. background: #f3f3f4;
  43. /*height: 60px;*/
  44. padding: 10px 20px;
  45. }
  46. .hut-tcon{
  47. float: right;
  48. }
  49. .dhLeft a{
  50. color: #999;
  51. }
  52. .huTable thead td{
  53. background: #00a1cb!important;
  54. color: #fff!important;
  55. }
  56. </style>
  57. <body class="gray-bg" style="background: #fefefe;">
  58. <div class="hu-total wrapper wrapper-content animated fadeInRight">
  59. <div class="daoHang clearfix">
  60. <div class="dhLeft">
  61. <sapn><i class="syIcon"></i>位置:<a id="ReIndex" href="javaScript:;">首页</a>&gt;<a href="javaScript:;">报表管理</a>&gt;<a href="" class="nowPosition">日流量统计</a></sapn>
  62. </div>
  63. <div class="dhRight"><a href="" title="刷新"><i class="fa fa-refresh"></i></a></div>
  64. </div>
  65. <div class="toolBar clearfix">
  66. <div class="toolRight" style="float: right;">
  67. <span>选择日期:</span>
  68. <!--<select name="" id="chooseTime" class="select_">-->
  69. <input type="text" class="laydate-icon" id="chooseTime" />
  70. </select>
  71. <button class="btns sear">搜索</button>
  72. <!--<a class="btns export">导出</a>-->
  73. </div>
  74. </div>
  75. <div class="hu-content">
  76. <div class="hu-con-right">
  77. <div id="huData" style="width:100%; height: 500px;">
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. <script src="../js/echarts.common.min.js"></script>
  83. <script>
  84. var myChart;
  85. var token = $.cookie("token");
  86. $(document).ready(function(){
  87. //返回首页
  88. $('#ReIndex').click(function(){
  89. top.home_index();
  90. })
  91. laydate.skin('blue');
  92. laydate({
  93. elem: '#chooseTime',
  94. event: 'focus'
  95. });
  96. //图形
  97. myChart = echarts.init(document.getElementById('huData'));
  98. myChart.setOption({
  99. color: ['#00a1cb'],
  100. tooltip: {
  101. trigger: 'axis',
  102. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  103. type: 'line' // 默认为直线,可选为:'line' | 'shadow'
  104. }
  105. },
  106. toolbox: {
  107. show: true,
  108. },
  109. calculable: true,
  110. xAxis: [{
  111. type: 'category',
  112. name: '时',
  113. splitLine: {
  114. show: false
  115. }, //去除网格线
  116. data: [],
  117. axisTick: {
  118. alignWithLabel: true
  119. }
  120. }],
  121. yAxis: [{
  122. type: 'value',
  123. name: '数量',
  124. nameLocation: 'end',
  125. splitLine: {
  126. show: false
  127. } //去除网格线
  128. }],
  129. series: [{
  130. name: '流量',
  131. type: 'bar',
  132. barWidth: 20, //图形宽度
  133. data:[],
  134. itemStyle: {
  135. normal: {
  136. label: {
  137. show: true,
  138. textStyle: {
  139. color: '#FF9800' //顶部数据颜色
  140. }
  141. }
  142. }
  143. },
  144. label: {
  145. normal: {
  146. show: true,
  147. position: 'top' //顶部数据显示位置
  148. }
  149. }
  150. }
  151. ]
  152. })
  153. Ajax();
  154. function Ajax(){
  155. $.ajax({
  156. type:"get",
  157. url: huayi.config.callcenter_url + "FlowAnalysis/GetDayCount",
  158. async:true,
  159. dataType:'json',
  160. data:{
  161. token:token,
  162. date:$('#chooseTime').val()
  163. },
  164. success:function(data){
  165. if(data.state.toLowerCase()=="success"){
  166. myChart.setOption({
  167. xAxis:[{
  168. data: data.data.hours
  169. }],
  170. series:[{
  171. data:data.data.counts
  172. }]
  173. });
  174. }
  175. }
  176. });
  177. }
  178. //搜索事件
  179. $('.sear').click(function(){
  180. Ajax();
  181. })
  182. })
  183. </script>
  184. </body>
  185. </html>