<!DOCTYPE html>
<% language=javascript %>
<html>
<head lang="en">
    <meta charset="GB2312">
    <title></title>
    <link href="css/style.css" title="style" rel="stylesheet" type="text/css" />
    <script src="js/jquery-1.6.3.min.js"></script>
    <script src="js/omara.js"></script>

</head>
<body style="background: #F3F3F3">
<div class='type2076 empty' style=' margin: 10px;'>
  <table width="100%">
    <tr>
    <td width="300px" style="text-align: center;"><img src="img/ico-cyber.png" style="width: 60%;text-align: center;"></td>
    <td>
    <table width='100%'>
        <tr><td style='border: none'> <h1>空调监测</h1></td></tr>
        <tr><td style='width: 200px;'>基本信息</td><td>SID:<span class='SID2076'> </span>&nbsp;&nbsp;&nbsp;编址:<span class='Addr2076'> </span>&nbsp;&nbsp;&nbsp;数据端口:<span class='Port2076'> </span></td></tr>
        <tr><td style='width: 200px;'>更新时间</td><td><span class='DateUpd2076'> </span></td></tr>
        <tr><td style='width: 200px;'>监测项状态</td><td><span class='State2076'> </span></td></tr>
    </table>
    <table width='100%' style='margin-top: 30px'>
        <tr><td style='border: none'> <h1>基本信息</h1></td></tr>
		<tr><td width='50%'>室内温度: <span class='Tem2076'></span></td><td width='50%'>室内湿度: <span class='Hum2076'></span></td></tr>
	<!--	<tr><td width='50%'>室外温度: <span class='TemExt2076'></span></td><td width='50%'>送风温度: <span class='TemSup2076'></span></td></tr> -->
    </table>
    <table width='100%' style='margin-top: 30px'>
        <tr><td style='border: none'> <h1>设置信息</h1></td></tr>
		<tr><td width='50%'>设定温度: <span class='TemSet2076'></span></td><td width='50%'>设定湿度: <span class='HumSet2076'></span></td></tr>
		<tr><td width='50%'>最低温度: <span class='TemMin2076'></span></td><td width='50%'>最低湿度: <span class='HumMin2076'></span></td></tr>
		<tr><td width='50%'>最高温度: <span class='TemMax2076'></span></td><td width='50%'>最高湿度: <span class='HumMax2076'></span></td></tr>
		<tr><td width='50%'>制冷设定: <span class='TemCool2076'></span></td><td width='50%'>制热设定: <span class='TemHeat2076'></span></td></tr>
    </table>
    <table width='100%' style='margin-top: 30px'>
        <tr><td style='border: none'> <h1>状态信息</h1></td></tr>
		<tr><td width='50%'>风扇累计: <span class='FanRun2076'></span></td><td width='50%'>过滤累计: <span class='FilRun2076'></span></td></tr>
		<tr><td width='50%'>压缩累计: <span class='CompRun2076'></span></td><td width='50%'>湿度管理: <span class='HumMng2076'></span></td></tr>
		<tr><td width='50%'>制冷模式: <span class='CoolMode2076'></span></td><td width='50%'>制热模式: <span class='HeatMode2076'></span></td></tr>
		<tr><td width='50%'>开关机: <span class='StOn2076'></span></td><td width='50%'>压缩机: <span class='StComp2076'></span></td></tr>
		<tr><td width='50%'>风扇: <span class='StFan2076'></span></td><td width='50%'>除湿: <span class='StDehum2076'></span></td></tr>
		<tr><td width='50%'>增强加湿: <span class='StEnHum2076'></span></td><td width='50%'>开关按键: <span class='StKey2076'></span></td></tr>
    </table>
    </td>
    </tr>
  </table>
    <a href='javascript:history.back()' class='back' style='color: #fff'>返回</a>
</div>
<script>
var itype=2076;
var tescape= 5000,time;
  
<% db_Open("/NandFlash/tmp/dbDat0.db3"); %>
var sid=<% write(sid);%>;
var json=<% db_QryAdv("select * from tbCyberJADC0110b where SID="+sid,0);%>;
<% db_Close(); %>
	
$(function(){
   time=setInterval(ajax,tescape)
});
function ajax(){
    $.ajax({
        type: "POST",
        url: "omdev/smdat0.asp",
        data: "itype="+itype+"&sid="+sid,
        dataType:"json",
        success: function(msg){
            list3(msg); 
			
        }
    });
}

list3(json);
function list3(data){
    $.each(data.recs,function(i,n){
        $(".SID2076").html(n.SID);
        $(".Addr2076").html(n.Addr);
        $(".Port2076").html(n.Port%256);
        $(".DateUpd2076").html(n.DateUpd);
        $(".State2076").html(parseState(n.State));
		
		$(".Tem2076").html(n.Tem/10 + "℃");
		$(".Hum2076").html(n.Hum/10 + "％");
	//	$(".TemExt2076").html(n.TemExt/10 + "℃");
	//	$(".TemSup2076").html(n.TemSup/10 + "℃");

		$(".TemSet2076").html(n.TemSet/10 + "℃");
		$(".TemMin2076").html(n.TemMin/10 + "℃");
		$(".TemMax2076").html(n.TemMax/10 + "℃");
		$(".TemCool2076").html(n.TemCool/10 + "℃");
		$(".TemHeat2076").html(n.emHeat/10 + "℃"); //原笔误
		$(".HumSet2076").html(n.HumSet/10 + "%");
		$(".HumMin2076").html(n.HumMin/10 + "%");
		$(".HumMax2076").html(n.HumMax/10 + "%");

		$(".FanRun2076").html(n.FanRun + "h");
		$(".FilRun2076").html(n.FilRun + "h");
		$(".CompRun2076").html(n.CompRun + "h");
		$(".CoolMode2076").html(n.CoolMode + "h");
		$(".HeatMode2076").html(n.HeadMode + "h");
		$(".StOn2076").html(n.StOn);
		$(".StComp2076").html(n.StComp);
		$(".StFan2076").html(n.StFan);
		$(".StDehum2076").html(n.StDehum);
		$(".StEnHum2076").html(n.StEnHum);
		$(".StKey2076").html(n.StKey);
    })
	$("span:contains('故障'),span:contains('告警'),,span:contains('闭合'),span:contains('关闭')").addClass("red").removeClass("ger");
        $("span:contains('正常')").addClass("ger").removeClass("red");
    
}

</script>
</body>
</html>