123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513 |
- <%@ 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" />
- <script type="text/javascript" src="<%=request.getContextPath()%>/resource/plugin/highslide/highslide-with-html.js"></script>
- <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/resource/plugin/highslide/highslide.css" />
- <style type="text/css">
- a:link.url ,a:visited.url{ /* 超链接正常状态、被访问过的样式 */
- color:#000000;
- padding:4px 10px 4px 10px;
- background-color:#f1f1f1;
- text-decoration:none;
-
- border-top:1px solid #EEEEEE; /* 边框实现阴影效果 */
- border-left:1px solid #EEEEEE;
- border-bottom:1px solid #717171;
- border-right:1px solid #717171;
- }
- a:hover.url{ /* 鼠标指针经过时的超链接 */
- color:#821818; /* 改变文字颜色 */
- padding:5px 8px 3px 12px; /* 改变文字位置 */
- background-color:#e2c4c9; /* 改变背景色 */
- border-top:1px solid #717171; /* 边框变换,实现“按下去”的效果 */
- border-left:1px solid #717171;
- border-bottom:1px solid #EEEEEE;
- border-right:1px solid #EEEEEE;
- }
- </style>
- <script type="text/javascript">
- hs.graphicsDir = '<%=request.getContextPath()%>/resource/plugin/highslide/graphics/';
- hs.outlineType = 'rounded-white';
- hs.wrapperClassName = 'draggable-header';
- var action = -99;
- function showDiv1(a) {
- var hc = $("#container");
- action = a;
- return hs.htmlExpand(hc[0], {
- contentId : 'showDiv2',
- width : 300,
- height : 200,
- align : 'center',
- headingText : '输入账号密码'
- });
- }
- function hsreset(){
- $("#operator").val("");
- $("#username").val("");
- $("#password").val("");
- }
- function check(){
- var operator = $("#operator").val();
- var username = $("#username").val();
- var password = $("#password").val();
- if(operator=="" || operator==null){
- alert("请输操作人姓名");
- }else if(username=="" || username==null){
- alert("请输入用户名");
- }else if(password=="" || password==null){
- alert("请输入密码");
- }else{
- $.post("/statisticsAnalysis/reportusers_check.action",{username:username,password:password,action:action,wpid:$("#wfId").val()},function(data){
- if(data==1){
- if(action ==1){
- $.post("/statisticsAnalysis/statisticsstate_save.action",{state2:1,tbid2:username,action:4,tbname2:operator,tid:$("#stId").val()},function(data){
- hs.close();
- hsreset();
- saveData();
- return;
- })
- }else if(action ==2 ){
- $.post("/statisticsAnalysis/statisticsstate_save.action",{state2:2,shid2:username,action:5,shname2:operator,tid:$("#stId").val()},function(data){
- alert("审核成功");
- hs.close();
- hsreset();
- status();
- return ;
- })
- }else if(action ==3){
- $.post("/statisticsAnalysis/statisticsstate_save.action",{state2:3,qrid2:username,action:6,qrname2:operator,tid:$("#stId").val()},function(data){
- alert("确认成功");
- hsreset();
- hs.close();
- status();
- return;
- })
- }
- }else{
- alert("账号密码不正确或您的权限不足!")
- }
- })
- }
- }
- function status(){
- $.post("/statisticsAnalysis/statisticsstate_status2.action",{tid:$("#stId").val()},function(data){
- if(data==-1 || data=="null" || data==null){
- $("#baocun").removeAttr("disabled");
- $("#shenhe").attr({"disabled":"disabled"});
- $("#queren").attr({"disabled":"disabled"});
- }
- if(data==1){
- $("#baocun").attr({"disabled":"disabled"});
- $("#shenhe").removeAttr("disabled");
- $("#queren").attr({"disabled":"disabled"});
- }
- if(data==2){
- $("#baocun").attr({"disabled":"disabled"});
- $("#shenhe").attr({"disabled":"disabled"});
- $("#queren").removeAttr("disabled");
- }
- if(data==3){
- $("#baocun").attr({"disabled":"disabled"});
- $("#shenhe").attr({"disabled":"disabled"});
- $("#queren").attr({"disabled":"disabled"});
- }
- })
- }
- var width = 0;
- function queryData(){
- $("#gridTable").jqGrid('GridUnload');
- showJqGrid();
- //var g = $("#grid2");
- //var wtName = $("#wtName").val();
- //var wfId = $("#wfId").val();
- // 日期
- //var recordDate = $("#recordDate").val();
- //jQuery("#gridTable").jqGrid('setGridParam',{url:encodeURI(encodeURI("/windTurbineAnalysis/windturbineanalysismainlist.action?recordDate="+recordDate+"&wtName="+wtName+"&wfId="+wfId))}).trigger("reloadGrid");
- //g.gridOptions({url:"/windTurbineAnalysis/windturbineanalysismainlist.action?recordDate="+recordDate+"&wtName="+wtName+"&wfId="+wfId});
- //reload();
- }
- function reload() {
- var g = $("#grid2");
- g.gridReload();
- }
- function sendRequest(passData){
- $("#formView").attr("action", passData).submit();
- }
- function queryClear(){
- $("#wtName").val("");
- }
- function returnMainPage(){
- // 场站查询条件
- var wfIdQ = $("#wfIdQ").val();
- // 日期查询条件
- var recordDateQ = $("#recordDateQ").val();
- $("#formView").attr("action", "/statisticsAnalysis/analysismain.action?wfIdQ="+wfIdQ+"&recordDateQ="+recordDateQ).submit();
- }
- function selectAll(t) {
- $("#grid2").find(":checkbox").attr("checked", t.checked);
- }
- function saveData() {
- // 风场ID
- var wfId = $("#wfId").val();
- // 风机ID
- var wtId = $("#wtId").val();
- // 日期
- var recordDate = $("#recordDate").val();
- // 获取数量
- var count = 0;
- $('#dayValueETable').find('tr').each(function(i){
- if(i>0){
- count = count + 1;
- }
- });
-
- var array = [];
- $("#gridTable").find("tr").each(function(i){
- if(i>0){
- var wtid = $(this).find("td").eq(0).text();
- var str = wtid + "";
- $(this).find('input').each(function(){
- var tempVal = $(this).val();
- // 为空判断
- tempVal = tempVal.replace(/\s+/g, "");
- if(tempVal==""){
- alert("当日值不能为空");
- return false;
- }
- // 非法数字判断
- if(isNaN(tempVal)){
- alert("当日值必须为数字");
- return false;
- }
- str = str + "/" + tempVal;
- });
- array.push(str);
- }
- });
- $.ajax({
- type: "POST",
- url: "/windTurbineAnalysis/batchSaveModify.action?wfId="+wfId+"&recordDate="+recordDate+"&idsStr="+array,
- dataType:"json",
- complete:function (XMLHttpRequest, textStatus) {
- queryData();
- alert('保存成功');
- status();
- }
- });
- }
- function validateForm(){
- var tempVal = $("#dayValueI").val();
- // 为空判断
- tempVal = tempVal.replace(/\s+/g, "");
- if(tempVal==""){
- alert("当日值不能为空");
- return false;
- }
-
- // 非法数字判断
- if(isNaN(tempVal)){
- alert("当日值必须为数字");
- return false;
- }
- return true;
- }
- function modifyData(id){
- $("#editDiv").blockUI();
- }
- function loadTableTitleColumn(){
- var count = 0;
- // 加载当日值(只读)
- $("#dayValueRTable").find('tr').each(function(){
- var titleNameCN = $(this).children().eq(0).text();
- var titleNameEN = $(this).children().eq(1).text();
- var element = '<th align="center" tdalign="center" field="'+titleNameEN+'" movable="true" style="width:200px">'+titleNameCN+'</th>';
- $("#grid2").find('tr').append(element);
- count++;
- });
- // 加载当日值(可编辑)
- $("#dayValueETable").find('tr').each(function(){
- var titleNameCN = $(this).children().eq(0).text();
- var titleNameEN = $(this).children().eq(1).text();
- var element = '<th align="center" tdalign="center" field="'+titleNameEN+'" movable="true" style="width:200px">'+titleNameCN+'</th>';
- $("#grid2").find('tr').append(element);
- count++;
- });
- // 加载周
- $("#weekValueTable").find('tr').each(function(){
- var titleNameCN = $(this).children().eq(0).text();
- var titleNameEN = $(this).children().eq(1).text();
- var element = '<th align="center" tdalign="center" field="'+titleNameEN+'" movable="true" style="width:200px">'+titleNameCN+'</th>';
- $("#grid2").find('tr').append(element);
- count++;
- });
- // 加载月
- $("#monthValueTable").find('tr').each(function(){
- var titleNameCN = $(this).children().eq(0).text();
- var titleNameEN = $(this).children().eq(1).text();
- var element = '<th align="center" tdalign="center" field="'+titleNameEN+'" movable="true" style="width:200px">'+titleNameCN+'</th>';
- $("#grid2").find('tr').append(element);
- count++;
- });
- // 加载季
- $("#quarterValueTable").find('tr').each(function(){
- var titleNameCN = $(this).children().eq(0).text();
- var titleNameEN = $(this).children().eq(1).text();
- var element = '<th align="center" tdalign="center" field="'+titleNameEN+'" movable="true" style="width:200px">'+titleNameCN+'</th>';
- $("#grid2").find('tr').append(element);
- count++;
- });
- // 加载年
- $("#yearValueTable").find('tr').each(function(){
- var titleNameCN = $(this).children().eq(0).text();
- var titleNameEN = $(this).children().eq(1).text();
- var element = '<th align="center" tdalign="center" field="'+titleNameEN+'" movable="true" style="width:200px">'+titleNameCN+'</th>';
- $("#grid2").find('tr').append(element);
- count++;
- });
- return count*200;
- /*alert($('.hDiv').find('table').html());
- $('.hDiv').find('table').eq(0).attr('width',count*200);*/
- }
- function setColorDemoView(){
- // 当日值(只读)、周值、月值、季值、年值显示标示,1显示0不显示
- var dayValueRFlag = $("#dayValueRFlag").val();
- var weekValueFlag = $("#weekValueFlag").val();
- var monthValueFlag = $("#monthValueFlag").val();
- var quarterValueFlag = $("#quarterValueFlag").val();
- var yearValueFlag = $("#yearValueFlag").val();
- if(dayValueRFlag==0){
- $(".dvrc").hide();
- $(".pad1").show();
- }
- if(weekValueFlag==0){
- $(".wvc").hide();
- $(".pad2").show();
- }
- if(monthValueFlag==0){
- $(".mvc").hide();
- $(".pad3").show();
- }
- if(quarterValueFlag==0){
- $(".qvc").hide();
- $(".pad4").show();
- }
- if(yearValueFlag==0){
- $(".yvc").hide();
- $(".pad5").show();
- }
-
- if(dayValueRFlag==1 || weekValueFlag==1 || monthValueFlag==1 || quarterValueFlag==1 || yearValueFlag==1){
- $("#colortable").show();
- }else{
- $("#colortable").hide();
- }
- }
- $(document).ready(function(){
- status();
- setColorDemoView();
- // 日期
- var wstimetext = $("#recordDate").val();
- $("#wstime").text(wstimetext);
-
- showJqGrid();
- });
- // 加载jqgrid表格
- function showJqGrid(){
- var stId = $("#stId").val();
- var wfId = $("#wfId").val();
- var recordDate = $("#recordDate").val();
- $("#toexcel").attr('href',"/windTurbineAnalysis/windturbineanalysismainlistexcel.action?wfId=" + wfId + "&queryDate=" + recordDate + "&stId=" + stId);
- jQuery("#gridTable").jqGrid({
- url:"/windTurbineAnalysis/windturbineanalysismainlist.action?wfId=" + wfId + "&queryDate=" + recordDate + "&stId=" + stId,
- datatype: "json",
- colNames:[ '风机ID',
- '风机名称',
- <s:iterator value="dayValueEList" var="bean">
- '${bean.titleNameCN}',
- </s:iterator>
- <s:iterator value="valueList" var="bean">
- '${bean.titleNameCN}',
- </s:iterator>
- ],
- colModel:[
- { name: 'wtId', index: 'wtId', width: 200, align: 'center',hidden: true},
- { name: 'wtName', index: 'wtName', width: 200, align: 'center'},
- <s:iterator value="dayValueEList" var="bean">
- { name: '${bean.titleNameEN}', index: '${bean.titleNameEN}', width: '${bean.titleWidth}', align: 'center',editable : true},
- </s:iterator>
- <s:iterator value="valueList" var="bean">
- { name: '${bean.titleNameEN}', index: '${bean.titleNameEN}', width: '${bean.titleWidth}', align: 'center'},
- </s:iterator>
- ],
- rowNum:1000,
- height:670,
- width:1610,
- editurl : "/windTurbineAnalysis/windturbineanalysismainlist.action?wfId=" + wfId + "&queryDate=" + recordDate + "&stId=" + stId + "/RowEditing",
- autowidth: true,
- shrinkToFit: false,
- autoScroll: true,
- sortorder: "desc",
- caption: "统计分析列表",
- pager: '#gridPager',
- viewrecords: true,
- afterInsertRow:function(rowid,rowdata,rowelem){
- jQuery("#gridTable").jqGrid('editRow',rowid);
- var dvrc = $('#dayValueRColor').attr('bgcolor');
- var wvc = $('#weekValueColor').attr('bgcolor');
- var mvc = $('#monthValueColor').attr('bgcolor');
- var qvc = $('#quarterValueColor').attr('bgcolor');
- var yvc = $('#yearValueColor').attr('bgcolor');
-
- <s:iterator value="dayValueRList" var="bean">
- jQuery("#gridTable").jqGrid('setRowData',rowid,{${bean.titleNameEN}:"<font color='"+dvrc+"'>"+rowdata.${bean.titleNameEN}+"</font>"});
- </s:iterator>
- <s:iterator value="weekValueList" var="bean">
- jQuery("#gridTable").jqGrid('setRowData',rowid,{${bean.titleNameEN}:"<font color='"+wvc+"'>"+rowdata.${bean.titleNameEN}+"</font>"});
- </s:iterator>
- <s:iterator value="monthValueList" var="bean">
- jQuery("#gridTable").jqGrid('setRowData',rowid,{${bean.titleNameEN}:"<font color='"+mvc+"'>"+rowdata.${bean.titleNameEN}+"</font>"});
- </s:iterator>
- <s:iterator value="quarterValueList" var="bean">
- jQuery("#gridTable").jqGrid('setRowData',rowid,{${bean.titleNameEN}:"<font color='"+qvc+"'>"+rowdata.${bean.titleNameEN}+"</font>"});
- </s:iterator>
- <s:iterator value="yearValueList" var="bean">
- jQuery("#gridTable").jqGrid('setRowData',rowid,{${bean.titleNameEN}:"<font color='"+yvc+"'>"+rowdata.${bean.titleNameEN}+"</font>"});
- </s:iterator>
- }
- });
- }
- </script>
- </head>
- <body>
- <div class="highslide-html-content" id="showDiv2" style="width: 1100">
- <div class="highslide-header">
- <ul>
- <li class="highslide-move">
- <a href="#" onclick="return false">Move</a>
- </li>
- <li class="highslide-close" >
- <a href="#" onclick="return hs.close(this)"></a>
- </li>
- </ul>
- </div>
- <div class="highslide-body" id="container" style="width: 289px">
- <table height="180px">
- <tr><td width="100px" align="right" style="font-size: 16px;font-weight: bold;">操 作 人:</td><td width="190px"><input type="text" name="operator" id="operator" placeholder= "请输入操作人姓名" /> </td></tr>
- <tr><td width="100px" align="right" style="font-size: 16px;font-weight: bold;">用 户 名:</td><td width="190px"><input type="text" name="username" id="username" placeholder= "请输入用户名" /> </td></tr>
- <tr><td width="100px" align="right" style="font-size: 16px;font-weight: bold;">密 码:</td><td width="190px"><input type="password" name="password" id="password" placeholder= "请输入密码"/> </td></tr>
- <tr><td width="100px" align="center" colspan="2"><input type="button" class="button" onclick="javascript:check();" value="确定"/> <input type="reset" class="button" onclick="javascript:hs.close();" value="取消"/></td>
- </tr>
- </table>
-
-
- </div>
- </div>
- <form action="" method="post" id="formView">
- </form>
- <table width="100%">
- <tr>
- <td align="left" class="navbar" style="font-size: 12px;">风机统计分析<font id="wstime"></font></td>
- <td align="right">
- <input type="button" id = 'baocun' class="button" onclick="javascript:showDiv1(1);" value="保存"/>
- <input type="button" id="shenhe" class="button" onclick="javascript:showDiv1(2);" value="审核"/>
- <input type="button" id="queren" class="button" onclick="javascript:showDiv1(3);" value="确认"/>
- <a href="www" class="url" id="toexcel">导出</a>
- <input type="button" class="button" onclick="javascript:returnMainPage();" value="返回"/>
- </td>
- </tr>
- </table>
- <hr/>
- <fieldset id="fst">
- <legend class="item_Name">统计分析查询项</legend>
- <table width="1000px" cellpadding="0" cellspacing="0" class="dataform">
- <tr>
- <td align="left" >
- <input type="text" name="wfIdQ" id="wfIdQ" value="${wfIdQ}" 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 value="${url}" id="url" style="display:none;">
- 风机名称:<s:textfield name="wtName" id="wtName"></s:textfield>
- <s:textfield name="wfId" id="wfId" style="display:none;"></s:textfield>
- <s:textfield name="stId" id="stId" style="display:none;"></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;"/>
- <input type="button" class="button" onclick="javascript:queryData();" value="查询"/>
- <input type="button" class="button" onclick="javascript:queryClear();" value="清空"/>
- </td>
- </tr>
- </table>
- </fieldset>
- <br/>
- <input type="text" id="dayValueRFlag" value="${dayValueRFlag}" style="display: none;"/>
- <input type="text" id="weekValueFlag" value="${weekValueFlag}" style="display: none;"/>
- <input type="text" id="monthValueFlag" value="${monthValueFlag}" style="display: none;"/>
- <input type="text" id="quarterValueFlag" value="${quarterValueFlag}" style="display: none;"/>
- <input type="text" id="yearValueFlag" value="${yearValueFlag}" style="display: none;"/>
- <table id="colortable" style="width: 60%;">
- <tr>
- <td class="dvrc" id="dayValueRColor" bgcolor="${dayValueRColor}" height="20" width="30"></td>
- <td class="dvrc" style="width: 50px;">当日值(只读)</td>
- <td class="wvc" id="weekValueColor" bgcolor="${weekValueColor}" height="20" width="30"></td>
- <td class="wvc" style="width: 40px;">周值</td>
- <td class="mvc" id="monthValueColor" bgcolor="${monthValueColor}" height="20" width="30"></td>
- <td class="mvc" style="width: 40px;">月值</td>
- <td class="qvc" id="quarterValueColor" bgcolor="${quarterValueColor}" height="20" width="30"></td>
- <td class="qvc" style="width: 40px;">季值</td>
- <td class="yvc" id="yearValueColor" bgcolor="${yearValueColor}" height="20" width="30"></td>
- <td class="yvc" style="width: 40px;">年值</td>
-
- <td class="pad1" style="display: none;" height="20" width="30"></td><td class="pad1" style="width: 40px;display: none;"></td>
- <td class="pad2" style="display: none;" height="20" width="30"></td><td class="pad2" style="width: 40px;display: none;"></td>
- <td class="pad3" style="display: none;" height="20" width="30"></td><td class="pad3" style="width: 40px;display: none;"></td>
- <td class="pad4" style="display: none;" height="20" width="30"></td><td class="pad4" style="width: 40px;display: none;"></td>
- <td class="pad5" style="display: none;" height="20" width="30"></td><td class="pad5" style="width: 40px;display: none;"></td>
- </tr>
- </table>
- <table id='gridTable'></table>
- <div id='gridPager'></div>
- <table id="dayValueETable" style="display: none;">
- <s:iterator value="dayValueEList">
- <tr>
- <td><s:property value="titleNameCN"/></td>
- <td><s:property value="titleNameEN"/></td>
- </tr>
- </s:iterator>
- </table>
- </body>
|