123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <title></title>
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <meta name="format-detection" content="telephone=no">
- <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}()}();
- </script>
- <link rel="stylesheet" type="text/css" href="../build/p/my/style.css">
- </head>
- <body>
- <div class="header">
- <ul class="nav clearfix">
- <li class="active"><a href="" title="">设备名称</a></li>
- </ul>
- <a href="index.html" class="back"></a>
- </div>
- <div class="container equip equip2">
- <div class="equip-top">
- <h3 class="title">喷灌机控制</h3>
- <div class="left">
- <img src="../img/equip21.jpg" />
- <div class="time">2015/12/12 18:22:30</div>
- <div class="role" id="J_role"></div>
- </div>
- </div>
- <div class="right clearfix">
- <div class="all-info open" id="J_allInfo">
- <div class="title">设备运行中</div>
- <div class="btn" id="J_close">关闭水泵</div>
- </div>
- <div class="item">
- <div class="num">12h 32m 18s</div>
- <div class="name">灌溉时长</div>
- </div>
- <div class="item">
- <div class="num">2</div>
- <div class="name">运转圈数</div>
- </div>
- <div class="item">
- <div class="num">顺时针</div>
- <div class="name">运转方向</div>
- </div>
- <div class="item">
- <div class="num">60%(走1m停2m)</div>
- <div class="name">运转速度</div>
- </div>
- <div class="item">
- <div class="num">20m/s</div>
- <div class="name">水流量</div>
- </div>
- <div class="item">
- <div class="num">60m³</div>
- <div class="name">本次总量</div>
- </div>
- <div class="item">
- <div class="num">30mpa</div>
- <div class="name">水压监测</div>
- </div>
- <div class="item">
- <div class="num">5mm</div>
- <div class="name">平均灌溉深度</div>
- </div>
- </div>
- </div>
- <div class="footer clearfix">
- <a href="" class="item active">设备控制</a>
- <a href="data.html" class="item">数据统计</a>
- <a href="log.html" class="item">设备记录</a>
- </div>
-
- <script type="text/javascript" src="../build/lib/zepto.min.js"></script>
- <script type="text/javascript">
- var timer = null;
- $('#J_allInfo').bind('click', function(){
- var allInfo = $('#J_allInfo');
- var title = allInfo.find('.title');
- var btn = allInfo.find('.btn');
- if (allInfo.hasClass('open')) {
- allInfo.removeClass('open');
- allInfo.addClass('close');
- title.html('设备故障');
- clearInterval(timer);
- btn.html('启动水泵');
- } else {
- allInfo.removeClass('close');
- allInfo.addClass('open');
- title.html('设备运行中');
- btn.html('关闭水泵');
- initRole();
- }
- });
- initRole();
- var pfx = (function() {
- var style = document.createElement('dummy').style,
- prefixes = ['Webkit','Moz','O','ms','Khtml'],
- memory = {};
-
- function _pfx(prop) {
- if(typeof memory[prop] === "undefined") {
- var ucProp = prop.charAt(0).toUpperCase()+prop.substr(1),
- props = [prop].concat(prefixes.map(function(prefix) {
- return prefix+ucProp;
- }));
- memory[prop] = null;
- for(var i in props) {
- if(style[props[i]] !== undefined) {
- memory[prop] = props[i];
- break;
- }
- }
- }
- return memory[prop];
- }
-
- return _pfx;
- })();
- function css(el, props) {
- for(var key in props) {
- var pkey = pfx(key);
- if(pkey !== null) el.style[pkey] = props[key];
- }
- return el;
- }
- var deg = 0;
- var obj = $('#J_role')[0];
- function initRole() {
- timer = setInterval(function(){
- deg += 1;
- css(obj,{'transform':'rotate('+deg+'deg)'});
- },10);
- }
- </script>
- </body>
- </html>
|