<!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='type2073 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='SID2073'> </span>&nbsp;&nbsp;&nbsp;编址:<span class='Addr2073'> </span>&nbsp;&nbsp;&nbsp;数据端口:<span class='Port2073'> </span></td></tr>
        <tr><td style='width: 200px;'>更新时间</td><td><span class='DateUpd2073'> </span></td></tr>
        <tr><td style='width: 200px;'>监测项状态</td><td><span class='State2073'> </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='TemExtCiol2073'></span></td><td width='50%'>内盘管温度: <span class='TemInCiol2073'></span></td></tr>
		<tr><td width='50%'>室内温度: <span class='TemIn2073'></span></td><td width='50%'>室内湿度: <span class='HumIn2073'></span></td></tr>
		<tr><td width='50%'>设定温度: <span class='TemSet2073'></span></td><td width='50%'>设定湿度: <span class='HumSet2073'></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='StPhaseErr2073'></span></td><td width='50%'>高压保护: <span class='StPreHighProt2073'></span></td></tr>
		<tr><td width='50%'>压缩机过载: <span class='StCompOverLoad2073'></span></td><td width='50%'>低压保护: <span class='StPreLowProt2073'></span></td></tr>
		<tr><td width='50%'>压缩机输出: <span class='StComp2073'></span></td><td width='50%'>外风机输出: <span class='StFanOut2073'></span></td></tr>
		<tr><td width='50%'>内风机输出: <span class='StFanIn2073'></span></td><td width='50%'>电加热1输出: <span class='StHeater1On2073'></span></td></tr>
		<tr><td width='50%'>加湿器输出: <span class='StHumOn2073'></span></td><td width='50%'>制冷阀输出: <span class='StCoolerOn2073'></span></td></tr>
        <tr><td width='50%'>除湿阀输出: <span class='StDeHumOn2073'></span></td><td>四通阀输出: <span class='StFWValue2073'></span></td></tr>
		<tr><td width='50%'>电加热2输出: <span class='StHeater2On2073'></span></td><td width='50%'><span class='2073'></span></td></tr>
    </table>
    <table width='100%' style='margin-top: 30px'>
        <tr><td style='border: none'> <h1>报警状态</h1></td></tr>
		<td width='50%'>相序错误: <span class='AlmPhaseErr2073'></span></td><td width='50%'>高压报警: <span class='AlmPreHighProt2073'></span></td></tr>
		<tr><td width='50%'>压缩机过载: <span class='AlmCompOverLoad2073'></span></td><td width='50%'>低压报警: <span class='AlmPreLowProt2073'></span></td></tr>
		<tr><td width='50%'>外盘管温度传感器故障: <span class='ErrTemExtCiol2073'></span></td><td width='50%'>内盘管温度传感器故障: <span class='ErrTemInCiol2073'></span></td></tr>
		<tr><td width='50%'>室内温度传感器故障: <span class='ErrTemIn2073'></span></td><td width='50%'>室内湿度传感器故障: <span class='ErrHumIn2073'></span></td></tr>
    </table>
    </td>
    </tr>
  </table>
    <a href='javascript:history.back()' class='back' style='color: #fff'>返回</a>
</div>
<script>
var itype=2073;
var tescape= 5000,time;
  
<% db_Open("/NandFlash/tmp/dbDat0.db3"); %>
var sid=<% write(sid);%>;
var json=<% db_QryAdv("select * from tbCyberHstx 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){
        $(".SID2073").html(n.SID);
        $(".Addr2073").html(n.Addr);
        $(".Port2073").html(n.Port%256);
        $(".DateUpd2073").html(n.DateUpd);
        $(".State2073").html(window.parent.parseState(n.State));
		
		$(".TemExtCiol2073").html(n.TemExtCiol/10 + "℃");
		$(".TemInCiol2073").html(n.TemInCiol/10 + "℃");
		$(".TemIn2073").html(n.TemIn/10 + "℃");
		$(".HumIn2073").html(n.HumIn/10 + "％");
		$(".TemSet2073").html(n.TemSet/10 + "℃");
		$(".HumSet2073").html(n.HumSet/10 + "％");
		
		$(".StPhaseErr2073").html(n.StPhaseErr ? "是" : "否");
		$(".StPreHighProt2073").html(n.StPreHighProt ? "是" : "否");
		$(".StCompOverLoad2073").html(n.StCompOverLoad ? "是" : "否");
		$(".StPreLowProt2073").html(n.StPreLowProt ? "是" : "否");
		$(".StComp2073").html(n.StComp ? "是" : "否");
		$(".StFanOut2073").html(n.StFanOut ? "是" : "否");
		$(".StFanIn2073").html(n.StFanIn ? "是" : "否");
		$(".StHeater1On2073").html(n.StHeater1On ? "是" : "否");
		$(".StHumOn2073").html(n.StHumOn ? "是" : "否");
		$(".StCoolerOn2073").html(n.StCoolerOn ? "是" : "否");
		$(".StDeHumOn2073").html(n.StDeHumOn ? "是" : "否");
		$(".StFWValue2073").html(n.StFWValue ? "是" : "否");
		$(".StHeater2On2073").html(n.StHeater2On ? "是" : "否");
		$(".AlmPhaseErr2073").html(n.AlmPhaseErr ? "是" : "否");
		$(".AlmPreHighProt2073").html(n.AlmPreHighProt ? "是" : "否");
		$(".AlmCompOverLoad2073").html(n.AlmCompOverLoad ? "是" : "否");
		$(".AlmPreLowProt2073").html(n.AlmPreLowProt ? "是" : "否");
		$(".ErrTemExtCiol2073").html(n.ErrTemExtCiol ? "是" : "否");
		$(".ErrTemInCiol2073").html(n.ErrTemInCiol ? "是" : "否");
		$(".ErrTemIn2073").html(n.ErrTemIn ? "是" : "否");
		$(".ErrHumIn2073").html(n.ErrHumIn ? "是" : "否");
		
		
    })
	$("span:contains('故障'),span:contains('告警'),,span:contains('闭合'),span:contains('关闭')").addClass("red").removeClass("ger");
        $("span:contains('正常')").addClass("ger").removeClass("red");
    
}

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