<!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>

</head>
<body style="background: #F3F3F3">
<div class='type2074 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='SID2074'> </span>&nbsp;&nbsp;&nbsp;编址:<span class='Addr2074'> </span>&nbsp;&nbsp;&nbsp;数据端口:<span class='Port2074'> </span></td></tr>
        <tr><td style='width: 200px;'>更新时间</td><td><span class='DateUpd2074'> </span></td></tr>
        <tr><td style='width: 200px;'>监测项状态</td><td><span class='State2074'> </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='Tem2074'></span></td><td width='50%'>室内湿度: <span class='Hum2074'></span></td></tr>
		<tr><td width='50%'>设定温度: <span class='TemSet2074'></span></td><td width='50%'>设定湿度: <span class='HumSet2074'></span></td></tr>
    </table>
    <table width='100%' style='margin-top: 30px'>
        <tr><td style='border: none'> <h1>系统告警状态</h1></td></tr>
		<tr><td width='50%'>压缩机1低压: <span class='AlmPresLow12074'></span></td><td width='50%'>压缩机2低压: <span class='AlmPresLow22074'></span></td></tr>
		<tr><td width='50%'>气流: <span class='AlmAirFlow2074'></span></td><td width='50%'>风机过载: <span class='AlmFanOVL2074'></span></td></tr>
		<tr><td width='50%'>加热器1过载: <span class='AlmH1OVL2074'></span></td><td width='50%'>加热器2过载: <span class='AlmH2OVL2074'></span></td></tr>
		<tr><td width='50%'>烟火: <span class='AlmFire2074'></span></td><td width='50%'>过滤器: <span class='AlmDirty2074'></span></td></tr>
		<tr><td width='50%'>高温: <span class='AlmTemHigh2074'></span></td><td width='50%'>低温: <span class='AlmTemLow2074'></span></td></tr>
        <tr><td width='50%'>高湿: <span class='AlmHumHigh2074'></span></td><td>低湿: <span class='AlmHumLow2074'></span></td></tr>
		<tr><td width='50%'>漏水: <span class='AlmFlood2074'></span></td><td width='50%'>水流异常: <span class='AlmWerterFlow2074'></span></td></tr>
    </table>
    </td>
    </tr>
  </table>
    <a href='javascript:history.back()' class='back' style='color: #fff'>返回</a>
</div>
<script>
var itype=2074;
var tescape= 5000,time;
  
<% db_Open("/NandFlash/tmp/dbDat0.db3"); %>
var sid=<% write(sid);%>;
var json=<% db_QryAdv("select * from tbCyberPcos 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){
        $(".SID2074").html(n.SID);
        $(".Addr2074").html(n.Addr);
        $(".Port2074").html(n.Port%256);
        $(".DateUpd2074").html(n.DateUpd);
        $(".State2074").html(window.parent.parseState(n.State));
		
		$(".Tem2074").html(n.Tem/10 + "℃");
		$(".Hum2074").html(n.Hum/10 + "％");
		$(".TemSet2074").html(n.TemSet/10 + "℃");
		$(".HumSet2074").html(n.HumSet/10 + "％");
		
		$(".AlmPresLow12074").html(n.AlmPresLow1 ? "告警" : "正常");
		$(".AlmPresLow22074").html(n.AlmPresLow2 ? "告警" : "正常");
		$(".AlmAirFlow2074").html(n.AlmAirFlow ? "告警" : "正常");
		$(".AlmFanOVL2074").html(n.AlmFanOVL ? "告警" : "正常");
		$(".AlmH1OVL2074").html(n.AlmH1OVL ? "告警" : "正常");
		$(".AlmH2OVL2074").html(n.AlmH2OVL ? "告警" : "正常");
		$(".AlmFire2074").html(n.AlmFire ? "告警" : "正常");
		$(".AlmDirty2074").html(n.AlmDirty ? "告警" : "正常");
		$(".AlmTemHigh2074").html(n.AlmTemHigh ? "告警" : "正常");
		$(".AlmTemLow2074").html(n.AlmTemLow ? "告警" : "正常");
		$(".AlmHumHigh2074").html(n.AlmHumHigh ? "告警" : "正常");
		$(".AlmHumLow2074").html(n.AlmHumLow ? "告警" : "正常");
		$(".AlmFlood2074").html(n.AlmFlood ? "告警" : "正常");
		$(".AlmWerterFlow2074").html(n.AlmWerterFlow ? "告警" : "正常");
		
		
    })
	$("span:contains('故障'),span:contains('告警'),,span:contains('闭合'),span:contains('关闭')").addClass("red").removeClass("ger");
        $("span:contains('正常')").addClass("ger").removeClass("red");
    
}

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