monitormain.js 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155
  1. var chart1;
  2. var chart2;
  3. var chart3;
  4. var chart4;
  5. var chart5;
  6. var chart6;
  7. var chart7;
  8. var chart8;
  9. var chart9;
  10. var categor = ['0','1', '2', '3','4', '5', '6', '7', '8',
  11. '9', '10', '11', '12', '13','14', '15',
  12. '16', '17', '18','19', '20','21','22','23'];
  13. var options1;
  14. var options2;
  15. var options3;
  16. var options4;
  17. var options5;
  18. var options6;
  19. var options7;
  20. var options8;
  21. var options9;
  22. Highcharts.setOptions({
  23. global : {
  24. useUTC : false
  25. }
  26. });
  27. String.prototype.endWith=function(oString){
  28. var reg=new RegExp(oString+"$");
  29. return reg.test(this);
  30. };
  31. function realPowerCharBy24() {
  32. var url = "/matrix/findRealPowerCharBy24.action";
  33. $.ajax({
  34. url : url,
  35. type : "post",
  36. cache : false,
  37. dataType : "json",
  38. async : false,
  39. data : {},
  40. ifModified : false,
  41. success : function(result) {
  42. var yfdl = [];
  43. var gzdl = [];
  44. var whdl = [];
  45. var xddl = [];
  46. var qfdl = [];
  47. var sldl = [];
  48. var fs = [];
  49. var xtime = [];
  50. $.each(result, function(m, obj) {
  51. //if(m == result.length -1){
  52. if (obj.value1 != null) {
  53. yfdl.push( parseFloat(obj.value1) );
  54. }
  55. if (obj.value2 != null) {
  56. whdl.push( parseFloat(obj.value2) );
  57. }
  58. if (obj.value3 != null) {
  59. gzdl.push( parseFloat(obj.value3) );
  60. }
  61. if (obj.value4 != null) {
  62. xddl.push( parseFloat(obj.value4) );
  63. }
  64. if (obj.value5 != null) {
  65. qfdl.push( parseFloat(obj.value5) );
  66. }
  67. if (obj.value6 != null) {
  68. fs.push( parseFloat(obj.value6) );
  69. }
  70. if (obj.value7 != null ) {
  71. sldl.push( parseFloat(obj.value7) );
  72. }
  73. if(obj.time!= null )
  74. {
  75. xtime.push(parseFloat(obj.time));
  76. }
  77. });
  78. //alert(xtime.length);
  79. options2.series[0].data = yfdl;
  80. options2.series[1].data = gzdl;
  81. options2.series[2].data = whdl;
  82. options2.series[3].data = xddl;
  83. options2.series[4].data = qfdl;
  84. options2.series[5].data = sldl;
  85. options2.series[6].data = fs;
  86. options2.xAxis.categories = xtime;
  87. chart2 = new Highcharts.Chart(options2);
  88. }
  89. });
  90. }
  91. function powercompareChat() {
  92. var url = "/matrix/powercompareChat.action";
  93. $.ajax({
  94. url : url,
  95. type : "post",
  96. cache : false,
  97. dataType : "json",
  98. async : false,
  99. data : {},
  100. ifModified : false,
  101. success : function(result) {
  102. var lldl = [];
  103. var gfdl = [];
  104. $.each(result, function(m, obj) {
  105. if (obj.value1 != null) {
  106. lldl.push(obj.value1*-1-obj.value2);
  107. }
  108. if (obj.value2 != null) {
  109. gfdl.push(obj.value2);
  110. }
  111. });
  112. options1.series[0].data = lldl;
  113. options1.series[1].data = gfdl;
  114. chart1 = new Highcharts.Chart(options1);
  115. }
  116. });
  117. }
  118. function showChart() {
  119. /***************************************************************************************************/
  120. $.ajax( {
  121. url : "/matrix/fdcPieChart.action",
  122. type : "post",
  123. cache : false,
  124. dataType : "json",
  125. data : {},
  126. ifModified : false,
  127. success : function(result) {
  128. if (null!=result && result.length != 0) {
  129. eval(result);
  130. var xaixs = [];
  131. for ( var i = 0; i < result.length; i += 1) {
  132. var jsonObj1 = [ result[i].name, result[i].value1 ];
  133. xaixs.push(jsonObj1);
  134. }
  135. options3.series[0].data = xaixs;
  136. chart3 = new Highcharts.Chart(options3);
  137. }
  138. }
  139. });
  140. /***************************************************************************************************/
  141. $.ajax( {
  142. url : "/matrix/lossPieChart.action",
  143. type : "post",
  144. cache : false,
  145. dataType : "json",
  146. data : {},
  147. ifModified : false,
  148. success : function(result) {
  149. if (null!=result && result.length != 0) {
  150. eval(result);
  151. var xaixs = [];
  152. for ( var i = 0; i < result.length; i += 1) {
  153. var jsonObj1 = [ result[i].name, result[i].value1 ];
  154. xaixs.push(jsonObj1);
  155. }
  156. options4.series[0].data = xaixs;
  157. chart4 = new Highcharts.Chart(options4);
  158. }
  159. }
  160. });
  161. /***************************************************************************************************/
  162. }
  163. function pointChart(){
  164. $.ajax( {
  165. url : "/matrix/pointChart.action",
  166. type : "post",
  167. cache : false,
  168. dataType : "json",
  169. data : {},
  170. ifModified : false,
  171. success : function(result) {
  172. if (null!=result && result.length != 0) {
  173. eval(result);
  174. var xaixs = [];
  175. var xtime = [];
  176. for ( var i = 0; i < result.length; i += 1) {
  177. var jsonObj1 = [result[i].name,parseFloat(result[i].value1)];
  178. xaixs.push(jsonObj1);
  179. xtime.push(parseFloat(result[i].time));
  180. }
  181. options5.series[0].data = xaixs;
  182. options5.xAxis.categories = xtime;
  183. //alert(options5.series[0].data);
  184. options5.xAxis.minTickInterval=xtime.length/24;
  185. chart5 = new Highcharts.Chart(options5);
  186. }
  187. }
  188. });
  189. }
  190. /*************************************************************************************************/
  191. $(document).ready(function () {
  192. // options1 = {
  193. // chart: {renderTo: 'chatyc',type: 'bar'},
  194. // title: {text: ''},
  195. // subtitle: {text: ''},
  196. // xAxis: [{categories: categor,
  197. // reversed: false,
  198. // labels: {
  199. // step: 2
  200. // }
  201. // }, {
  202. // opposite: true,
  203. // reversed: false,
  204. // categories: categor,
  205. // linkedTo: 0,
  206. // labels: {
  207. // step: 2
  208. // }
  209. // }],
  210. // yAxis: {title: {
  211. // text: null
  212. // },
  213. // labels: {
  214. // formatter: function () {
  215. // return Math.abs(this.value) + 'MWh';
  216. // }
  217. // }
  218. // },
  219. // plotOptions: {
  220. // series: {
  221. // stacking: 'normal'
  222. // }
  223. // },
  224. // tooltip: {
  225. // formatter: function () {
  226. // return '<b>' + this.series.name + ',截止上一时刻 ' + this.point.category + '时</b><br/>' +
  227. // '电量: ' + Highcharts.numberFormat(Math.abs(this.point.y), 2)+'MWh';
  228. // }
  229. // },
  230. // series: [{
  231. // name: '理论电量',
  232. // data: []
  233. // }, {
  234. // name: '实发电量',
  235. // data: []
  236. // }]
  237. // };
  238. options1 = {
  239. chart: {renderTo: 'chatyc',type: 'bar'},
  240. colors: [
  241. '#000000', //理论发电量
  242. '#7cb5ec'//风速
  243. ],
  244. title: {text: ''},
  245. subtitle: {text: ''},
  246. xAxis: [{categories: categor,
  247. reversed: false,
  248. //linkedTo: 0,
  249. labels: {
  250. step: 2
  251. }
  252. }
  253. , {
  254. opposite: true,
  255. reversed: false,
  256. //categories: categor,
  257. //linkedTo: 0,
  258. labels: {
  259. step: 2
  260. }
  261. }
  262. ],
  263. yAxis: {title: {
  264. text: null
  265. },
  266. min: 0,
  267. labels: {
  268. formatter: function () {
  269. return Math.abs(this.value) + 'MWh';
  270. }
  271. }
  272. },
  273. plotOptions: {
  274. series: {
  275. stacking: 'normal'
  276. }
  277. },
  278. tooltip: {
  279. formatter: function () {
  280. console.log(this.series);
  281. var html = '<b>' + this.series.name + ',截止上一时刻 ' + this.point.category + '时</b><br/>';
  282. if(this.series.name=='理论电量'){
  283. html +='电量: ' + Highcharts.numberFormat(Math.abs(this.point.total), 2)+'MWh';
  284. }else{
  285. html +='电量: ' + Highcharts.numberFormat(Math.abs(this.point.y), 2)+'MWh';
  286. }
  287. return html;
  288. }
  289. },
  290. series: [{
  291. name: '理论电量',
  292. data: []
  293. }, {
  294. name: '实发电量',
  295. data: []
  296. }]
  297. };
  298. /*************************************************/
  299. options2 = {
  300. colors: [
  301. '#0BFEFA', //发电量
  302. '#FD0100',//检修
  303. '#FF7B16', //故障
  304. '#D201D8',//限电
  305. '#8085E9', //性能
  306. '#A6A6A6', //受累
  307. '#000000'//风速
  308. ],
  309. chart: {
  310. renderTo: 'glqx_Chart',
  311. type: 'column',
  312. //backgroundColor:'#BFDFFF',
  313. //plotBackgroundColor:'#BFDFFF',
  314. zoomType: 'x'
  315. },title:null ,
  316. xAxis: {
  317. type: 'datetime',
  318. labels: {
  319. align: 'center',
  320. formatter: function() {
  321. return Highcharts.dateFormat('%H<br/>%M', this.value);
  322. }
  323. }
  324. },
  325. yAxis: [{ // Primary yAxis
  326. labels: {
  327. format: '{value}万kw',
  328. style: {
  329. color: '#89A54E'
  330. }
  331. },
  332. title: {
  333. text: '电量',
  334. style: {
  335. color: '#89A54E'
  336. }
  337. }
  338. }, { // Secondary yAxis
  339. title: {
  340. text: '风速',
  341. style: {
  342. color: '#4572A7'
  343. }
  344. },
  345. labels: {
  346. format: '{value} m/s',
  347. style: {
  348. color: '#4572A7'
  349. }
  350. },
  351. opposite: true
  352. }],
  353. legend: {
  354. layout: 'vertical',
  355. // backgroundColor: '#FFFFFF',
  356. align: 'right',
  357. verticalAlign: 'top',
  358. x:-80,
  359. floating: true
  360. // shadow: true
  361. // layout: 'vertical',
  362. // align: 'right',
  363. // verticalAlign: 'middle',
  364. // borderWidth: 0
  365. },
  366. tooltip: {
  367. shared:true,
  368. xDateFormat:'%Y-%m-%d %H:%M'
  369. /*formatter: function() {
  370. return '<b>'+ this.series.name +'</b>:'+
  371. Highcharts.numberFormat(this.y, 2) +' 万kW<br/>时间:'+
  372. Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x);
  373. }*/
  374. },
  375. series: [{
  376. name: '日发电量(单位:万KWh)',
  377. yAxis:0
  378. },
  379. {name: '故障损失电量(单位:万KWh)',
  380. yAxis:0
  381. },{
  382. name: '检修损失电量(单位:万KWh)',
  383. yAxis:0
  384. },{
  385. name: '限电损失电量(单位:万KWh)',
  386. yAxis:0
  387. }
  388. ,{
  389. name: '性能损失电量(单位:万KWh)',
  390. yAxis:0
  391. },{
  392. name: '受累损失电量(单位:万KWh)',
  393. yAxis:0
  394. },{
  395. name: '风速(单位:m/s)',
  396. yAxis:1,
  397. type: 'spline'
  398. }]
  399. };
  400. /***************************************************************************************************/
  401. options3 = {
  402. chart : {
  403. renderTo : 'dltj_Chart_1',
  404. plotBackgroundColor : null,
  405. plotBorderWidth : null,
  406. plotShadow : false
  407. },
  408. title : {
  409. text : '发电量占比'
  410. },
  411. tooltip : {
  412. pointFormat : '{series.name}: <b>{point.percentage:.1f}%</b>'
  413. },
  414. plotOptions : {
  415. pie : {
  416. allowPointSelect : true,
  417. cursor : 'pointer',
  418. dataLabels : {
  419. enabled : false,
  420. color : '#000000',
  421. connectorColor : '#000000',
  422. format : '<b>{point.name}</b>: {point.percentage:.1f} %'
  423. },
  424. showInLegend : true
  425. }
  426. },
  427. legend : {
  428. layout : 'vertical',
  429. align : 'right',
  430. verticalAlign : 'bottom',
  431. borderWidth : 0
  432. },
  433. series : [ {
  434. type : 'pie',
  435. name : '占比',
  436. data : []
  437. } ]
  438. };
  439. /***************************************************************************************************/
  440. options4 = {
  441. colors: [
  442. '#8085E9', //性能
  443. '#FD0100',//检修
  444. '#FF7B16', //故障
  445. '#D201D8',//限电
  446. '#00ff20' //受累
  447. ],
  448. chart : {
  449. renderTo : 'dltj_Chart_2',
  450. plotBackgroundColor : null,
  451. plotBorderWidth : null,
  452. plotShadow : false
  453. },
  454. title : {
  455. text : '损失电量占比'
  456. },
  457. tooltip : {
  458. pointFormat : '{series.name}: <b>{point.percentage:.1f}%</b>'
  459. },
  460. plotOptions : {
  461. pie : {
  462. allowPointSelect : true,
  463. cursor : 'pointer',
  464. dataLabels : {
  465. enabled : false,
  466. color : '#000000',
  467. connectorColor : '#000000',
  468. format : '<b>{point.name}</b>: {point.percentage:.1f} %'
  469. },
  470. showInLegend : true
  471. }
  472. },
  473. legend : {
  474. layout : 'vertical',
  475. align : 'right',
  476. verticalAlign : 'bottom',
  477. borderWidth : 0
  478. },
  479. series : [ {
  480. type : 'pie',
  481. name : '占比',
  482. data : []
  483. } ]
  484. };
  485. /***************************************************************/
  486. options5 = {
  487. chart: {
  488. renderTo: 'pointChat',
  489. type: 'scatter',
  490. zoomType: 'xy'
  491. },
  492. title: {
  493. text: ''
  494. },
  495. xAxis: {
  496. type: 'datetime',
  497. labels: {
  498. align: 'center',
  499. formatter: function() {
  500. return Highcharts.dateFormat('%H:%M', this.value);
  501. }
  502. },
  503. showLastLabel: true
  504. },
  505. yAxis: {
  506. title: {
  507. text: '功率 (MW)'
  508. }
  509. },
  510. legend: {
  511. layout: 'vertical',
  512. align: 'left',
  513. verticalAlign: 'top',
  514. x: 100,
  515. y: 70,
  516. floating: true,
  517. backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF',
  518. borderWidth: 1
  519. },
  520. plotOptions: {
  521. scatter: {
  522. marker: {
  523. radius: 2,
  524. states: {
  525. hover: {
  526. enabled: true,
  527. lineColor: 'rgb(100,100,100)'
  528. }
  529. }
  530. },
  531. states: {
  532. hover: {
  533. marker: {
  534. enabled: false
  535. }
  536. }
  537. },
  538. tooltip: {
  539. shared:true,
  540. xDateFormat:'%H:%M',
  541. pointFormat : '{point.name}<br/>实际出力<b>{point.y} MW</b>'
  542. }
  543. }
  544. },
  545. series: [{
  546. name: '河北新能源',
  547. color: 'rgba(119, 152, 191, .5)',
  548. turboThreshold:1500,
  549. data: []
  550. }]
  551. };
  552. /*******************************************************************/
  553. options6 = {
  554. chart: {
  555. renderTo: 'speedCL',
  556. type: 'solidgauge'
  557. },
  558. title: null,
  559. pane: {
  560. center: ['50%', '85%'],
  561. size: '170%',
  562. startAngle: -90,
  563. endAngle: 90,
  564. background: {
  565. backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || '#EEE',
  566. innerRadius: '60%',
  567. outerRadius: '100%',
  568. shape: 'arc'
  569. }
  570. },
  571. tooltip: {
  572. enabled: false
  573. },
  574. // the value axis
  575. yAxis: {
  576. stops: [
  577. [0.1, '#55BF3B'], // green
  578. [0.5, '#DDDF0D'], // yellow
  579. [0.9, '#DF5353'] // red
  580. ],
  581. lineWidth: 0,
  582. minorTickInterval: null,
  583. tickPixelInterval: 400,
  584. tickWidth: 0,
  585. min: 0,
  586. max: 25,
  587. title: {
  588. y: 7,
  589. text: ''
  590. },
  591. labels: {
  592. y: 16
  593. }
  594. },
  595. plotOptions: {
  596. solidgauge: {
  597. dataLabels: {
  598. y: 22,
  599. borderWidth: 0,
  600. useHTML: true
  601. }
  602. }
  603. },
  604. credits: {
  605. enabled: false
  606. },series: [{
  607. name: '风速',
  608. data: [6.66],
  609. dataLabels: {
  610. format: '<div style="text-align:center"><span style="font-size:15px;color:' +
  611. ((Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black') + '">{y}</span><br/>' +
  612. '<span style="font-size:12px;color:silver">m/s</span></div>'
  613. },
  614. tooltip: {
  615. valueSuffix: 'm/s'
  616. }
  617. }]
  618. };
  619. /*******************************************************************/
  620. options7 = {
  621. chart: {
  622. renderTo: 'speedKB',
  623. type: 'solidgauge'
  624. },
  625. title: null,
  626. pane: {
  627. center: ['50%', '85%'],
  628. size: '170%',
  629. startAngle: -90,
  630. endAngle: 90,
  631. background: {
  632. backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || '#EEE',
  633. innerRadius: '60%',
  634. outerRadius: '100%',
  635. shape: 'arc'
  636. }
  637. },
  638. tooltip: {
  639. enabled: false
  640. },
  641. // the value axis
  642. yAxis: {
  643. stops: [
  644. [0.1, '#55BF3B'], // green
  645. [0.5, '#DDDF0D'], // yellow
  646. [0.9, '#DF5353'] // red
  647. ],
  648. lineWidth: 0,
  649. minorTickInterval: null,
  650. tickPixelInterval: 400,
  651. tickWidth: 0,
  652. min: 0,
  653. max: 25,
  654. title: {
  655. y: 7,
  656. text: ''
  657. },
  658. labels: {
  659. y: 16
  660. }
  661. },
  662. plotOptions: {
  663. solidgauge: {
  664. dataLabels: {
  665. y: 22,
  666. borderWidth: 0,
  667. useHTML: true
  668. }
  669. }
  670. },
  671. credits: {
  672. enabled: false
  673. },series: [{
  674. name: '风速',
  675. data: [6.66],
  676. dataLabels: {
  677. format: '<div style="text-align:center"><span style="font-size:15px;color:' +
  678. ((Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black') + '">{y}</span><br/>' +
  679. '<span style="font-size:12px;color:silver">m/s</span></div>'
  680. },
  681. tooltip: {
  682. valueSuffix: 'm/s'
  683. }
  684. }]
  685. };
  686. /*******************************************************************/
  687. options8 = {
  688. chart: {
  689. renderTo: 'speedDX',
  690. type: 'solidgauge'
  691. },
  692. title: null,
  693. pane: {
  694. center: ['50%', '85%'],
  695. size: '170%',
  696. startAngle: -90,
  697. endAngle: 90,
  698. background: {
  699. backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || '#EEE',
  700. innerRadius: '60%',
  701. outerRadius: '100%',
  702. shape: 'arc'
  703. }
  704. },
  705. tooltip: {
  706. enabled: false
  707. },
  708. // the value axis
  709. yAxis: {
  710. stops: [
  711. [0.1, '#55BF3B'], // green
  712. [0.5, '#DDDF0D'], // yellow
  713. [0.9, '#DF5353'] // red
  714. ],
  715. lineWidth: 0,
  716. minorTickInterval: null,
  717. tickPixelInterval: 400,
  718. tickWidth: 0,
  719. min: 0,
  720. max: 25,
  721. title: {
  722. y: 7,
  723. text: ''
  724. },
  725. labels: {
  726. y: 16
  727. }
  728. },
  729. plotOptions: {
  730. solidgauge: {
  731. dataLabels: {
  732. y: 22,
  733. borderWidth: 0,
  734. useHTML: true
  735. }
  736. }
  737. },
  738. credits: {
  739. enabled: false
  740. },series: [{
  741. name: '风速',
  742. data: [6.66],
  743. dataLabels: {
  744. format: '<div style="text-align:center"><span style="font-size:15px;color:' +
  745. ((Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black') + '">{y}</span><br/>' +
  746. '<span style="font-size:12px;color:silver">m/s</span></div>'
  747. },
  748. tooltip: {
  749. valueSuffix: 'm/s'
  750. }
  751. }]
  752. };
  753. /*******************************************************************/
  754. options9 = {
  755. chart: {
  756. renderTo: 'speedSY',
  757. type: 'solidgauge'
  758. },
  759. title: null,
  760. pane: {
  761. center: ['50%', '85%'],
  762. size: '170%',
  763. startAngle: -90,
  764. endAngle: 90,
  765. background: {
  766. backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || '#EEE',
  767. innerRadius: '60%',
  768. outerRadius: '100%',
  769. shape: 'arc'
  770. }
  771. },
  772. tooltip: {
  773. enabled: false
  774. },
  775. // the value axis
  776. yAxis: {
  777. stops: [
  778. [0.1, '#55BF3B'], // green
  779. [0.5, '#DDDF0D'], // yellow
  780. [0.9, '#DF5353'] // red
  781. ],
  782. lineWidth: 0,
  783. minorTickInterval: null,
  784. tickPixelInterval: 400,
  785. tickWidth: 0,
  786. min: 0,
  787. max: 25,
  788. title: {
  789. y: 7,
  790. text: ''
  791. },
  792. labels: {
  793. y: 16
  794. }
  795. },
  796. plotOptions: {
  797. solidgauge: {
  798. dataLabels: {
  799. y: 22,
  800. borderWidth: 0,
  801. useHTML: true
  802. }
  803. }
  804. },
  805. credits: {
  806. enabled: false
  807. },series: [{
  808. name: '风速',
  809. data: [6.66],
  810. dataLabels: {
  811. format: '<div style="text-align:center"><span style="font-size:15px;color:' +
  812. ((Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black') + '">{y}</span><br/>' +
  813. '<span style="font-size:12px;color:silver">m/s</span></div>'
  814. },
  815. tooltip: {
  816. valueSuffix: 'm/s'
  817. }
  818. }]
  819. };
  820. /***************************************************************/
  821. realPowerCharBy24();
  822. showChart();
  823. wpAllInfoAjaxs() ;
  824. powercompareChat();
  825. pointChart();
  826. window.setInterval(realPowerCharBy24, 60000);
  827. window.setInterval(showChart, 60000);
  828. window.setInterval(wpAllInfoAjaxs, 60000);
  829. window.setInterval(powercompareChat, 60000);
  830. window.setInterval(pointChart, 60000);
  831. /*****************************************************************/
  832. });
  833. function getValueInfo(value)
  834. {
  835. if(value=="" || value==null || value==undefined )
  836. {
  837. return "0.0";
  838. }else
  839. {
  840. return value;
  841. }
  842. }
  843. function getValueToInt(value)
  844. {
  845. if(value=="" || value==null || value==undefined || value==0.0){
  846. return "0";
  847. }else{
  848. return value;
  849. }
  850. }
  851. /*********************************************************************************/
  852. function wpAllInfoAjaxs() {
  853. $.ajax( {
  854. url : "/matrix/wpAllInfoAjaxes.action",
  855. type : "post",
  856. cache : false,
  857. dataType : "json",
  858. data : {},
  859. ifModified : false,
  860. success : function(res) {
  861. /********************************************************************************************************/
  862. $("#CL_FDC_RFDL").html(getValueInfo(res["CL_FDC_RFDL"] ));
  863. $("#CL_FDC_LLFDL").html(getValueInfo(res["CL_FDC_LLFDL"] ));
  864. $("#CL_FDC_RSWDL").html(getValueInfo(res["CL_FDC_RSWDL"] ));
  865. $("#CL_FDC_SCADAFDL").html(getValueInfo(res["CL_FDC_SCADAFDL"] ));
  866. //$("#CL_FDC_YLYXS").html(getValueInfo(res["CL_FDC_YLYXS"] ));
  867. if(parseFloat(res["CL_FDC_FNLYL"])<80){
  868. $("#CL_FDC_YLYXS").attr("style","color:red");
  869. }
  870. $("#CL_FDC_YLYXS").html(getValueInfo(res["CL_FDC_FNLYL"] ));
  871. $("#CL_FDC_WHSS").html(getValueInfo(res["CL_FDC_WHSS"] ));
  872. $("#CL_FDC_FS").html(getValueInfo(res["CL_FDC_FS"] ));
  873. $("#CL_FDC_GZSS").html(getValueInfo(res["CL_FDC_GZSS"] ));
  874. $("#CL_FDC_GL").html(getValueInfo(res["CL_FDC_GL"] ));
  875. $("#CL_FDC_XDSS").html(getValueInfo(res["CL_FDC_XDSS"] ));
  876. $("#CL_FDC_LLGL").html(getValueInfo(res["CL_FDC_LLGL"] ));
  877. $("#CL_FDC_SLSS").html(getValueInfo(res["CL_FDC_SLSS"] ));
  878. $("#CL_FDC_YFGL").html(getValueInfo(res["CL_FDC_YFGL"] ));
  879. $("#CL_FDC_XNSS").html(getValueInfo(res["CL_FDC_XNSS"] ));
  880. $("#CL_FDC_FDL").html(getValueInfo(res["CL_FDC_RFDL"] ));
  881. $("#CL_FDC_GL1").html(getValueInfo(res["CL_FDC_GL"] ));
  882. $("#CL_FDC_JRTS").html(getValueToInt(res["CL_FDC_JRTS"] ));
  883. $("#CL_FDC_YXTS").html(getValueToInt(res["CL_FDC_YXTS"] ));
  884. $("#CL_FDC_GZTS").html(getValueToInt(res["CL_FDC_GZTS"] ));
  885. $("#CL_FDC_XDTS").html(getValueToInt(res["CL_FDC_XDTS"] ));
  886. $("#CL_FDC_DJTS").html(getValueToInt(res["CL_FDC_DJTS"] ));
  887. $("#CL_FDC_WHTS").html(getValueToInt(res["CL_FDC_WHTS"] ));
  888. $("#CL_FDC_LXTS").html(getValueToInt(res["CL_FDC_LXTS"] ));
  889. $("#DX_FDC_RFDL").html(getValueInfo(res["DX_FDC_RFDL"] ));
  890. $("#DX_FDC_LLFDL").html(getValueInfo(res["DX_FDC_LLFDL"] ));
  891. $("#DX_FDC_RSWDL").html(getValueInfo(res["DX_FDC_RSWDL"] ));
  892. $("#DX_FDC_SCADAFDL").html(getValueInfo(res["DX_FDC_SCADAFDL"] ));
  893. //$("#DX_FDC_YLYXS").html(getValueInfo(res["DX_FDC_YLYXS"] ));
  894. if(parseFloat(res["DX_FDC_FNLYL"])<80){
  895. $("#DX_FDC_YLYXS").attr("style","color:red");
  896. }
  897. $("#DX_FDC_YLYXS").html(getValueInfo(res["DX_FDC_FNLYL"] ));
  898. $("#DX_FDC_WHSS").html(getValueInfo(res["DX_FDC_WHSS"] ));
  899. $("#DX_FDC_FS").html(getValueInfo(res["DX_FDC_FS"] ));
  900. $("#DX_FDC_GZSS").html(getValueInfo(res["DX_FDC_GZSS"] ));
  901. $("#DX_FDC_GL").html(getValueInfo(res["DX_FDC_GL"] ));
  902. $("#DX_FDC_XDSS").html(getValueInfo(res["DX_FDC_XDSS"] ));
  903. $("#DX_FDC_LLGL").html(getValueInfo(res["DX_FDC_LLGL"] ));
  904. $("#DX_FDC_SLSS").html(getValueInfo(res["DX_FDC_SLSS"] ));
  905. $("#DX_FDC_YFGL").html(getValueInfo(res["DX_FDC_YFGL"] ));
  906. $("#DX_FDC_XNSS").html(getValueInfo(res["DX_FDC_XNSS"] ));
  907. $("#DX_FDC_FDL").html(getValueInfo(res["DX_FDC_RFDL"] ));
  908. $("#DX_FDC_GL1").html(getValueInfo(res["DX_FDC_GL"] ));
  909. $("#DX_FDC_JRTS").html(getValueToInt(res["DX_FDC_JRTS"] ));
  910. $("#DX_FDC_YXTS").html(getValueToInt(res["DX_FDC_YXTS"] ));
  911. $("#DX_FDC_GZTS").html(getValueToInt(res["DX_FDC_GZTS"] ));
  912. $("#DX_FDC_XDTS").html(getValueToInt(res["DX_FDC_XDTS"] ));
  913. $("#DX_FDC_DJTS").html(getValueToInt(res["DX_FDC_DJTS"] ));
  914. $("#DX_FDC_WHTS").html(getValueToInt(res["DX_FDC_WHTS"] ));
  915. $("#DX_FDC_LXTS").html(getValueToInt(res["DX_FDC_LXTS"] ));
  916. $("#KB_FDC_RFDL").html(getValueInfo(res["KB_FDC_RFDL"] ));
  917. $("#KB_FDC_LLFDL").html(getValueInfo(res["KB_FDC_LLFDL"] ));
  918. $("#KB_FDC_RSWDL").html(getValueInfo(res["KB_FDC_RSWDL"] ));
  919. $("#KB_FDC_SCADAFDL").html(getValueInfo(res["KB_FDC_SCADAFDL"] ));
  920. //$("#KB_FDC_YLYXS").html(getValueInfo(res["KB_FDC_YLYXS"] ));
  921. if(parseFloat(res["KB_FDC_FNLYL"])<80){
  922. $("#KB_FDC_YLYXS").attr("style","color:red");
  923. }
  924. $("#KB_FDC_YLYXS").html(getValueInfo(res["KB_FDC_FNLYL"] ));
  925. $("#KB_FDC_WHSS").html(getValueInfo(res["KB_FDC_WHSS"] ));
  926. $("#KB_FDC_FS").html(getValueInfo(res["KB_FDC_FS"] ));
  927. $("#KB_FDC_GZSS").html(getValueInfo(res["KB_FDC_GZSS"] ));
  928. $("#KB_FDC_GL").html(getValueInfo(res["KB_FDC_GL"] ));
  929. $("#KB_FDC_XDSS").html(getValueInfo(res["KB_FDC_XDSS"] ));
  930. $("#KB_FDC_LLGL").html(getValueInfo(res["KB_FDC_LLGL"] ));
  931. $("#KB_FDC_SLSS").html(getValueInfo(res["KB_FDC_SLSS"] ));
  932. $("#KB_FDC_YFGL").html(getValueInfo(res["KB_FDC_YFGL"] ));
  933. $("#KB_FDC_XNSS").html(getValueInfo(res["KB_FDC_XNSS"] ));
  934. $("#KB_FDC_FDL").html(getValueInfo(res["KB_FDC_RFDL"] ));
  935. $("#KB_FDC_GL1").html(getValueInfo(res["KB_FDC_GL"] ));
  936. $("#KB_FDC_JRTS").html(getValueToInt(res["KB_FDC_JRTS"] ));
  937. $("#KB_FDC_YXTS").html(getValueToInt(res["KB_FDC_YXTS"] ));
  938. $("#KB_FDC_GZTS").html(getValueToInt(res["KB_FDC_GZTS"] ));
  939. $("#KB_FDC_XDTS").html(getValueToInt(res["KB_FDC_XDTS"] ));
  940. $("#KB_FDC_DJTS").html(getValueToInt(res["KB_FDC_DJTS"] ));
  941. $("#KB_FDC_WHTS").html(getValueToInt(res["KB_FDC_WHTS"] ));
  942. $("#KB_FDC_LXTS").html(getValueToInt(res["KB_FDC_LXTS"] ));
  943. /********************************************************************************************************/
  944. $("#QYGS_RFDL").html(getValueInfo(res["QYGS_RFDL"] ));
  945. $("#QYGS_LLFDL").html(getValueInfo(res["QYGS_LLFDL"] ));
  946. $("#QYGS_RSWDL").html(getValueInfo(res["QYGS_RSWDL"] ));
  947. $("#QYGS_SCADAFDL").html(getValueInfo(res["QYGS_SCADAFDL"] ));
  948. //$("#QYGS_YLYXS").html(getValueInfo(res["QYGS_YLYXS"] ));
  949. if(parseFloat(res["QYGS_FNLYL"])<80){
  950. $("#QYGS_YLYXS").attr("style","color:red");
  951. }
  952. $("#QYGS_YLYXS").html(getValueInfo(res["QYGS_FNLYL"] ));
  953. $("#QYGS_WHSS").html(getValueInfo(res["QYGS_WHSS"] ));
  954. $("#QYGS_FS").html(getValueInfo(res["QYGS_FS"] ));
  955. $("#QYGS_GZSS").html(getValueInfo(res["QYGS_GZSS"] ));
  956. $("#QYGS_GL").html(getValueInfo(res["QYGS_GL"] ));
  957. $("#QYGS_XDSS").html(getValueInfo(res["QYGS_XDSS"] ));
  958. $("#QYGS_LLGL").html(getValueInfo(res["QYGS_LLGL"] ));
  959. $("#QYGS_SLSS").html(getValueInfo(res["QYGS_SLSS"] ));
  960. $("#QYGS_YFGL").html(getValueInfo(res["QYGS_YFGL"] ));
  961. $("#QYGS_XNSS").html(getValueInfo(res["QYGS_XNSS"] ));
  962. $("#SY_FDC_RFDL").html(getValueInfo(res["SY_FDC_RFDL"] ));
  963. $("#SY_FDC_LLFDL").html(getValueInfo(res["SY_FDC_LLFDL"] ));
  964. $("#SY_FDC_RSWDL").html(getValueInfo(res["SY_FDC_RSWDL"] ));
  965. $("#SY_FDC_SCADAFDL").html(getValueInfo(res["SY_FDC_SCADAFDL"] ));
  966. //$("#SY_FDC_YLYXS").html(getValueInfo(res["SY_FDC_YLYXS"] ));
  967. if(parseFloat(res["SY_FDC_FNLYL"])<80){
  968. $("#SY_FDC_YLYXS").attr("style","color:red");
  969. }
  970. $("#SY_FDC_YLYXS").html(getValueInfo(res["SY_FDC_FNLYL"] ));
  971. $("#SY_FDC_WHSS").html(getValueInfo(res["SY_FDC_WHSS"] ));
  972. $("#SY_FDC_FS").html(getValueInfo(res["SY_FDC_FS"] ));
  973. $("#SY_FDC_GZSS").html(getValueInfo(res["SY_FDC_GZSS"] ));
  974. $("#SY_FDC_GL").html(getValueInfo(res["SY_FDC_GL"] ));
  975. $("#SY_FDC_XDSS").html(getValueInfo(res["SY_FDC_XDSS"] ));
  976. $("#SY_FDC_LLGL").html(getValueInfo(res["SY_FDC_LLGL"] ));
  977. $("#SY_FDC_SLSS").html(getValueInfo(res["SY_FDC_SLSS"] ));
  978. $("#SY_FDC_YFGL").html(getValueInfo(res["SY_FDC_YFGL"] ));
  979. $("#SY_FDC_XNSS").html(getValueInfo(res["SY_FDC_XNSS"] ));
  980. $("#SY_FDC_FDL").html(getValueInfo(res["SY_FDC_RFDL"] ));
  981. $("#SY_FDC_GL1").html(getValueInfo(res["SY_FDC_GL"] ));
  982. $("#SY_FDC_JRTS").html(getValueToInt(res["SY_FDC_JRTS"] ));
  983. $("#SY_FDC_YXTS").html(getValueToInt(res["SY_FDC_YXTS"] ));
  984. $("#SY_FDC_GZTS").html(getValueToInt(res["SY_FDC_GZTS"] ));
  985. $("#SY_FDC_XDTS").html(getValueToInt(res["SY_FDC_XDTS"] ));
  986. $("#SY_FDC_DJTS").html(getValueToInt(res["SY_FDC_DJTS"] ));
  987. $("#SY_FDC_WHTS").html(getValueToInt(res["SY_FDC_WHTS"] ));
  988. $("#SY_FDC_LXTS").html(getValueToInt(res["SY_FDC_LXTS"] ));
  989. //$("#CL_FDC_FS1").html();
  990. //$("#DX_FDC_FS1").html();
  991. //$("#KB_FDC_FS1").html();
  992. var clfs = [];
  993. var kbfs = [];
  994. var dxfs = [];
  995. var syfs = [];
  996. clfs.push( parseFloat(res["CL_FDC_FS"] ));
  997. kbfs.push(parseFloat(res["KB_FDC_FS"] ));
  998. dxfs.push(parseFloat(res["DX_FDC_FS"] ));
  999. syfs.push(parseFloat(res["SY_FDC_FS"] ));
  1000. options6.series[0].data = clfs;
  1001. options7.series[0].data = kbfs;
  1002. options8.series[0].data = dxfs;
  1003. options9.series[0].data = syfs;
  1004. chart6 = new Highcharts.Chart(options6);
  1005. chart7 = new Highcharts.Chart(options7);
  1006. chart8 = new Highcharts.Chart(options8);
  1007. chart9 = new Highcharts.Chart(options9);
  1008. /********************************************************************************************************/
  1009. }
  1010. });
  1011. }
  1012. function goaction(wpId)
  1013. {
  1014. $("#f1").attr("action","/wpmonitor/lineindex.action?wpId="+wpId).submit();
  1015. }