data.cmp.php 5.9 KB

123
  1. <!--power by mazephp--><?php Maze::setInput("menu", "3") ?>
  2. <?php $data['company/info.park_menu']=Maze\Routing\Load::get('company/info.park_menu') ?>
  3. <!doctype html> <html> <head><?php echo Maze::view("inc/head") ?></head> <style> #search_method,#search_time { display:none; } </style> <body> <div class="header" style="<?php echo Maze::input("header") ? "display:none;" : "" ?>"> <ul class="nav clearfix"> <li class="active"><a href="" title=""><?php echo Maze::load("company/info.park_info#name") ?></a></li> </ul> <a href="<?php echo Maze::url("index?farm=" . Maze::input("farm")) ?>" class="back"></a> </div> <div id="device_data" style="<?php echo Maze::input("header") ? "margin-top:20px" : "" ?>"></div> <div class="container equip data" style="<?php echo Maze::input("header") ? (Maze::input("top") ? Maze::input("top") : "top:0;bottom:0") : Maze::input("top") ?>"> <div class="title" style="<?php echo Maze::input("header") ? (Maze::input("title") ? "" : "display:none;") : "" ?>">数据统计</div> <div id="container" style="min-widths:700px;height:400px;margin-bottom:0px;"></div> <div class="show_select"><?php echo Maze::load("company/info.device_stat_search") ?></div> <div class="business-list three-list data clearfix" style="display:none;"> <div class="business-item"> <div class="num">28℃</div> <div class="name">平均温度</div> </div> <div class="business-item"> <div class="num">85%rh</div> <div class="name">平均湿度</div> </div> <div class="business-item"> <div class="num">20m/s</div> <div class="name">平均风速</div> </div> </div> </div> <div class="footer clearfix image" style="<?php echo Maze::input("header") ? "display:none;" : "" ?>"> <?php if(is_array($data['company/info.park_menu'])): ?><?php $t=count($data['company/info.park_menu'])-1 ?><?php $i=0 ?><?php foreach($data['company/info.park_menu'] as $k => $v): ?><a href="<?php echo $v['link'] ?><?php echo Maze::input("header") ? "&header=false" : "" ?>" class="item <?php echo $v['class'] ?>"><?php echo $v['name'] ?></a><?php $i=$i+1 ?><?php endforeach; ?><?php else: ?><?php echo $data['company/info.park_menu'] ?><?php endif; ?> </div> <input type="hidden" value="<?php echo Maze::input("header") ?>" id="search_header" /> <script src="http://cdn.hcharts.cn/jquery/jquery-1.8.3.min.js"></script> <script type="text/javascript" src="http://www.xinnongbaohe.com/assets/pc/lib/date/WdatePicker.js"></script> <script type="text/javascript" src="http://cdn.hcharts.cn/highcharts/highcharts.js"></script> <script id="push"><?php echo Maze::load("company/info.device_stat_chart") ?></script> <script type="text/javascript"> $(function () { var chart = new Highcharts.Chart({ chart: { renderTo: 'container', type: 'spline' }, title: { text: null }, credits: { enabled: false }, exporting: { enabled: false }, xAxis: { type: 'datetime', dateTimeLabelFormats: { millisecond: '%H:%M:%S.%L', second: '%H:%M:%S', minute: '%H:%M', hour: '%H:%M', day: '%e. %b', week: '%e. %b', month: '%b \'%y', year: '%Y' } }, yAxis: { title: { text: '' } }, tooltip: { formatter: function() { return '<b>'+ Maze_Data.name +'</b><br/>'+ Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x) +'<br />'+ this.y +' ' + Maze_Data.dw; } }, series: Maze_Data.data }); $('#J_submitBtn').bind('click', function() { var start = $("#search_start").val(); var end = $("#search_end").val(); var type = $("#search_type").val(); var method = $("#search_method").val(); var time = $("#search_time_value").val(); var header = $("#search_header").val(); var url = Maze_Data.url + '&start=' + start + '&end=' + end + '&type=' + type + '&method=' + method + '&time=' + time; if(header) { url += '&header=' + header; } location.href = url; }); }); function time() { var value = $("#search_time").val(); if(value) { var temp = value.split('||'); $("#search_start").val(temp[0]); $("#search_end").val(temp[1]); $("#search_method").val(temp[2]); $("#search_time_value").val(temp[3]); $("#J_submitBtn").click(); } } </script> </body> </html>