data.html 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title></title>
  6. <meta name="apple-mobile-web-app-capable" content="yes">
  7. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  8. <meta name="format-detection" content="telephone=no">
  9. <script>!function(){var e;e=function(e){return function(e,t){function i(){var t=r.getBoundingClientRect().width;t/m>540&&(t=540*m);var i=t/16;r.style.fontSize=i+"px",d.rem=e.rem=i}var a,n=e.document,r=n.documentElement,o=n.querySelector('meta[name="viewport"]'),l=n.querySelector('meta[name="flexible"]'),m=0,s=0,d=t.flexible||(t.flexible={});if(o){console.warn("将根据已有的meta标签来设置缩放比例");var c=o.getAttribute("content").match(/initial\-scale=([\d\.]+)/);c&&(s=parseFloat(c[1]),m=parseInt(1/s))}else if(l){var p=l.getAttribute("content");if(p){var u=p.match(/initial\-dpr=([\d\.]+)/),f=p.match(/maximum\-dpr=([\d\.]+)/);u&&(m=parseFloat(u[1]),s=parseFloat((1/m).toFixed(2))),f&&(m=parseFloat(f[1]),s=parseFloat((1/m).toFixed(2)))}}if(!m&&!s){var v=(e.navigator.appVersion.match(/android/gi),e.navigator.appVersion.match(/iphone/gi)),h=e.devicePixelRatio;m=v?h>=3&&(!m||m>=3)?3:h>=2&&(!m||m>=2)?2:1:1,s=1/m}if(r.setAttribute("data-dpr",m),!o)if(o=n.createElement("meta"),o.setAttribute("name","viewport"),o.setAttribute("content","initial-scale="+s+", maximum-scale="+s+", minimum-scale="+s+", user-scalable=no"),r.firstElementChild)r.firstElementChild.appendChild(o);else{var x=n.createElement("div");x.appendChild(o),n.write(x.innerHTML)}e.addEventListener("resize",function(){clearTimeout(a),a=setTimeout(i,300)},!1),e.addEventListener("pageshow",function(e){e.persisted&&(clearTimeout(a),a=setTimeout(i,300))},!1),"complete"===n.readyState?n.body.style.fontSize=12*m+"px":n.addEventListener("DOMContentLoaded",function(e){n.body.style.fontSize=12*m+"px"},!1),i(),d.dpr=e.dpr=m,d.refreshRem=i,d.rem2px=function(e){var t=parseFloat(e)*this.rem;return"string"==typeof e&&e.match(/rem$/)&&(t+="px"),t},d.px2rem=function(e){var t=parseFloat(e)/this.rem;return"string"==typeof e&&e.match(/px$/)&&(t+="rem"),t}}(window,window.lib||(window.lib={})),e}()}();
  10. </script>
  11. <link rel="stylesheet" type="text/css" href="../build/p/my/style.css">
  12. </head>
  13. <style>
  14. #search_method,#search_time
  15. {
  16. display:none;
  17. }
  18. </style>
  19. <body>
  20. <div class="header">
  21. <ul class="nav clearfix">
  22. <li class="active"><a href="" title="">设备名称</a></li>
  23. </ul>
  24. <a href="index.html" class="back"></a>
  25. </div>
  26. <div id="device_data" style="display:none;"></div>
  27. <div class="container equip data">
  28. <div class="title">数据统计</div>
  29. <div id="container" style="min-widths:700px;height:400px;margin-bottom:0px;"></div>
  30. <div class="show_select">
  31. <select class="start-time">
  32. <option>开始时间</option>
  33. </select>
  34. <select class="end-time">
  35. <option>结束时间</option>
  36. </select>
  37. <select class="args">
  38. <option>查询参数</option>
  39. </select>
  40. <div class="submit-btn" id="J_submitBtn">提交</div>
  41. </div>
  42. <div class="business-list three-list data clearfix">
  43. <div class="business-item">
  44. <div class="num">28℃</div>
  45. <div class="name">平均温度</div>
  46. </div>
  47. <div class="business-item">
  48. <div class="num">85%rh</div>
  49. <div class="name">平均湿度</div>
  50. </div>
  51. <div class="business-item">
  52. <div class="num">20m/s</div>
  53. <div class="name">平均风速</div>
  54. </div>
  55. </div>
  56. </div>
  57. <div class="footer clearfix image">
  58. <a href="equip.html" class="item">设备控制</a>
  59. <a href="data.html" class="item">数据统计</a>
  60. <a href="log.html" class="item active">设备记录</a>
  61. </div>
  62. <input type="hidden" value="" id="search_header" />
  63. <script src="http://cdn.hcharts.cn/jquery/jquery-1.8.3.min.js"></script>
  64. <script type="text/javascript" src="../date/WdatePicker.js"></script>
  65. <script type="text/javascript" src="http://cdn.hcharts.cn/highcharts/highcharts.js"></script>
  66. <script id="push">
  67. var Maze_Data = {};
  68. Maze_Data.cate = ['1月', '2月', '3月', '4月', '5月', '6月','7月', '8月', '9月', '10月', '11月', '12月'];
  69. Maze_Data.dw = 'pa';
  70. Maze_Data.name = 'name';
  71. Maze_Data.data = [{
  72. name: '1号',
  73. color: '#f05a41',
  74. data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
  75. }, {
  76. name: '2号',
  77. color: '#0263ee',
  78. data: [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5]
  79. }];
  80. </script>
  81. <script type="text/javascript">
  82. $(function () {
  83. var chart = new Highcharts.Chart({
  84. chart: {
  85. renderTo: 'container',
  86. type: 'spline'
  87. },
  88. title: {
  89. text: null
  90. },
  91. credits: {
  92. enabled: false
  93. },
  94. exporting: {
  95. enabled: false
  96. },
  97. xAxis: {
  98. type: 'datetime',
  99. dateTimeLabelFormats: {
  100. millisecond: '%H:%M:%S.%L',
  101. second: '%H:%M:%S',
  102. minute: '%H:%M',
  103. hour: '%H:%M',
  104. day: '%e. %b',
  105. week: '%e. %b',
  106. month: '%b \'%y',
  107. year: '%Y'
  108. }
  109. },
  110. yAxis: {
  111. title: {
  112. text: ''
  113. }
  114. },
  115. tooltip: {
  116. formatter: function()
  117. {
  118. return '<b>'+ Maze_Data.name +'</b><br/>'+
  119. Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x) +'<br />'+ this.y +' ' + Maze_Data.dw;
  120. }
  121. },
  122. series: Maze_Data.data
  123. });
  124. $('#J_submitBtn').bind('click', function()
  125. {
  126. var start = $("#search_start").val();
  127. var end = $("#search_end").val();
  128. var type = $("#search_type").val();
  129. var method = $("#search_method").val();
  130. var time = $("#search_time_value").val();
  131. var header = $("#search_header").val();
  132. var url = Maze_Data.url + '&start=' + start + '&end=' + end + '&type=' + type + '&method=' + method + '&time=' + time;
  133. if(header)
  134. {
  135. url += '&header=' + header;
  136. }
  137. location.href = url;
  138. });
  139. });
  140. function time()
  141. {
  142. var value = $("#search_time").val();
  143. if(value)
  144. {
  145. var temp = value.split('||');
  146. $("#search_start").val(temp[0]);
  147. $("#search_end").val(temp[1]);
  148. $("#search_method").val(temp[2]);
  149. $("#search_time_value").val(temp[3]);
  150. $("#J_submitBtn").click();
  151. }
  152. }
  153. </script>
  154. </body>
  155. </html>