<!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='type2053 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>行间空调GT系列</h1></td></tr>
        <tr><td style='width: 200px;'>基本信息</td><td>SID:<span class='SID2053'> </span>&nbsp;&nbsp;&nbsp;编址:<span class='Addr2053'> </span>&nbsp;&nbsp;&nbsp;数据端口:<span class='Port2053'> </span></td></tr>
        <tr><td style='width: 200px;'>更新时间</td><td><span class='DateUpd2053'> </span></td></tr>
        <tr><td style='width: 200px;'>监测项状态</td><td><span class='State2053'> </span></td></tr>
		<tr><td style='width: 200px;'>机组状态</td><td><span class='aircstate2053'> </span></td></tr>
		<tr><td style='width: 200px;'>回风温度</td><td><span class='hfwd2053'> </span>&nbsp;℃</td></tr>
		<tr><td style='width: 200px;'>回风湿度</td><td><span class='hfsd2053'> </span>&nbsp;%RH</td></tr>
		<tr><td style='width: 200px;'>送风温度</td><td><span class='sfwd2053'> </span>&nbsp;℃</td></tr>
		<tr><td style='width: 200px;'>温度设定点</td><td><span class='wdset2053'> </span>&nbsp;℃</td></tr>
		<tr><td style='width: 200px;'>湿度设定点</td><td><span class='sdset2053'> </span>&nbsp;%RH</td></tr>
    </table>
    <table width='100%' style='margin-top: 5px'>
        <tr><td >回风温度探头故障:<span class='hfwdgz2053'></span></td><td>送风温度探头故障:<span class='sfwdgz2053'></span></td><td>回风湿度探头故障:<span class='hfsdgz2053'> </span></td><td>送风机或电源故障:<span class='sfgz2053'></span></td></tr>
        <tr><td>压机1过载或冷凝风机过载:<span class='yj1gzgz2053'> </span></td><td>压机2过载或冷凝风机过载:<span class='yj2gzgz2053'> </span></td><td>压机1低压保护:<span class='yj1dygz2053'></span></td><td>压机2低压保护:<span class='yj2dygz2053'></span></td></tr>
		<tr><td>电加热故障:<span class='jrgz2053'></span></td><td>加湿器故障:<span class='jsgz2053'></span></td><td>风流量开关:<span class='flkglgz2053'> </span></td><td>风流量开关报警:<span class='flkglbj2053'></span></td></tr>
    </table>	
    </td>
    </tr>
  </table>
    <a href='javascript:history.back()' class='back' style='color: #fff'>返回</a>
</div>
<script>
  var itype=2053;
  var tescape= 5000,time;
  
<% db_Open("/NandFlash/tmp/dbDat0.db3"); %>
var sid=<% write(sid);%>;
var json=<% db_QryAdv("select * from tbLinegt 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);

  var aircstate = "";

  function list3(data) {
    $.each(data.recs, function(i, n) {
      $(".SID2053").html(n.SID);
      $(".Addr2053").html(n.Addr);
      $(".Port2053").html(n.Port % 256);
      $(".DateUpd2053").html(n.DateUpd);
      $(".State2053").html(window.parent.parseState(n.State));
      if (n.aircstate == "1") {
        aircstate = "机组运行";
      } else if (n.aircstate == "2") {
        aircstate = "报警停机";
      } else if (n.aircstate == "4") {
        aircstate = "监控停机";
      } else if (n.aircstate == "6") {
        aircstate = "远程停机";
      } else if (n.aircstate == "7") {
        aircstate = "按键停机";
      } else if (n.aircstate == "12") {
        aircstate = "机组制冷";
      } else if (n.aircstate == "13") {
        aircstate = "制热加湿";
      } else if (n.aircstate == "14") {
        aircstate = "制热除湿";
      }
      $(".aircstate2053").html(aircstate);
      $(".hfwd2053").html(n.hfwd / 10);
      $(".hfsd2053").html(n.hfsd / 10);
      $(".sfwd2053").html(n.sfwd / 10);
      $(".wdset2053").html(n.wdset / 10);
      $(".sdset2053").html(n.sdset / 10);
      if (n.hfwdgz == "0") {
        n.hfwdgz = "无故障";
      } else {
        n.hfwdgz = "有故障";
      }
      $(".hfwdgz2053").html(n.hfwdgz);
      if (n.sfwdgz == "0") {
        n.sfwdgz = "无故障";
      } else {
        n.sfwdgz = "有故障";
      }
      $(".sfwdgz2053").html(n.sfwdgz);
      if (n.hfsdgz == "0") {
        n.hfsdgz = "无故障";
      } else {
        n.hfsdgz = "有故障";
      }
      $(".hfsdgz2053").html(n.hfsdgz);
      if (n.sfgz == "0") {
        n.sfgz = "无故障";
      } else {
        n.sfgz = "有故障";
      }
      $(".sfgz2053").html(n.sfgz);
      if (n.yj1gzgz == "0") {
        n.yj1gzgz = "无故障";
      } else {
        n.yj1gzgz = "有故障";
      }
      $(".yj1gzgz2053").html(n.yj1gzgz);
      if (n.yj2gzgz == "0") {
        n.yj2gzgz = "无故障";
      } else {
        n.yj2gzgz = "有故障";
      }
      $(".yj2gzgz2053").html(n.yj2gzgz);
      if (n.yj1dygz == "0") {
        n.yj1dygz = "无故障";
      } else {
        n.yj1dygz = "有故障";
      }
      $(".yj1dygz2053").html(n.yj1dygz);
      if (n.yj2dygz == "0") {
        n.yj2dygz = "无故障";
      } else {
        n.yj2dygz = "有故障";
      }
      $(".yj2dygz2053").html(n.yj2dygz);
      if (n.jrgz == "0") {
        n.jrgz = "无故障";
      } else {
        n.jrgz = "有故障";
      }
      $(".jrgz2053").html(n.jrgz);
      if (n.jsgz == "0") {
        n.jsgz = "无故障";
      } else {
        n.jsgz = "有故障";
      }
      $(".jsgz2053").html(n.jsgz);
      if (n.flkglgz == "0") {
        n.flkglgz = "无故障";
      } else {
        n.flkglgz = "有故障";
      }
      $(".flkglgz2053").html(n.flkglgz);
      if (n.flkglbj == "0") {
        n.flkglbj = "无故障";
      } else {
        n.flkglbj = "有故障";
      }
      $(".flkglbj2053").html(n.flkglbj);
    })
    $("span:contains('有故障'),span:contains('告警'),span:contains('闭合'),span:contains('关闭')").addClass("red").removeClass("ger");
    $("span:contains('正常')").addClass("ger").removeClass("red");
  }
</script>
</body>
</html>