evaluateviewmain.jsp 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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 queryData(){
  12. // 场站
  13. var wfId = $("#wfId").val();
  14. // 日期
  15. var recordDate = $("#recordDate").val();
  16. $("#wfIdQ").val(wfId);
  17. $("#recordDateQ").val(recordDate);
  18. jQuery("#gridTable").jqGrid('setGridParam',{url:"/singleMachineAnalysis/evaluateViewMainList.action?recordDate="+recordDate+"&wfId="+wfId}).trigger("reloadGrid");
  19. }
  20. function queryClear(){
  21. $("#wfId").val("");
  22. $("#recordDate").val("");
  23. $("#wfIdQ").val("");
  24. $("#recordDateQ").val("");
  25. }
  26. function aaa(){
  27. alert('该功能暂未开发!');
  28. return false;
  29. }
  30. function requestAction(url){
  31. // 场站
  32. var wfIdQ = $("#wfIdQ").val();
  33. // 日期
  34. var recordDateQ = $("#recordDateQ").val();
  35. $("#f1").attr("action",url+"&wfIdQ=" + wfIdQ + "&recordDateQ=" + recordDateQ);
  36. $("#f1").submit();
  37. }
  38. function addEvaluatePage(){
  39. $("#f1").attr("action",'/singleMachineAnalysis/equipmentLevelEvaluateMain.action');
  40. $("#f1").submit();
  41. }
  42. $(function(){
  43. // 编码
  44. var targetCodeQ = $("#targetCodeQ").val();
  45. // 名称
  46. var targetNameQ = $("#targetNameQ").val();
  47. $("#targetCode").val(targetCodeQ);
  48. $("#targetName").val(targetNameQ);
  49. showJqGrid();
  50. });
  51. // 加载jqgrid表格
  52. function showJqGrid(){
  53. // 场站
  54. var wfId = $("#wfId").val();
  55. // 日期
  56. var recordDate = $("#recordDate").val();
  57. /*// 场站
  58. var wfIdQ = $("#wfIdQ").val();
  59. // 日期
  60. var recordDateQ = $("#recordDateQ").val();*/
  61. jQuery("#gridTable").jqGrid({
  62. url:'/singleMachineAnalysis/evaluateViewMainList.action?recordDate='+recordDate+'&wfId='+wfId,
  63. datastr: 'data.json',
  64. datatype: "json",
  65. colNames:['编号','场站编号','场站','日期','操作'],
  66. colModel:[
  67. { name: 'id', index: 'id', width: 200, align: 'center', hidden: true},
  68. { name: 'windPowerstationId', index: 'windPowerstationId', width: 200, align: 'center', hidden: true},
  69. { name: 'windPowestationName', index: 'windPowestationName', width: 200, align: 'center'},
  70. { name: 'recordDate', index: 'recordDate', width: 200, align: 'center'},
  71. { name: 'operate', index: 'operate', width: 200, align: 'center'}
  72. ],
  73. rowNum:10,
  74. height:'670',
  75. width:'1610',
  76. rowList:[10,20,30],
  77. //multiselect : true,
  78. pager: '#gridPager',
  79. sortname: 'id',
  80. viewrecords: true,
  81. autowidth: true,
  82. sortorder: "desc",
  83. caption: "评估列表",
  84. jsonReader: {
  85. repeatitems: false,
  86. root: function (obj) { return obj.rows; },
  87. page: function (obj) { return obj.pageindex; },
  88. total: function (obj) { return obj.pagecount; },
  89. records: function (obj) { return obj.total; }
  90. },
  91. prmNames: {
  92. page: 'page',
  93. rows: 'pageSize'
  94. },
  95. afterInsertRow:function(rowid,rowdata,rowelem){
  96. var operateLink = "<a href=\"#\" onclick=\"aaa()\">定性评估</a>&nbsp/&nbsp"+
  97. "<a href=\"#\" onclick=\"requestAction('/singleMachineAnalysis/measureEvaluationMain.action?wfId=" + rowdata.windPowerstationId + "&recordDate=" + rowdata.recordDate + "')\">定量评估</a>";
  98. jQuery("#gridTable").jqGrid('setRowData',rowid,{operate:operateLink});
  99. }
  100. });
  101. }
  102. </script>
  103. <style type="text/css">
  104. fieldset legend {
  105. color:#302A2A;
  106. font: bold 16px/2 Verdana, Geneva, sans-serif;
  107. font-weight: bold;
  108. text-align: left;
  109. text-shadow: 2px 2px 2px rgb(88, 126, 156);
  110. }
  111. </style>
  112. </head>
  113. <body>
  114. <fieldset id="fst">
  115. <legend class="item_Name">查询条件</legend>
  116. <table width="1000px" cellpadding="0" cellspacing="0" class="dataform">
  117. <tr>
  118. <td width="100px">
  119. 场站:
  120. </td>
  121. <td width="100px">
  122. <s:select list="windpowers" cssStyle="width:173px;" listKey="id" listValue="name" id="wfId" name="wfId" headerKey="" headerValue="请选择" ></s:select>
  123. <input type="text" id="wfIdQ" value="${wfIdQ}" style="display: none"/>
  124. </td>
  125. <td style="width: 50px;">
  126. 日期:
  127. </td>
  128. <td style="padding-left: 50px;width: 50px;">
  129. <s:textfield
  130. cssClass="Wdate"
  131. onFocus="WdatePicker({dateFmt:'yyyy-MM',isShowWeek:true,readOnly:true})"
  132. id="recordDate" name="recordDate" title="日期" />
  133. <s:textfield
  134. cssClass="Wdate"
  135. onFocus="WdatePicker({dateFmt:'yyyy-MM',isShowWeek:true,readOnly:true})"
  136. id="recordDateQ" name="recordDateQ" title="日期" style="display: none"/>
  137. </td>
  138. <td style="padding-left: 50px;">
  139. <input type="button" class="button" onclick="javascript:queryData();" value="查询"/>
  140. <input type="button" class="button" onclick="javascript:queryClear();" value="清空"/>
  141. </td>
  142. </tr>
  143. </table>
  144. </fieldset>
  145. <br/>
  146. <table id='gridTable'></table>
  147. <div id='gridPager'></div>
  148. <div style="width: 100%;" align="right">
  149. <input type="button" style="margin-top: 10px;margin-right: 10px;" class="button" onclick="addEvaluatePage();" value="新增评估"/>
  150. </div>
  151. <form action="" method="post" id="f1">
  152. </body>