product.html 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <filter><script src="../js/common.js"></script><script src="../js/jquery.min.js"></script></filter>
  5. <script class="include" system="" path="inc/" file="head">include()</script>
  6. </head>
  7. <body class="gray">
  8. <header>
  9. 1号温室 <a href="javascript:;" class="ico-back"></a>
  10. </header>
  11. <section class="wrapper">
  12. <section class="video">
  13. <img src="../images/video.jpg" width="100%" alt="">
  14. <a href="javascript:;" class="btn-video"></a>
  15. </section>
  16. <section class="card">
  17. <dl>
  18. <dt><i class="ico-net"></i><span>联网信号</span></dt>
  19. <dd><span>10</span><em>%</em></dd>
  20. <dd class="color-error"><span>断开</span></dd>
  21. </dl>
  22. <dl>
  23. <dt><i class="ico-electric"></i><span>电池电量</span></dt>
  24. <dd><span>65</span><em>%</em></dd>
  25. <dd class="color-success"><span>充电中...</span></dd>
  26. </dl>
  27. </section>
  28. <section class="card border">
  29. <dl>
  30. <dt><i class="ico-temperature"></i><span>温度</span></dt>
  31. <dd><span class="color-info">28</span><em>°C</em></dd>
  32. <dd>
  33. <a href="javascript:;" class="ico-setting-gray"></a><b class="hline"></b><a href="javascript:;" class="ico-grid"></a>
  34. <p>2016.8.29 12:50</p>
  35. </dd>
  36. </dl>
  37. <dl>
  38. <dt><i class="ico-humidity"></i><span>湿度</span></dt>
  39. <dd><span class="color-info">65</span><em>%RH</em></dd>
  40. <dd>
  41. <a href="javascript:;" class="color-info">正常</a><b class="hline"></b><a href="javascript:;" class="ico-grid"></a>
  42. <p>2016.8.29 12:50</p>
  43. </dd>
  44. </dl>
  45. <dl>
  46. <dt><i class="ico-ec"></i><span>EC</span></dt>
  47. <dd><span class="color-info">140</span><em>ms/cm</em></dd>
  48. <dd>
  49. <a href="javascript:;" class="ico-down"></a><b class="hline"></b><a href="javascript:;" class="ico-grid"></a>
  50. <p>2016.8.29 12:50</p>
  51. </dd>
  52. </dl>
  53. <dl>
  54. <dt><i class="ico-co2"></i><span>二氧化碳</span></dt>
  55. <dd><span class="color-info">410</span><em>ppm</em></dd>
  56. <dd>
  57. <a href="javascript:;" class="ico-down"></a><b class="hline"></b><a href="javascript:;" class="ico-grid"></a>
  58. <p>2016.8.29 12:50</p>
  59. </dd>
  60. </dl>
  61. </section>
  62. <section class="card col2 border">
  63. <dl>
  64. <dt><span>1号阀门</span></dt>
  65. <dd>&nbsp;</dd>
  66. <dd>
  67. <a href="javascript:;" class="ico-clock"></a><b class="hline"></b><a href="javascript:;" class="btn-on-off on"></a>
  68. </dd>
  69. </dl>
  70. <dl>
  71. <dt><span>2号阀门(0.2MPa)</span></dt>
  72. <dd>&nbsp;</dd>
  73. <dd>
  74. <a href="javascript:;" class="ico-clock"></a><b class="hline"></b><a href="javascript:;" class="btn-on-off yellow on"></a>
  75. </dd>
  76. </dl>
  77. <dl>
  78. <dt><span>补光灯</span></dt>
  79. <dd>&nbsp;</dd>
  80. <dd>
  81. <a href="javascript:;" class="ico-clock"></a><b class="hline"></b><a href="javascript:;" class="btn-on-off on"></a>
  82. </dd>
  83. </dl>
  84. <dl>
  85. <dt><span>加湿</span></dt>
  86. <dd>&nbsp;</dd>
  87. <dd>
  88. <a href="javascript:;" class="ico-clock"></a><b class="hline"></b><a href="javascript:;" class="btn-on-off"></a>
  89. </dd>
  90. </dl>
  91. <dl>
  92. <dt><span>除湿</span></dt>
  93. <dd>&nbsp;</dd>
  94. <dd>
  95. <a href="javascript:;" class="ico-clock"></a><b class="hline"></b><a href="javascript:;" class="btn-on-off"></a>
  96. </dd>
  97. </dl>
  98. <dl>
  99. <dt><span>通风</span></dt>
  100. <dd>&nbsp;</dd>
  101. <dd>
  102. <a href="javascript:;" class="ico-clock"></a><b class="hline"></b><a href="javascript:;" class="btn-on-off"></a>
  103. </dd>
  104. </dl>
  105. <dl>
  106. <dt><span>卷帘开</span></dt>
  107. <dd>&nbsp;</dd>
  108. <dd>
  109. <a href="javascript:;" class="ico-clock"></a><b class="hline"></b><a href="javascript:;" class="btn-on-off"></a>
  110. </dd>
  111. </dl>
  112. <dl>
  113. <dt><span>卷帘关</span></dt>
  114. <dd>&nbsp;</dd>
  115. <dd>
  116. <a href="javascript:;" class="ico-clock"></a><b class="hline"></b><a href="javascript:;" class="btn-on-off"></a>
  117. </dd>
  118. </dl>
  119. </section>
  120. </section>
  121. <section class="layer">
  122. <article>
  123. <h3>1号阀门开关设置</h3>
  124. <form action="">
  125. <p><span class="status">打开</span><span>,并在</span><input type="text" class="inline" placeholder=""><span>分钟后关闭</span></p>
  126. <input type="button" class="form-item" value="确认">
  127. </form>
  128. </article>
  129. </section>
  130. </body>
  131. </html>
  132. <script>
  133. $(function()
  134. {
  135. bind_button();
  136. });
  137. var func = function()
  138. {
  139. var link = location.href + '&header=false';
  140. $.get(link, function(t)
  141. {
  142. var key = '.wrapper';
  143. t = '<div>' + t + '</div>';
  144. var c = $(t).find(key).html();
  145. if(c)
  146. {
  147. $(key).html(c);
  148. bind_button();
  149. }
  150. });
  151. };
  152. setInterval(func, 3000);
  153. function bind_button()
  154. {
  155. $('.b_clock').click(function()
  156. {
  157. var self = $(this);
  158. var v = $('.layer');
  159. var p = v.parent();
  160. v.find('h3').html(self.attr('name'));
  161. v.find('.status').html(self.attr('status'));
  162. if(self.attr('value'))
  163. {
  164. v.find('.inline').val(self.attr('value'));
  165. }
  166. v.show();
  167. });
  168. $('.b_status').each(function()
  169. {
  170. $(this).click(function()
  171. {
  172. var self = $(this);
  173. var clock = self.parent().find('.b_clock');
  174. var link = self.attr('link');
  175. var nextlink = self.attr('nextlink');
  176. $.post(link, function(t)
  177. {
  178. self.attr('link', nextlink);
  179. self.attr('nextlink', link);
  180. if(self.attr('class') == 'btn-on-off on b_status')
  181. {
  182. self.attr('class', 'btn-on-off yellow b_status');
  183. }
  184. else if(self.attr('class') == 'btn-on-off yellow b_status')
  185. {
  186. self.attr('class', 'btn-on-off on b_status');
  187. }
  188. else
  189. {
  190. alert('已执行');
  191. }
  192. var name = clock.attr('name');
  193. clock.attr('name', clock.attr('nextname'));
  194. clock.attr('nextname', name);
  195. })
  196. });
  197. });
  198. }
  199. </script>