123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- <%@ 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/jqdatagrid.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" />
- <style type="text/css">
- </style>
- <script type="text/javascript">
- function queryClear(){
- $("#targetName").val("");
- }
- function returnMainPage(){
- var recordDateQ = $("#recordDateQ").val();
- $("#formView").attr("action", "/statisticsAnalysisBranch/analysisBranchMain.action?recordDateQ="+recordDateQ).submit();
- }
- function queryData(){
- // 风场ID
- var id = $("#id").val();
- // 指标名称
- var targetName = $("#targetName").val();
- jQuery("#gridTable").jqGrid('setGridParam',{url:encodeURI(encodeURI("/statisticsAnalysisBranch/analysisBranchList.action?id="+ id + "&targetName="+targetName))}).trigger("reloadGrid");
- }
-
- $(function(){
-
- showJqGrid();
-
- // 风场名称
- var wsnametext = $("#wfId").find("option:selected").text();
- $("#wsname").text(wsnametext);
-
- // 日期
- var wstimetext = $("#recordDate").val();
- $("#wstime").text(wstimetext);
- });
-
- // 加载jqgrid表格
- function showJqGrid(){
- // 风场ID
- var id = $("#id").val();
- // 指标名称
- var targetName = $("#targetName").val();
-
- jQuery("#gridTable").jqGrid({
- url:'/statisticsAnalysisBranch/analysisBranchList.action?id='+id+'&targetName='+targetName,
- datatype: "json",
- colNames:['编号', '指标名称','单位','当日值(只读)','当日值(可变)','当前星期值','当前月份值','当前季度值','当前年值','类别','公式描述'],
- colModel:[
- { name: 'id', index: 'id', width: 200, align: 'center', hidden: true},
- { name: 'targetName', index: 'targetName', width: 200, align: 'center'},
- { name: 'unit', index: 'unit', width: 200, align: 'center'},
- { name: 'dayValueR', index: 'dayValueR', width: 200, align: 'center'},
- { name: 'dayValue', index: 'dayValue', width: 200, align: 'center',editable : true},
- { name: 'weekValue', index: 'weekValue', width: 200, align: 'center'},
- { name: 'monthValue', index: 'monthValue', width: 200, align: 'center'},
- { name: 'quarterValue', index: 'wpId', width: 200, align: 'center'},
- { name: 'yearValue', index: 'wpName', width: 200, align: 'center'},
- { name: 'type', index: 'recordDate', width: 200, align: 'center'},
- { name: 'formulaDesc', index: 'operate', width: 200, align: 'center'}
- ],
- rowNum:1000,
- height:'670',
- width:'1610',
- editurl : '/statisticsAnalysisBranch/analysisBranchList.action?id='+id+'&targetName='+targetName+"/RowEditing",
- autowidth: true,
- sortorder: "desc",
- caption: "统计分析列表",
- pager: '#gridPager',
- viewrecords: true,
- afterInsertRow:function(rowid,rowdata,rowelem){
- if(rowdata.type == '基础' ){
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{targetName:"<font color=Green>"+rowdata.targetName+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{unit:"<font color=Green>"+rowdata.unit+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{dayValueR:"<font color=Green>"+rowdata.dayValueR+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{dayValue:"<font color=Green>"+rowdata.dayValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{weekValue:"<font color=Green>"+rowdata.weekValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{monthValue:"<font color=Green>"+rowdata.monthValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{quarterValue:"<font color=Green>"+rowdata.quarterValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{yearValue:"<font color=Green>"+rowdata.yearValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{type:"<font color=Green>"+rowdata.type+"</font>"});
- } else if(rowdata.type == '计算' ){
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{targetName:"<font color=Purple>"+rowdata.targetName+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{unit:"<font color=Purple>"+rowdata.unit+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{dayValueR:"<font color=Green>"+rowdata.dayValueR+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{dayValue:"<font color=Purple>"+rowdata.dayValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{weekValue:"<font color=Purple>"+rowdata.weekValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{monthValue:"<font color=Purple>"+rowdata.monthValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{quarterValue:"<font color=Purple>"+rowdata.quarterValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{yearValue:"<font color=Purple>"+rowdata.yearValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{type:"<font color=Purple>"+rowdata.type+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{formulaDesc:"<font color=Purple>"+rowdata.formulaDesc+"</font>"});
- } else if(rowdata.type == '默认' ){
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{targetName:"<font color=Orange>"+rowdata.targetName+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{unit:"<font color=Orange>"+rowdata.unit+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{dayValueR:"<font color=Orange>"+rowdata.dayValueR+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{dayValue:"<font color=Orange>"+rowdata.dayValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{weekValue:"<font color=Orange>"+rowdata.weekValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{monthValue:"<font color=Orange>"+rowdata.monthValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{quarterValue:"<font color=Orange>"+rowdata.quarterValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{yearValue:"<font color=Orange>"+rowdata.yearValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{type:"<font color=Orange>"+rowdata.type+"</font>"});
- } else if(rowdata.type == '手填' ){
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{targetName:"<font color=Blue>"+rowdata.targetName+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{unit:"<font color=Blue>"+rowdata.unit+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{dayValueR:"<font color=Blue>"+rowdata.dayValueR+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{dayValue:"<font color=Blue>"+rowdata.dayValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{weekValue:"<font color=Blue>"+rowdata.weekValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{monthValue:"<font color=Blue>"+rowdata.monthValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{quarterValue:"<font color=Blue>"+rowdata.quarterValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{yearValue:"<font color=Blue>"+rowdata.yearValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{type:"<font color=Blue>"+rowdata.type+"</font>"});
- } else if(rowdata.type == '特殊' ){
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{targetName:"<font color=Red>"+rowdata.targetName+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{unit:"<font color=Red>"+rowdata.unit+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{dayValueR:"<font color=Red>"+rowdata.dayValueR+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{dayValue:"<font color=Red>"+rowdata.dayValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{weekValue:"<font color=Red>"+rowdata.weekValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{monthValue:"<font color=Red>"+rowdata.monthValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{quarterValue:"<font color=Red>"+rowdata.quarterValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{yearValue:"<font color=Red>"+rowdata.yearValue+"</font>"});
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{type:"<font color=Red>"+rowdata.type+"</font>"});
- }
- }
- });
- }
- </script>
- </head>
- <body>
- <table width="100%">
- <tr>
- <td align="left" class="navbar" style="font-size: 12px;"><font id="wsname"></font>统计分析<font id="wstime"></font></td>
- <td align="right">
- <input type="button" class="button" onclick="javascript:returnMainPage();" value="返回"/>
- </td>
- </tr>
- </table>
- <hr/>
- <fieldset style="height: 60px" id="fst">
- <legend class="item_Name">查询条件</legend>
- <table width="1000px" cellpadding="0" cellspacing="0" class="dataform">
- <tr>
- <td align="left" >
- <input type="text" id="id" value="${id}" style="display: none;"/>
- <!-- 风场: --><s:select list="windpowers" cssStyle="width:173px;display:none" listKey="id" listValue="name" id="wfId" name="wfId" headerKey="" headerValue="请选择" onchange="javascript:queryData()" ></s:select>
- 指标名称:<s:textfield name="targetName" id="targetName"></s:textfield>
- <!--指标编码:<s:textfield name="targetCode" id="targetCode"></s:textfield> -->
- <!-- 日期: --><s:textfield
- cssClass="Wdate"
- onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowWeek:true,readOnly:true})"
- id="recordDate" name="recordDate" title="日期" onchange="javascript:queryData()" style="display:none"/>
- <s:textfield
- cssClass="Wdate"
- onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowWeek:true,readOnly:true})"
- id="recordDateQ" name="recordDateQ" title="日期" style="display:none" />
- <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>
- <form action="" method="post" id="formView">
- </form>
- </body>
|