<!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='type2071 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='SID2071'> </span>&nbsp;&nbsp;&nbsp;编址:<span class='Addr2071'> </span>&nbsp;&nbsp;&nbsp;数据端口:<span class='Port2071'> </span></td></tr>
        <tr><td style='width: 200px;'>更新时间</td><td><span class='DateUpd2071'> </span></td></tr>
        <tr><td style='width: 200px;'>监测项状态</td><td><span class='State2071'> </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='RoomTem2071'></span></td><td width='50%'>室外温度: <span class='OutdoorTem2071'></span></td></tr>
		<tr><td width='50%'>送风温度: <span class='DeliveryAirTem2071'></span></td><td width='50%'>循环水温度: <span class='ChilledWaterTem2071'></span></td></tr>
		<tr><td width='50%'>热水温度: <span class='HotWaterTem2071'></span></td><td width='50%'>室内湿度: <span class='RoomHum2071'></span></td></tr>
    </table>
    <table width='100%' style='margin-top: 30px'>
        <tr><td> <h1>报警状态</h1></td></tr>
		<tr><td>温度高报警: <span class='almTemHigh2071'></span></td><td width='50%'>温度低报警: <span class='almTemLow2071'></span></td></tr>
		<tr><td>湿度高报警: <span class='almHumHigh2071'></span></td><td width='50%'>湿度低报警: <span class='almHumLow2071'></span></td></tr>
        <tr><td>失去气流报警: <span class='almHeaterOH2071'></span></td><td>加热器过热: <span class='almHeaterOH2071'></span></td></tr>
		<tr><td>高压1报警: <span class='almCircuit1High2071'></span></td><td>高压2报警: <span class='almCircuit2High2071'></span></td></tr>
		<tr><td>低压1报警: <span class='almCircuit1Low2071'></span></td><td>低压2报警: <span class='almCircuit2Low2071'></span></td></tr>
		<tr><td>电子阀1故障: <span class='errCircuitElec12071'></span></td><td>电子阀2故障: <span class='errCircuitElec22071'></span></td></tr>
		<tr><td>相序错误: <span class='almWrongPhase2071'></span></td><td>烟感报警: <span class='almSmokeFire2071'></span></td></tr>
		<tr><td>加湿器高电流报警: <span class='almHumHighCur2071'></span></td><td>加湿器供电丢失报警: <span class='almHumPowerLoss2071'></span></td></tr>
		<tr><td>加湿器水量不够报警: <span class='almHumWaterLoss2071'></span></td><td>除湿器温度过高: <span class='almCWTemHigh2071'></span></td></tr>
		<tr><td>水位低报警: <span class='almCWWaterFlowLow2071'></span></td><td>水位丢失报警: <span class='almWaterFlowLoss2071'></span></td></tr>
		<tr><td>水温高报警: <span class='almWaterTemHigh2071'></span></td><td>回风温度传感器故障: <span class='errRoomAirTemSensor2071'></span></td></tr>
		<tr><td>热水温度传感器故障: <span class='errHotWaterTempSensor2071'></span></td><td>循环水温度传感器故障: <span class='errWaterTempSensor2071'></span></td></tr>
		<tr><td>室外温度传感器故障: <span class='errOutdoorTemSensor2071'></span></td><td>送风温度传感器故障: <span class='errDeliAirTempSensor2071'></span></td></tr>
		<tr><td>室内湿度传感器故障: <span class='errRoomHumSensor2071'></span></td><td>循环水传感器故障: <span class='errWaterOutlet2071'></span></td></tr>
    </table>
	<table width='100%' style='margin-top: 30px'>
        <tr><td style='border: none'> <h1>系统状态</h1></td></tr>
        <tr><td>风扇开: <span class='stFanOn2071'></span></td><td>压缩机 1 开: <span class='stComp12071'></span></td></tr>
		<tr><td>压缩机 2 开: <span class='almCircuit1High2071'></span></td><td>压缩机 3 开: <span class='almHeaterOH2071'></span></td></tr>
		<tr><td>压缩机 4 开: <span class='stComp42071'></span></td><td>加热 1 开: <span class='stHeater12071'></span></td></tr>
		<tr><td>加热 2 开: <span class='stHeater22071'></span></td><td>热气开<span class='stHotgas2071'></span></td></tr>
		<tr><td>除湿开: <span class='stDehumid2071'></span></td><td>加湿开<span class='stHumidi2071'></span></td></tr>
		<tr><td>应急工作: <span class='stEmergency2071'></span></td><td> <span class='xxx2071'></span></td></tr>
    </table>
    </td>
    </tr>
  </table>

    <a href='javascript:history.back()' class='back' style='color: #fff'>返回</a>
</div>
<script>
var itype=2071;
var tescape= 5000,time;
  
<% db_Open("/NandFlash/tmp/dbDat0.db3"); %>
var sid=<% write(sid);%>;
var json=<% db_QryAdv("select * from tbCyberUG40 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){
        $(".SID2071").html(n.SID);
        $(".Addr2071").html(n.Addr);
        $(".Port2071").html(n.Port%256);
        $(".DateUpd2071").html(n.DateUpd);
        $(".State2071").html(window.parent.parseState(n.State));
		
		$(".RoomTem2071").html(n.RoomTem/10+"℃");
		$(".OutdoorTem2071").html(n.OutdoorTem/10+"℃");
		$(".DeliveryAirTem2071").html(n.DeliveryAirTem/10+"℃");
		$(".ChilledWaterTem2071").html(n.ChilledWaterTem/10+"℃");
		$(".HotWaterTem2071").html(n.HotWaterTem/10+"℃");
		$(".RoomHum2071").html(n.RoomHum/10+"%RH");
		
		$(".stFanOn2071").html(n.stFanOn ? "是" : "否");
		$(".stComp12071").html(n.stComp1 ? "是" : "否");
		$(".stComp22071").html(n.stComp2 ? "是" : "否");
		$(".stComp32071").html(n.stComp3 ? "是" : "否");
		$(".stComp42071").html(n.stComp4 ? "是" : "否");
		$(".stHeater12071").html(n.stHeater1 ? "是" : "否");
		$(".stHeater22071").html(n.stHeater2 ? "是" : "否");
		$(".stHotgas2071").html(n.stHotgas ? "是" : "否");
		$(".stDehumid2071").html(n.stDehumid ? "是" : "否");
		$(".stHumidi2071").html(n.stHumidi ? "是" : "否");
		$(".stEmergency2071").html(n.stEmergency ? "是" : "否");
		$(".almTemHigh2071").html(n.almTemHigh ? "是" : "否");
		$(".almTemLow2071").html(n.almTemLow ? "是" : "否");
		$(".almHumHigh2071").html(n.almHumHigh ? "是" : "否");
		$(".almHumLow2071").html(n.almHumLow ? "是" : "否");
		$(".almAirFlowLoss2071").html(n.almAirFlowLoss ? "是" : "否");
		$(".almHeaterOH2071").html(n.almHeaterOH ? "是" : "否");
		$(".almCircuit1High2071").html(n.almCircuit1High ? "是" : "否");
		$(".almCircuit2High2071").html(n.almCircuit2High ? "是" : "否");
		$(".almCircuit1Low2071").html(n.almCircuit1Low ? "是" : "否");
		$(".almCircuit2Low2071").html(n.almCircuit2Low ? "是" : "否");
		$(".errCircuitElec12071").html(n.errCircuitElec1 ? "是" : "否");
		$(".errCircuitElec22071").html(n.errCircuitElec2 ? "是" : "否");
		$(".almWrongPhase2071").html(n.almWrongPhase ? "是" : "否");
		$(".almSmokeFire2071").html(n.almSmokeFire ? "是" : "否");
		$(".almHumHighCur2071").html(n.almHumHighCur ? "是" : "否");
		$(".almHumPowerLoss2071").html(n.almHumPowerLoss ? "是" : "否");
		$(".almHumWaterLoss2071").html(n.almHumWaterLoss ? "是" : "否");
		$(".almCWTemHigh2071").html(n.almCWTemHigh ? "是" : "否");
		$(".almCWWaterFlowLow2071").html(n.almCWWaterFlowLow ? "是" : "否");
		$(".almWaterFlowLoss2071").html(n.almWaterFlowLoss ? "是" : "否");
		$(".almWaterTemHigh2071").html(n.almWaterTemHigh ? "是" : "否");
		$(".errRoomAirTemSensor2071").html(n.errRoomAirTemSensor ? "是" : "否");
		$(".errHotWaterTempSensor2071").html(n.errHotWaterTempSensor ? "是" : "否");
		$(".errWaterTempSensor2071").html(n.errWaterTempSensor ? "是" : "否");
		$(".errOutdoorTemSensor2071").html(n.errOutdoorTemSensor ? "是" : "否");
		$(".errDeliAirTempSensor2071").html(n.errDeliAirTempSensor ? "是" : "否");
		$(".errRoomHumSensor2071").html(n.errRoomHumSensor ? "是" : "否");
		$(".errWaterOutlet2071").html(n.errWaterOutlet ? "是" : "否");
		
    })
	$("span:contains('故障'),span:contains('告警'),,span:contains('闭合'),span:contains('关闭')").addClass("red").removeClass("ger");
        $("span:contains('正常')").addClass("ger").removeClass("red");
    
}

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