detail.jsp 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <%@ page language="java" contentType="text/html;charset=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. <script type="text/ecmascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/jquery.jqGrid.min.js"></script>
  6. <script type="text/ecmascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/i18n/grid.locale-cn.js"></script>
  7. <script type="text/ecmascript" src="<%=request.getContextPath()%>/resource/js/system/jqdatagrid.js"></script>
  8. <script src="<%=request.getContextPath()%>/resource/js/datePicker/WdatePicker.js" type="text/javascript"></script>
  9. <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/resource/plugin/jqueryui/css/custom-theme/jquery-ui-1.9.2.custom.css" />
  10. <link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath() %>/resource/plugin/jqgrid/css/ui.jqgrid.css" />
  11. <script language="javascript">
  12. $(function(){
  13. showJqGrid();
  14. });
  15. function editData(){
  16. $("#f1").attr("action","editData.action").submit();
  17. }
  18. function delDetail(id){
  19. if(confirm("您确认删除吗?")){
  20. $("#f1").attr("action","delDetail.action?brownoutsevent.id="+id).submit();
  21. }
  22. }
  23. function returnIndex(){
  24. $("#f1").attr("action", "index.action").attr("validate", false).submit();
  25. }
  26. function returnEdit(){
  27. $("#f1").attr("action", "detail.action").attr("validate", false).submit();
  28. }
  29. function save(){
  30. $("#f1").attr("action", "saveData.action").submit();
  31. }
  32. function saveDetail(){
  33. $("#f1").attr("action", "saveDetail.action").submit();
  34. }
  35. function showJqGrid() {
  36. var id = '<s:property value="mainBrownouts.id"/>';
  37. var temp="detaillist.action?mainBrownouts.id="+id;
  38. var url= encodeURI(encodeURI(temp));
  39. var id = 'gridTable';
  40. var datatype = 'json';
  41. var colNames = ['风机', '限电时刻','恢复时刻','停机小时数','损失电量(KWh)'];
  42. var colModel = [
  43. { name: 'wtName', index: 'wtName', width: 250, align: 'center'},
  44. { name: 'stopTime', index: 'stopTime', width: 250, align: 'center'},
  45. { name: 'startTime', index: 'startTime', width: 250, align: 'center'},
  46. { name: 'stopHours', index: 'stopHours', width: 250, align: 'center'},
  47. { name: 'lossPower', index: 'lossPower', width: 250, align: 'center'}
  48. ];
  49. var caption = '限电事件记录';
  50. var sortname = 'stopTime';
  51. var gridPagerID ='gridPager';
  52. var sortorder='desc';
  53. var height='auto';
  54. var width='auto';
  55. var rownumbers=true;
  56. var multiselect=false;
  57. myJqGrid(id, url, datatype, colNames, colModel, caption, sortname, gridPagerID,sortorder,height,width,
  58. multiselect,rownumbers);
  59. }
  60. </script>
  61. <style type="text/css">
  62. .mycss {
  63. font-family: "宋体";
  64. font-size: 12px;
  65. color: #000;
  66. text-decoration: none;
  67. }
  68. </style>
  69. </head>
  70. <body>
  71. <s:form action="" method="post" id="f1">
  72. <lt:token/>
  73. <s:hidden name="page"></s:hidden>
  74. <s:hidden name="pageSize"></s:hidden>
  75. <s:hidden name="mainBrownouts.id"></s:hidden>
  76. <s:hidden name="beginDate"></s:hidden>
  77. <s:hidden name="endDate"></s:hidden>
  78. <s:hidden name="wfId"></s:hidden>
  79. <table width="100%">
  80. <tr>
  81. <td align="left" class="mycss">
  82. ${mainBrownouts.id==null?"新增限电事件":"修改限电事件" }
  83. </td>
  84. <td align="right">
  85. <s:if test="mainBrownouts.id != null">
  86. <input type="button" class="button" value='修改' onclick="javascript:editData()"/>
  87. <input type="button" class="button" value='返回' onclick="javascript:returnIndex()"/>
  88. </s:if>
  89. <s:else>
  90. <input type="button" class="button" value='返回' onclick="javascript:returnIndex()"/>
  91. </s:else>
  92. </td>
  93. </tr>
  94. </table>
  95. <hr />
  96. <s:fielderror/>
  97. <s:actionerror />
  98. <s:actionmessage />
  99. <!-- 修改的页面风格 开始 -->
  100. <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#C1C1C1">
  101. <tr>
  102. <td width="10%" height="26" bgcolor="#efefef"><span class="mycss">限电原因:</span></td>
  103. <td width="40%" bgcolor="#efefef"><span class="mycss"><s:property value="mainBrownouts.description"/></span></td>
  104. <td width="10%" height="26" bgcolor="#efefef"><span class="mycss">限电类型:</span></td>
  105. <td width="40%" bgcolor="#efefef"><span class="mycss"><s:property value="mainBrownouts.stopTypeId" /></span></td>
  106. </tr>
  107. <tr>
  108. <td width="10%" height="26" bgcolor="#ffffff"><span class="mycss">限电指令:</span></td>
  109. <td width="40%" bgcolor="#ffffff"><span class="mycss"><s:property value="mainBrownouts.brownoutsDirective"/></span></td>
  110. <td width="10%" height="26" bgcolor="#ffffff"><span class="mycss">当时风速(m/s):</span></td>
  111. <td width="40%" bgcolor="#ffffff"><span class="mycss"><s:property value="mainBrownouts.windspeed" /></span></td>
  112. </tr>
  113. <tr>
  114. <td width="10%" height="26" bgcolor="#efefef"><span class="mycss">限电负荷(MW):</span></td>
  115. <td width="40%" bgcolor="#efefef"><span class="mycss"><s:property value="mainBrownouts.limitload"/></span></td>
  116. <td width="10%" height="26" bgcolor="#efefef"><span class="mycss">当时负荷(MW):</span></td>
  117. <td width="40%" bgcolor="#efefef"><span class="mycss"><s:property value="mainBrownouts.thisload" /></span></td>
  118. </tr>
  119. <tr>
  120. <td width="10%" height="26" bgcolor="#ffffff"><span class="mycss">限电时刻:</span></td>
  121. <td width="40%" bgcolor="#ffffff"><span class="mycss"><s:date name="mainBrownouts.stopTime" format="yyyy-MM-dd HH:mm:ss"/></span></td>
  122. <td width="10%" height="26" bgcolor="#ffffff"><span class="mycss">恢复时刻:</span></td>
  123. <td width="40%" bgcolor="#ffffff"><span class="mycss"><s:date name="mainBrownouts.startTime" format="yyyy-MM-dd HH:mm:ss"/></span></td>
  124. </tr>
  125. <tr>
  126. <td width="10%" height="26" bgcolor="#efefef"><span class="mycss">限电损失电量(KWh):</span></td>
  127. <td width="40%" bgcolor="#efefef"><span class="mycss"><s:property value="mainBrownouts.lossPower" /></span></td>
  128. <td width="10%" height="26" bgcolor="#efefef"></td>
  129. <td width="40%" bgcolor="#efefef"></td>
  130. </tr>
  131. </table>
  132. <!-- 修改的页面风格 结束 -->
  133. <br/>
  134. <!-- <table width="100%">
  135. <tr>
  136. <td align="right" >
  137. <input type="button" class="button" value='保存' onclick="javascript:saveDetail()"/>
  138. </td>
  139. </tr>
  140. </table> -->
  141. <table id='gridTable' height="100%">
  142. </table>
  143. <div id='gridPager'></div>
  144. </s:form>
  145. </body>