gyhzttlfx.jsp 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. pageEncoding="UTF-8"%>
  3. <%@ page import="java.text.SimpleDateFormat"%>
  4. <%@ include file="../../common.jsp"%>
  5. <!DOCTYPE html>
  6. <html>
  7. <head>
  8. <meta charset="utf-8">
  9. <title>港口吞吐量分析</title>
  10. <meta name="viewport" content="width=device-width, initial-scale=1">
  11. <link rel="stylesheet" type="text/css" href="${app }/static/css/public.css" />
  12. <link rel="stylesheet" type="text/css" href="${app }/static/css/other.css" />
  13. <script type="text/javascript" src="${app }/static/js/highcharts.js"></script>
  14. <script type="text/javascript" src="${app }/static/js/highcharts-3d.js"></script>
  15. <script type="text/javascript" src="${app }/static/js/exporting.js"></script>
  16. <script type="text/javascript">
  17. $(document).ready(function () {
  18. initChart();
  19. initSelect();
  20. iFrameHeightIframe('${menuid}');//自适应高度
  21. });
  22. function initSelect(){
  23. if('${tjx}'!=''){
  24. $("#tjx").val('${tjx}');
  25. }
  26. if('${zzbl}'!=''){
  27. $("#zzbl").val('${zzbl}');
  28. }
  29. }
  30. function submitGyhzttlForm(){
  31. if($("#tjx").val() == 'gy'){
  32. $("#gyhzttlfxform").attr("action","${app }/gyhzttlfx/gymtttl/main");
  33. }else{
  34. $("#gyhzttlfxform").attr("action","${app }/gyhzttlfx/hzmtttl/main");
  35. }
  36. $("#gyhzttlfxform").submit();
  37. }
  38. function initChart(){
  39. var ttl = ${ttl};
  40. var month = ${dateList};
  41. var bl = ${bl}
  42. $('#container').highcharts({
  43. chart: {
  44. zoomType: 'xy'
  45. },
  46. lang : {
  47. contextButtonTitle : "图表菜单",
  48. resetRoom : "重置",
  49. printChart : "打印图片",
  50. downloadJPEG : "下载JPEG 图片",
  51. downloadPDF : "下载PDF文档",
  52. downloadPNG : "下载PNG 图片",
  53. downloadSVG : "下载SVG 矢量图",
  54. exportButtonTitle : "导出图片",
  55. },
  56. title: {
  57. text: ''
  58. },
  59. /* subtitle: {副标题
  60. text: 'Source: WorldClimate.com'
  61. }, */
  62. xAxis: [{
  63. categories: month,//['Jan', 'Feb', 'Mar', 'Apr', 'May'],
  64. crosshair: true
  65. }],
  66. yAxis: [{ // Primary yAxis
  67. labels: {
  68. format: '{value}%',
  69. style: {
  70. color: Highcharts.getOptions().colors[1]
  71. }
  72. },
  73. title: {
  74. text: '增长比率',
  75. style: {
  76. color: Highcharts.getOptions().colors[1]
  77. }
  78. }
  79. }, { // Secondary yAxis
  80. title: {
  81. text: '货物吞吐量',
  82. style: {
  83. color: Highcharts.getOptions().colors[0]
  84. }
  85. },
  86. labels: {
  87. format: '{value}万吨',
  88. style: {
  89. color: Highcharts.getOptions().colors[0]
  90. }
  91. },
  92. opposite: true
  93. }],
  94. tooltip: {
  95. shared: true
  96. },
  97. series: [{
  98. name: '货物吞吐量',
  99. type: 'column',
  100. yAxis: 1,
  101. data: ttl,//[49.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
  102. tooltip: {
  103. valueSuffix: '万吨'
  104. }
  105. }, {
  106. name: '增长比率',
  107. type: 'spline',
  108. data: bl,
  109. tooltip: {
  110. valueSuffix: '%'
  111. }
  112. }]
  113. });
  114. }
  115. </script>
  116. </head>
  117. <body>
  118. <form id="gyhzttlfxform" method="post" style="margin-top: 30px">
  119. <div>
  120. <table class="search_table" cellpadding="0" cellspacing="0">
  121. <tr>
  122. <th width="11%"></th>
  123. <th width="22%"></th>
  124. <th width="11%"></th>
  125. <th width="22%"></th>
  126. <th width="12%"></th>
  127. <th width="22%"></th>
  128. </tr>
  129. <tr>
  130. <td class="right">
  131. 请选择统计项:&nbsp;
  132. </td>
  133. <td>
  134. <span><select id="tjx" name="tjx" class="form-control" style="width: 80%">
  135. <option value="gy">公用码头吞吐量</option>
  136. <option value="hz">货主码头吞吐量</option>
  137. </select></span>
  138. </td>
  139. <td class="right">
  140. 选择日期:&nbsp;
  141. </td>
  142. <td>
  143. <input id="startDate" class="Wdate" style="width:80%;" name="startDate" value="${startDate}" type="text" onFocus="WdatePicker({lang:'zh-cn',skin:'default',dateFmt:'yyyy-MM',maxDate: '#F{$dp.$D(\'endDate\',{d:0})}'})">
  144. </td>
  145. <td class="middle">~</td>
  146. <td>
  147. <input id="endDate" class="Wdate" style="width:80%;" name="endDate" value="${endDate}" type="text" onFocus="WdatePicker({lang:'zh-cn',skin:'default',dateFmt:'yyyy-MM',minDate: '#F{$dp.$D(\'startDate\',{d:0})}'})">
  148. </td>
  149. </tr>
  150. <tr>
  151. <td class="right">
  152. 请选择增长比率:&nbsp;
  153. </td>
  154. <td>
  155. <span><select id="zzbl" name="zzbl" class="form-control" style="width: 80%">
  156. <option value="tb">同比</option>
  157. <option value="hb">环比</option>
  158. <option value="zs">增速</option>
  159. </select></span>
  160. </td>
  161. <td></td>
  162. <td></td>
  163. <td></td>
  164. <td>
  165. <a class="btn btn-default btn-sm" href="#" onclick="submitGyhzttlForm()">
  166. <i class="glyphicon glyphicon-search"></i>查询
  167. </a>
  168. </td>
  169. </tr>
  170. </table>
  171. </div>
  172. </form>
  173. <h2 align="center" style="margin-top:20px;" ><font style="font-size:16px;color:#196794;font-family:微软雅黑;font-weight: bold;">
  174. (${startDate}月——${endDate}月)港口公用与货主码头吞吐量分析</font></h2>
  175. <br>
  176. <div id="container" style="min-width:400px;height:400px"></div>
  177. </body>
  178. </html>