hwttlfz.jsp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  1. <!DOCTYPE html >
  2. <html >
  3. <%@ page language="java" contentType="text/html; charset=UTF-8"
  4. pageEncoding="UTF-8"%>
  5. <%@ page import="java.text.SimpleDateFormat"%>
  6. <%@ include file="../../common.jsp"%>
  7. <head>
  8. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  9. <title>货物吞吐量发展分析</title>
  10. </head>
  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/exporting.js"></script>
  15. <script type="text/javascript" src="${app }/static/js/highcharts-3d.js"></script>
  16. <script type="text/javascript" src="${app }/static/biz/js/gkyxtjyfx/gkttlfx/hwttlfzmain.js"></script>
  17. <script>
  18. $(document).ready(function () {
  19. /* inithwzlSelect('hwzl','${hwzl}','80%'); */
  20. initHwzldydlSelect('hwzldydl','${dydlid}','showdedl','80%');
  21. initHwzldedlSelect('hwzldedl','${dedlid}','${dydlid}','80%');
  22. initszdSelect('szdsel', '${szd}', 'showgk', '80%');
  23. initgkSelect('gksel', '${szgk}', '${szd}', 'showgq', '80%');
  24. initgqSelect('gqsel', '${szgq}','${szd}', '${szgk}', null, '80%');
  25. $('.selectpicker').selectpicker({
  26. width:'80%'
  27. });
  28. hwttlfz.main.init();
  29. iFrameHeightIframe('${menuid}');//自适应高度
  30. });
  31. function showgk(){
  32. initgkSelect('gksel','${szgk }',$('.szdselectpicker').val(),"showgq",'80%');
  33. showgq();
  34. }
  35. function showdedl(){
  36. initHwzldedlSelect('hwzldedl','',$('.dydlselectpicker').val(),'80%')
  37. }
  38. function showgq(){
  39. initgqSelect('gqsel','${szgq }',$('.szdselectpicker').val(),$('.gkselectpicker').val(),null,'80%');
  40. }
  41. function inithwzlSelect(divid,existVal,width){
  42. $.post($.app + "/hwttlfz/selectHwzl", {
  43. }, function(data) {
  44. var str = "";
  45. str+="<select class='hwzlselectpicker' name='hwzlid' >";
  46. str+="<option></option>";
  47. if(data){
  48. for(var i=0;i<data.length;i++){
  49. var hwzl = data[i];
  50. if(hwzl.id==existVal){
  51. str+=" <option selected='selected' value='"+hwzl.id+"' >"+hwzl.text+"</option>";
  52. }else{
  53. str+=" <option value='"+hwzl.id+"' >"+hwzl.text+"</option>";
  54. }
  55. }
  56. }
  57. str+="</select>";
  58. $("#"+divid).empty();
  59. $("#"+divid).append(str);
  60. $('.hwzlselectpicker').selectpicker({
  61. width:width
  62. });
  63. }, "json");
  64. }
  65. function initthbSelect(){
  66. var str = "";
  67. str+="<select class='thbselectpicker' name='tonghuanbi' >";
  68. str+="<option></option>";
  69. if("tongbi"=='${tonghuanbi}'){
  70. str+=" <option value='tongbi' selected='selected'>同比</option>";
  71. str+=" <option value='huanbi'>环比</option>";
  72. }
  73. else{
  74. str+=" <option value='tongbi'>同比</option>";
  75. str+=" <option value='huanbi' selected='selected'>环比</option>";
  76. }
  77. str+="</select>";
  78. $("#thb").empty();
  79. $("#thb").append(str);
  80. $('.thbselectpicker').selectpicker({
  81. width:'80%'
  82. });
  83. }
  84. function initsfdwkfSelect(divid,existVal,width){
  85. $.post($.app + "/hwttlfz/selectSfdwkf", {
  86. }, function(data) {
  87. var str = "";
  88. str+="<select class='sfdwkfselectpicker' name='sfdwkf' >";
  89. str+="<option></option>";
  90. if(data){
  91. for(var i=0;i<data.length;i++){
  92. var sf = data[i];
  93. if(sf.id==existVal){
  94. str+=" <option selected='selected' value='"+sf.id+"' >"+sf.text+"</option>";
  95. }else{
  96. str+=" <option value='"+sf.id+"' >"+sf.text+"</option>";
  97. }
  98. }
  99. }
  100. str+="</select>";
  101. $("#"+divid).empty();
  102. $("#"+divid).append(str);
  103. $('.sfdwkfselectpicker').selectpicker({
  104. width:width
  105. });
  106. }, "json");
  107. }
  108. //构建货物种类第一大类下拉
  109. function initHwzldydlSelect(divid,existVal,changefunc,width){
  110. $.post($.app+"/dcsb/selectHwlxdydl",{
  111. },function(data) {
  112. var str="";
  113. if(changefunc!=null&&changefunc!=""){
  114. str+="<select class='dydlselectpicker' name='dydlid' onchange='"+changefunc+"()' id='dydlid'>";
  115. }else{
  116. str+="<select class='dydlselectpicker' name='dydlid' id='dydlid'>";
  117. }
  118. str+="<option></option>";
  119. if(data){
  120. for(var i=0;i<data.length;i++){
  121. var dydl=data[i];
  122. if(dydl.id==existVal){
  123. str+=" <option selected='selected' value='"+dydl.id+"' >"+dydl.text+"</option>";
  124. }else{
  125. str+="<option value='"+dydl.id+"'>"+dydl.text+"</option>" ;
  126. }
  127. }
  128. }
  129. str+="</select>";
  130. $("#"+divid).empty();
  131. $("#"+divid).append(str);
  132. $('.dydlselectpicker').selectpicker({
  133. width:width
  134. });
  135. }, "json");
  136. }
  137. //构建货物种类第二大类下拉
  138. //existVal:默认值,dydlid:第一大类id
  139. function initHwzldedlSelect(divid,existVal,dydlid,width){
  140. $.post($.app+"/dcsb/selectHwlxdedl",{
  141. dydlid:dydlid
  142. },function(data) {
  143. var str="";
  144. str+="<select class='dedlselectpicker' name='dedlid' id='dedlid'>";
  145. str+="<option></option>";
  146. if(data){
  147. for(var i=0;i<data.length;i++){
  148. var dedl=data[i];
  149. if(dedl.id==existVal){
  150. str+=" <option selected='selected' value='"+dedl.id+"' >"+dedl.text+"</option>";
  151. }else{
  152. str+="<option value='"+dedl.id+"'>"+dedl.text+"</option>" ;
  153. }
  154. }
  155. }
  156. str+="</select>";
  157. $("#"+divid).empty();
  158. $("#"+divid).append(str);
  159. $('.dedlselectpicker').selectpicker({
  160. width:width
  161. });
  162. }, "json");
  163. }
  164. $(function () {
  165. var list = '${list}';
  166. var zttl=[];
  167. var name=[];
  168. var hb=[];
  169. var tb=[]
  170. var aa='${zcl}';
  171. var bb=-+'${zcl}';
  172. $.each(JSON.parse(list), function (n, value) {
  173. name[n]=value.name;
  174. zttl[n]=value.zttl;
  175. hb[n]=value.hwttlhb;
  176. tb[n]=value.hwttltb;
  177. });
  178. $('#container').highcharts({
  179. title:{
  180. text:""
  181. },
  182. chart: {
  183. zoomType: 'xy'
  184. },
  185. lang : {
  186. contextButtonTitle : "图表菜单",
  187. resetRoom : "重置",
  188. printChart : "打印图片",
  189. downloadJPEG : "下载JPEG 图片",
  190. downloadPDF : "下载PDF文档",
  191. downloadPNG : "下载PNG 图片",
  192. downloadSVG : "下载SVG 矢量图",
  193. exportButtonTitle : "导出图片",
  194. },
  195. xAxis: [{
  196. categories: eval(name)
  197. }],
  198. yAxis: [{ // Primary yAxis
  199. min:-20,
  200. max:50,
  201. labels: {
  202. formatter: function() {
  203. return this.value +'%';
  204. },
  205. style: {
  206. color: '#89A54E'
  207. }
  208. },
  209. title: {
  210. text: '同比增长率',
  211. style: {
  212. color: '#89A54E'
  213. }
  214. },
  215. opposite: true,
  216. plotLines:[{
  217. color:'red', //线的颜色,定义为红色
  218. dashStyle:'ShortDash', //默认值,这里定义为实线
  219. value:aa, //定义在那个值上显示标示线,这里是在x轴上刻度为3的值处垂直化一条线
  220. width:2 //标示线的宽度,2px
  221. },{
  222. color:'yellow', //线的颜色,定义为红色
  223. dashStyle:'ShortDash', //默认值,这里定义为实线
  224. value:bb, //定义在那个值上显示标示线,这里是在x轴上刻度为1的值处垂直化一条线
  225. width:2 //标示线的宽度,2px
  226. }]
  227. }, { // Secondary yAxis
  228. min:0,
  229. max:100,
  230. gridLineWidth: 0,
  231. title: {
  232. text: '吞吐量',
  233. style: {
  234. color: '#4572A7'
  235. }
  236. },
  237. labels: {
  238. formatter: function() {
  239. return this.value +' 万吨';
  240. },
  241. style: {
  242. color: '#4572A7'
  243. }
  244. }
  245. }, { // Tertiary yAxis
  246. min:-20,
  247. max:50,
  248. gridLineWidth: 0,
  249. title: {
  250. text: '环比增长率',
  251. style: {
  252. color: '#AA4643'
  253. }
  254. },
  255. labels: {
  256. formatter: function() {
  257. return this.value +' %';
  258. },
  259. style: {
  260. color: '#AA4643'
  261. }
  262. },
  263. opposite: true
  264. }],
  265. tooltip: {
  266. shared: true
  267. },
  268. legend: {
  269. layout: 'vertical',
  270. align: 'left',
  271. x: 120,
  272. verticalAlign: 'top',
  273. y: 80,
  274. floating: true,
  275. backgroundColor: '#FFFFFF'
  276. },
  277. series: [{
  278. name: '吞吐量',
  279. color: '#4572A7',
  280. type: 'column',
  281. yAxis: 1,
  282. data: eval('['+zttl+']'),
  283. tooltip: {
  284. valueSuffix: ' 万吨'
  285. }
  286. }, {
  287. name: '环比增长率',
  288. type: 'spline',
  289. color: '#AA4643',
  290. yAxis: 2,
  291. data: eval('['+hb+']'),
  292. marker: {
  293. enabled: false
  294. },
  295. dashStyle: 'shortdot',
  296. tooltip: {
  297. valueSuffix: ' %'
  298. }
  299. }, {
  300. name: '同比增长率',
  301. color: '#89A54E',
  302. type: 'spline',
  303. data: eval('['+tb+']'),
  304. tooltip: {
  305. valueSuffix: ' %'
  306. }
  307. }]
  308. });
  309. });
  310. </script>
  311. <style type="text/css">
  312. .main_table td{
  313. text-align:left;
  314. padding-left:50px;
  315. width:50px;
  316. }
  317. </style>
  318. </head>
  319. <body >
  320. <div class="box">
  321. <div class="box-content">
  322. <form action="${app }/hwttlfz/main" id="hwttlfzform" method="post">
  323. <!-- 查询条件 -->
  324. <div class="searchdiv">
  325. <table class="search_table" cellpadding="0" cellspacing="0">
  326. <tr>
  327. <th width="11%"></th>
  328. <th width="22%"></th>
  329. <th width="11%"></th>
  330. <th width="22%"></th>
  331. <th width="12%"></th>
  332. <th width="22%"></th>
  333. </tr>
  334. <tr>
  335. <td class="right">
  336. 所在地:&nbsp;
  337. </td>
  338. <td>
  339. <span id="szdsel">
  340. </span>
  341. </td>
  342. <td class="right">
  343. 所在港口:&nbsp;
  344. </td>
  345. <td>
  346. <span id="gksel">
  347. </span>
  348. </td>
  349. <td class="right">
  350. 所在港区:&nbsp;
  351. </td>
  352. <td>
  353. <span id="gqsel">
  354. </span>
  355. </td>
  356. </tr>
  357. <tr>
  358. <td class="right">
  359. 货物种类第一大类:&nbsp;
  360. </td>
  361. <td>
  362. <span id="hwzldydl">
  363. </span>
  364. </td>
  365. <td class="right">
  366. 货物种类第二大类:&nbsp;
  367. </td>
  368. <td>
  369. <span id="hwzldedl">
  370. </span>
  371. </td>
  372. <td class="right">
  373. 报告时间起:&nbsp;
  374. </td>
  375. <td>
  376. <input id="d4311" class="Wdate" name="startDate" value="${startDate}" type="text" onFocus="WdatePicker({lang:'zh-cn',skin:'default',dateFmt:'yyyy-MM'})">
  377. </td>
  378. </tr>
  379. <tr>
  380. <td class="right">
  381. 增长率阈值:&nbsp;
  382. </td>
  383. <td>
  384. <select class='selectpicker' name="zcl" style="width:80%">
  385. <c:if test="${zcl ==10 }">
  386. <option value="10" selected="selected">10%</option>
  387. <option value="20">20%</option>
  388. </c:if>
  389. <c:if test="${zcl ==20 }">
  390. <option value="10" >10%</option>
  391. <option value="20" selected="selected">20%</option>
  392. </c:if>
  393. </select>
  394. </td>
  395. <td align="right" colspan="6">
  396. <a class="btn btn-default btn-sm" href="#" onclick="hwttlfz.main.search()">
  397. <i class="glyphicon glyphicon-search"></i>查询
  398. </a>
  399. </td>
  400. </tr>
  401. </table>
  402. </div>
  403. </form>
  404. <h2 align="center" style="margin-top:20px;" ><font style="font-size:16px;color:#196794;font-family:微软雅黑;font-weight: bold;">
  405. ${szgkzw}${hwzlzw}吞吐量发展<c:if test="${tonghuanbi=='tongbi'}">同比</c:if><c:if test="${tonghuanbi=='huanbi'||(tonghuanbi=='')}">环比</c:if>分析</font></h2>
  406. <div id="container" style="min-width: 200px; min-height:300px; margin: 0 auto;"></div>
  407. <div class="box">
  408. <div style="background-color:#f4f4f4;">
  409. <table class="main_table" id="hwttlfz" cellpadding="0" cellspacing="0" border="1">
  410. <tr>
  411. <th rowspan="2" width="20%" style="min-width: 163px;">货物种类</th>
  412. <th colspan="3">合计</th>
  413. <th colspan="3">进港</th>
  414. <th colspan="3">出港</th>
  415. </tr>
  416. <tr>
  417. <th>万吨</th>
  418. <th>同比(%)</th>
  419. <th>环比(%)</th>
  420. <th>万吨</th>
  421. <th>同比(%)</th>
  422. <th>环比(%)</th>
  423. <th>万吨</th>
  424. <th>同比(%)</th>
  425. <th>环比(%)</th>
  426. </tr>
  427. <tr>
  428. <td>合计</td>
  429. <td>${sum.zttl }</td>
  430. <td>${sum.ztb }</td>
  431. <td>${sum.zhb }</td>
  432. <td>${sum.jgttl }</td>
  433. <td>${sum.jgtb}</td>
  434. <td>${sum.jghb }</td>
  435. <td>${sum.cgttl }</td>
  436. <td>${sum.cgtb}</td>
  437. <td>${sum.cghb }</td>
  438. </tr>
  439. <c:forEach items="${slist}" var="s" varStatus="status">
  440. <tr>
  441. <td>${s.hwzlname }</td>
  442. <td style="text-align:center;padding-left:0px">${s.zttl }</td>
  443. <td style="text-align:center;padding-left:0px">${s.ztb }</td>
  444. <td style="text-align:center;padding-left:0px">${s.zhb }</td>
  445. <td style="text-align:center;padding-left:0px">${s.jgttl }</td>
  446. <td style="text-align:center;padding-left:0px">${s.jgtb}</td>
  447. <td style="text-align:center;padding-left:0px">${s.jghb }</td>
  448. <td style="text-align:center;padding-left:0px">${s.cgttl }</td>
  449. <td style="text-align:center;padding-left:0px">${s.cgtb}</td>
  450. <td style="text-align:center;padding-left:0px">${s.cghb }</td>
  451. </tr>
  452. </c:forEach>
  453. </table>
  454. </div>
  455. </div>
  456. </div>
  457. </div>
  458. </body>
  459. </html>