fxtabs.jsp 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. var today=new Date();
  33. var yesterday_milliseconds=today.getTime()-1000*60*60*24;
  34. var yesterday=new Date();
  35. yesterday.setTime(yesterday_milliseconds);
  36. var strYear=yesterday.getFullYear();
  37. var strDay=yesterday.getDate();
  38. var strMonth=yesterday.getMonth()+1;
  39. if(strMonth<10)
  40. {
  41. strMonth="0"+strMonth;
  42. }
  43. if(strDay<10)
  44. {
  45. strDay="0"+strDay;
  46. }
  47. var strYesterday=strYear+"-"+strMonth+"-"+strDay;
  48. $( "#tabs" ).tabs({
  49. select: function(event, ui) {
  50. // ui.tab锚元素选中的标签页
  51. // ui.panel 锚元素选中的标签页的内容
  52. // ui.index 锚元素选中的标签页的索引(从0开始)
  53. if(ui.index==0)
  54. {
  55. $("#tab1").attr("src","<%=request.getContextPath() %>/winddirection/wpscatterIndex.action");
  56. $("#tab2").attr("src","about:blank");
  57. }else if(ui.index==1)
  58. {
  59. $("#tab2").attr("src","<%=request.getContextPath() %>/wtgoodness/wpdetailindex.action?windfarm="+"MHS_FDC"
  60. +"&recorddate="+strYesterday);
  61. $("#tab1").attr("src","about:blank");
  62. }
  63. else
  64. {
  65. $("#tab1").attr("src","about:blank");
  66. }
  67. }
  68. });
  69. $("#tab1").attr("src","<%=request.getContextPath() %>/winddirection/wpscatterIndex.action");
  70. });
  71. </script>
  72. </head>
  73. <body>
  74. <div id="tabs" style="width: 1625px;height: 860px;border: 0px;margin: 0px">
  75. <ul >
  76. <li><a href="#tabs-1" >风向走势情况</a></li>
  77. <li><a href="#tabs-2">风资源玫瑰图</a></li>
  78. </ul>
  79. <div id="tabs-1" style="border: 0px;margin: 0px">
  80. <iframe id="tab1" src="" style="border: 0px;margin: 0px" marginwidth="0px" marginheight="0px" frameborder="0" width="1625px" height="830px" scrolling="auto"></iframe>
  81. </div>
  82. <div id="tabs-2">
  83. <iframe id="tab2" src="" style="border: 0px;margin: 0px" marginwidth="0px" marginheight="0px" frameborder="0" width="1625px" height="830px" scrolling="auto"></iframe>
  84. </div>
  85. </div>
  86. </body>
  87. </html>