123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317 |
- <%@ page language="java" contentType="text/html;charset=utf-8"%>
- <%@include file="/pages/includes/taglibs.jsp"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta http-equiv="X-UA-Compatible" content="IE=8" />
- <title>国电电力和风新能源公司生产运行监控平台</title>
- <link href="<%=request.getContextPath() %>/pages/monitor/css/page_fjjz_new.css" rel="stylesheet" type="text/css" />
- <script type='text/javascript' src='<%=request.getContextPath() %>/resource/js/jquery-1.8.3.js'></script>
- <link href="<%=request.getContextPath() %>/resource/js/contextmenu/skins/default/contextmenu.css" rel="stylesheet"/>
- <script src="<%=request.getContextPath() %>/resource/js/contextmenu/contextmenu.js" type="text/javascript"></script>
-
- </head>
- <script type="text/javascript">
- var islongin=0;
- var username="tom";
- var password="jerry";
- var errorCode=-1;
- $(document).ready(function() {
- getDetail();
- window.setInterval(getDetail, 30000);
- window.setInterval(initIslongin, 300000);
- });
- function initIslongin(){
- islongin=0;
- }
- function login(){
- var user=$("#username").val();
- var pwd=$("#password").val();
- if(username==user&&password==pwd){
- islongin=1;
- }else{
- islongin=0;
- errorCode=0;
- }
- }
- function checkLogin(wpId,pjId,lineId,wtId,stateId){
- if(islongin==0){
- if(errorCode=0){
- alert("用户名或密码不正确,请重新输入");
- }
- showDialog(wpId,pjId,lineId,wtId,stateId);
- return false;
- }else{
- return true;
- }
- }
- function showDialog(wpId,pjId,lineId,wtId,stateId){
-
- }
- function changeState(wpId,pjId,lineId,wtId,stateId){
- //alert("下发人工干预状态!!");
- //alert(wpId+"=="+pjId+"=="+lineId+"=="+wtId+"=="+stateId)
- $.ajax({
- url : "/matrix/changeState.action",
- type : "post",
- cache : false,
- dataType : "json",
- data : {"wpId":wpId,"pjId":pjId,"lineId":lineId,"wtId":wtId,"stateId":stateId},
- async : false,
- ifModified : false,
- success : function(res) {
- getDetail();
- }
- });
- }
- function getDetail(type)
- {
- if( type!="" && type!=null && type!=undefined)
- {
- $("#type").val(type);
- }else
- {
- type=$("#type").val();
- }
- $.ajax({
- url : "/matrix/ztXdslAjax.action",
- type : "post",
- cache : false,
- dataType : "json",
- data : {},
- async : false,
- ifModified : false,
- success : function(res) {
- for (var key in res){
- getStateType(res[key],key,type);
- }
- }
- });
- }
- function gowt(id)
- {
- var wpId=$("#wpId").val();
- $("#wtId").val(id);
- parent.$tabs.tabs('select', 1);
- $("#tab3", window.parent.document).attr("src","about:blank");
- $("#tab2", window.parent.document).attr("src","/wpmonitor/wtindex.action?wpId="+wpId+"&wtId="+id);
- }
- function getStateType(result,id,type) {
- switch(result){
- case 1:
- if(type==1 || type==6)
- {
-
- $("#"+id).attr("class","matrix_pink");
-
- }else
- {
- $("#"+id).attr("class","matrix_none");
- }
-
- break;
- case 0:
- if(type==0 || type==6)
- {
- $("#"+id).attr("class","matrix_blue");
- }else
- {
- $("#"+id).attr("class","matrix_none");
- }
- break;
- case 2:
- if(type==2 || type==6)
- {
- $("#"+id).attr("class","matrix_orange");
-
- }else
- {
- $("#"+id).attr("class","matrix_none");
- }
- break;
- case 3:
- if(type==3 || type==6)
- {
- $("#"+id).attr("class","matrix_red");
- }else
- {
- $("#"+id).attr("class","matrix_none");
- }
-
- break;
- case 4:
- if(type==4 || type==6)
- {
- $("#"+id).attr("class","matrix_deepblack");
- }else
- {
- $("#"+id).attr("class","matrix_none");
- }
-
- break;
- case 5:
- if(type==5 || type==6)
- {
- $("#"+id).attr("class","matrix_deepblue");
- }else
- {
- $("#"+id).attr("class","matrix_none");
- }
- break;
- }
- }
- function setTab(m,n){
- var menu=document.getElementById("tab"+m).getElementsByTagName("li");
- for(i=0;i<menu.length;i++)
- {
- menu[i].className=(i==n?"now":"");
- }
- }
- </script>
- <!--[if gte IE 6]>
- <script type="text/javascript">
- function correctPNG()
- {
- for(var i=0; i<document.images.length; i++)
- {
- var img = document.images[i]
- var imgName = img.src.toUpperCase()
- if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
- {
- var imgID = (img.id) ? "id='" + img.id + "' " : ""
- var imgClass = (img.className) ? "class='" + img.className + "' " : ""
- var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
- var imgStyle = "display:inline-block;" + img.style.cssText
- if (img.align == "left") imgStyle = "float:left;" + imgStyle
- if (img.align == "right") imgStyle = "float:right;" + imgStyle
- if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
- var strNewHTML = "<span " + imgID + imgClass + imgTitle
- + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
- + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
- + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
- img.outerHTML = strNewHTML
- i = i-1
- }
- }
- }
- window.attachEvent("onload", correctPNG);
- </script>
- <![endif]-->
- <body>
- <div id="WincontextMenu" class="WincontextMenu" style="top:100px; left:230px; display:none;">
- <li><a id="0" href="#"><img src="<%=request.getContextPath() %>/resource/js/contextmenu/skins/default/contextmenu/icons/Copy.png"/><span>正常状态</span></a></li>
- <li><a id="1" href="#"><img src="<%=request.getContextPath() %>/resource/js/contextmenu/skins/default/contextmenu/icons/New.png"/><span>限电状态</span></a></li>
- <li><a id="2" href="#"><img src="<%=request.getContextPath() %>/resource/js/contextmenu/skins/default/contextmenu/icons/Save.png"/><span>站内计划停运</span></a></li>
- <li><a id="3" href="#" ><img src="<%=request.getContextPath() %>/resource/js/contextmenu/skins/default/contextmenu/icons/table.png"/><span>站内故障停运</span></a></li>
- <li><a id="4" href="#"><img src="<%=request.getContextPath() %>/resource/js/contextmenu/skins/default/contextmenu/icons/Pinion.png"/><span>站外受累电网</span></a></li>
- <li><a id="5" href="#"><img src="<%=request.getContextPath() %>/resource/js/contextmenu/skins/default/contextmenu/icons/Person.png"/><span>站外受累天气</span></a></li>
- </div>
-
- <form id="f1" action="" method="post">
- <s:hidden id="type" value="6"></s:hidden>
- <s:hidden id="wpId" name="wpId"></s:hidden>
- <s:hidden id="wtId" name="wtId"></s:hidden>
- <div class="">
- <div class="">
- <s:iterator id="wp" value="wpls" status="wfst" >
- <table border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse;border-color:graytext;">
- <tr>
- <td width="150px">
- <div id="<s:property value='#wp.id'/>"><s:property value='#wp.name'/></div>
- <script type="text/javascript">
- $(document).ready(function() {
- $("#<s:property value='#wp.id'/>").WinContextMenu({cancel:'.cancel',action:function(e){changeState("<s:property value='#wp.id'/>","","","",e.id)}});
- });
- </script>
- </td>
- <td>
- <s:iterator id="pj" value="pjsmap" >
- <s:if test="#wp.id==#pj.key">
- <table border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse;border-width:0px; border-style:hidden;border-color: graytext;">
- <s:iterator id="pjls" value="#pj.value" >
- <tr>
- <td width="150px"><div id="<s:property value='#pjls.id'/>"><s:property value='#pjls.name'/></div></td>
- <script type="text/javascript">
- $(document).ready(function() {
- $("#<s:property value='#pjls.id'/>").WinContextMenu({cancel:'.cancel',action:function(e){changeState("","<s:property value='#pjls.id'/>","","",e.id)}});
- });
- </script>
- <td>
- <table border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse;border-width:0px; border-style:hidden;border-color: white;" >
- <s:iterator id="lnpj" value="lnpjmap" >
- <s:if test="#pjls.id==#lnpj.key">
- <s:property value='#lnpj.name'/>
- <s:iterator id="lnpj2" value="#lnpj.value" >
-
- <tr>
- <td width="150px"><div id="<s:property value='#lnpj2.id'/>"><s:property value='#lnpj2.name'/></div>
- <script type="text/javascript">
- $(document).ready(function() {
- $("#<s:property value='#lnpj2.id'/>").WinContextMenu({cancel:'.cancel',action:function(e){changeState("","","<s:property value='#lnpj2.id'/>","",e.id)}});
- });
- </script>
- </td>
- <td width="1200px">
- <s:iterator id="wtls" value="wtlinemap" >
- <s:if test="#lnpj2.id==#wtls.key">
- <div class="">
- <s:iterator id="wtls2" value="#wtls.value" >
- <div class="matrix_white" id="<s:property value='#wtls2.id'/>"><s:property value='#wtls2.code'/></div>
- <script type="text/javascript">
- $(document).ready(function() {
- $("#<s:property value='#wtls2.id'/>").WinContextMenu({cancel:'.cancel',action:function(e){changeState("","","","<s:property value='#wtls2.id'/>",e.id)}});
- });
- </script>
- </s:iterator>
- </div>
- </s:if>
- </s:iterator>
- </td>
- </tr>
- </s:iterator>
-
- </s:if>
- </s:iterator>
- </table>
-
-
- </td>
- </tr>
- </s:iterator>
- </table>
-
-
- </s:if>
- </s:iterator>
-
- </td>
-
- </tr>
- </table>
- </s:iterator>
-
- </div>
- </div>
- </form>
- </body>
- </html>
|