<!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='type260 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='SID260'> </span>&nbsp;&nbsp;&nbsp;编址:<span class='Addr260'> </span>&nbsp;&nbsp;&nbsp;数据端口:<span class='Port260'></span></td></tr>
        <tr><td style='width: 200px;'>更新时间</td><td><span class='DateUpd260'> </span></td></tr>
        <tr><td style='width: 200px;'>监测项状态</td><td><span class='State260'> </span></td></tr>
    </table>

    <table width='100%' style='margin-top: 30px'>
        <tr><td style='border: none'> <h1>电压(监测量)</h1></td></tr>
         <tr><td style='width: 33%' >一路交流UV电压:<span class='dyuv1260'> </span></td><td>一路交流VW电压:<span class='dyvw1260'> </span></td><td>一路交流WU电压:<span class='dywu1260'> </span></td></tr>
         <tr><td style='width: 33%' >二路交流UV电压:<span class='dyuv2260'> </span></td><td>二路交流VW电压:<span class='dyvw2260'> </span></td><td>二路交流WU电压:<span class='dywu2260'> </span></td></tr>
         <tr><td style='width: 33%' >母排电压:<span class='dymp260'> </span></td></tr>
    </table>

    <table width='100%' style='margin-top: 10px'>
        <tr><td style='border: none'> <h1>电流(监测量)</h1></td></tr>
        <tr><td  style='width: 33%' >A相电流:<span class='dlA260'> </span></td><td>B相电流:<span class='dlB260'> </span></td><td>C相电流:<span class='dlC260'> </span></td><td>负载电流:<span class='dlfc260'> </span></td></tr>
        <tr><td  style='width: 33%' >一组电池容量:<span class='PBatt1260'> </span></td><td>一组电池环境温度:<span class='PTem1260'> </span></td><td>二组电池容量:<span class='PBatt2260'> </span></td><td>二组电池环境温度:<span class='PTem2260'> </span></td></tr>
        <tr><td  style='width: 33%' >三组电池容量:<span class='PBatt3260'> </span></td><td>三组电池环境温度:<span class='PTem3260'> </span></td><td>四组电池容量:<span class='PBatt4260'> </span></td><td>四组电池环境温度:<span class='PTem4260'> </span></td></tr>
        <tr><td  style='width: 33%' >环境温度:<span class='tem260'> </span></td></tr>
    </table>

    
    <table width='100%' style='margin-top: 10px'>
        <tr><td style='border: none'> <h1>工作状态</h1></td></tr>
        <tr><td >交流故障:<span class='stAC260'> </span></td><td> 直流故障:<span class='stDC260'> </span></td><td>电池故障:<span class='stBatt260'> </span></td><td>模块故障:<span class='stMod260'> </span></td></tr>
        <tr><td>分路故障:<span class='stPart260'> </span></td><td>直流过压:<span class='stDCGY260'> </span></td><td>直流欠压:<span class='stDCQY260'> </span></td></tr>
    </table>
    </td>
    </tr>
  </table>
    <a href='javascript:history.back()' class='back' style='color: #fff'>返回</a>
    </div>
<script>
var itype=261;
var tescape= 5000,time;

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

        $(".SID260").html(n.SID);
        $(".Addr260").html(n.Addr);
        $(".Port260").html(n.Port%256);
        $(".DateUpd260").html(n.DateUpd);
        $(".State260").html(window.parent.parseState(n.State));

        $(".dyuv1260").html(n.dyuv1/10+"V");
        $(".dyvw1260").html(n.dyvw1/10+"V");
        $(".dywu1260").html(n.dywu1/10+"V");
        $(".dyuv2260").html(n.dyuv2/10+"V");
        $(".dyvw2260").html(n.dyvw2/10+"V");
        $(".dywu2260").html(n.dywu2/10+"V");
        $(".dymp260").html(n.dymp/10+"V");

        $(".dlA260").html(n.dlA/10+"A");
        $(".dlB260").html(n.dlB/10+"A");
        $(".dlC260").html(n.dlC/10+"A");
        $(".dlfc260").html(n.dlfc/10+"A");

        $(".PBatt1260").html(n.PBatt1/10+"%");
        $(".PTem1260").html(n.PTem1/10+"℃");
        $(".PBatt2260").html(n.PBatt2/10+"%");
        $(".PTem2260").html(n.PTem2/10+"℃");
        $(".PBatt3260").html(n.PBatt3/10+"%");
        $(".PTem3260").html(n.PTem3/10+"℃");
        $(".PBatt4260").html(n.PBatt4/10+"%");
        $(".PTem4260").html(n.PTem4/10+"℃");
        $(".tem260").html(n.tem/10+"℃");
		
        $(".stAC260").html(n.stAC);
        $(".stDC260").html(n.stDC);
        $(".stBatt260").html(n.stBatt);
        $(".stMod260").html(n.stMod);
        $(".stPart260").html(n.stPart);
        $(".stDCGY260").html(n.stDCGY);
        $(".stDCQY260").html(n.stDCQY);
    });
    $("span:contains('故障'),span:contains('告警'),span:contains('闭合'),span:contains('关闭')").addClass("red").removeClass("ger");
    $("span:contains('正常')").addClass("ger").removeClass("red");
}
</script>
</body>
</html>