123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
- <%@include file="/pages/includes/taglibs.jsp" %>
- <head>
- <script type="text/javascript" src="<%=request.getContextPath() %>/resource/js/jquery-1.8.3.js"></script>
- <script type="text/ecmascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/jquery.jqGrid.min.js"></script>
- <script type="text/ecmascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/i18n/grid.locale-cn.js"></script>
-
- <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>
- <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/resource/plugin/jqueryui/css/custom-theme/jquery-ui-1.9.2.custom.css" />
- <link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath() %>/resource/plugin/jqgrid/css/ui.jqgrid.css" />
- <script type="text/javascript">
- function queryData(){
- // 场站
- var wfId = $("#wfId").val();
- // 日期
- var recordDate = $("#recordDate").val();
-
- $("#wfIdQ").val(wfId);
- $("#recordDateQ").val(recordDate);
- jQuery("#gridTable").jqGrid('setGridParam',{url:"/singleMachineAnalysis/evaluateViewMainList.action?recordDate="+recordDate+"&wfId="+wfId}).trigger("reloadGrid");
- }
-
- function queryClear(){
- $("#wfId").val("");
- $("#recordDate").val("");
- $("#wfIdQ").val("");
- $("#recordDateQ").val("");
- }
-
-
- function aaa(){
- alert('该功能暂未开发!');
- return false;
- }
-
- function requestAction(url){
- // 场站
- var wfIdQ = $("#wfIdQ").val();
- // 日期
- var recordDateQ = $("#recordDateQ").val();
- $("#f1").attr("action",url+"&wfIdQ=" + wfIdQ + "&recordDateQ=" + recordDateQ);
- $("#f1").submit();
- }
-
- function addEvaluatePage(){
- $("#f1").attr("action",'/singleMachineAnalysis/equipmentLevelEvaluateMain.action');
- $("#f1").submit();
- }
-
- $(function(){
- // 编码
- var targetCodeQ = $("#targetCodeQ").val();
- // 名称
- var targetNameQ = $("#targetNameQ").val();
- $("#targetCode").val(targetCodeQ);
- $("#targetName").val(targetNameQ);
- showJqGrid();
- });
-
- // 加载jqgrid表格
- function showJqGrid(){
- // 场站
- var wfId = $("#wfId").val();
- // 日期
- var recordDate = $("#recordDate").val();
-
- /*// 场站
- var wfIdQ = $("#wfIdQ").val();
- // 日期
- var recordDateQ = $("#recordDateQ").val();*/
-
- jQuery("#gridTable").jqGrid({
- url:'/singleMachineAnalysis/evaluateViewMainList.action?recordDate='+recordDate+'&wfId='+wfId,
- datastr: 'data.json',
- datatype: "json",
- colNames:['编号','场站编号','场站','日期','操作'],
- colModel:[
- { name: 'id', index: 'id', width: 200, align: 'center', hidden: true},
- { name: 'windPowerstationId', index: 'windPowerstationId', width: 200, align: 'center', hidden: true},
- { name: 'windPowestationName', index: 'windPowestationName', width: 200, align: 'center'},
- { name: 'recordDate', index: 'recordDate', width: 200, align: 'center'},
- { name: 'operate', index: 'operate', width: 200, align: 'center'}
- ],
- rowNum:10,
- height:'670',
- width:'1610',
- rowList:[10,20,30],
- //multiselect : true,
- pager: '#gridPager',
- sortname: 'id',
- viewrecords: true,
- autowidth: true,
- sortorder: "desc",
- caption: "评估列表",
- jsonReader: {
-
- repeatitems: false,
-
- root: function (obj) { return obj.rows; },
-
- page: function (obj) { return obj.pageindex; },
-
- total: function (obj) { return obj.pagecount; },
-
- records: function (obj) { return obj.total; }
- },
- prmNames: {
- page: 'page',
-
- rows: 'pageSize'
-
- },
- afterInsertRow:function(rowid,rowdata,rowelem){
- var operateLink = "<a href=\"#\" onclick=\"aaa()\">定性评估</a> / "+
- "<a href=\"#\" onclick=\"requestAction('/singleMachineAnalysis/measureEvaluationMain.action?wfId=" + rowdata.windPowerstationId + "&recordDate=" + rowdata.recordDate + "')\">定量评估</a>";
- jQuery("#gridTable").jqGrid('setRowData',rowid,{operate:operateLink});
- }
-
- });
- }
- </script>
- <style type="text/css">
- fieldset legend {
- color:#302A2A;
- font: bold 16px/2 Verdana, Geneva, sans-serif;
- font-weight: bold;
- text-align: left;
- text-shadow: 2px 2px 2px rgb(88, 126, 156);
- }
- </style>
- </head>
- <body>
- <fieldset id="fst">
- <legend class="item_Name">查询条件</legend>
- <table width="1000px" cellpadding="0" cellspacing="0" class="dataform">
- <tr>
- <td width="100px">
- 场站:
- </td>
- <td width="100px">
- <s:select list="windpowers" cssStyle="width:173px;" listKey="id" listValue="name" id="wfId" name="wfId" headerKey="" headerValue="请选择" ></s:select>
- <input type="text" id="wfIdQ" value="${wfIdQ}" style="display: none"/>
- </td>
- <td style="width: 50px;">
- 日期:
- </td>
- <td style="padding-left: 50px;width: 50px;">
- <s:textfield
- cssClass="Wdate"
- onFocus="WdatePicker({dateFmt:'yyyy-MM',isShowWeek:true,readOnly:true})"
- id="recordDate" name="recordDate" title="日期" />
- <s:textfield
- cssClass="Wdate"
- onFocus="WdatePicker({dateFmt:'yyyy-MM',isShowWeek:true,readOnly:true})"
- id="recordDateQ" name="recordDateQ" title="日期" style="display: none"/>
- </td>
- <td style="padding-left: 50px;">
- <input type="button" class="button" onclick="javascript:queryData();" value="查询"/>
- <input type="button" class="button" onclick="javascript:queryClear();" value="清空"/>
- </td>
- </tr>
- </table>
- </fieldset>
- <br/>
- <table id='gridTable'></table>
- <div id='gridPager'></div>
- <div style="width: 100%;" align="right">
- <input type="button" style="margin-top: 10px;margin-right: 10px;" class="button" onclick="addEvaluatePage();" value="新增评估"/>
- </div>
- <form action="" method="post" id="f1">
- </body>
|