<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@include file="/pages/includes/taglibs.jsp" %> <% String contextPath = request.getContextPath(); %> <head> <script type="text/javascript"> function processTimer(){ var wfId =$("#wfId").val(); var ais=$("#ais").val(); $.ajax({ url: "temperature.action", type: "post", cache: false, dataType: "json", data: {"wfId":wfId,"ais":ais}, success: function(vo){ if(null !=vo) { eval(vo); $.each(vo, function(m, obj) { $("#"+obj.id).html(parseFloat(obj.value)+""); if(obj.color=="white"){ $("#"+obj.id+"l").attr("background","../resource/images/temperature/title_Left.fw.png"); $("#"+obj.id).attr("background","../resource/images/temperature/title_Center.fw.png"); $("#"+obj.id+"r").attr("background","../resource/images/temperature/title_Right.fw.png"); } else if(obj.color=="yellow"){ $("#"+obj.id+"l").attr("background","../resource/images/temperature/gj_left.fw.png"); $("#"+obj.id).attr("background","../resource/images/temperature/gj_Center.fw.png"); $("#"+obj.id+"r").attr("background","../resource/images/temperature/gj_Right.fw.png"); } else if(obj.color=="red"){ $("#"+obj.id+"l").attr("background","../resource/images/temperature/error_left.fw.png"); $("#"+obj.id).attr("background","../resource/images/temperature/error_Center.fw.png"); $("#"+obj.id+"r").attr("background","../resource/images/temperature/error_Right.fw.png"); } }); } } }); } $(document).ready(function() { processTimer(); setInterval(processTimer,3000); }); </script> <style type="text/css"> body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } .Bar_Text_Css { font-size: 16px; font-style: normal; font-weight: bolder; color: #FFF; } </style> </head> <body> <input type="hidden" id="ais" name="ais" value="${ais }" /> <input type="hidden" id="wfId" name="wfId" value="${wfId }" /> <s:iterator value="windturbines" id="var"> <div style="float:left;margin:5px;padding:5px;width:250;"> <table width="300" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="10" height="30" background="../resource/images/temperature/fj_Code_Left.fw.png"> <td class="Bar_Text_Css" background="../resource/images/temperature/fj_Center_Right.fw.png" align="center" id="${var.id}" colspan="4">风机编号:${var.code}</td> <td width="10" background="../resource/images/temperature/fj_Code_Right.fw.png"> </tr> <tr> <td width="5" height="30" background="../resource/images/temperature/title_Left.fw.png"/> <td width="140" background="../resource/images/temperature/title_Center.fw.png">机舱振动有效值</td> <td width="5" background="../resource/images/temperature/title_Right.fw.png"/> <td id="${var.id}AI004l" width="5" background="../resource/images/temperature/title_Left.fw.png"/> <td width="140" background="../resource/images/temperature/title_Center.fw.png" id="${var.id}AI004">0</td> <td id="${var.id}AI004r" width="5" background="../resource/images/temperature/title_Right.fw.png"/> </tr> <tr> <td width="5" height="30" background="../resource/images/temperature/title_Left.fw.png"/> <td width="140" background="../resource/images/temperature/title_Center.fw.png">机舱震动X轴</td> <td width="5" background="../resource/images/temperature/title_Right.fw.png"/> <td id="${var.id}AI001l" width="5" background="../resource/images/temperature/title_Left.fw.png"/> <td width="140" background="../resource/images/temperature/title_Center.fw.png" id="${var.id}AI001">0</td> <td id="${var.id}AI001r" width="5" background="../resource/images/temperature/title_Right.fw.png"/> </tr> <tr> <td width="5" height="30" background="../resource/images/temperature/title_Left.fw.png"/> <td width="140" background="../resource/images/temperature/title_Center.fw.png">机舱震动Y轴</td> <td width="5" background="../resource/images/temperature/title_Right.fw.png"/> <td id="${var.id}AI002l" width="5" background="../resource/images/temperature/title_Left.fw.png"/> <td width="140" background="../resource/images/temperature/title_Center.fw.png" id="${var.id}AI002">0</td> <td id="${var.id}AI002r" width="5" background="../resource/images/temperature/title_Right.fw.png"/> </tr> </table> </div> </s:iterator> </body>