alarmwindow.jsp 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
  2. <%@include file="/pages/includes/taglibs.jsp" %>
  3. <head>
  4. <script type="text/javascript" src="<%=request.getContextPath() %>/resource/js/jquery-1.8.3.js"></script>
  5. <link rel="stylesheet" href="<%=request.getContextPath() %>/resource/css/ztree/zTreeStyle.css" type="text/css">
  6. <script src="<%=request.getContextPath() %>/resource/js/ztree/jquery.ztree.all.min.js" type="text/javascript"></script>
  7. <script src="<%=request.getContextPath()%>/resource/js/highcharts/highcharts.src.js" type="text/javascript"></script>
  8. <script src="<%=request.getContextPath()%>/resource/js/highcharts/highcharts-more.js"></script>
  9. <script src="<%=request.getContextPath()%>/resource/js/highcharts/modules/solid-gauge.src.js"></script>
  10. <script type="text/javascript" src="<%=request.getContextPath()%>/resource/plugin/highslide/highslide-with-html.js"></script>
  11. <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/resource/plugin/highslide/highslide.css" />
  12. <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/resource/css/gzp/css/gz_baojing.css" />
  13. <style type="text/css">
  14. fieldset legend {
  15. color:#302A2A;
  16. font: bold 16px/2 Verdana, Geneva, sans-serif;
  17. font-weight: bold;
  18. text-align: left;
  19. text-shadow: 2px 2px 2px rgb(88, 126, 156);
  20. }
  21. </style>
  22. <script type="text/javascript">
  23. $(document).ready(function () {
  24. var options = {
  25. chart : {
  26. plotBackgroundColor : null,
  27. plotBorderWidth : null,
  28. plotShadow : false
  29. },
  30. title : {
  31. text : '报警分布图'
  32. },
  33. tooltip : {
  34. pointFormat : '{series.name}: <b>{point.percentage:.1f}%</b>'
  35. },
  36. plotOptions : {
  37. pie : {
  38. allowPointSelect : true,
  39. cursor : 'pointer',
  40. dataLabels : {
  41. enabled : false
  42. },
  43. showInLegend : true
  44. }
  45. },
  46. legend : {
  47. layout : 'vertical',
  48. align : 'left',
  49. verticalAlign : 'left',
  50. borderWidth : 0
  51. },
  52. series : [ {
  53. type : 'pie',
  54. name : '占比',
  55. data : [ ]
  56. } ]
  57. };
  58. // $('#container').highcharts(options);
  59. $.getJSON('getPieDataAjax.action', function (datac) {
  60. dbs = [];
  61. for (i in datac) {
  62. var r = datac[i];
  63. t = parseInt(i)+1;
  64. dbs.push([r.NAME, r.COUNTC]);
  65. $('<tr><td>'+t+'</td><td>'+r.NAME+'</td><td>'+r.COUNTC+'</td></tr>').insertAfter($('#tablePH tr:eq('+i+')'));
  66. }
  67. options.series[0].data = dbs;
  68. $('#container').highcharts(options);
  69. });
  70. reAlertRank();
  71. });
  72. var isRunningReAlertRank = false;
  73. function reAlertRank(){
  74. if(isRunningReAlertRank){
  75. return;
  76. }
  77. isRunningReAlertRank = true;
  78. $.getJSON('getAlertRank.action', function (datac) {
  79. for (i in datac) {
  80. var r = datac[i];
  81. t = parseInt(r.count);
  82. $('#'+r.id+'_d').html(''+t);
  83. if(t==0){
  84. $('#'+r.id+'_d').parent().attr("class","baojing_black");
  85. }
  86. if(t>0 && t<10){
  87. $('#'+r.id+'_d').parent().attr("class","baojing_orange");
  88. }
  89. if(t>=10){
  90. $('#'+r.id+'_d').parent().attr("class","baojing_red");
  91. }
  92. }
  93. isRunningReAlertRank = false;
  94. });
  95. setTimeout("reAlertRank();", 3000);
  96. }
  97. function confirmeAll(){
  98. $.getJSON('confirmeAlert.action', function (datac) {
  99. reAlertRank();
  100. });
  101. }
  102. function submitform(id,type){
  103. var url = "runningAlarmIndex.action?";
  104. $("#type").val(id);
  105. url =url+type+"="+id;
  106. $("#f1").attr("action",url).submit();
  107. }
  108. </script>
  109. <style type="text/css">
  110. fieldset legend {
  111. color:#302A2A;
  112. font: bold 16px/2 Verdana, Geneva, sans-serif;
  113. font-weight: bold;
  114. text-align: left;
  115. text-shadow: 2px 2px 2px rgb(88, 126, 156);
  116. }
  117. </style>
  118. </head>
  119. <body>
  120. <form action="" id="f1">
  121. <input id="type" type="hidden" name="category2" value=""/>
  122. </form>
  123. <div class="all">
  124. <div class="index_box">
  125. <div class="index_box_center">
  126. <div class="center_box">
  127. <div class="center_box_left1">风<Br />机<br />报<br />警</div>
  128. <div class="center_box_right">
  129. <div class="baojing_black" onclick="submitform('fdj','category2')"><div class="baojing_font_top"><a href="runningAlarmIndex.action?category2=fdj">发电机</a></div><div class="baojing_font_bottom" id="fdj_d">0</div></div>
  130. <div class="baojing_black" onclick='submitform("bj","category2")'><div class="baojing_font_top"><a href="runningAlarmIndex.action?category2=bj">变桨</a></div><div class="baojing_font_bottom" id="bj_d">0</div></div>
  131. <div class="baojing_black" onclick="submitform('bpq','category2')"><div class="baojing_font_top"><a href="runningAlarmIndex.action?category2=bpq">变频器</a></div><div class="baojing_font_bottom" id="bpq_d">0</div></div>
  132. <div class="baojing_black" onclick="submitform('clx','category2')"><div class="baojing_font_top"><a href="runningAlarmIndex.action?category2=clx">齿轮箱</a></div><div class="baojing_font_bottom" id="clx_d">0</div></div>
  133. <div class="baojing_black" onclick="submitform('ph','category2')"><div class="baojing_font_top"><a href="runningAlarmIndex.action?category2=ph">偏航</a></div><div class="baojing_font_bottom" id="ph_d">0</div></div>
  134. <div class="baojing_black" onclick="submitform('yy','category2')"><div class="baojing_font_top"><a href="runningAlarmIndex.action?category2=yy">液压</a></div><div class="baojing_font_bottom" id="yy_d">0</div></div>
  135. <div class="baojing_black" onclick="submitform('cz','category2')"><div class="baojing_font_top"><a href="runningAlarmIndex.action?category2=cz">控制</a></div><div class="baojing_font_bottom" id="kz_d">0</div></div>
  136. <div class="baojing_black" onclick="submitform('jcjr','category2')"><div class="baojing_font_top"><a href="runningAlarmIndex.action?category2=jcjr">机舱加热</a></div><div class="baojing_font_bottom" id="jcjr_d">0</div></div>
  137. <div class="baojing_black" onclick="submitform('zz','category2')"><div class="baojing_font_top"><a href="runningAlarmIndex.action?category2=zz">主轴</a></div><div class="baojing_font_bottom" id="zz_d">0</div></div>
  138. <div class="baojing_black" onclick="submitform('yl','category2')"><div class="baojing_font_top"><a href="runningAlarmIndex.action?category2=yl">叶轮</a></div><div class="baojing_font_bottom" id="yl_d">0</div></div>
  139. <div class="baojing_black" onclick="submitform('dw','category2')"><div class="baojing_font_top"><a href="runningAlarmIndex.action?category2=dw">电网</a></div><div class="baojing_font_bottom" id="dw_d">0</div></div>
  140. <div class="baojing_black" onclick="submitform('blq','category2')"><div class="baojing_font_top"><a href="runningAlarmIndex.action?category2=blq">变流器</a></div><div class="baojing_font_bottom" id="blq_d">0</div></div>
  141. <div class="baojing_black" onclick="submitform('xb','category2')"><div class="baojing_font_top"><a href="runningAlarmIndex.action?category2=xb">箱变</a></div><div class="baojing_font_bottom" id="xb_d">0</div></div>
  142. <div class="baojing_black" onclick="submitform('other','category2')"><div class="baojing_font_top"><a href="runningAlarmIndex.action?category2=other">其他</a></div><div class="baojing_font_bottom" id="other_d">0</div></div>
  143. </div>
  144. </div>
  145. <div class="center_box">
  146. <div class="center_box_left2">升<Br />压<br />站<br />报<br />警</div>
  147. <div class="center_box_right">
  148. <div class="baojing_black" onclick="submitform('SYZSG','category2')"><div class="baojing_font_top"><a href="runningAlarmIndex.action?category2=SYZSG">事故报警</a></div><div class="baojing_font_bottom" id="SYZSG_d">0</div></div>
  149. <div class="baojing_black" onclick="submitform('SYZKG','category2')"><div class="baojing_font_top"><a href="runningAlarmIndex.action?category2=SYZKG">开关</a></div><div class="baojing_font_bottom" id="SYZKG_d">0</div></div>
  150. <div class="baojing_black" onclick="submitform('SYZBJ','category2')"><div class="baojing_font_top"><a href="runningAlarmIndex.action?category2=SYZBJ">普通报警</a></div><div class="baojing_font_bottom" id="SYZBJ_d">0</div></div>
  151. </div>
  152. </div>
  153. <div class="center_box">
  154. <div class="center_box_left3">自<Br />定<br />义<br />报<br />警</div>
  155. <div class="center_box_right">
  156. <div class="baojing_black" onclick="submitform('1','category2')"><div class="baojing_font_top"><a href="runningAlarmIndex.action?category2=1">风机</a></div><div class="baojing_font_bottom" id="1_d">0</div></div>
  157. <div class="baojing_black" onclick="submitform('2','category2')"><div class="baojing_font_top"><a href="runningAlarmIndex.action?category2=2">风场</a></div><div class="baojing_font_bottom" id="2_d">0</div></div>
  158. <div class="baojing_black" onclick="submitform('3','category2')"><div class="baojing_font_top"><a href="runningAlarmIndex.action?category2=3">工程</a></div><div class="baojing_font_bottom" id="3_d">0</div></div>
  159. <div class="baojing_black" onclick="submitform('4','category2')"><div class="baojing_font_top"><a href="runningAlarmIndex.action?category2=4">线路</a></div><div class="baojing_font_bottom" id="4_d">0</div></div>
  160. <div class="baojing_black" onclick="submitform('5','category2')"><div class="baojing_font_top"><a href="runningAlarmIndex.action?category2=5">电气</a></div><div class="baojing_font_bottom" id="5_d">0</div></div>
  161. </div>
  162. </div>
  163. </div>
  164. <div class="index_box_right">
  165. <div style="width: 400px; height: 40px; margin: 0 auto">
  166. <button onclick="javascript:confirmeAll();" id="toconfirme">确认全部</button>
  167. </div>
  168. <div id="container" style="width: 400px; height: 400px; margin: 0 auto"></div>
  169. 报警排行<br/><br/>
  170. <table id="tablePH" class="dataform" style="width: 100%">
  171. <tr class="item_Name"><td width="80">排名</td><td>风场</td><td width="80">报警数量</td></tr>
  172. </table>
  173. </div>
  174. </div>
  175. </div>
  176. </body>