123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
- <%@include file="/pages/includes/taglibs.jsp"%>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <%--<meta http-equiv="X-UA-Compatible" content="IE=7"></meta>--%>
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
- <script type="text/javascript" src="<%=request.getContextPath()%>/resource/js/jquery-1.8.3.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" />
- <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);
- }
- .text { font-family: "宋体";
- font-size: 12px;
- color: #000000;
- }
- .valuetext { font-family: Arial, Helvetica, sans-serif;
- font-size: 14px;
- color: #000000;
- font-weight: bold;
- }
- -->
- </style>
- <script type="text/javascript">
- function countData() {
- var llfdl = $("#yffdl").html();
- var sfdl = $("#sfdl").html();
- var xdss = $("#xddl").html();
- var dwsl = $("#dwsl").html();
- var tqsl = $("#tqsl").html();
- var zjrl = $("#zjrl").html();
-
- var llfdlxs = llfdl/zjrl*10;
- var sfdlxs = sfdl/zjrl*10;
- var xdssxs = xdss/zjrl*10;
- var dwslxs = dwsl/zjrl*10;
- var tqslxs = tqsl/zjrl*10;
-
- var result = (llfdlxs-sfdlxs-xdssxs-dwslxs-tqslxs)/(llfdlxs-xdssxs-dwslxs-tqslxs)*100;
- $("#result").html(result.toFixed(2)+"%");
-
- }
- function queryData() {
- var wpid = $("#wpid").val();
- var year = $("#year").val();
- var month = $("#month").val();
- if("" == year){
- alert("请选择年份!");
- }else if ("" == month){
- alert("请选择月份!");
- }else{
- var url2 = "wpinfoajax.action?wpid=" + wpid + "&year=" + year + "&month=" + month;
- $.ajax( {
- type : "post",
- url : url2,
- dataType : "json",
- success : function(data){
- if (data.length != 0){
- eval(data);
- $("#zjrl").html(data["zjrl"]*10);
- $("#sfdl").html(data["sfdl"]);
- $("#yffdl").html(data["yffdl"]);
- $("#xddl").html(data["xddl"]);
- $("#dwsl").html(data["dwsl"]);
- $("#tqsl").html(data["tqsl"]);
- $("#result").html(data["result"]+"%");
- }
- }
- });
- }
- }
- $(document).ready(function(){
- $("#year").val("<s:property value='year'/>");
- $("#month").val("<s:property value='month'/>");
- queryData();
- });
- </script>
- </head>
- <body>
- <form action="powerindex.action" method="post" id="f1">
- <fieldset style="height: 100px; width: 1400" id="fst">
- <legend class="item_Name">
- 查询条件
- </legend>
- <table class="dataform">
- <tr>
- <th width="5%" class="item_Name">
- 场站:
- </th>
- <td width="15%">
- <s:select list="wpls" listKey="id" listValue="name" id="wpid"
- name="wpid"></s:select>
- </td>
- <th width="5%" class="item_Name">
- 年份:
- </th>
- <td width="10%" style="text-align: left">
- <s:textfield cssClass="Wdate"
- onFocus="WdatePicker({dateFmt:'yyyy',isShowWeek:true,readOnly:true})"
- id="year" name="year" title="年" />
- </td>
- <th width="5%" class="item_Name">
- 月份:
- </th>
- <td width="10%" style="text-align: left">
- <s:textfield cssClass="Wdate"
- onFocus="WdatePicker({dateFmt:'MM',isShowWeek:true,readOnly:true})"
- id="month" name="month" title="月" />
- </td>
- <td width="10%" style="text-align: right">
- <input type="button" onclick="queryData();" value="查询">
- </td>
- <td width="10%" style="text-align: right">
- <input type="button" onclick="countData();" value="计算">
- </td>
- <td width="40%"></td>
- </tr>
- </table>
- </fieldset>
- <table width="1400" border="0" cellpadding="2" cellspacing="1" bgcolor="efefef">
- <tr>
- <td height="30" align="center" bgcolor="#FFFFFF" class="text">结论如下</td>
- </tr>
- </table>
- <table width="1400" border="0" cellspacing="1" bgcolor="#efefef">
- <tr>
- <td width="185" height="40" align="right" valign="middle" bgcolor="#F7FCFF" class="text">装机容量:</td>
- <td width="185" align="center" valign="middle" bgcolor="#F7FCFF" class="valuetext"><span id="zjrl" contenteditable="true"></span></td>
- <td width="185" align="left" valign="middle" bgcolor="#F7FCFF" class="text">MW</td>
- <td width="185" align="right" valign="middle" bgcolor="#F7FCFF" class="text">实际发电量:</td>
- <td width="185" align="center" valign="middle" bgcolor="#F7FCFF" class="valuetext"><span id="sfdl" contenteditable="true"></span></td>
- <td width="185" align="left" valign="middle" bgcolor="#F7FCFF" class="text">万kWh</td>
- <td width="185" align="right" valign="middle" bgcolor="#F7FCFF" class="text">理论发电量:</td>
- <td width="185" align="center" valign="middle" bgcolor="#F7FCFF" class="valuetext"><span id="yffdl" contenteditable="true"></span></td>
- <td width="185" align="left" valign="middle" bgcolor="#F7FCFF" class="text">万kWh</td>
- </tr>
- <tr>
- <td height="40" align="right" valign="middle" bgcolor="#FFF9EE" class="text">限电损失电量:</td>
- <td align="center" valign="middle" bgcolor="#FFF9EE" class="valuetext"><span id="xddl" contenteditable="true"></span></td>
- <td align="left" valign="middle" bgcolor="#FFF9EE" class="text">万kWh</td>
- <td align="right" valign="middle" bgcolor="#FFF9EE" class="text">电网受累损失:</td>
- <td align="center" valign="middle" bgcolor="#FFF9EE" class="valuetext"><span id="dwsl" contenteditable="true"></span></td>
- <td align="left" valign="middle" bgcolor="#FFF9EE" class="text">万kWh</td>
- <td align="right" valign="middle" bgcolor="#FFF9EE" class="text">天气受累损失:</td>
- <td align="center" valign="middle" bgcolor="#FFF9EE" class="valuetext"><span id="tqsl" contenteditable="true"></span></td>
- <td align="left" valign="middle" bgcolor="#FFF9EE" class="text">万kWh</td>
- </tr>
- </table>
- <table width="1400" border="0" cellpadding="2" cellspacing="1" bgcolor="efefef">
- <tr>
- <td height="30" align="center" bgcolor="#FFFFFF" class="text">公式如下</td>
- </tr>
- </table>
- <table width="1400" border="0" cellspacing="0" cellpadding="2">
- <tr>
- <td height="150" align="center" valign="middle" bgcolor="#F7F7EE"><img src="<%=request.getContextPath()%>/resource/images/system/pictures/bt.gif" width="364" height="87" /><span valign="middle" id="result" style="position: absolute; left:880px;top:330px"></span></td>
- </tr>
- </table>
- </form>
- </body>
|