<!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='type2050 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='SID2050'> </span>&nbsp;&nbsp;&nbsp;编址:<span class='Addr2050'> </span>&nbsp;&nbsp;&nbsp;数据端口:<span class='Port2050'> </span></td></tr>
        <tr><td style='width: 200px;'>更新时间</td><td><span class='DateUpd2050'> </span></td></tr>
        <tr><td style='width: 200px;'>监测项状态</td><td><span class='State2050'> </span></td></tr>
    </table>
	
    <table width='100%' style='margin-top: 10px'>
        <tr><td style='border: none'> <h1>空调监测量</h1></td></tr>
		<tr><td style='width: 200px;'>水温</td><td><span class='temw2050'> </span>&nbsp;℃</td>			<td style='width: 200px;'></td><td><span class='2050'> </span></td></tr>
		<tr><td style='width: 200px;'>回风温度</td><td><span class='temr2050'> </span>&nbsp;℃</td>		<td style='width: 200px;'>回风湿度</td><td><span class='humr2050'> </span>&nbsp;%RH</td></tr>
		<tr><td style='width: 200px;'>送风温度</td><td><span class='tems2050'> </span>&nbsp;℃</td>		<td style='width: 200px;'>送风湿度</td><td><span class='hums2050'> </span>&nbsp;%RH</td></tr>
		<tr><td style='width: 200px;'>室外温度</td><td><span class='temo2050'> </span>&nbsp;℃</td>		<td style='width: 200px;'>室外湿度</td><td><span class='humo2050'> </span>&nbsp;%RH</td></tr>
		<tr><td style='border: none'>  </td></tr>
		
		<tr><td style='width: 200px;'>最高水温</td><td><span class='temWH2050'> </span>&nbsp;℃</td>    <td style='width: 200px;'>最低水温</td><td><span class='temWL2050'> </span>&nbsp;℃</td></tr>
		<tr><td style='width: 200px;'>最高送风温度</td><td><span class='temSH2050'> </span>&nbsp;℃</td> <td style='width: 200px;'>最高送风湿度</td><td><span class='humSH2050'> </span>&nbsp;%RH</td></tr>
    	<tr><td style='width: 200px;'>最低送风温度</td><td><span class='temSL2050'> </span>&nbsp;℃</td> <td style='width: 200px;'>最低送风湿度</td><td><span class='humSL2050'> </span>&nbsp;%RH</td></tr>
		<tr><td style='width: 200px;'>最高回风温度</td><td><span class='temRH2050'> </span>&nbsp;℃</td> <td style='width: 200px;'>最高回风湿度</td><td><span class='humRH2050'> </span>&nbsp;%RH</td></tr>
		<tr><td style='width: 200px;'>最低回风温度</td><td><span class='temRL2050'> </span>&nbsp;℃</td> <td style='width: 200px;'>最低回风湿度</td><td><span class='humRL2050'> </span>&nbsp;%RH</td></tr>
	</table>
    </td>
    </tr>
  </table>
    <a href='javascript:history.back()' class='back' style='color: #fff'>返回</a>
</div>
<script>
var itype=2050;
var tescape= 5000,time;

<% db_Open("/NandFlash/tmp/dbDat0.db3"); %>
var sid=<% write(sid);%>;
var json=<% db_QryAdv("select * from tbCybStulz 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) {
      if (n.RunSt == 0) {
        n.RunSt = "停止";
      } 
	  else {
        n.RunSt = "启动";
      }
      $(".SID2050").html(n.SID);
      $(".Addr2050").html(n.Addr);
      $(".Port2050").html(n.Port % 256);
      $(".DateUpd2050").html(n.DateUpd);
      $(".State2050").html(window.parent.parseState(n.State));

      $(".runst2050").html(n.RunSt);
      //$(".tem2050").html(n.Tem/10);
      //$(".hum2050").html(n.Hum/10);
      //$(".temset2050").html(n.TemSet/10);
      //$(".humset2050").html(n.HumSet/10);
      $(".temr2050").html(n.TemR/10);
      $(".tems2050").html(n.TemS/10);
      $(".humr2050").html(n.HumR/10);
      $(".hums2050").html(n.HumS/10);
      $(".temo2050").html(n.TemO/10);
      $(".humo2050").html(n.HumO/10);
      $(".temw2050").html(n.TemW/10);
	  
      $(".temWH2050").html(n.TemWH);
      $(".temWL2050").html(n.TemWL);
      $(".temSH2050").html(n.TemSH);
      $(".humSH2050").html(n.HumSH);
      $(".temSL2050").html(n.TemSL);
      $(".humSL2050").html(n.HumSL);
      $(".temRH2050").html(n.TemRH);
      $(".humRH2050").html(n.HumRH);
      $(".temRL2050").html(n.TemRL);
      $(".humRL2050").html(n.HumRL);
	  
    })
    $("span:contains('故障'),span:contains('告警'),span:contains('闭合'),span:contains('关闭')").addClass("red").removeClass("ger");
    $("span:contains('正常')").addClass("ger").removeClass("red");
  }
</script>
</body>
</html>