<!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='type1799 empty' style=' margin: 10px;'>
  <table width="100%">
    <tr>
    <td width="300px" style="text-align: center;"><img src="img/ico-airc.png" style="width: 50%;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='SID1799'> </span>&nbsp;&nbsp;&nbsp;编址:<span class='Addr1799'> </span>&nbsp;&nbsp;&nbsp;数据端口:<span class='Port1799'> </span></td></tr>
        <tr><td style='width: 200px;'>更新时间</td><td><span class='DateUpd1799'> </span></td></tr>
        <tr><td style='width: 200px;'>监测项状态</td><td><span class='State1799'> </span></td></tr>
    </table>

    <table width='100%' style='margin-top: 30px'>
      <tr><td style='border: none'> <h1>基本信息</h1></td></tr>
			
			<tr>
				<td width='33%'>库温温度:&nbsp;&nbsp;<span class='Ftem_1799'></span>&nbsp;&nbsp;</td>
				<td width='33%'>化霜温度:&nbsp;&nbsp;<span class='Htem_1799'></span>&nbsp;&nbsp;</td>
			  <td width='33%'><span class='0807'></span></td>    
			</tr>
			
			<tr>
				<td width='33%'>制冷开机温度:&nbsp;&nbsp;<span class='COtem_1799'></span>&nbsp;&nbsp;</td>
				<td width='33%'>制冷关机温度:&nbsp;&nbsp;<span class='CCtem_1799'></span>&nbsp;&nbsp;</td>
			  <td width='33%'><span class='0807'></span></td>    
			</tr>
			
			<tr>
				<td width='33%'>制热开机温度:&nbsp;&nbsp;<span class='HOtem_1799'></span>&nbsp;&nbsp;</td>
				<td width='33%'>制热关机温度:&nbsp;&nbsp;<span class='HCtem_1799'></span>&nbsp;&nbsp;</td>
			  <td width='33%'><span class='0807'></span></td>    
			</tr>

    </table>
    
        <table width='100%' style='margin-top: 30px'>
      <tr><td style='border: none'> <h1>设备状态</h1></td></tr>
			
			<tr>
				<td width='33%'>制冷或制热:&nbsp;&nbsp;<span class='DevSt1_1799'></span>&nbsp;&nbsp;</td>
				<td width='33%'>风机状态:&nbsp;&nbsp;<span class='DevSt2_1799'></span>&nbsp;&nbsp;</td>
			  <td width='33%'>制冷开关状态:&nbsp;&nbsp;<span class='DevSt3_1799'></span>&nbsp;&nbsp;</td>  
			</tr>
			<tr>
				<td width='33%'>制热开关状态:&nbsp;&nbsp;<span class='DevSt4_1799'></span>&nbsp;&nbsp;</td>
				<td width='33%'>化霜状态:&nbsp;&nbsp;<span class='DevSt5_1799'></span>&nbsp;&nbsp;</td>
			  <td width='33%'>化霜类型:&nbsp;&nbsp;<span class='HType_1799'></span>&nbsp;&nbsp;</td>  
			</tr>
			<tr>
				<td width='33%'>化霜停止温度:&nbsp;&nbsp;<span class='HStem_1799'></span>&nbsp;&nbsp;</td>
				<td width='33%'>风机工作模式:&nbsp;&nbsp;<span class='WindMode_1799'></span>&nbsp;&nbsp;</td>
			  <td width='33%'>库温下限报警值:&nbsp;&nbsp;<span class='FLtem_1799'></span>&nbsp;&nbsp;</td>  
			</tr>
			<tr>
				<td width='33%'>库温上限报警值:&nbsp;&nbsp;<span class='FHtem_1799'></span>&nbsp;&nbsp;</td>
				<td width='33%'>是否启用报警音:&nbsp;&nbsp;<span class='AlarmOn_1799'></span>&nbsp;&nbsp;</td>
			  <td width='33%'>风机继电器状态:&nbsp;&nbsp;<span class='WindSt_1799'></span>&nbsp;&nbsp;</td>  
			</tr>
			
			<tr>
				<td width='33%'>加热丝继电器状态:&nbsp;&nbsp;<span class='HeatSt_1799'></span>&nbsp;&nbsp;</td>
				<td width='33%'>压缩机继电器状态:&nbsp;&nbsp;<span class='AlarmOn_1799'></span>&nbsp;&nbsp;</td>
			  <td width='33%'><span class='0807'></span></td>  
			</tr>

    </table>
    
     <table width='100%' style='margin-top: 30px'>
      <tr><td style='border: none'> <h1>报警状态</h1></td></tr>
			
			<tr>
				<td width='33%'>门打开报警:&nbsp;&nbsp;<span class='DevAlarm1_1799'></span>&nbsp;&nbsp;</td>
				<td width='33%'>压力开关报警:&nbsp;&nbsp;<span class='DevAlarm2_1799'></span>&nbsp;&nbsp;</td>
			  <td width='33%'>紧急外部报警:&nbsp;&nbsp;<span class='DevAlarm3_1799'></span>&nbsp;&nbsp;</td>  
			</tr>
			<tr>
				<td width='33%'>普通外部报警:&nbsp;&nbsp;<span class='DevAlarm4_1799'></span>&nbsp;&nbsp;</td>
				<td width='33%'>超出试用时间报警:&nbsp;&nbsp;<span class='DevAlarm5_1799'></span>&nbsp;&nbsp;</td>
			  <td width='33%'>库温超下限报警:&nbsp;&nbsp;<span class='DevAlarm6_1799'></span>&nbsp;&nbsp;</td>  
			</tr>
			<tr>
				<td width='33%'>库温超上限报警:&nbsp;&nbsp;<span class='DevAlarm7_1799'></span>&nbsp;&nbsp;</td>
				<td width='33%'>化霜探头故障报警:&nbsp;&nbsp;<span class='DevAlarm8_1799'></span>&nbsp;&nbsp;</td>
			  <td width='33%'>库温探头故障报警:&nbsp;&nbsp;<span class='DevAlarm9_1799'></span>&nbsp;&nbsp;</td>  
			</tr>

    </table>

    </td>
    </tr>
  </table>
    <a href='javascript:history.back()' class='back' style='color: #fff'>返回</a>
    </div>
<script>
var itype=1799;
var tescape= 5000,time;

<% db_Open("/NandFlash/tmp/dbDat0.db3"); %>
var sid=<% write(sid);%>;
var tag1=<% write(db_QryInt("select Tag1 from tbSM where SID="+sid,1));%>;
var json=<% db_QryAdv("select * from tbAircEK3030E 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){
        $(".SID1799").html(n.SID);
        $(".Addr1799").html(n.Addr);
        $(".Port1799").html(n.Port%256);
        $(".DateUpd1799").html(n.DateUpd);
        $(".State1799").html(parseState(n.State));

		{ 
	 
	 		$(".Ftem_1799").html(n.Ftem/10+"°C");
	 		$(".Htem_1799").html(n.Htem/10+"°C");
	 		$(".COtem_1799").html(n.COtem/10+"°C");
	 		$(".CCtem_1799").html(n.CCtem/10+"°C");
	 		$(".HOtem_1799").html(n.HOtem/10+"°C");
	 		$(".HCtem_1799").html(n.HCtem/10+"°C");

			//if(n.mType == 0)
	 		//	$(".mType_1799").html("KE3030E");
	 		//else 
				$(".mType_1799").html("ECB-1000S");
	 
	 		$(".AlarmOn_1799").html(n.AlarmOn ? "是" : "否");
	 		$(".WindSt_1799").html(n.WindSt ? "打开" : "关闭");
	 		$(".HeatSt_1799").html(n.HeatSt ? "打开" : "关闭");
	 		$(".YsSt_1799").html(n.YsSt ? "打开" : "关闭");
	 		
	 		$(".FLtem_1799").html(n.FLtem/10+"°C");
	 		$(".FHtem_1799").html(n.FHtem/10+"°C");
	 		
	 		if(n.WindMode == 0)
	 			$(".WindMode_1799").html("风机与压机同启");
	 		else if(n.WindMode == 1)
	 			$(".WindMode_1799").html("风机持续运转(滴水后无延时启动)");
	 		else if(n.WindMode == 2)
	 			$(".WindMode_1799").html("风机持续运转，化霜和滴水时停止");
	 		else
	 			$(".WindMode_1799").html("风机滞后压缩机1-300启动");
	 			
	 		$(".HStem_1799").html(n.HStem/10+"°C");
	 		
	 		if(n.HType==0)
	 			$(".HType_1799").html("电热化霜");
	 		else if(n.HType==1)
	 			$(".HType_1799").html("热气化霜");
	 		else
	 			$(".HType_1799").html("风除霜");
	 		
			$(".DevSt1_1799").html(n.DevSt1 ? "制热" : "制冷");
			$(".DevSt2_1799").html(n.DevSt2 ? "开启" : "关闭");
			$(".DevSt3_1799").html(n.DevSt3 ? "开启" : "关闭");
			$(".DevSt4_1799").html(n.DevSt4 ? "开启" : "关闭");
			$(".DevSt5_1799").html(n.DevSt5 ? "开启" : "关闭");
			
			$(".DevAlarm1_1799").html(n.DevAlarm1 ? "报警" : "正常");
			$(".DevAlarm2_1799").html(n.DevAlarm2 ? "报警" : "正常");
			$(".DevAlarm3_1799").html(n.DevAlarm3 ? "报警" : "正常");
			$(".DevAlarm4_1799").html(n.DevAlarm4 ? "报警" : "正常");
			$(".DevAlarm5_1799").html(n.DevAlarm5 ? "报警" : "正常");
			$(".DevAlarm6_1799").html(n.DevAlarm6 ? "报警" : "正常");
			$(".DevAlarm7_1799").html(n.DevAlarm7 ? "报警" : "正常");
			$(".DevAlarm8_1799").html(n.DevAlarm8 ? "报警" : "正常");
			$(".DevAlarm9_1799").html(n.DevAlarm9 ? "报警" : "正常");
			
		}

    })
    $("span:contains('故障'),span:contains('报警'),span:contains('异常')").addClass("red").removeClass("ger");
    $("span:contains('正常')").addClass("ger").removeClass("red");
}

function parseState(istate)
{
    if(istate==0) return "正常";
    else   if(istate==1) return "告警";
    else return "故障";
}



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