comparetab.jsp 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <%@ page language="java" contentType="text/html;charset=utf-8"%>
  2. <%@include file="/pages/includes/taglibs.jsp"%>
  3. <html>
  4. <head>
  5. <title>宁夏集控</title>
  6. <style>
  7. body{
  8. font-size: 12px;
  9. margin-left: 0px;
  10. margin-top: 0px;
  11. margin-right: 0px;
  12. margin-bottom: 0px;
  13. }
  14. @font-face {
  15. font-family: 'fontNameRegular';
  16. src: url('<%=request.getContextPath() %>/resource/fonts/DS-DIGIT-webfont.eot');
  17. src: local('<%=request.getContextPath() %>/resource/fonts/DS-DIGIT-webfont Regular'),
  18. local('<%=request.getContextPath() %>/resource/fonts/DS-DIGIT-webfont'),
  19. url('<%=request.getContextPath() %>/resource/fonts/DS-DIGIT-webfont.woff') format('woff'),
  20. url('<%=request.getContextPath() %>/resource/fonts/DS-DIGIT-webfont.ttf') format('truetype'),
  21. url('<%=request.getContextPath() %>/resource/fonts/DS-DIGIT-webfont.svg#fontName') format('svg');
  22. font-size: 20px;
  23. font-weight: bolder;
  24. }
  25. </style>
  26. <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/resource/plugin/jqueryui/css/custom-theme/jquery-ui-1.9.2.custom.css" />
  27. <script src="<%=request.getContextPath() %>/resource/plugin/jqueryui/js/jquery-ui-1.9.2.custom.js" type="text/javascript"></script>
  28. <script src="<%=request.getContextPath() %>/resource/plugin/jqueryui/development-bundle/ui/jquery.ui.widget.js"></script>
  29. <script src="<%=request.getContextPath() %>/resource/plugin/jqueryui/development-bundle/ui/jquery.ui.tabs.js"></script>
  30. <script type="text/javascript">
  31. $(function() {
  32. $( "#tabs" ).tabs({
  33. select: function(event, ui) {
  34. // ui.tab锚元素选中的标签页
  35. // ui.panel 锚元素选中的标签页的内容
  36. // ui.index 锚元素选中的标签页的索引(从0开始)
  37. if(ui.index==0)
  38. {
  39. var beginDate2 =$(window.frames[1].document).find("#beginDate").val();
  40. var windfarm2 =$(window.frames[1].document).find("#wpidls").val();
  41. var windturbineid2 =$(window.frames[1].document).find("#wtidls").val();
  42. var beginDate3 =$(window.frames[2].document).find("#beginDate").val();
  43. var windfarm3 =$(window.frames[2].document).find("#wpidls").val();
  44. var windturbineid3 =$(window.frames[2].document).find("#wtidls").val();
  45. if(beginDate2!=null && windturbineid2!=null)
  46. {
  47. $("#tab1").attr("src","<%=request.getContextPath() %>/compare/compareindex.action?windturbineid=" + windturbineid2
  48. + "&windfarm=" + windfarm2 + "&beginDate=" + beginDate2
  49. );
  50. }else if(beginDate3!=null && windturbineid3!=null)
  51. {
  52. $("#tab1").attr("src","<%=request.getContextPath() %>/compare/compareindex.action?windturbineid=" + windturbineid3
  53. + "&windfarm=" + windfarm3 + "&beginDate=" + beginDate3
  54. );
  55. }else
  56. {
  57. $("#tab1").attr("src","<%=request.getContextPath() %>/compare/compareindex.action");
  58. }
  59. $("#tab3").attr("src","about:blank");
  60. $("#tab2").attr("src","about:blank");
  61. }else if(ui.index==1)
  62. {
  63. var beginDate1 =$(window.frames[0].document).find("#beginDate").val();
  64. var windturbineid1 =$(window.frames[0].document).find("#wtidls").val();
  65. var windfarm1 =$(window.frames[0].document).find("#wpidls").val();
  66. var beginDate3 =$(window.frames[2].document).find("#beginDate").val();
  67. var windturbineid3 =$(window.frames[2].document).find("#wtidls").val();
  68. var windfarm3 =$(window.frames[2].document).find("#wpidls").val();
  69. if(beginDate1!=null && windturbineid1!=null)
  70. {
  71. $("#tab2").attr("src","<%=request.getContextPath() %>/comparemonth/compareindex.action?windturbineid=" + windturbineid1
  72. + "&windfarm=" + windfarm1 + "&beginDate=" + beginDate1
  73. );
  74. }else if(beginDate3!=null && windturbineid3!=null)
  75. {
  76. $("#tab2").attr("src","<%=request.getContextPath() %>/comparemonth/compareindex.action?windturbineid=" + windturbineid3
  77. + "&windfarm=" + windfarm3 + "&beginDate=" + beginDate3
  78. );
  79. }else
  80. {
  81. $("#tab2").attr("src","<%=request.getContextPath() %>/comparemonth/compareindex.action");
  82. }
  83. $("#tab1").attr("src","about:blank");
  84. $("#tab3").attr("src","about:blank");
  85. }else if(ui.index==2)
  86. {
  87. var beginDate1 =$(window.frames[0].document).find("#beginDate").val();
  88. var windturbineid1 =$(window.frames[0].document).find("#wtidls").val();
  89. var windfarm1 =$(window.frames[0].document).find("#wpidls").val();
  90. var beginDate2 =$(window.frames[1].document).find("#beginDate").val();
  91. var windturbineid2 =$(window.frames[1].document).find("#wtidls").val();
  92. var windfarm2 =$(window.frames[1].document).find("#wpidls").val();
  93. if(beginDate1!=null && windturbineid1!=null)
  94. {
  95. $("#tab3").attr("src","<%=request.getContextPath() %>/compareyear/compareindex.action?windturbineid=" + windturbineid1
  96. + "&windfarm=" + windfarm1 + "&beginDate=" + beginDate1
  97. );
  98. }else if(beginDate2!=null && windturbineid2!=null)
  99. {
  100. $("#tab3").attr("src","<%=request.getContextPath() %>/compareyear/compareindex.action?windturbineid=" + windturbineid2
  101. + "&windfarm=" + windfarm2 + "&beginDate=" + beginDate2
  102. );
  103. }else
  104. {
  105. $("#tab3").attr("src","<%=request.getContextPath() %>/compareyear/compareindex.action");
  106. }
  107. $("#tab1").attr("src","about:blank");
  108. $("#tab2").attr("src","about:blank");
  109. }
  110. else
  111. {
  112. $("#tab1").attr("src","about:blank");
  113. }
  114. }
  115. });
  116. $("#tab1").attr("src","<%=request.getContextPath() %>/compare/compareindex.action");
  117. });
  118. </script>
  119. </head>
  120. <body>
  121. <div id="tabs" style="width: 1880px;height: 860px;border: 0px;margin: 0px">
  122. <ul >
  123. <li><a href="#tabs-1" >日风电机对比</a></li>
  124. <li><a href="#tabs-2">月风电机对比</a></li>
  125. <li><a href="#tabs-3">年风电机对比</a></li>
  126. </ul>
  127. <div id="tabs-1" style="border: 0px;margin: 0px">
  128. <iframe id="tab1" src="" style="border: 0px;margin: 0px" marginwidth="0px" marginheight="0px" frameborder="0" width="1890px" height="830px" scrolling="auto"></iframe>
  129. </div>
  130. <div id="tabs-2">
  131. <iframe id="tab2" src="" style="border: 0px;margin: 0px" marginwidth="0px" marginheight="0px" frameborder="0" width="1890px" height="830px" scrolling="auto"></iframe>
  132. </div>
  133. <div id="tabs-3">
  134. <iframe id="tab3" src="" style="border: 0px;margin: 0px" marginwidth="0px" marginheight="0px" frameborder="0" width="1890px" height="830px" scrolling="auto"></iframe>
  135. </div>
  136. </div>
  137. </body>
  138. </html>