<!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='type269 empty' style=' margin: 10px;'>
  <table width="100%">
    <tr>
    <td width="300px" style="text-align: center;"><img src="img/ico-elec.png" style="width: 70%;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='SID269'> </span>&nbsp;&nbsp;&nbsp;编址:<span class='Addr269'> </span>&nbsp;&nbsp;&nbsp;数据端口:<span class='Port269'></span></td></tr>
        <tr><td style='width: 200px;'>更新时间</td><td><span class='DateUpd269'> </span></td></tr>
        <tr><td style='width: 200px;'>监测项状态</td><td><span class='State269'> </span></td></tr>
    </table>

    <table id="jpmcwb1" width='100%' style='margin-top: 30px'>
        <tr><td style='border: none'> <h1>1路</h1></td></tr>
        <tr><td style='width: 200px'>电压：&nbsp;&nbsp;<span class='Ady1269'> </span></td>
		<td style='width: 200px'>电流：&nbsp;&nbsp;<span class='Adl1269'> </span></td>
		<td style='width: 200px'>频率：&nbsp;&nbsp;<span class='PL1269'> </span></td></tr>
        <tr><td style='width: 200px'>有功总电能：&nbsp;&nbsp;<span class='Ygzdn1269'> </span></td>
		<td style='width: 200px'>有功功率：&nbsp;&nbsp;<span class='Zyggl1269'> </span></td>
		<td style='width: 200px'>功率因数：&nbsp;&nbsp;<span class='Zglys1269'> </span></td></tr>
    </table>
	
    <table id="jpmcwb1" width='100%' style='margin-top: 30px'>
        <tr><td style='border: none'> <h1>2路</h1></td></tr>
        <tr><td style='width: 200px'>电压：&nbsp;&nbsp;<span class='Ady2269'> </span></td>
        <td style='width: 200px'>电流：&nbsp;&nbsp;<span class='Adl2269'> </span></td>
        <td style='width: 200px'>频率：&nbsp;&nbsp;<span class='PL2269'> </span></td></tr>
        <tr><td style='width: 200px'>有功总电能：&nbsp;&nbsp;<span class='Ygzdn2269'> </span></td>
        <td style='width: 200px'>有功功率：&nbsp;&nbsp; <span class='Zyggl2269'> </span></td>
        <td style='width: 200px'>功率因数：&nbsp;&nbsp;<span class='Zglys2269'> </span></td></tr>
    </table>
	
    <table id="jpmcwb1" width='100%' style='margin-top: 30px'>
        <tr><td style='border: none'> <h1>3路</h1></td></tr>
        <tr><td style='width: 200px'>电压：&nbsp;&nbsp;<span class='Ady3269'> </span></td>
        <td style='width: 200px'>电流：&nbsp;&nbsp;<span class='Adl3269'> </span></td>
        <td style='width: 200px'>频率：&nbsp;&nbsp;<span class='PL3269'> </span></td></tr>
        <tr><td style='width: 200px'>有功总电能：&nbsp;&nbsp;<span class='Ygzdn3269'> </span></td>
        <td style='width: 200px'>有功功率：&nbsp;&nbsp;<span class='Zyggl3269'> </span></td>
        <td style='width: 200px'>功率因数：&nbsp;&nbsp;<span class='Zglys3269'> </span></td></tr>
    </table>
	
    <table id="jpmcwb1" width='100%' style='margin-top: 30px'>
        <tr><td style='border: none'> <h1>4路</h1></td></tr>
        <tr><td style='width: 200px'>电压：&nbsp;&nbsp;<span class='Ady4269'> </span></td>
        <td style='width: 200px'>电流：&nbsp;&nbsp;<span class='Adl4269'> </span></td>
        <td style='width: 200px'>频率：&nbsp;&nbsp;<span class='PL4269'> </span></td></tr>
        <tr><td style='width: 200px'>有功总电能：&nbsp;&nbsp;<span class='Ygzdn4269'> </span></td>
        <td style='width: 200px'>有功功率：&nbsp;&nbsp;<span class='Zyggl4269'> </span></td>
        <td style='width: 200px'>功率因数：&nbsp;&nbsp;<span class='Zglys4269'> </span></td></tr>
    </table>
	
    <table id="jpmcwb1" width='100%' style='margin-top: 30px'>
        <tr><td style='border: none'> <h1>5路</h1></td></tr>
        <tr><td style='width: 200px'>电压：&nbsp;&nbsp;<span class='Ady5269'> </span></td>
        <td style='width: 200px'>电流：&nbsp;&nbsp;<span class='Adl5269'> </span></td>
        <td style='width: 200px'>频率：&nbsp;&nbsp;<span class='PL5269'> </span></td></tr>
        <tr><td style='width: 200px'>有功总电能：&nbsp;&nbsp;<span class='Ygzdn5269'> </span></td>
        <td style='width: 200px'>有功功率：&nbsp;&nbsp;<span class='Zyggl5269'> </span></td>
        <td style='width: 200px'>功率因数：&nbsp;&nbsp;<span class='Zglys5269'> </span></td></tr>
    </table>
	
    <table id="jpmcwb1" width='100%' style='margin-top: 30px'>
        <tr><td style='border: none'> <h1>6路</h1></td></tr>
        <tr><td style='width: 200px'>电压：&nbsp;&nbsp;<span class='Ady6269'> </span></td>
        <td style='width: 200px'>电流：&nbsp;&nbsp;<span class='Adl6269'> </span></td>
        <td style='width: 200px'>频率：&nbsp;&nbsp;<span class='PL6269'> </span></td></tr>
        <tr><td style='width: 200px'>有功总电能：&nbsp;&nbsp;<span class='Ygzdn6269'> </span></td>
        <td style='width: 200px'>有功功率：&nbsp;&nbsp;<span class='Zyggl6269'> </span></td>
        <td style='width: 200px'>功率因数：&nbsp;&nbsp;<span class='Zglys6269'> </span></td></tr>
    </table>
	
    </td>
    </tr>
  </table>
    <a href='javascript:history.back()' class='back' style='color: #fff'>返回</a>
    </div>
<script>
var itype=269;
var tescape= 5000,time;

<% db_Open("/NandFlash/tmp/dbDat0.db3"); %>
var sid=<% write(sid);%>;
var json=<% db_QryAdv("select * from tbElecJSYMK141 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){

        $(".SID269").html(n.SID);
        $(".Addr269").html(n.Addr);
        $(".Port269").html(n.Port%256);
        $(".DateUpd269").html(n.DateUpd);
        $(".State269").html(window.parent.parseState(n.State));

		$(".Ady1269").html(n.voltage1/10+"V");
		$(".Adl1269").html(n.current1/100+"A");
		$(".PL1269").html(n.frequency1/100+"Hz");
		$(".Ygzdn1269").html(n.energy1/1000+"KWH");
		$(".Zyggl1269").html(n.power1+"W");
		$(".Zglys1269").html(n.rateofwork1/1000);
		
		$(".Ady2269").html(n.voltage2/10+"V");
		$(".Adl2269").html(n.current2/100+"A");
		$(".PL2269").html(n.frequency2/100+"Hz");
		$(".Ygzdn2269").html(n.energy2/1000+"KWH");
		$(".Zyggl2269").html(n.power2+"W");
		$(".Zglys2269").html(n.rateofwork2/1000);
		
		$(".Ady3269").html(n.voltage3/10+"V");
		$(".Adl3269").html(n.current3/100+"A");
		$(".PL3269").html(n.frequency3/100+"Hz");
		$(".Ygzdn3269").html(n.energy3/1000+"KWH");
		$(".Zyggl3269").html(n.power3+"W");
		$(".Zglys3269").html(n.rateofwork3/1000);
		
		$(".Ady4269").html(n.voltage4/10+"V");
		$(".Adl4269").html(n.current4/100+"A");
		$(".PL4269").html(n.frequency4/100+"Hz");
		$(".Ygzdn4269").html(n.energy4/1000+"KWH");
		$(".Zyggl4269").html(n.power4+"W");
		$(".Zglys4269").html(n.rateofwork4/1000);
		
		$(".Ady5269").html(n.voltage5/10+"V");
		$(".Adl5269").html(n.current5/100+"A");
		$(".PL5269").html(n.frequency5/100+"Hz");
		$(".Ygzdn5269").html(n.energy5/1000+"KWH");
		$(".Zyggl5269").html(n.power5+"W");
		$(".Zglys5269").html(n.rateofwork5/1000);
		
		$(".Ady6269").html(n.voltage6/10+"V");
		$(".Adl6269").html(n.current6/100+"A");
		$(".PL6269").html(n.frequency6/100+"Hz");
		$(".Ygzdn6269").html(n.energy6/1000+"KWH");
		$(".Zyggl6269").html(n.power6+"W");
		$(".Zglys6269").html(n.rateofwork6/1000);
		
    });
    $("span:contains('故障'),span:contains('告警'),span:contains('闭合'),span:contains('关闭')").addClass("red").removeClass("ger");
    $("span:contains('正常')").addClass("ger").removeClass("red");
}
</script>
</body>
</html>