measureevaluation.jsp 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. <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/jqdatagridpage.js"></script><script src="<%=request.getContextPath()%>/resource/js/datePicker/WdatePicker.js" type="text/javascript"></script>
  8. <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/resource/plugin/jqueryui/css/custom-theme/jquery-ui-1.9.2.custom.css" />
  9. <link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath() %>/resource/plugin/jqgrid/css/ui.jqgrid.css" />
  10. <script type="text/javascript">
  11. $(function(){
  12. showJqGrid();
  13. });
  14. var columnE = 1;
  15. function showJqGrid(){
  16. // 获取场站ID
  17. var wfId = $("#wfId").val();
  18. // 获取数据日期
  19. var recordDate = $("#recordDate").val();
  20. jQuery("#gridTable").jqGrid({
  21. url:'/singleMachineAnalysis/measureEvaluationMainList.action?wfId='+wfId+'&recordDate='+recordDate,
  22. datatype: "json",
  23. colNames: ['设备',
  24. '评估项',
  25. <s:iterator value="mtList" var="bean">
  26. '${bean.name}',
  27. </s:iterator>
  28. '总计'],
  29. colModel: [
  30. {name: 'wtName', index: 'wtName', width: 70 },
  31. {name: 'item', index: 'item', width: 70 },
  32. <s:iterator value="mtList" var="bean">
  33. {name: '${bean.targetCode}', index: '${bean.targetCode}', width: 70 },
  34. </s:iterator>
  35. {name: 'total', index: 'total', width: 70 }
  36. ],
  37. rowNum:1000,
  38. height:'670',
  39. width:'1610',
  40. autowidth: true,
  41. pager: '#gridPager',
  42. viewrecords: true,
  43. sortorder: "desc",
  44. jsonReader: {
  45. repeatitems : false
  46. },
  47. caption: "${wpName}定量评估列表${recordDate}",
  48. height: '100%'
  49. });
  50. jQuery("#gridTable").jqGrid('setGroupHeaders', {
  51. useColSpanStyle: true,
  52. groupHeaders:[
  53. <s:iterator value="mergeColumnList" var="bean">
  54. {startColumnName: '${bean.startColumnName}', numberOfColumns: ${bean.numberOfColumns}, titleText: '${bean.titleText}'},
  55. </s:iterator>
  56. {startColumnName: 'aaaa', numberOfColumns: 1, titleText: 'aaaa'}
  57. ]
  58. });
  59. }
  60. function returnMainPage(){
  61. $("#f1").attr("action",'/singleMachineAnalysis/evaluateViewMain.action');
  62. $("#f1").submit();
  63. }
  64. </script>
  65. <style type="text/css">
  66. fieldset legend {
  67. color:#302A2A;
  68. font: bold 16px/2 Verdana, Geneva, sans-serif;
  69. font-weight: bold;
  70. text-align: left;
  71. text-shadow: 2px 2px 2px rgb(88, 126, 156);
  72. }
  73. </style>
  74. </head>
  75. <body>
  76. <table id='gridTable'></table>
  77. <div id='gridPager'></div>
  78. <div style="width: 100%;" align="right">
  79. <input type="button" style="margin-top: 10px;margin-right: 10px;" class="button" onclick="returnMainPage();" value="返回"/>
  80. </div>
  81. <form action="" method="post" id="f1">
  82. <input type="text" id="wfId" value="${wfId}" style="display: none;"/>
  83. <input type="text" id="recordDate" value="${recordDate}" style="display: none;"/>
  84. </body>