wtdetailchart.jsp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772
  1. <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
  2. <%@include file="/pages/includes/taglibs.jsp"%>
  3. <head>
  4. <link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath() %>/resource/plugin/jqgrid/css/ui.jqgrid.css" />
  5. <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/resource/plugin/jqueryui/css/custom-theme/jquery-ui-1.9.2.custom.css" />
  6. <script src="<%=request.getContextPath() %>/resource/js/jquery-1.8.3.js" type="text/javascript"></script>
  7. <script src="<%=request.getContextPath() %>/resource/plugin/jqueryui/js/jquery-ui-1.9.2.custom.js" type="text/javascript"></script>
  8. <script src="<%=request.getContextPath()%>/resource/js/highcharts/highcharts.src.js" type="text/javascript"></script>
  9. <script src="<%=request.getContextPath()%>/resource/js/highcharts/highcharts-more.js"></script>
  10. <script src="<%=request.getContextPath()%>/resource/js/highcharts/modules/solid-gauge.src.js"></script>
  11. <script src="<%=request.getContextPath()%>/resource/js/datePicker/WdatePicker.js" type="text/javascript"></script>
  12. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  13. <title>单机日性能分析</title>
  14. <style type="text/css">
  15. body {
  16. margin-left: 0px;
  17. margin-top: 0px;
  18. margin-right: 0px;
  19. margin-bottom: 0px;
  20. }
  21. .Text {
  22. font-family: "Times New Roman", Times, serif;
  23. font-size: 12px;
  24. color: #333;
  25. }
  26. </style>
  27. <script type="text/javascript">
  28. var chart1;
  29. var chart2;
  30. var chart3;
  31. var chart4;
  32. var chart5;
  33. var chart6;
  34. var options1;
  35. var options2;
  36. var options3;
  37. var options4;
  38. var options5;
  39. var options6;
  40. Highcharts.setOptions({
  41. global : {
  42. useUTC : false
  43. }
  44. });
  45. String.prototype.endWith=function(oString){
  46. var reg=new RegExp(oString+"$");
  47. return reg.test(this);
  48. }
  49. $(document).ready(function(){
  50. options1 = {
  51. chart: {
  52. renderTo : 'rzdfs',
  53. height:300,width:480,
  54. polar: true,
  55. type: 'area'
  56. },
  57. title: {
  58. text: '',
  59. x: 0
  60. },
  61. pane: {
  62. size: '70%'
  63. },
  64. xAxis: {
  65. categories: ['北', '北北东', '北东', '东北东','东', '东南东',
  66. '南东', '南南东', '南','南南西', '南西',
  67. '西南西', '西', '西北西', '北西','北北西'
  68. ],
  69. tickmarkPlacement: 'on',
  70. lineWidth: 0
  71. },
  72. yAxis: {
  73. gridLineInterpolation: 'polygon',
  74. lineWidth: 0,
  75. min: 0
  76. },
  77. tooltip: {
  78. shared: true,
  79. pointFormat: '<span style="color:{series.color}"> <b>{point.y:,.0f}</b><br/>'
  80. },
  81. series: [{
  82. name: 'name1',
  83. data: [],
  84. pointPlacement: 'on'
  85. }]
  86. }
  87. /*******************************************************************/
  88. options2 = {
  89. chart: {
  90. renderTo : 'yzdfs',
  91. height:300,width:480,
  92. polar: true,
  93. type: 'area'
  94. },
  95. title: {
  96. text: '',
  97. x: 0
  98. },
  99. pane: {
  100. size: '70%'
  101. },
  102. xAxis: {
  103. categories: ['北', '北北东', '北东', '东北东','东', '东南东',
  104. '南东', '南南东', '南','南南西', '南西',
  105. '西南西', '西', '西北西', '北西','北北西'
  106. ],
  107. tickmarkPlacement: 'on',
  108. lineWidth: 0
  109. },
  110. yAxis: {
  111. gridLineInterpolation: 'polygon',
  112. lineWidth: 0,
  113. min: 0
  114. },
  115. tooltip: {
  116. shared: true,
  117. pointFormat: '<span style="color:{series.color}"> <b>{point.y:,.0f}</b><br/>'
  118. },
  119. series: [{
  120. name: 'name1',
  121. data: [],
  122. pointPlacement: 'on'
  123. }]
  124. }
  125. /*******************************************************************/
  126. options3 = {
  127. chart: {
  128. renderTo : 'nzdfs',
  129. height:300,width:480,
  130. polar: true,
  131. type: 'area'
  132. },
  133. title: {
  134. text: '',
  135. x: 0
  136. },
  137. pane: {
  138. size: '70%'
  139. },
  140. xAxis: {
  141. categories: ['北', '北北东', '北东', '东北东','东', '东南东',
  142. '南东', '南南东', '南','南南西', '南西',
  143. '西南西', '西', '西北西', '北西','北北西'
  144. ],
  145. tickmarkPlacement: 'on',
  146. lineWidth: 0
  147. },
  148. yAxis: {
  149. gridLineInterpolation: 'polygon',
  150. lineWidth: 0,
  151. min: 0
  152. },
  153. tooltip: {
  154. shared: true,
  155. pointFormat: '<span style="color:{series.color}"> <b>{point.y:,.0f}</b><br/>'
  156. },
  157. series: [{
  158. name: 'name1',
  159. data: [],
  160. pointPlacement: 'on'
  161. }]
  162. }
  163. /*******************************************************************/
  164. options4 = {
  165. chart: {
  166. renderTo : 'rfxpl',
  167. height:300,width:480,
  168. polar: true,
  169. type: 'area'
  170. },
  171. title: {
  172. text: '',
  173. x: 0
  174. },
  175. pane: {
  176. size: '70%'
  177. },
  178. xAxis: {
  179. categories: ['北', '北北东', '北东', '东北东','东', '东南东',
  180. '南东', '南南东', '南','南南西', '南西',
  181. '西南西', '西', '西北西', '北西','北北西'
  182. ],
  183. tickmarkPlacement: 'on',
  184. lineWidth: 0
  185. },
  186. yAxis: {
  187. gridLineInterpolation: 'polygon',
  188. lineWidth: 0,
  189. min: 0
  190. },
  191. tooltip: {
  192. shared: true,
  193. pointFormat: '<span style="color:{series.color}"> <b>{point.y:,.0f}</b><br/>'
  194. },
  195. series: [{
  196. name: 'name1',
  197. data: [],
  198. pointPlacement: 'on'
  199. }]
  200. }
  201. /*******************************************************************/
  202. options5 = {
  203. chart: {
  204. renderTo : 'yfxpl',
  205. height:300,width:480,
  206. polar: true,
  207. type: 'area'
  208. },
  209. title: {
  210. text: '',
  211. x: 0
  212. },
  213. pane: {
  214. size: '70%'
  215. },
  216. xAxis: {
  217. categories: ['北', '北北东', '北东', '东北东','东', '东南东',
  218. '南东', '南南东', '南','南南西', '南西',
  219. '西南西', '西', '西北西', '北西','北北西'
  220. ],
  221. tickmarkPlacement: 'on',
  222. lineWidth: 0
  223. },
  224. yAxis: {
  225. gridLineInterpolation: 'polygon',
  226. lineWidth: 0,
  227. min: 0
  228. },
  229. tooltip: {
  230. shared: true,
  231. pointFormat: '<span style="color:{series.color}"> <b>{point.y:,.0f}</b><br/>'
  232. },
  233. series: [{
  234. name: 'name1',
  235. data: [],
  236. pointPlacement: 'on'
  237. }]
  238. }
  239. /*******************************************************************/
  240. options6 = {
  241. chart: {
  242. renderTo : 'nfxpl',
  243. height:300,width:480,
  244. polar: true,
  245. type: 'area'
  246. },
  247. title: {
  248. text: '',
  249. x: 0
  250. },
  251. pane: {
  252. size: '70%'
  253. },
  254. xAxis: {
  255. categories: ['北', '北北东', '北东', '东北东','东', '东南东',
  256. '南东', '南南东', '南','南南西', '南西',
  257. '西南西', '西', '西北西', '北西','北北西'
  258. ],
  259. tickmarkPlacement: 'on',
  260. lineWidth: 0
  261. },
  262. yAxis: {
  263. gridLineInterpolation: 'polygon',
  264. lineWidth: 0,
  265. min: 0
  266. },
  267. tooltip: {
  268. shared: true,
  269. pointFormat: '<span style="color:{series.color}"> <b>{point.y:,.0f}</b><br/>'
  270. },
  271. series: [{
  272. name: 'name1',
  273. data: [],
  274. pointPlacement: 'on'
  275. }]
  276. }
  277. /*******************************************************************/
  278. chart1 = new Highcharts.Chart(options1);
  279. chart2 = new Highcharts.Chart(options2);
  280. chart3 = new Highcharts.Chart(options3);
  281. chart4 = new Highcharts.Chart(options4);
  282. chart5 = new Highcharts.Chart(options5);
  283. chart6 = new Highcharts.Chart(options6);
  284. //windtowerAjax();
  285. //window.setInterval(windtowerAjax, 60000);
  286. var wp='<s:property value="windfarm"/>';
  287. var wt='<s:property value="windturbineid"/>';
  288. var rd='<s:property value="recorddate"/>';
  289. $("#recorddate").val(rd);
  290. $("#windfarm").val(wp);
  291. $("#windturbineid").val(wt);
  292. changeFc(wp, wt)
  293. nfxplchart();
  294. yfxplchart();
  295. rfxplchart();
  296. nzdfschart();
  297. yzdfschart();
  298. rzdfschart();
  299. });
  300. function queryData() {
  301. var recorddate = $("#recorddate").val();
  302. var windfarm = $("#windfarm").val();
  303. var windturbineid = $("#windturbineid").val();
  304. if ("" == windfarm) {
  305. alert("请选择风场!");
  306. return false;
  307. }
  308. if ("" == recorddate) {
  309. alert("请选择查询日期!");
  310. return false;
  311. }
  312. $("#f1").attr("action", "../wtgoodness/wtdetailindex.action").submit();
  313. }
  314. function changeFc(fcId, fjId) {
  315. var url = "../warn/changeFc.action?fcId=" + fcId;
  316. $
  317. .ajax({
  318. type : "post",
  319. url : url,
  320. dataType : "json",
  321. success : function(data) {
  322. if (data.length != 0) {
  323. eval(data);
  324. $("#windturbineid").empty();
  325. for ( var i = 0; i < data.length; i++) {
  326. $("#windturbineid").append("<option value='"+data[i].id+"'>"+data[i].code+"</option>");
  327. }
  328. $("#windturbineid").val(fjId);
  329. } else {
  330. $("#windturbineid").empty();
  331. }
  332. }
  333. });
  334. }
  335. function rzdfschart() {
  336. var recorddate = $("#recorddate").val();
  337. var windturbineid = $("#windturbineid").val();
  338. if(windturbineid=='')
  339. {
  340. windturbineid='<s:property value="windturbineid"/>';
  341. }
  342. url = "../wtgoodness/wtrzdfs.action?windturbineid="
  343. + windturbineid + "&recorddate=" + recorddate;
  344. $.ajax( {
  345. url : url,
  346. type : "post",
  347. cache : false,
  348. dataType : "json",
  349. data : {},
  350. ifModified : false,
  351. success : function(result) {
  352. var data1 = [];
  353. var jfpl=result.jfpl;
  354. $.each(result.data, function(m, obj) {
  355. if (obj.data1 != null) {
  356. data1.push(parseFloat(obj.data1));
  357. }
  358. });
  359. if(null !=options1.series[0])
  360. {
  361. options1.series[0].data = data1;
  362. }
  363. options1.series[0].name = jfpl;
  364. chart1 = new Highcharts.Chart(options1);
  365. }
  366. });
  367. }
  368. function yzdfschart() {
  369. var recorddate = $("#recorddate").val();
  370. var windturbineid = $("#windturbineid").val();
  371. if(windturbineid=='')
  372. {
  373. windturbineid='<s:property value="windturbineid"/>';
  374. }
  375. url = "../wtgoodness/wtyzdfs.action?windturbineid="
  376. + windturbineid + "&recorddate=" + recorddate;
  377. $.ajax( {
  378. url : url,
  379. type : "post",
  380. cache : false,
  381. dataType : "json",
  382. data : {},
  383. ifModified : false,
  384. success : function(result) {
  385. var data1 = [];
  386. var jfpl=result.jfpl;
  387. $.each(result.data, function(m, obj) {
  388. if (obj.data1 != null) {
  389. data1.push(parseFloat(obj.data1));
  390. }
  391. });
  392. if(null !=options2.series[0])
  393. {
  394. options2.series[0].data = data1;
  395. }
  396. options2.series[0].name = jfpl;
  397. chart2 = new Highcharts.Chart(options2);
  398. }
  399. });
  400. }
  401. function nzdfschart() {
  402. var recorddate = $("#recorddate").val();
  403. var windturbineid = $("#windturbineid").val();
  404. if(windturbineid=='')
  405. {
  406. windturbineid='<s:property value="windturbineid"/>';
  407. }
  408. url = "../wtgoodness/wtnzdfs.action?windturbineid="
  409. + windturbineid + "&recorddate=" + recorddate;
  410. $.ajax( {
  411. url : url,
  412. type : "post",
  413. cache : false,
  414. dataType : "json",
  415. data : {},
  416. ifModified : false,
  417. success : function(result) {
  418. var data1 = [];
  419. var jfpl=result.jfpl;
  420. $.each(result.data, function(m, obj) {
  421. if (obj.data1 != null) {
  422. data1.push(parseFloat(obj.data1));
  423. }
  424. });
  425. if(null !=options3.series[0])
  426. {
  427. options3.series[0].data = data1;
  428. }
  429. options3.series[0].name = jfpl;
  430. chart3 = new Highcharts.Chart(options3);
  431. }
  432. });
  433. }
  434. function rfxplchart() {
  435. var recorddate = $("#recorddate").val();
  436. var windturbineid = $("#windturbineid").val();
  437. if(windturbineid=='')
  438. {
  439. windturbineid='<s:property value="windturbineid"/>';
  440. }
  441. url = "../wtgoodness/wtrfxpl.action?windturbineid="
  442. + windturbineid + "&recorddate=" + recorddate;
  443. $.ajax( {
  444. url : url,
  445. type : "post",
  446. cache : false,
  447. dataType : "json",
  448. data : {},
  449. ifModified : false,
  450. success : function(result) {
  451. var data1 = [];
  452. var jfpl=result.jfpl;
  453. $.each(result.data, function(m, obj) {
  454. if (obj.data1 != null) {
  455. data1.push(parseFloat(obj.data1));
  456. }
  457. });
  458. if(null !=options4.series[0])
  459. {
  460. options4.series[0].data = data1;
  461. }
  462. options4.series[0].name = jfpl;
  463. chart4 = new Highcharts.Chart(options4);
  464. }
  465. });
  466. }
  467. function yfxplchart() {
  468. var recorddate = $("#recorddate").val();
  469. var windturbineid = $("#windturbineid").val();
  470. if(windturbineid=='')
  471. {
  472. windturbineid='<s:property value="windturbineid"/>';
  473. }
  474. url = "../wtgoodness/wtyfxpl.action?windturbineid="
  475. + windturbineid + "&recorddate=" + recorddate;
  476. $.ajax( {
  477. url : url,
  478. type : "post",
  479. cache : false,
  480. dataType : "json",
  481. data : {},
  482. ifModified : false,
  483. success : function(result) {
  484. var data1 = [];
  485. var jfpl=result.jfpl;
  486. $.each(result.data, function(m, obj) {
  487. if (obj.data1 != null) {
  488. data1.push(parseFloat(obj.data1));
  489. }
  490. });
  491. if(null !=options5.series[0])
  492. {
  493. options5.series[0].data = data1;
  494. }
  495. options5.series[0].name = jfpl;
  496. chart5 = new Highcharts.Chart(options5);
  497. }
  498. });
  499. }
  500. function nfxplchart() {
  501. var recorddate = $("#recorddate").val();
  502. var windturbineid = $("#windturbineid").val();
  503. if(windturbineid=='')
  504. {
  505. windturbineid='<s:property value="windturbineid"/>';
  506. }
  507. url = "../wtgoodness/wtnfxpl.action?windturbineid="
  508. + windturbineid + "&recorddate=" + recorddate;
  509. $.ajax( {
  510. url : url,
  511. type : "post",
  512. cache : false,
  513. dataType : "json",
  514. data : {},
  515. ifModified : false,
  516. success : function(result) {
  517. var data1 = [];
  518. var jfpl=result.jfpl;
  519. $.each(result.data, function(m, obj) {
  520. if (obj.data1 != null) {
  521. data1.push(parseFloat(obj.data1));
  522. }
  523. });
  524. if(null !=options6.series[0])
  525. {
  526. options6.series[0].data = data1;
  527. }
  528. options6.series[0].name = jfpl;
  529. chart6 = new Highcharts.Chart(options6);
  530. }
  531. });
  532. }
  533. </script>
  534. <body style='overflow:scroll;'>
  535. <form action="" method="get" id="f1">
  536. <table width="1560" border="0" cellspacing="0" cellpadding="0">
  537. <tr>
  538. <td width="50" height="30" bgcolor="#EFF1F0">&nbsp;</td>
  539. <td width="1560" bgcolor="#EFF1F0"><span class="Text">
  540. 风场: <label for="textfield5"></label> <s:if test="u.wpId == null">
  541. <s:select list="wps" listKey="id" listValue="name" id="windfarm"
  542. name="windfarm" onchange="javascript:changeFc(this.value);"></s:select>
  543. </s:if> <s:else>
  544. <s:select list="wps" listKey="id" listValue="name" id="windfarm"
  545. name="windfarm" onchange="javascript:changeFc(this.value);"></s:select>
  546. </s:else> 风机: <label for="textfield6" width="100"></label> <select
  547. name="windturbineid" id="windturbineid">
  548. <option value="">请选择</option>
  549. </select> 日期: <s:textfield cssClass="Wdate"
  550. onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowWeek:true,readOnly:true})"
  551. id="recorddate" name="recorddate" title="开始日期" /> <input
  552. type="submit" name="button" id="button" onclick="queryData();"
  553. value="查询" />
  554. </td>
  555. </span>
  556. </td>
  557. </tr>
  558. </table>
  559. <table width="1000" border="0" cellspacing="0" cellpadding="0">
  560. <tr>
  561. <td align="center" valign="top"><table
  562. border="0" cellspacing="0" cellpadding="0">
  563. <tr>
  564. <td><img
  565. src="<%=request.getContextPath()%>/resource/images/detailInfo/1.jpg"
  566. width="500" height="35" /></td>
  567. </tr>
  568. <tr>
  569. <td
  570. >
  571. <div id="rzdfs" ></div>
  572. </td>
  573. </tr>
  574. <tr>
  575. <td></td>
  576. </tr>
  577. </table>
  578. </td>
  579. <td align="center" valign="top"><table
  580. border="0" cellspacing="0" cellpadding="0">
  581. <tr>
  582. <td><img
  583. src="<%=request.getContextPath()%>/resource/images/detailInfo/2.jpg"
  584. width="500" height="35" /></td>
  585. </tr>
  586. <tr>
  587. <td>
  588. <div id="yzdfs" ></div>
  589. </td>
  590. </tr>
  591. <tr>
  592. <td></td>
  593. </tr>
  594. </table>
  595. </td>
  596. <td align="center" valign="top"><table
  597. border="0" cellspacing="0" cellpadding="0">
  598. <tr>
  599. <td><img
  600. src="<%=request.getContextPath()%>/resource/images/detailInfo/3.jpg"
  601. width="500" height="35" /></td>
  602. </tr>
  603. <tr>
  604. <td>
  605. <div id="nzdfs" ></div>
  606. </td>
  607. </tr>
  608. <tr>
  609. <td></td>
  610. </tr>
  611. </table>
  612. </td>
  613. </tr>
  614. <tr>
  615. <td align="center" valign="top"><table
  616. border="0" cellspacing="0" cellpadding="0">
  617. <tr>
  618. <td><img
  619. src="<%=request.getContextPath()%>/resource/images/detailInfo/4.jpg"
  620. width="500" height="35" /></td>
  621. </tr>
  622. <tr>
  623. <td
  624. >
  625. <div id="rfxpl" ></div>
  626. </td>
  627. </tr>
  628. <tr>
  629. <td></td>
  630. </tr>
  631. </table>
  632. </td>
  633. <td align="center" valign="top"><table
  634. border="0" cellspacing="0" cellpadding="0">
  635. <tr>
  636. <td><img
  637. src="<%=request.getContextPath()%>/resource/images/detailInfo/5.jpg"
  638. width="500" height="35" /></td>
  639. </tr>
  640. <tr>
  641. <td
  642. >
  643. <div id="yfxpl" ></div>
  644. </td>
  645. </tr>
  646. <tr>
  647. <td></td>
  648. </tr>
  649. </table>
  650. </td>
  651. <td align="center" valign="top"><table
  652. border="0" cellspacing="0" cellpadding="0">
  653. <tr>
  654. <td><img
  655. src="<%=request.getContextPath()%>/resource/images/detailInfo/6.jpg"
  656. width="500" height="35" /></td>
  657. </tr>
  658. <tr>
  659. <td>
  660. <div id="nfxpl" ></div>
  661. </td>
  662. </tr>
  663. <tr>
  664. <td></td>
  665. </tr>
  666. </table>
  667. </td>
  668. </tr>
  669. </table>
  670. </form>
  671. </body>