123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214 |
- <!DOCTYPE html>
- <html>
- <head>
- <filter><script src="../js/common.js"></script><script src="../js/jquery.min.js"></script></filter>
- <script class="include" system="" path="inc/" file="head">include()</script>
- </head>
- <body class="gray">
- <header>
- 1号温室 <a href="javascript:;" class="ico-back"></a>
- </header>
- <section class="wrapper">
- <section class="video">
- <img src="../images/video.jpg" width="100%" alt="">
- <a href="javascript:;" class="btn-video"></a>
- </section>
- <section class="card">
- <dl>
- <dt><i class="ico-net"></i><span>联网信号</span></dt>
- <dd><span>10</span><em>%</em></dd>
- <dd class="color-error"><span>断开</span></dd>
- </dl>
- <dl>
- <dt><i class="ico-electric"></i><span>电池电量</span></dt>
- <dd><span>65</span><em>%</em></dd>
- <dd class="color-success"><span>充电中...</span></dd>
- </dl>
- </section>
- <section class="card border">
- <dl>
- <dt><i class="ico-temperature"></i><span>温度</span></dt>
- <dd><span class="color-info">28</span><em>°C</em></dd>
- <dd>
- <a href="javascript:;" class="ico-setting-gray"></a><b class="hline"></b><a href="javascript:;" class="ico-grid"></a>
- <p>2016.8.29 12:50</p>
- </dd>
- </dl>
- <dl>
- <dt><i class="ico-humidity"></i><span>湿度</span></dt>
- <dd><span class="color-info">65</span><em>%RH</em></dd>
- <dd>
- <a href="javascript:;" class="color-info">正常</a><b class="hline"></b><a href="javascript:;" class="ico-grid"></a>
- <p>2016.8.29 12:50</p>
- </dd>
- </dl>
- <dl>
- <dt><i class="ico-ec"></i><span>EC</span></dt>
- <dd><span class="color-info">140</span><em>ms/cm</em></dd>
- <dd>
- <a href="javascript:;" class="ico-down"></a><b class="hline"></b><a href="javascript:;" class="ico-grid"></a>
- <p>2016.8.29 12:50</p>
- </dd>
- </dl>
- <dl>
- <dt><i class="ico-co2"></i><span>二氧化碳</span></dt>
- <dd><span class="color-info">410</span><em>ppm</em></dd>
- <dd>
- <a href="javascript:;" class="ico-down"></a><b class="hline"></b><a href="javascript:;" class="ico-grid"></a>
- <p>2016.8.29 12:50</p>
- </dd>
- </dl>
- </section>
- <section class="card col2 border">
- <dl>
- <dt><span>1号阀门</span></dt>
- <dd> </dd>
- <dd>
- <a href="javascript:;" class="ico-clock"></a><b class="hline"></b><a href="javascript:;" class="btn-on-off on"></a>
- </dd>
- </dl>
- <dl>
- <dt><span>2号阀门(0.2MPa)</span></dt>
- <dd> </dd>
- <dd>
- <a href="javascript:;" class="ico-clock"></a><b class="hline"></b><a href="javascript:;" class="btn-on-off yellow on"></a>
- </dd>
- </dl>
- <dl>
- <dt><span>补光灯</span></dt>
- <dd> </dd>
- <dd>
- <a href="javascript:;" class="ico-clock"></a><b class="hline"></b><a href="javascript:;" class="btn-on-off on"></a>
- </dd>
- </dl>
- <dl>
- <dt><span>加湿</span></dt>
- <dd> </dd>
- <dd>
- <a href="javascript:;" class="ico-clock"></a><b class="hline"></b><a href="javascript:;" class="btn-on-off"></a>
- </dd>
- </dl>
- <dl>
- <dt><span>除湿</span></dt>
- <dd> </dd>
- <dd>
- <a href="javascript:;" class="ico-clock"></a><b class="hline"></b><a href="javascript:;" class="btn-on-off"></a>
- </dd>
- </dl>
- <dl>
- <dt><span>通风</span></dt>
- <dd> </dd>
- <dd>
- <a href="javascript:;" class="ico-clock"></a><b class="hline"></b><a href="javascript:;" class="btn-on-off"></a>
- </dd>
- </dl>
- <dl>
- <dt><span>卷帘开</span></dt>
- <dd> </dd>
- <dd>
- <a href="javascript:;" class="ico-clock"></a><b class="hline"></b><a href="javascript:;" class="btn-on-off"></a>
- </dd>
- </dl>
- <dl>
- <dt><span>卷帘关</span></dt>
- <dd> </dd>
- <dd>
- <a href="javascript:;" class="ico-clock"></a><b class="hline"></b><a href="javascript:;" class="btn-on-off"></a>
- </dd>
- </dl>
- </section>
- </section>
- <section class="layer">
- <article>
- <h3>1号阀门开关设置</h3>
- <form action="">
- <p><span class="status">打开</span><span>,并在</span><input type="text" class="inline" placeholder=""><span>分钟后关闭</span></p>
- <input type="button" class="form-item" value="确认">
- </form>
- </article>
- </section>
- </body>
- </html>
- <script>
- $(function()
- {
- bind_button();
-
- });
- var func = function()
- {
- var link = location.href + '&header=false';
- $.get(link, function(t)
- {
- var key = '.wrapper';
- t = '<div>' + t + '</div>';
- var c = $(t).find(key).html();
- if(c)
- {
- $(key).html(c);
- bind_button();
- }
- });
- };
-
- setInterval(func, 3000);
- function bind_button()
- {
- $('.b_clock').click(function()
- {
- var self = $(this);
- var v = $('.layer');
- var p = v.parent();
- v.find('h3').html(self.attr('name'));
- v.find('.status').html(self.attr('status'));
- if(self.attr('value'))
- {
- v.find('.inline').val(self.attr('value'));
- }
-
- v.show();
- });
- $('.b_status').each(function()
- {
- $(this).click(function()
- {
- var self = $(this);
- var clock = self.parent().find('.b_clock');
- var link = self.attr('link');
- var nextlink = self.attr('nextlink');
- $.post(link, function(t)
- {
- self.attr('link', nextlink);
- self.attr('nextlink', link);
- if(self.attr('class') == 'btn-on-off on b_status')
- {
- self.attr('class', 'btn-on-off yellow b_status');
- }
- else if(self.attr('class') == 'btn-on-off yellow b_status')
- {
- self.attr('class', 'btn-on-off on b_status');
- }
- else
- {
- alert('已执行');
- }
- var name = clock.attr('name');
- clock.attr('name', clock.attr('nextname'));
- clock.attr('nextname', name);
- })
- });
- });
- }
- </script>
|