tempQt.jsp 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
  2. <%@include file="/pages/includes/taglibs.jsp" %>
  3. <%
  4. String contextPath = request.getContextPath();
  5. %>
  6. <head>
  7. <script type="text/javascript">
  8. function processTimer(){
  9. var wfId =$("#wfId").val();
  10. var ais=$("#ais").val();
  11. $.ajax({
  12. url: "temperature.action",
  13. type: "post",
  14. cache: false,
  15. dataType: "json",
  16. data: {"wfId":wfId,"ais":ais},
  17. success: function(vo){
  18. if(null !=vo)
  19. {
  20. eval(vo);
  21. $.each(vo, function(m, obj) {
  22. $("#"+obj.id).html(parseFloat(obj.value)+"");
  23. if(obj.color=="white"){
  24. $("#"+obj.id+"l").attr("background","../resource/images/temperature/title_Left.fw.png");
  25. $("#"+obj.id).attr("background","../resource/images/temperature/title_Center.fw.png");
  26. $("#"+obj.id+"r").attr("background","../resource/images/temperature/title_Right.fw.png");
  27. }
  28. else if(obj.color=="yellow"){
  29. $("#"+obj.id+"l").attr("background","../resource/images/temperature/gj_left.fw.png");
  30. $("#"+obj.id).attr("background","../resource/images/temperature/gj_Center.fw.png");
  31. $("#"+obj.id+"r").attr("background","../resource/images/temperature/gj_Right.fw.png");
  32. }
  33. else if(obj.color=="red"){
  34. $("#"+obj.id+"l").attr("background","../resource/images/temperature/error_left.fw.png");
  35. $("#"+obj.id).attr("background","../resource/images/temperature/error_Center.fw.png");
  36. $("#"+obj.id+"r").attr("background","../resource/images/temperature/error_Right.fw.png");
  37. }
  38. });
  39. }
  40. }
  41. });
  42. }
  43. $(document).ready(function() {
  44. processTimer();
  45. setInterval(processTimer,3000);
  46. });
  47. </script>
  48. <style type="text/css">
  49. body {
  50. margin-left: 0px;
  51. margin-top: 0px;
  52. margin-right: 0px;
  53. margin-bottom: 0px;
  54. }
  55. .Bar_Text_Css {
  56. font-size: 16px;
  57. font-style: normal;
  58. font-weight: bolder;
  59. color: #FFF;
  60. }
  61. </style>
  62. </head>
  63. <body>
  64. <input type="hidden" id="ais" name="ais" value="${ais }" />
  65. <input type="hidden" id="wfId" name="wfId"
  66. value="${wfId }" />
  67. <s:iterator value="windturbines" id="var">
  68. <div style="float:left;margin:5px;padding:5px;width:250;">
  69. <table width="300" border="0" cellspacing="0" cellpadding="0">
  70. <tr>
  71. <td width="10" height="30" background="../resource/images/temperature/fj_Code_Left.fw.png">
  72. <td class="Bar_Text_Css" background="../resource/images/temperature/fj_Center_Right.fw.png" align="center" id="${var.id}" colspan="4">风机编号:${var.code}</td>
  73. <td width="10" background="../resource/images/temperature/fj_Code_Right.fw.png">
  74. </tr>
  75. <tr>
  76. <td width="5" height="30" background="../resource/images/temperature/title_Left.fw.png"/>
  77. <td width="140" background="../resource/images/temperature/title_Center.fw.png">环境温度</td>
  78. <td width="5" background="../resource/images/temperature/title_Right.fw.png"/>
  79. <td id="${var.id}AI056l" width="5" background="../resource/images/temperature/title_Left.fw.png"/>
  80. <td width="140" background="../resource/images/temperature/title_Center.fw.png" id="${var.id}AI056">0</td>
  81. <td id="${var.id}AI056r" width="5" background="../resource/images/temperature/title_Right.fw.png"/>
  82. </tr>
  83. <tr>
  84. <td width="5" height="30" background="../resource/images/temperature/title_Left.fw.png"/>
  85. <td width="140" background="../resource/images/temperature/title_Center.fw.png">机舱温度</td>
  86. <td width="5" background="../resource/images/temperature/title_Right.fw.png"/>
  87. <td id="${var.id}AI057l" width="5" background="../resource/images/temperature/title_Left.fw.png"/>
  88. <td width="140" background="../resource/images/temperature/title_Center.fw.png" id="${var.id}AI057">0</td>
  89. <td id="${var.id}AI057r" width="5" background="../resource/images/temperature/title_Right.fw.png"/>
  90. </tr>
  91. <tr>
  92. <td width="5" height="30" background="../resource/images/temperature/title_Left.fw.png"/>
  93. <td width="140" background="../resource/images/temperature/title_Center.fw.png">塔底柜温度</td>
  94. <td width="5" background="../resource/images/temperature/title_Right.fw.png"/>
  95. <td id="${var.id}AI069l" width="5" background="../resource/images/temperature/title_Left.fw.png"/>
  96. <td width="140" background="../resource/images/temperature/title_Center.fw.png" id="${var.id}AI069">0</td>
  97. <td id="${var.id}AI069r" width="5" background="../resource/images/temperature/title_Right.fw.png"/>
  98. </tr>
  99. <tr>
  100. <td width="5" height="30" background="../resource/images/temperature/title_Left.fw.png"/>
  101. <td width="140" background="../resource/images/temperature/title_Center.fw.png">机舱柜内温度</td>
  102. <td width="5" background="../resource/images/temperature/title_Right.fw.png"/>
  103. <td id="${var.id}AI070l" width="5" background="../resource/images/temperature/title_Left.fw.png"/>
  104. <td width="140" background="../resource/images/temperature/title_Center.fw.png" id="${var.id}AI070">0</td>
  105. <td id="${var.id}AI070r" width="5" background="../resource/images/temperature/title_Right.fw.png"/>
  106. </tr>
  107. </table>
  108. </div>
  109. </s:iterator>
  110. </body>