<!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='type2068 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='SID2068'> </span>&nbsp;&nbsp;&nbsp;编址:<span class='Addr2068'> </span>&nbsp;&nbsp;&nbsp;数据端口:<span class='Port2068'> </span></td></tr>
        <tr><td style='width: 200px;'>更新时间</td><td><span class='DateUpd2068'> </span></td></tr>
        <tr><td style='width: 200px;'>监测项状态</td><td><span class='State2068'> </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='Com1Pre2068'></span></td><td width='50%'>压缩机2排气压力: <span class='Com2Pre2068'></span></td></tr>
		<tr><td width='50%'>室内回风湿度: <span class='RoomHum2068'></span></td><td width='50%'>室内回风温度: <span class='RoomTem2068'></span></td></tr>
		<tr><td width='50%'>湿度设定点: <span class='HumSet2068'></span></td><td width='50%'>温度设定点: <span class='TemSet2068'></span></td></tr>
		<tr><td width='50%'>送风温度: <span class='SupTem2068'></span></td><td width='50%'>蒸气产量: <span class='Steam2068'></span></td></tr>
		<tr><td width='50%'>室内湿度过高报警设定点: <span class='HumSetH2068'></span></td><td width='50%'>室内温度过高报警设定点: <span class='TemSetH2068'></span></td></tr>
		<tr><td width='50%'>室内湿度过低报警设定点: <span class='HumSetL2068'></span></td><td width='50%'>室内温度过低报警设定点: <span class='TemSetL2068'></span></td></tr>
    </table>
	<table width='100%' style='margin-top: 30px'>
        <tr><td style='border: none'> <h1>系统状态</h1></td></tr>
        <tr>
			<td>过滤网堵塞: <span class='AlmFilter2068'></span></td>
			<td>烟火报警: <span class='AlmFire2068'></span></td>
		</tr>
		<tr>
			<td>室内湿度过高: <span class='AlmHumH2068'></span></td>
			<td>室内温度过高: <span class='AlmTemH2068'></span></td>
		</tr>
		<tr>
			<td>室内湿度过低: <span class='AlmHumL2068'></span></td>
			<td>室内温度过低: <span class='AlmTemL2068'></span></td>
		</tr>
		<tr>
			<td>缺水报警: <span class='AlmWater2068'></span></td>
			<td>排水报警: <span class='AlmDrain2068'></span></td>
		</tr>
		<tr>
			<td>机组过热: <span class='UnitHeat2068'></span></td>
			<td>&nbsp; <span class='xxx2068'></span></td>
		</tr>
    </table>
    </td>
    </tr>
  </table>

    <a href='javascript:history.back()' class='back' style='color: #fff'>返回</a>
</div>
<script>
var itype=2068;
var tescape= 5000,time;
  
<% db_Open("/NandFlash/tmp/dbDat0.db3"); %>
var sid=<% write(sid);%>;
var json=<% db_QryAdv("select * from tbCyberDataCool 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){
        $(".SID2068").html(n.SID);
        $(".Addr2068").html(n.Addr);
        $(".Port2068").html(n.Port%256);
        $(".DateUpd2068").html(n.DateUpd);
        $(".State2068").html(window.parent.parseState(n.State));
		
		if (n.Com1Pre > 0)
			$(".Com1Pre2068").html(n.Com1Pre/10+"Pa");
		if (n.Com2Pre > 0)
			$(".Com2Pre2068").html(n.Com2Pre/10+"Pa");
		if (n.RoomHum > 0)
			$(".RoomHum2068").html(n.RoomHum/10+"%RH");
		if (n.RoomTem > 0)
			$(".RoomTem2068").html(n.RoomTem/10+"℃");
		if (n.HumSet > 0)
			$(".HumSet2068").html(n.HumSet/10+"%RH");
		if (n.TemSet > 0)
			$(".TemSet2068").html(n.TemSet/10+"℃");
		if (n.SupTem > 0)
			$(".SupTem2068").html(n.SupTem/10+"℃");
		if (n.HumSetH > 0)
			$(".HumSetH2068").html(n.HumSetH/10+"%RH");
		if (n.TemSetH > 0)
			$(".TemSetH2068").html(n.TemSetH/10+"℃");
		if (n.HumSetL > 0)
			$(".HumSetL2068").html(n.HumSetL/10+"%RH");
		if (n.TemSetL > 0)
			$(".TemSetL2068").html(n.TemSetL/10+"℃");
		if (n.Steam > 0)
			$(".Steam2068").html(n.Steam/10+"kg/h");
		
		$(".AlmFilter2068").html(n.AlmFilter ? "报警" : "正常");
		$(".AlmFire2068").html(n.AlmFire ? "报警" : "正常");
		$(".AlmHumH2068").html(n.AlmHumH ? "报警" : "正常");
		$(".AlmTemH2068").html(n.AlmTemH ? "报警" : "正常");
		$(".AlmHumL2068").html(n.AlmHumL ? "报警" : "正常");
		$(".AlmTemL2068").html(n.AlmTemL ? "报警" : "正常");
		$(".UnitHeat2068").html(n.UnitHeat ? "报警" : "正常");
		$(".AlmWater2068").html(n.AlmWater ? "报警" : "正常");
		$(".AlmDrain2068").html(n.AlmDrain ? "报警" : "正常");
		
    })
	$("span:contains('故障'),span:contains('告警'),span:contains('闭合'),span:contains('关闭')").addClass("red").removeClass("ger");
        $("span:contains('正常')").addClass("ger").removeClass("red");
    
}

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