| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432 |
- <!doctype html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title></title>
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
- <link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.css" rel="stylesheet">
- <link href="../css/mui.min.css" rel="stylesheet" />
- <link rel="stylesheet" href="../css/reset.css" />
- <link rel="stylesheet" href="../css/iconfont.css" />
- <link href="../css/common.css" rel="stylesheet" />
- <style type="text/css">
- @media(max-width: 400px) {
- .mui-col-sm-6 {
- width: 50%;
- }
- }
- .topBorder{
- border-top: 2px solid #eee;
- }
-
- #detial .mui-navigate-right {
- line-height: 80px;
- }
- .clearfix:after {
- content: " ";
- display: block;
- clear: both;
- visibility: hidden;
- line-height: 0;
- height: 0;
- font-size: 0;
- }
- .clearfix{
- *zoom:1;
- }
- .fl{
- float: left;
- }
-
- body,.mui-content{
- background: #fff;
- }
- .msgTop{
- background: #24b2e7;
- background: url(../images/bluesky.jpg) no-repeat;
- background-size: 100% 120%;
- position: relative;
- height: 150px;
- }
- .currEquip{
- color: #fff;
- font-size: 14px;
- position: absolute;
- bottom: 15px;
- left: 35px;
- }
- .currEquipId{
- font-size: 18px;
- line-height: 34px;
- color: #fffac9;
- font-weight: 700;
- }
- .equipImg{
- position: absolute;
- right: 37px;
- bottom: 0px;
- }
- /*统计图*/
- .progressBarBox{
- /*margin-left: 5%;*/
- }
- .progressBarBox >li{
- width: 33%;
- text-align: center;
- }
- .progressBartitle{
- text-align: center;
- font-size: 14px;
- margin: 15px 0 7px;
- color: #333;
- }
- .circleChart_text{
- color: #13a1e2;
- font-size: 20px !important;
- }
- /*分界线*/
- .boundaryline{
- width: 100%;
- height: 10px;
- background: #F3F3F3;
- }
- /*状态*/
- .equipFun{
- font-size: 12px;
- }
- .equipState {
- font-size: 14px;
- color: #333;
- overflow: hidden;
- }
- #detial >div{
- text-align: center;
- padding: 10px 0;
- }
- #detial >div:nth-child(1):before,#detial >div:nth-child(2):before,#detial >div:nth-child(4):before,#detial >div:nth-child(5):before,#detial >div:nth-child(7):before,#detial >div:nth-child(8):before{
- content: '';
- position: absolute;
- right: 0;
- border-right: 1px solid #9c9c9c;
- width: 1px;
- height: 15px;
- top: 40%;
- }
- /*数据*/
- .dataShowBox >h1{
- /*padding-left: 30px;*/
- margin: 10px 0 10px 15px;
- /*background: url(../images/statusTag.png) no-repeat 0 2px;*/
- line-height: 25px;
- font-weight: 700;
- }
- .dataShowBox hr{
- margin: 0 12px 10px 12px;
- border: 1px dashed #e7f3fc;
- }
- .dataShowBox >.equipStatus{
- background: url(../images/statusTag.png) no-repeat 0 -26px;
- }
- /*配置设备操作*/
- .mui-table-view:before{
- background-color:transparent;
- }
- /*查看详情*/
- .lookDetialBox{
- text-align: center;
- margin: 20px 0;
- }
- .lookDetialBox button{
- width: 80%;
- border-radius: 15px;
- }
- /*查看详情*/
- .areaTitle {
- color: #424242;
- padding-left: 7px;
- /*border-left: 14px solid #ff6e00;*/
- font-weight: bold;
- font-size: 16px;
- position: relative;
- border-left: 5px solid #24b2e7;
- /*background: url(../images/statusTag.png) no-repeat 0 -52px;*/
- }
- .detialBox .fa{
- padding-right: 5px;
- /*color: #3bb9e7;*/
- color: #f74b16;
- }
- </style>
- </head>
- <body>
- <header class="mui-bar mui-bar-nav">
- <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
- <h1 class="mui-title" id="title">孢子仪数据详情</h1>
- <!--<a class="headRightIcon fa fa-search mui-pull-right" id="reloadEquip">查询</a>-->
- </header>
- <div class="mui-content">
- <div class="msgTop">
- <div class="currEquip">
- <div id="currEquipId" class="currEquipId"></div>
- <div id="upl_time"></div>
- </div>
- <img class="equipImg" src="../images/bzyequipImg.png" width="70"/>
- </div>
- <!--<div class="boundaryline"></div>-->
- <div class="dataShowBox">
- <h1 class="areaTitle">设备数据</h1>
- <hr />
- <div>
- <ul class="progressBarBox clearfix">
- <li class="fl">
- <!--<div class="circleChart" id="circleChart1"></div>-->
- <canvas id="circleChart1" width="95%" height="95%"></canvas>
- <div class="progressBartitle">环境湿度(%)</div>
- </li>
- <li class="fl">
- <!--<div class="circleChart" id="c1"></div>-->
- <canvas id="circleChart2" width="95%" height="95%"></canvas>
-
- <div class="progressBartitle">环境温度(℃)</div>
- </li>
- <li class="fl">
- <!--<div class="circleChart" id="c2"></div>-->
- <canvas id="circleChart3" width="95%" height="95%"></canvas>
-
- <div class="progressBartitle">保温仓当前温度(℃)</div>
- </li>
- </ul>
- </div>
- <!--状态-->
- <div class="boundaryline"></div>
- <h1 class="areaTitle">设备状态</h1>
- <hr style="margin-bottom: 0;" />
- <div class="mui-row" id="detial">
- <div class="mui-col-xs-4">
- <p class="equipFun">电池状态</p>
- <p class="equipState" id="bat_sta"></p>
- </div>
- <div class="mui-col-xs-4">
- <p class="equipFun">摄像头状态</p>
- <p class="equipState" id="usb_sta"></p>
- </div>
- <div class="mui-col-xs-4">
- <p class="equipFun">雨控状态</p>
- <p class="equipState" id="rps"></p>
- </div>
- <div class="mui-col-xs-4">
- <p class="equipFun">电压(V)</p>
- <p class="equipState" id="v_bat"></p>
- </div>
- <div class="mui-col-xs-4">
- <p class="equipFun">海拔高度</p>
- <p class="equipState" id="alti"></p>
- </div>
- <div class="mui-col-xs-4">
- <p class="equipFun">信号强度</p>
- <p class="equipState" id="csq"></p>
- </div>
- <div class="mui-col-xs-4">
- <!--<p class="equipFun">保温仓</p>-->
- <p class="equipFun">保温仓设定温度</p>
- <p class="equipState" id="set_temp"></p>
- </div>
- <div class="mui-col-xs-4">
- <p class="equipFun">设备版本</p>
- <p class="equipState" id="dver"></p>
- </div>
- <div class="mui-col-xs-4">
- <p class="equipFun">设备开关</p>
- <p class="equipState" id="on_off"></p>
- </div>
- </div>
- </div>
- <div class="boundaryline"></div>
- <ul class="mui-table-view detialBox">
- <li class="mui-table-view-cell">
- <h1 class="areaTitle">配置设备操作</h1>
- </li>
- <li class="mui-table-view-cell" id="lookImg">
- <a class="mui-navigate-right">
- <i class="fa fa-file-image-o" aria-hidden="true"></i>
- 查看图片
- </a>
- </li>
- <li class="mui-table-view-cell" id="lookEchart">
- <a class="mui-navigate-right">
- <i class="fa fa-line-chart" aria-hidden="true"></i>
- 查询统计详情
- </a>
- </li>
- <li class="mui-table-view-cell" id="lookDetial">
- <a class="mui-navigate-right">
- <i class="fa fa-list" aria-hidden="true"></i>
- 查看列表详情
- </a>
- </li>
- <li class="mui-table-view-cell" id="reloadEquip">
- <a class="mui-navigate-right">
- <i class="fa fa-refresh" aria-hidden="true"></i>
- 查询最新状态
- </a>
- </li>
- </ul>
- </div>
- <script src="../js/jquery-2.1.0.js"></script>
- <script src="../js/mui.min.js"></script>
- <script src="../js/echarts.js"></script>
- <script src="../js/progress.js"></script>
- <script type="text/javascript">
- mui.init();
- var equipId;
-
- mui.plusReady(function() {
- var self = plus.webview.currentWebview();
- equipId = self.equipId;
- $('#currEquipId').html('ID:'+equipId);
- //详情
- requestData();
-
- //查看图片
- document.getElementById('lookImg').addEventListener('tap', function() {
- mui.openWindow({
- url: 'bzy_lookImage.html',
- id: 'bzy_lookImage',
- extras: {
- equipId: equipId
- }
- })
- })
- //查看统计图
- document.getElementById('lookEchart').addEventListener('tap', function() {
- mui.openWindow({
- url: 'bzy_detail_echart.html',
- id: 'bzy_detail_echart',
- extras: {
- equipId: equipId
- }
- })
- })
-
- //查看详情
- document.getElementById('lookDetial').addEventListener('tap', function() {
- mui.openWindow({
- url: 'bzy_detail_list.html',
- id: 'bzy_detail_list',
- extras: {
- equipId: equipId,
- }
- })
- })
- //查询
- document.getElementById('reloadEquip').addEventListener('tap',function(){
- mui.ajax('http://120.27.222.26/bzy_mqtt',{
- data:{
- 'req': 'read',
- 'topicid': equipId,
- 'kind': 'data'
- },
- dataType:'json',//服务器返回json格式数据
- type:'post',//HTTP请求类型
- timeout: 10000,//超时时间设置为10秒;
- beforeSend: function() {
- plus.nativeUI.showWaiting('请求中...');
- },
- complete: function() {
- setTimeout(function() {
- plus.nativeUI.closeWaiting();
- }, 4000);
- },
- success:function(data){
- setTimeout(function() {
- mui.toast('查询成功')
- window.location.reload();
- }, 4000);
- },
- error:function(xhr,type,errorThrown){
- mui.toast('查询失败')
- }
- });
- })
- })
- function requestData() {
- mui.ajax('http://120.27.222.26/app_reportmanage_unflod', {
- data: {
- 'etype': 'bzy',
- 'equip_id': equipId,
- },
- dataType: 'json', //服务器返回json格式数据
- type: 'post', //HTTP请求类型
- timeout: 10000, //超时时间设置为10秒;
- beforeSend: function() {
- plus.nativeUI.showWaiting('请求中...');
- },
- complete: function() {
- plus.nativeUI.closeWaiting();
- },
- success: function(data) {
- console.log(JSON.stringify(data));
- $('#upl_time').html(data.upl_time)
- var dat = eval('('+data.bzy_data+')');
- var p1 = new Progress({
- el: 'circleChart1', //canvas元素id
- deg: dat.ah, //填入你的数据 如data
- currtype:'%',
- timer: 10, //绘制时间
- lineWidth: 10, //线宽
- lineBgColor: '#f4f3f3', //底圆颜色
- lineColor: '#1f8aff', //动态圆颜色
- textColor: '#1f8aff', //文本颜色
- fontSize: 20, //字体大小
- circleRadius: 100 //圆半径
- });
- var p2 = new Progress({
- el: 'circleChart2', //canvas元素id
- deg: dat.at, //填入你的数据 如data
- currtype:'℃',
- timer: 10, //绘制时间
- lineWidth: 10, //线宽
- lineBgColor: '#f4f3f3', //底圆颜色
- lineColor: '#1f8aff', //动态圆颜色
- textColor: '#1f8aff', //文本颜色
- fontSize: 20, //字体大小
- circleRadius: 100 //圆半径
- });
- var p3 = new Progress({
- el: 'circleChart3', //canvas元素id
- deg: dat.pre_temp, //填入你的数据 如data
- currtype:'℃',
- timer: 10, //绘制时间
- lineWidth: 10, //线宽
- lineBgColor: '#f4f3f3', //底圆颜色
- lineColor: '#1f8aff', //动态圆颜色
- textColor: '#1f8aff', //文本颜色
- fontSize: 20, //字体大小
- circleRadius: 100 //圆半径
- });
- $('#bat_sta').html(dat.bat_sta?'电量过低':'正常');
- $('#usb_sta').html(dat.usb_sta?'异常':'正常');
- $('#rps').html(dat.rps?'雨控':'正常');
- $('#v_bat').html(dat.v_bat);
- $('#alti').html(dat.alti || 0);
- $('#csq').html(dat.csq);
- $('#set_temp').html(dat.set_temp);
- $('#dver').html(dat.dver);
- $('#on_off').html(dat.on_off?'开启':'关闭');
- },
- error: function(xhr, type, errorThrown) {
- mui.toast('数据请求失败');
- }
- })
- }
- </script>
- </body>
- </html>
|