desktop.js 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775
  1. 
  2. var chart1;
  3. var chart2;
  4. var chart3;
  5. var chart4;
  6. var chart5;
  7. var chart6;
  8. var chart7;
  9. var chart8;
  10. var chart9;
  11. var chart10;
  12. var chart11;
  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. var options10;
  23. var options11;
  24. Highcharts.setOptions({
  25. global : {
  26. useUTC : false
  27. }
  28. });
  29. String.prototype.endWith=function(oString){
  30. var reg=new RegExp(oString+"$");
  31. return reg.test(this);
  32. }
  33. var bl1;
  34. var bl2;
  35. function stateimg(obj,type)
  36. {
  37. switch (type)
  38. {
  39. case 0:
  40. $(obj).attr("src",
  41. "/resource/images/hbsj/standBy_Station.fw.png");
  42. break;
  43. case 1:
  44. $(obj).attr("src",
  45. "/resource/images/hbsj/run_Station.fw.png");
  46. break;
  47. case 2:
  48. $(obj).attr("src",
  49. "/resource/images/hbsj/stop_Station.fw.png");
  50. break;
  51. case 3:
  52. $(obj).attr("src",
  53. "/resource/images/hbsj/interrupt_Station.fw.png");
  54. break;
  55. case 4:
  56. $(obj).attr("src",
  57. "/resource/images/hbsj/repair_Station.fw.png");
  58. break;
  59. case 5:
  60. $(obj).attr("src",
  61. "/resource/images/hbsj/limit_Station.fw.png");
  62. break;
  63. case 6:
  64. $(obj).attr("src",
  65. "/resource/images/hbsj/limit_Station.fw.png");
  66. break;
  67. }
  68. }
  69. function statebtnimg(obj,type)
  70. {
  71. switch (type)
  72. {
  73. case 0:
  74. $(obj).html("<img src='/resource/images/hbsj/page_zmt_fj_green.png' width='31' height='44' />");
  75. break;
  76. case 1:
  77. $(obj).html("<img src='/resource/images/hbsj/page_zmt_fj_blue.gif' width='31' height='44' />");
  78. break;
  79. case 2:
  80. $(obj).html("<img src='/resource/images/hbsj/page_zmt_fj_red.png' width='31' height='44' />");
  81. break;
  82. case 3:
  83. $(obj).html("<img src='/resource/images/hbsj/page_zmt_fj_gray.png' width='31' height='44' />");
  84. break;
  85. case 4:
  86. $(obj).html("<img src='/resource/images/hbsj/page_zmt_fj_orange.png' width='31' height='44' />");
  87. break;
  88. case 5:
  89. $(obj).html("<img src='/resource/images/hbsj/page_zmt_fj_pink.png' width='31' height='44' />");
  90. break;
  91. case 6:
  92. $(obj).html("<img src='/resource/images/hbsj/page_zmt_fj_pink.png' width='31' height='44' />");
  93. break;
  94. }
  95. }
  96. function wpInfoAjax() {
  97. var wpId = $("#wpId").val();
  98. $.ajax({
  99. url : "wpInfoAjax.action?wpId=" + wpId,
  100. type : "post",
  101. cache : false,
  102. dataType : "json",
  103. data : {},
  104. ifModified : false,
  105. success : function(res) {
  106. var zjrl = res["zjrl"];
  107. if(zjrl==44.85){
  108. $("#zjrl").html(148.5);
  109. }else{
  110. $("#zjrl").html(res["zjrl"]*10);
  111. }
  112. $("#aqts").html(res["aqts"]);
  113. $("#ydxkyxs").html(res["ysbklyl"]);
  114. $("#ysbklyl").html(res["ysbklyl"]);
  115. $("#ylyxs").html(res["ylyxs"]);
  116. $("#nlyxs").html(res["nlyxs"]);
  117. $("#rfdl").html(res["rfdl"]);
  118. $("#yfdl").html(res["yfdl"]);
  119. $("#nfdl").html(res["nfdl"]);
  120. $("#rswdl").html(res["rswdl"]);
  121. $("#yswdl").html(res["yswdl"]);
  122. $("#nswdl").html(res["nswdl"]);
  123. $("#jpeyht").html(res["jpeyht"]);
  124. $("#jpeyhl").html(res["jpeyhl"]);
  125. $("#jybm").html(res["jybm"]);
  126. $("#jys").html(res["jys"]);
  127. //作假
  128. if(wpId=='0'){
  129. $("#whssy").html((res["whssy"]-1000.6429).toFixed(2));
  130. $("#whssn").html((res["whssy"]-1000.6429).toFixed(2));
  131. $("#gzssy").html((res["gzssy"]-252.8915).toFixed(2));
  132. $("#gzssn").html((res["gzssy"]-252.8915).toFixed(2));
  133. $("#xdssy").html((res["xdssy"]-1273.2357).toFixed(2));
  134. $("#xdssn").html((res["xdssy"]-1273.2357).toFixed(2));
  135. $("#slssy").html((res["slssy"]-0.1315).toFixed(2));
  136. $("#slssn").html((res["slssy"]-0.1315).toFixed(2));
  137. $("#xnssy").html((res["xnssy"]-1682.4901).toFixed(2));
  138. $("#xnssn").html((res["xnssy"]-1682.4901).toFixed(2));
  139. }else if(wpId.indexOf("CL_FDC")>-1){
  140. $("#whssy").html((res["whssy"]-432.0266).toFixed(2));
  141. $("#whssn").html((res["whssy"]-432.0266).toFixed(2));
  142. $("#gzssy").html((res["gzssy"]-42.9232).toFixed(2));
  143. $("#gzssn").html((res["gzssy"]-42.9232).toFixed(2));
  144. $("#xdssy").html((res["xdssy"]-60.9183).toFixed(2));
  145. $("#xdssn").html((res["xdssy"]-60.9183).toFixed(2));
  146. $("#slssy").html((res["slssy"]-0.0038).toFixed(2));
  147. $("#slssn").html((res["slssy"]-0.0038).toFixed(2));
  148. $("#xnssy").html((res["xnssy"]-235.0909).toFixed(2));
  149. $("#xnssn").html((res["xnssy"]-235.0909).toFixed(2));
  150. }else if(wpId.indexOf("KB04_GC")>-1){
  151. $("#whssy").html((res["whssy"]-122.9792).toFixed(2));
  152. $("#whssn").html((res["whssy"]-122.9792).toFixed(2));
  153. $("#gzssy").html((res["gzssy"]-38.3588).toFixed(2));
  154. $("#gzssn").html((res["gzssy"]-38.3588).toFixed(2));
  155. $("#xdssy").html((res["xdssy"]-212.3221).toFixed(2));
  156. $("#xdssn").html((res["xdssy"]-212.3221).toFixed(2));
  157. $("#slssy").html((res["slssy"]).toFixed(2));
  158. $("#slssn").html((res["slssy"]).toFixed(2));
  159. $("#xnssy").html((res["xnssy"]-300.8463).toFixed(2));
  160. $("#xnssn").html((res["xnssy"]-300.8463).toFixed(2));
  161. }else if(wpId.indexOf("KB_FDC")>-1){
  162. $("#whssy").html((res["whssy"]-300.9792).toFixed(2));
  163. $("#whssn").html((res["whssy"]-300.9792).toFixed(2));
  164. $("#gzssy").html((res["gzssy"]-100.3588).toFixed(2));
  165. $("#gzssn").html((res["gzssy"]-100.3588).toFixed(2));
  166. $("#xdssy").html((res["xdssy"]-1000.3221).toFixed(2));
  167. $("#xdssn").html((res["xdssy"]-1000.3221).toFixed(2));
  168. $("#slssy").html((res["slssy"]).toFixed(2));
  169. $("#slssn").html((res["slssy"]).toFixed(2));
  170. $("#xnssy").html((res["xnssy"]-1000.8463).toFixed(2));
  171. $("#xnssn").html((res["xnssy"]-1000.8463).toFixed(2));
  172. }else if(wpId.indexOf("DX_FDC")>-1){
  173. $("#whssy").html((res["whssy"]-145.9178).toFixed(2));
  174. $("#whssn").html((res["whssy"]-145.9178).toFixed(2));
  175. $("#gzssy").html((res["gzssy"]-73.2744).toFixed(2));
  176. $("#gzssn").html((res["gzssy"]-73.2744).toFixed(2));
  177. $("#xdssy").html((res["xdssy"]).toFixed(2));
  178. $("#xdssn").html((res["xdssy"]).toFixed(2));
  179. $("#slssy").html((res["slssy"]-0.2589).toFixed(2));
  180. $("#slssn").html((res["slssy"]-0.2589).toFixed(2));
  181. $("#xnssy").html((res["xnssy"]-146.6001).toFixed(2));
  182. $("#xnssn").html((res["xnssy"]-146.6001).toFixed(2));
  183. }else{
  184. $("#whss").html(res["whss"]);
  185. $("#whssy").html(res["whssy"]);
  186. // $("#whssn").html(res["whssn"]);
  187. $("#whssn").html(res["whssy"]);
  188. $("#gzss").html(res["gzss"]);
  189. $("#gzssy").html(res["gzssy"]);
  190. // $("#gzssn").html(res["gzssn"]);
  191. $("#gzssn").html(res["gzssy"]);
  192. $("#xdss").html(res["xdss"]);
  193. $("#xdssy").html(res["xdssy"]);
  194. // $("#xdssn").html(res["xdssn"]);
  195. $("#xdssn").html(res["xdssy"]);
  196. $("#slss").html(res["slss"]);
  197. $("#slssy").html(res["slssy"]);
  198. // $("#slssn").html(res["slssn"]);
  199. $("#slssn").html(res["slssy"]);
  200. $("#xnss").html(res["xnss"]);
  201. $("#xnssy").html(res["xnssy"]);
  202. // $("#xnssn").html(res["xnssn"]);
  203. $("#xnssn").html(res["xnssy"]);
  204. }
  205. $("#whss").html(res["whss"]);
  206. $("#gzss").html(res["gzss"]);
  207. $("#xdss").html(res["xdss"]);
  208. $("#slss").html(res["slss"]);
  209. $("#xnss").html(res["xnss"]);
  210. //结束
  211. // $("#whss").html(res["whss"]);
  212. // $("#whssy").html(res["whssy"]);
  213. // $("#whssn").html(res["whssn"]);
  214. //
  215. // $("#gzss").html(res["gzss"]);
  216. // $("#gzssy").html(res["gzssy"]);
  217. // $("#gzssn").html(res["gzssn"]);
  218. //
  219. // $("#xdss").html(res["xdss"]);
  220. // $("#xdssy").html(res["xdssy"]);
  221. // $("#xdssn").html(res["xdssn"]);
  222. //
  223. // $("#slss").html(res["slss"]);
  224. // $("#slssy").html(res["slssy"]);
  225. // $("#slssn").html(res["slssn"]);
  226. //
  227. //
  228. // $("#xnss").html(res["xnss"]);
  229. // $("#xnssy").html(res["xnssy"]);
  230. // $("#xnssn").html(res["xnssn"]);
  231. $("#yxts").html(res["yxts"]);
  232. $("#djts").html(res["djts"]);
  233. $("#whts").html(res["whts"]);
  234. $("#gzts").html(res["gzts"]);
  235. $("#xdts").html(res["xdts"]);
  236. $("#lxts").html(res["lxts"]);
  237. $("#jrts").html(res["yxts"]+res["djts"]+res["whts"]+res["gzts"]+res["xdts"]+res["lxts"]);
  238. $("#yxtsc").html(res["yxts"]);
  239. $("#djtsc").html(res["djts"]);
  240. $("#whtsc").html(res["whts"]);
  241. $("#gztsc").html(res["gzts"]);
  242. $("#xdtsc").html(res["xdts"]);
  243. $("#lxtsc").html(res["lxts"]);
  244. $("#jrtsc").html(res["yxts"]+res["djts"]+res["whts"]+res["gzts"]+res["xdts"]+res["lxts"]);
  245. $("#yxtsk").html(res["yxts"]);
  246. $("#djtsk").html(res["djts"]);
  247. $("#whtsk").html(res["whts"]);
  248. $("#gztsk").html(res["gzts"]);
  249. $("#xdtsk").html(res["xdts"]);
  250. $("#lxtsk").html(res["lxts"]);
  251. $("#jrtsk").html(res["yxts"]+res["djts"]+res["whts"]+res["gzts"]+res["xdts"]+res["lxts"]);
  252. $("#yxtsk4").html(res["yxts"]);
  253. $("#djtsk4").html(res["djts"]);
  254. $("#whtsk4").html(res["whts"]);
  255. $("#gztsk4").html(res["gzts"]);
  256. $("#xdtsk4").html(res["xdts"]);
  257. $("#lxtsk4").html(res["lxts"]);
  258. $("#jrtsk4").html(res["yxts"]+res["djts"]+res["whts"]+res["gzts"]+res["xdts"]+res["lxts"]);
  259. $("#yxtsd").html(res["yxts"]);
  260. $("#djtsd").html(res["djts"]);
  261. $("#whtsd").html(res["whts"]);
  262. $("#gztsd").html(res["gzts"]);
  263. $("#xdtsd").html(res["xdts"]);
  264. $("#lxtsd").html(res["lxts"]);
  265. $("#jrtsd").html(res["yxts"]+res["djts"]+res["whts"]+res["gzts"]+res["xdts"]+res["lxts"]);
  266. /**********************************************************************************************/
  267. statebtnimg("#cl_fczt", res["CL_FDC_FCZT"]);
  268. statebtnimg("#kb_fczt", res["KB_FDC_FCZT"]);
  269. statebtnimg("#dx_fczt", res["DX_FDC_FCZT"]);
  270. /**********************************************************************************************/
  271. //悬浮层
  272. $("#CL_ZJTS").html(res["CL_FDC_ZJTS"]);
  273. $("#CL_ZJRL").html(res["CL_FDC_ZJRL"]*10);
  274. $("#CL_FS").html(res["CL_FDC_FS"]);
  275. $("#CL_RFDL").html(res["CL_FDC_RFDL"]);
  276. $("#CL_GL").html(res["CL_FDC_GL"]);
  277. $("#KB_ZJTS").html(res["KB_FDC_ZJTS"]);
  278. $("#KB_FS").html(res["KB_FDC_FS"]);
  279. $("#KB_RFDL").html(res["KB_FDC_RFDL"]);
  280. $("#KB_GL").html(res["KB_FDC_GL"]);
  281. $("#DX_ZJTS").html(res["DX_FDC_ZJTS"]);
  282. $("#DX_ZJRL").html(res["DX_FDC_ZJRL"]*10);
  283. $("#DX_FS").html(res["DX_FDC_FS"]);
  284. $("#DX_RFDL").html(res["DX_FDC_RFDL"]);
  285. $("#DX_GL").html(res["DX_FDC_GL"]);
  286. $("#KB_SIQI_ZJTS").html(res["KB_SIQI_ZJTS"]);
  287. $("#KB_SIQI_ZJRL").html(res["KB_SIQI_ZJRL"]);
  288. $("#KB_SIQI_RFDL").html(res["KB_SIQI_RFDL"]);
  289. $("#KB_SIQI_FS").html(res["KB_SIQI_FS"]);
  290. $("#KB_SIQI_GL").html(res["KB_SIQI_GL"]);
  291. /**********************************************************************************************/
  292. if(chart3.series[0])
  293. {
  294. var point = chart3.series[0].points[0];
  295. point.update(res["fs"]);
  296. }
  297. if(chart4.series[0])
  298. {
  299. point = chart4.series[0].points[0];
  300. point.update(res["llgl"]);
  301. }
  302. if(chart5.series[0])
  303. {
  304. point = chart5.series[0].points[0];
  305. if(res["sjgl"]<0)
  306. {
  307. point.update(res["yfgl"]);
  308. }else
  309. {
  310. point.update(res["sjgl"]);
  311. }
  312. }
  313. if(chart7.series[0])
  314. {
  315. point = chart7.series[0].points[0];
  316. point.update(res["yfgl"]);
  317. }
  318. /****************************************/
  319. var jh=[];
  320. var sj=[];
  321. var bl=[];
  322. jh.push(res["yfdljh"]);
  323. jh.push(res["nfdljh"]);
  324. sj.push(res["yfdl"]);
  325. sj.push(res["nfdl"]);
  326. bl.push("月计划完成率"+res["ywcl"]+"%");
  327. bl.push("年计划完成率"+res["nwcl"]+"%");
  328. options6.series[0].data = jh;
  329. options6.series[1].data = sj;
  330. //options6.series[2].data = bl;
  331. if(bl1!=res["ywcl"])
  332. {
  333. bl1=res["ywcl"];
  334. bl2=res["nwcl"];
  335. options6.xAxis.categories=bl
  336. chart6 = new Highcharts.Chart(options6);
  337. }else if(bl2!=res["nwcl"])
  338. {
  339. bl1=res["ywcl"];
  340. bl2=res["nwcl"];
  341. options6.xAxis.categories=bl;
  342. chart6 = new Highcharts.Chart(options6);
  343. }
  344. }
  345. });
  346. }
  347. /*var yfdlForC2 = [];
  348. var swdlForC2 = [];
  349. var gwdlForC2 = [];
  350. var lldlForC2 = [];
  351. var xtimeForC2 = [];*/
  352. function powerAjax() {
  353. var wpId = $("#wpId").val();
  354. var url = "powerAjax.action?wpId=" + wpId;
  355. $.ajax({
  356. url : url,
  357. type : "post",
  358. cache : false,
  359. dataType : "json",
  360. async : false,
  361. data : {},
  362. ifModified : false,
  363. success : function(result) {
  364. var yfdl = [];
  365. var swdl = [];
  366. var gwdl = [];
  367. var lldl = [];
  368. var xtimex = [];
  369. $.each(result, function(m, obj) {
  370. if (obj.value1 != null) {
  371. yfdl.push( parseFloat(obj.value1) );
  372. }
  373. if (obj.value2 != null) {
  374. swdl.push( parseFloat(obj.value2) );
  375. }
  376. if (obj.value3 != null) {
  377. gwdl.push( parseFloat(obj.value3) );
  378. //ycgl.push([ obj.time, parseFloat(obj.wggl) ]);
  379. }
  380. if (obj.value4 != null) {
  381. lldl.push( parseFloat(obj.value4) );
  382. //ycgl.push([ obj.time, parseFloat(obj.wggl) ]);
  383. }
  384. if(obj.timestr!="")
  385. {
  386. xtimex.push(obj.timestr);
  387. }else
  388. {
  389. xtimex.push("");
  390. }
  391. });
  392. //alert(xtime.length);
  393. options2.series[0].data = yfdl;
  394. options2.series[1].data = lldl;
  395. options2.series[2].data = swdl;
  396. options2.series[3].data = gwdl;
  397. options2.xAxis.categories = xtimex;
  398. chart2 = new Highcharts.Chart(options2);
  399. }
  400. });
  401. }
  402. var yfgl = [];
  403. var sjgl = [];
  404. var ycgl = [];
  405. var pjfs = [];
  406. var lvgl = [];
  407. var bzgl = [];
  408. var zygl = [];
  409. var xtime=[];
  410. var yfgl1 = [];
  411. var sjgl1 = [];
  412. var ycgl1 = [];
  413. var pjfs1 = [];
  414. var bzgl1 = [];
  415. var yfgl2 = [];
  416. var sjgl2 = [];
  417. var ycgl2 = [];
  418. var pjfs2 = [];
  419. var bzgl2 = [];
  420. var xtime1=[];
  421. function realPowerAjax() {
  422. var wpId = $("#wpId").val();
  423. //console.log(wpId);
  424. var url = "realPowerAjax.action?wpId=" + wpId;
  425. $.ajax({
  426. url : url,
  427. type : "post",
  428. cache : false,
  429. dataType : "json",
  430. data : {},
  431. ifModified : false,
  432. success : function(result) {
  433. yfgl = [];
  434. sjgl = [];
  435. ycgl = [];
  436. pjfs = [];
  437. lvgl = [];
  438. bzgl = [];
  439. zygl = [];
  440. xtime=[];
  441. yfgl1 = [];
  442. sjgl1 = [];
  443. ycgl1 = [];
  444. pjfs1 = [];
  445. bzgl1 = [];
  446. yfgl2 = [];
  447. sjgl2 = [];
  448. ycgl2 = [];
  449. pjfs2 = [];
  450. bzgl2 = [];
  451. xtime1=[];
  452. var index=0;
  453. var count=0;
  454. var vindex=0;
  455. $.each(result, function(m, obj) {
  456. //if(m == result.length -1){
  457. if(m%2==0){
  458. if(index<obj.value7){
  459. index++;
  460. if(obj.value4!=null)
  461. {
  462. ycgl.push( parseFloat(obj.value4) );
  463. }else{
  464. ycgl.push( null );
  465. }
  466. }
  467. if(count<obj.value8 ){
  468. yfgl1.push( parseFloat(obj.value1) );
  469. sjgl1.push( parseFloat(obj.value2) );
  470. pjfs1.push( parseFloat(obj.value6) );
  471. bzgl1.push( parseFloat(obj.value5) );
  472. count++;
  473. }
  474. xtime.push(parseFloat(obj.time));
  475. }
  476. vindex=obj.value8%2==0?obj.value8/2:(obj.value8+1)/2;
  477. /*
  478. if(index<obj.value7){
  479. index++;
  480. if(obj.value4!=null)
  481. {
  482. ycgl2.push( parseFloat(obj.value4) );
  483. }else{
  484. ycgl2.push( null );
  485. }
  486. }
  487. if(count<obj.value8 ){
  488. yfgl2.push( parseFloat(obj.value1) );
  489. sjgl2.push( parseFloat(obj.value2) );
  490. pjfs2.push( parseFloat(obj.value6) );
  491. bzgl2.push( parseFloat(obj.value5) );
  492. count++;
  493. }
  494. xtime1.push(parseFloat(obj.time));*/
  495. });
  496. index=0;
  497. count=0;
  498. $.each(result, function(m, obj) {
  499. //if(m == result.length -1){
  500. if(index<obj.value7){
  501. index++;
  502. if(obj.value4!=null)
  503. {
  504. ycgl2.push( parseFloat(obj.value4) );
  505. }else{
  506. ycgl2.push( null );
  507. }
  508. }
  509. if(count<obj.value8 ){
  510. yfgl2.push( parseFloat(obj.value1) );
  511. sjgl2.push( parseFloat(obj.value2) );
  512. pjfs2.push( parseFloat(obj.value6) );
  513. bzgl2.push( parseFloat(obj.value5) );
  514. count++;
  515. }
  516. xtime1.push(parseFloat(obj.time));
  517. });
  518. for(var i=0;i<vindex;i++){
  519. yfgl.push(yfgl1[i]);
  520. sjgl.push(sjgl1[i]);
  521. pjfs.push(pjfs1[i]);
  522. bzgl.push(bzgl1[i]);
  523. }
  524. // alert(new Date(xtime[47]));
  525. // alert(yfgl[47]);
  526. options1.series[0].data = yfgl;//理论功率
  527. options1.series[1].data = bzgl;
  528. options1.series[2].data = sjgl;
  529. // options1.series[3].data = ycgl;
  530. //options1.series[2].visible=false;
  531. options1.series[3].data = pjfs;
  532. //options1.series[4].data = lvgl;
  533. //options1.series[4].visible=false;
  534. //options1.series[5].data = bzgl;
  535. //options1.series[5].visible=false;
  536. //options1.series[6].data = zygl;
  537. //options1.series[6].visible=false;
  538. options1.xAxis.categories = xtime;
  539. chart1 = new Highcharts.Chart(options1);
  540. /* if(wpId.endWith("FDC") || wpId=="" || wpId=="-1" || wpId=="0"){
  541. chart1.series[2].remove(true);
  542. chart1.addSeries({
  543. type: 'spline',
  544. name: '平均风速',
  545. data:pjfs,
  546. yAxis:1,
  547. color:'#FF350C'
  548. });
  549. chart1.yAxis[1].setTitle("平均风速",true);
  550. //alert(chart1.series[2].name);
  551. //chart1.options.series[2].name="平均风速";
  552. }
  553. else if(wpId.endWith("GDC") || wpId=="-2"){
  554. chart1.series[2].remove(true);
  555. chart1.addSeries({
  556. type: 'spline',
  557. name: '日照强度',
  558. data:pjfs,
  559. yAxis:1,
  560. color:'#FF350C'
  561. });
  562. chart1.yAxis[1].setTitle("日照强度",true);
  563. //chart1.options.series[2].name="平均辐射度";
  564. }*/
  565. }
  566. });
  567. }
  568. $(document).ready(
  569. function() {
  570. // $('#epiClock').epiclock({
  571. // format : ' Y年F月j日 D G:i:s'
  572. // }); // 绑定
  573. // $.epiclock();
  574. // ================================================
  575. // ================================================
  576. //Highcharts.setOptions(Highcharts.theme1);
  577. options1 = {
  578. colors: [
  579. '#00B259', //绿
  580. '#B20000', //红
  581. '#006DD9', //蓝
  582. '#000000', //黑
  583. '#FFBFFF',//藕荷色
  584. '#CC9900',//黄褐色
  585. '#FF8000'//橘黄
  586. ],
  587. chart: {
  588. renderTo: 'container1',//
  589. type: 'spline',
  590. //backgroundColor:'#BFDFFF',
  591. //plotBackgroundColor:'#BFDFFF',
  592. zoomType: 'x',
  593. events: {
  594. }
  595. },title:null,
  596. subtitle: {
  597. text: ''
  598. },
  599. xAxis: {
  600. labels: {
  601. align: 'center',
  602. formatter: function() {
  603. return Highcharts.dateFormat('%H<br/>%M', this.value);
  604. }
  605. },
  606. type: 'datetime'
  607. },
  608. yAxis: [{
  609. title: {
  610. //text: '功率数值(MW)'
  611. text:null
  612. }
  613. },{
  614. title:{
  615. //text :'风速'
  616. text:null
  617. },
  618. labels:{
  619. formatter: function(){
  620. return this.value;
  621. }
  622. },
  623. lineWidth : 1,
  624. opposite:true
  625. }],
  626. legend: {
  627. enabled:false,
  628. layout: 'vertical',
  629. // backgroundColor: '#FFFFFF',
  630. align: 'right',
  631. verticalAlign: 'top',
  632. x:-60,
  633. floating: true
  634. // shadow: true
  635. // layout: 'vertical',
  636. // align: 'right',
  637. // verticalAlign: 'middle',
  638. // borderWidth: 0
  639. },
  640. tooltip: {
  641. crosshairs:{//控制十字线
  642. width:2
  643. },
  644. shared:true,
  645. xDateFormat:'%Y-%m-%d %H:%M'
  646. /*formatter: function() {
  647. return '<b>'+ this.series.name +'</b>:'+
  648. Highcharts.numberFormat(this.y, 2) +' 万kW<br/>时间:'+
  649. Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x);
  650. }*/
  651. },
  652. credits: {
  653. enabled: false
  654. },
  655. plotOptions: {
  656. spline: {
  657. dataLabels : {
  658. enabled :false
  659. },
  660. // pointPadding: 0.2,
  661. borderWidth: 0
  662. },
  663. series: {
  664. cursor: 'pointer',
  665. marker: {
  666. radius: 0,
  667. symbol: 'circle' //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
  668. }
  669. }
  670. },
  671. series: [{
  672. type: 'spline',
  673. name: '理论功率(单位:MW)',
  674. yAxis:0
  675. },{
  676. type: 'spline',
  677. name: '保证功率(单位:MW)',
  678. yAxis:0
  679. },{
  680. type: 'spline',
  681. name: '实发功率(单位:MW)',
  682. yAxis:0
  683. },{
  684. type: 'spline',
  685. name: '平均风速(单位:m/s)',
  686. yAxis:1
  687. /* },
  688. {
  689. type: 'spline',
  690. name: '理论功率(单位:MW)',
  691. yAxis:0
  692. },{
  693. type: 'spline',
  694. name: '最优功率(单位:MW)',
  695. yAxis:0*/
  696. }]
  697. };
  698. options2 = {
  699. chart: {
  700. renderTo: 'container2',
  701. type: 'column',
  702. //backgroundColor:'#BFDFFF',
  703. //plotBackgroundColor:'#BFDFFF',
  704. zoomType: 'x',
  705. events: {
  706. click: function (event) {
  707. var num=parseInt(Math.abs(event.xAxis[0].value).toFixed(0));
  708. var temp=event.xAxis[0].axis.options.categories[num];
  709. var day=temp.substring(0,temp.length-1);
  710. powerDetailAjax(day,temp);
  711. }
  712. }
  713. },title:null
  714. ,
  715. xAxis: {
  716. type: 'category'
  717. },
  718. yAxis: [{
  719. title: {
  720. //text: '电量(万kWh)'
  721. text:null
  722. }
  723. }],
  724. legend: {
  725. enabled:false,
  726. layout: 'vertical',
  727. // backgroundColor: '#FFFFFF',
  728. align: 'right',
  729. verticalAlign: 'top',
  730. x:-60,
  731. floating: true
  732. // shadow: true
  733. // layout: 'vertical',
  734. // align: 'right',
  735. // verticalAlign: 'middle',
  736. // borderWidth: 0
  737. },
  738. tooltip: {
  739. shared:true,
  740. xDateFormat:'%Y-%m-%d'
  741. /*formatter: function() {
  742. return '<b>'+ this.series.name +'</b>:'+
  743. Highcharts.numberFormat(this.y, 2) +' 万kW<br/>时间:'+
  744. Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x);
  745. }*/
  746. },
  747. credits: {
  748. enabled: false
  749. },
  750. plotOptions: {
  751. spline: {
  752. dataLabels : {
  753. enabled :false
  754. },
  755. // pointPadding: 0.2,
  756. borderWidth: 0
  757. },
  758. column: {
  759. pointPadding: 0.2,
  760. borderWidth: 0
  761. },
  762. series: {
  763. cursor: 'pointer',
  764. marker: {
  765. radius: 0,
  766. symbol: 'circle' //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
  767. }
  768. }
  769. },
  770. series: [{
  771. name: '日发电量(单位:万kWh)',
  772. yAxis:0
  773. }, {
  774. name: '日理论发电量(单位:万kWh)',
  775. yAxis:0
  776. },
  777. {
  778. name: '上网电量(单位:万kWh)',
  779. yAxis:0
  780. },{
  781. name: '购网电量(单位:万kWh)',
  782. yAxis:0
  783. }]
  784. };
  785. options3 = {
  786. chart: {
  787. renderTo: 'container3',
  788. type: 'solidgauge',
  789. events: {
  790. click: function (event) {
  791. findPJFSDetail();
  792. }
  793. }
  794. },
  795. title: null,
  796. pane: {
  797. center: ['50%', '100%'],
  798. size: '200%',
  799. startAngle: -90,
  800. endAngle: 90,
  801. background: {
  802. backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || '#EEE',
  803. innerRadius: '60%',
  804. outerRadius: '100%',
  805. shape: 'arc'
  806. }
  807. },
  808. tooltip: {
  809. enabled: false
  810. },
  811. // the value axis
  812. yAxis: {
  813. stops: [
  814. [0.1, '#55BF3B'], // green
  815. [0.3, '#33FFFF'], // 蓝
  816. [0.7, '#DDDF0D'], // yellow
  817. [0.9, '#DF5353'] // red
  818. ],
  819. lineWidth: 0,
  820. minorTickInterval: null,
  821. tickPixelInterval: 400,
  822. tickWidth: 0,
  823. title: {
  824. y: -10
  825. },
  826. labels: {
  827. y: 0
  828. },
  829. min: 0,
  830. max: 50,
  831. title: {
  832. text: null
  833. }
  834. },
  835. plotOptions: {
  836. solidgauge: {
  837. dataLabels: {
  838. y: 20,
  839. borderWidth: 0,
  840. useHTML: true
  841. }
  842. }
  843. },
  844. credits: {
  845. enabled: false
  846. },
  847. series: [{
  848. name: '风速(m/s)',
  849. data: [12],
  850. dataLabels: {
  851. y:20,
  852. format: '<div style="text-align:center"><span style="font-size:13px;color:' +
  853. ((Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black') + '">{y}</span><br/>' +
  854. '<span style="font-size:12px;color:silver">风速(m/s)</span></div>'
  855. },
  856. tooltip: {
  857. valueSuffix: ''
  858. }
  859. }]
  860. };
  861. options4 = {
  862. chart: {
  863. renderTo: 'container4',
  864. type: 'solidgauge',
  865. events: {
  866. click: function (event) {
  867. findBZGLDetail();
  868. }
  869. }
  870. },
  871. title: null,
  872. pane: {
  873. center: ['50%', '100%'],
  874. size: '200%',
  875. startAngle: -90,
  876. endAngle: 90,
  877. background: {
  878. backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || '#EEE',
  879. innerRadius: '60%',
  880. outerRadius: '100%',
  881. shape: 'arc'
  882. }
  883. },
  884. tooltip: {
  885. enabled: false
  886. },
  887. // the value axis
  888. yAxis: {
  889. stops: [
  890. [0.1, '#55BF3B'], // green
  891. [0.3, '#33FFFF'], // 蓝
  892. [0.7, '#DDDF0D'], // yellow
  893. [0.9, '#DF5353'] // red
  894. ],
  895. lineWidth: 0,
  896. minorTickInterval: null,
  897. tickPixelInterval: 400,
  898. tickWidth: 0,
  899. title: {
  900. y: -10
  901. },
  902. labels: {
  903. y: 0
  904. },
  905. min: 0,
  906. max: 800,
  907. title: {
  908. text: null
  909. }
  910. },
  911. plotOptions: {
  912. solidgauge: {
  913. dataLabels: {
  914. y: 20,
  915. borderWidth: 0,
  916. useHTML: true
  917. }
  918. }
  919. },
  920. credits: {
  921. enabled: false
  922. },
  923. series: [{
  924. name: '保证功率(MW)',
  925. data: [12],
  926. dataLabels: {
  927. y:20,
  928. format: '<div style="text-align:center"><span style="font-size:13px;color:' +
  929. ((Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black') + '">{y}</span><br/>' +
  930. '<span style="font-size:12px;color:silver">保证功率(MW)</span></div>'
  931. },
  932. tooltip: {
  933. valueSuffix: ' '
  934. }
  935. }]
  936. };
  937. options5 = {
  938. chart: {
  939. renderTo: 'container5',
  940. type: 'solidgauge',
  941. events: {
  942. click: function (event) {
  943. findSJGLDetail();
  944. }
  945. }
  946. },
  947. title: null,
  948. pane: {
  949. center: ['50%', '100%'],
  950. size: '200%',
  951. startAngle: -90,
  952. endAngle: 90,
  953. background: {
  954. backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || '#EEE',
  955. innerRadius: '60%',
  956. outerRadius: '100%',
  957. shape: 'arc'
  958. }
  959. },
  960. tooltip: {
  961. enabled: false
  962. },
  963. // the value axis
  964. yAxis: {
  965. stops: [
  966. [0.1, '#55BF3B'], // green
  967. [0.3, '#33FFFF'], // 蓝
  968. [0.7, '#DDDF0D'], // yellow
  969. [0.9, '#DF5353'] // red
  970. ],
  971. lineWidth: 0,
  972. minorTickInterval: null,
  973. tickPixelInterval: 400,
  974. tickWidth: 0,
  975. title: {
  976. y: -10
  977. },
  978. labels: {
  979. y: 0
  980. },
  981. min: 0,
  982. max: 800,
  983. title: {
  984. text: null
  985. }
  986. },
  987. plotOptions: {
  988. solidgauge: {
  989. dataLabels: {
  990. y: 20,
  991. borderWidth: 0,
  992. useHTML: true
  993. }
  994. }
  995. },
  996. credits: {
  997. enabled: false
  998. },
  999. series: [{
  1000. name: '实发功率(MW)',
  1001. data: [12],
  1002. dataLabels: {
  1003. y:20,
  1004. format: '<div style="text-align:center"><span style="font-size:13px;color:' +
  1005. ((Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black') + '">{y}</span><br/>' +
  1006. '<span style="font-size:12px;color:silver">实发功率(MW)</span></div>'
  1007. },
  1008. tooltip: {
  1009. valueSuffix: ' '
  1010. }
  1011. }]
  1012. };
  1013. options6 = { chart: {
  1014. renderTo: 'container6',
  1015. type: 'bar',
  1016. events: {
  1017. click: function (event) {
  1018. getProjectInfo(event.srcElement);
  1019. }
  1020. }
  1021. },
  1022. title: {
  1023. text: ''
  1024. },
  1025. xAxis: {
  1026. categories: ['月发电量情况', '年发电量情况'],
  1027. title: {
  1028. text: null
  1029. }
  1030. },
  1031. yAxis: {
  1032. min: 0,
  1033. color: '#55BF3B',
  1034. title: {
  1035. text: ' ',
  1036. align: 'middle'
  1037. }
  1038. },
  1039. plotOptions: {
  1040. bar: {
  1041. dataLabels: {
  1042. enabled: true
  1043. }
  1044. }
  1045. }, legend: '',
  1046. credits: {
  1047. enabled: false
  1048. },
  1049. series: [{
  1050. name: '计划发电量(万kWh)',
  1051. data: [107, 133]
  1052. }, {
  1053. name: '实际发电量(万kWh)',
  1054. data: [133, 156],
  1055. color: '#55BF3B',
  1056. }]
  1057. };;
  1058. options7 = {
  1059. chart: {
  1060. renderTo: 'container7',
  1061. type: 'solidgauge',
  1062. events: {
  1063. click: function (event) {
  1064. findYFGLDetail();
  1065. }
  1066. }
  1067. },
  1068. title: null,
  1069. pane: {
  1070. center: ['50%', '100%'],
  1071. size: '200%',
  1072. startAngle: -90,
  1073. endAngle: 90,
  1074. background: {
  1075. backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || '#EEE',
  1076. innerRadius: '60%',
  1077. outerRadius: '100%',
  1078. shape: 'arc'
  1079. }
  1080. },
  1081. tooltip: {
  1082. enabled: false
  1083. },
  1084. // the value axis
  1085. yAxis: {
  1086. stops: [
  1087. [0.1, '#55BF3B'], // green
  1088. [0.3, '#33FFFF'], // 蓝
  1089. [0.7, '#DDDF0D'], // yellow
  1090. [0.9, '#DF5353'] // red
  1091. ],
  1092. lineWidth: 0,
  1093. minorTickInterval: null,
  1094. tickPixelInterval: 400,
  1095. tickWidth: 0,
  1096. title: {
  1097. y: -10
  1098. },
  1099. labels: {
  1100. y: 0
  1101. },
  1102. min: 0,
  1103. max: 800,
  1104. title: {
  1105. text: null
  1106. }
  1107. },
  1108. plotOptions: {
  1109. solidgauge: {
  1110. dataLabels: {
  1111. y: 20,
  1112. borderWidth: 0,
  1113. useHTML: true
  1114. }
  1115. }
  1116. },
  1117. credits: {
  1118. enabled: false
  1119. },
  1120. series: [{
  1121. name: '理论功率(MW)',
  1122. data: [12],
  1123. dataLabels: {
  1124. y:20,
  1125. format: '<div style="text-align:center"><span style="font-size:13px;color:' +
  1126. ((Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black') + '">{y}</span><br/>' +
  1127. '<span style="font-size:11px;color:silver">理论功率(MW)</span></div>'
  1128. },
  1129. tooltip: {
  1130. valueSuffix: ' '
  1131. }
  1132. }]
  1133. };
  1134. options8 = {
  1135. chart: {
  1136. renderTo: 'container8',
  1137. type: 'column',
  1138. //backgroundColor:'#BFDFFF',
  1139. //plotBackgroundColor:'#BFDFFF',
  1140. zoomType: 'x',
  1141. events: {
  1142. }
  1143. },title:null
  1144. ,
  1145. xAxis: {
  1146. type: 'category'
  1147. },
  1148. yAxis: [{
  1149. title: {
  1150. text: '发电量情况(万kWh)'
  1151. }
  1152. }],
  1153. legend: {
  1154. layout: 'vertical',
  1155. // backgroundColor: '#FFFFFF',
  1156. align: 'right',
  1157. verticalAlign: 'top',
  1158. floating: true
  1159. // shadow: true
  1160. // layout: 'vertical',
  1161. // align: 'right',
  1162. // verticalAlign: 'middle',
  1163. // borderWidth: 0
  1164. },
  1165. tooltip: {
  1166. shared:true
  1167. /*
  1168. ,
  1169. xDateFormat:'%Y-%m-%d'
  1170. formatter: function() {
  1171. return '<b>'+ this.series.name +'</b>:'+
  1172. Highcharts.numberFormat(this.y, 2) +' 万kW<br/>时间:'+
  1173. Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x);
  1174. }*/
  1175. },
  1176. credits: {
  1177. enabled: false
  1178. },
  1179. plotOptions: {
  1180. spline: {
  1181. dataLabels : {
  1182. enabled :false
  1183. },
  1184. // pointPadding: 0.2,
  1185. borderWidth: 0
  1186. },
  1187. column: {
  1188. pointPadding: 0.2,
  1189. borderWidth: 0
  1190. },
  1191. series: {
  1192. cursor: 'pointer',
  1193. marker: {
  1194. radius: 0,
  1195. symbol: 'circle' //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
  1196. }
  1197. }
  1198. },
  1199. series: [{
  1200. name: '月发电量(单位:万kWh)',
  1201. yAxis:0
  1202. },
  1203. {
  1204. name: '月计划发电量(单位:万kWh)',
  1205. yAxis:0
  1206. }, {
  1207. name: '年发电量(单位:万kWh)',
  1208. yAxis:0
  1209. },
  1210. {
  1211. name: '年计划发电量(单位:万kWh)',
  1212. yAxis:0
  1213. }]
  1214. };
  1215. options9 = {
  1216. chart: {
  1217. type: 'spline',
  1218. //backgroundColor:'#BFDFFF',
  1219. //plotBackgroundColor:'#BFDFFF',
  1220. zoomType: 'x',
  1221. events: {
  1222. }
  1223. },title:null
  1224. ,
  1225. subtitle: {
  1226. text: ''
  1227. },
  1228. xAxis: {
  1229. labels: {
  1230. align: 'center',
  1231. formatter: function() {
  1232. return Highcharts.dateFormat('%H<br/>%M', this.value);
  1233. }
  1234. },
  1235. type: 'datetime'
  1236. },
  1237. yAxis: [{
  1238. title: {
  1239. text: '功率数值(MW)'
  1240. }
  1241. }],
  1242. legend: {
  1243. layout: 'vertical',
  1244. // backgroundColor: '#FFFFFF',
  1245. align: 'right',
  1246. verticalAlign: 'top',
  1247. floating: true
  1248. // shadow: true
  1249. // layout: 'vertical',
  1250. // align: 'right',
  1251. // verticalAlign: 'middle',
  1252. // borderWidth: 0
  1253. },
  1254. tooltip: {
  1255. crosshairs:{//控制十字线
  1256. width:2
  1257. },
  1258. shared:true,
  1259. xDateFormat:'%Y-%m-%d %H:%M'
  1260. /*formatter: function() {
  1261. return '<b>'+ this.series.name +'</b>:'+
  1262. Highcharts.numberFormat(this.y, 2) +' 万kW<br/>时间:'+
  1263. Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x);
  1264. }*/
  1265. },
  1266. credits: {
  1267. enabled: false
  1268. },
  1269. plotOptions: {
  1270. spline: {
  1271. dataLabels : {
  1272. enabled :false
  1273. },
  1274. // pointPadding: 0.2,
  1275. borderWidth: 0
  1276. },
  1277. series: {
  1278. cursor: 'pointer',
  1279. marker: {
  1280. radius: 0,
  1281. symbol: 'circle' //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
  1282. }
  1283. }
  1284. },
  1285. series: [
  1286. ]
  1287. };
  1288. options10 = {
  1289. chart: {
  1290. type: 'spline',
  1291. //backgroundColor:'#BFDFFF',
  1292. //plotBackgroundColor:'#BFDFFF',
  1293. zoomType: 'x',
  1294. events: {
  1295. }
  1296. },title:null
  1297. ,
  1298. subtitle: {
  1299. text: ''
  1300. },
  1301. xAxis: {
  1302. labels: {
  1303. align: 'center',
  1304. formatter: function() {
  1305. return Highcharts.dateFormat('%H<br/>%M', this.value);
  1306. }
  1307. },
  1308. type: 'datetime'
  1309. },
  1310. yAxis: [{
  1311. title: {
  1312. text: '平均风速(m/s)'
  1313. }
  1314. }],
  1315. legend: {
  1316. layout: 'vertical',
  1317. // backgroundColor: '#FFFFFF',
  1318. align: 'right',
  1319. verticalAlign: 'top',
  1320. floating: true
  1321. // shadow: true
  1322. // layout: 'vertical',
  1323. // align: 'right',
  1324. // verticalAlign: 'middle',
  1325. // borderWidth: 0
  1326. },
  1327. tooltip: {
  1328. crosshairs:{//控制十字线
  1329. width:2
  1330. },
  1331. shared:true,
  1332. xDateFormat:'%Y-%m-%d %H:%M'
  1333. /*formatter: function() {
  1334. return '<b>'+ this.series.name +'</b>:'+
  1335. Highcharts.numberFormat(this.y, 2) +' 万kW<br/>时间:'+
  1336. Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x);
  1337. }*/
  1338. },
  1339. credits: {
  1340. enabled: false
  1341. },
  1342. plotOptions: {
  1343. spline: {
  1344. dataLabels : {
  1345. enabled :false
  1346. },
  1347. // pointPadding: 0.2,
  1348. borderWidth: 0
  1349. },
  1350. series: {
  1351. cursor: 'pointer',
  1352. marker: {
  1353. radius: 0,
  1354. symbol: 'circle' //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
  1355. }
  1356. }
  1357. },
  1358. series: [
  1359. ]
  1360. };
  1361. options11 = {
  1362. chart: {
  1363. renderTo: 'container11',
  1364. type: 'column',
  1365. //backgroundColor:'#BFDFFF',
  1366. //plotBackgroundColor:'#BFDFFF',
  1367. zoomType: 'x',
  1368. events: {
  1369. }
  1370. },title:null
  1371. ,
  1372. xAxis: {
  1373. type: 'category'
  1374. },
  1375. yAxis: [{
  1376. title: {
  1377. text: '发电量(万kWh)'
  1378. }
  1379. }],
  1380. legend: {
  1381. layout: 'vertical',
  1382. // backgroundColor: '#FFFFFF',
  1383. align: 'right',
  1384. verticalAlign: 'top',
  1385. floating: true
  1386. // shadow: true
  1387. // layout: 'vertical',
  1388. // align: 'right',
  1389. // verticalAlign: 'middle',
  1390. // borderWidth: 0
  1391. },
  1392. tooltip: {
  1393. shared:true,
  1394. xDateFormat:'%Y-%m-%d'
  1395. /*formatter: function() {
  1396. return '<b>'+ this.series.name +'</b>:'+
  1397. Highcharts.numberFormat(this.y, 2) +' 万kW<br/>时间:'+
  1398. Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x);
  1399. }*/
  1400. },
  1401. credits: {
  1402. enabled: false
  1403. },
  1404. plotOptions: {
  1405. spline: {
  1406. dataLabels : {
  1407. enabled :false
  1408. },
  1409. // pointPadding: 0.2,
  1410. borderWidth: 0
  1411. },
  1412. column: {
  1413. pointPadding: 0.2,
  1414. borderWidth: 0
  1415. },
  1416. series: {
  1417. cursor: 'pointer',
  1418. marker: {
  1419. radius: 0,
  1420. symbol: 'circle' //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
  1421. }
  1422. }
  1423. },
  1424. series: [{
  1425. name: '日发电量(单位:万kWh)',
  1426. yAxis:0
  1427. }, {
  1428. name: '日理论发电量(单位:万kWh)',
  1429. yAxis:0
  1430. }
  1431. ,
  1432. {
  1433. name: '上网电量(单位:万kWh)',
  1434. yAxis:0
  1435. },{
  1436. name: '购网电量(单位:万kWh)',
  1437. yAxis:0
  1438. }]
  1439. };
  1440. chart1 = new Highcharts.Chart(options1);
  1441. chart2 = new Highcharts.Chart(options2);
  1442. chart3 = new Highcharts.Chart(options3);
  1443. chart4 = new Highcharts.Chart(options4);
  1444. chart5 = new Highcharts.Chart(options5);
  1445. chart7= new Highcharts.Chart(options7);
  1446. wpInfoAjax();
  1447. window.setInterval(wpInfoAjax, 30000);
  1448. powerAjax();
  1449. setInterval(powerAjax, 24*60*60000);
  1450. realPowerAjax();
  1451. setInterval(realPowerAjax, 30*60000);
  1452. });
  1453. function goObjView(obj,type)
  1454. {
  1455. $("#wpId").val(obj);
  1456. //alert(obj);
  1457. if((type!=null && type!="" && type!=undefined) || type==0 )
  1458. {
  1459. setTab(1,type);
  1460. switch (type) {
  1461. case 0:
  1462. $("#hbgsdt").css("display","");
  1463. $("#cldt").css("display","none");
  1464. $("#kbdt").css("display","none");
  1465. $("#dxdt").css("display","none");
  1466. $("#kbdt4").css("display","none");
  1467. break;
  1468. case 1:
  1469. $("#hbgsdt").css("display","none");
  1470. $("#cldt").css("display","");
  1471. $("#kbdt").css("display","none");
  1472. $("#kbdt4").css("display","none");
  1473. $("#dxdt").css("display","none");
  1474. if("CL01_GC" == obj){
  1475. $("#cl01").removeClass("page_cz_chongli_acr_name_b page_cz_chongli_no2");
  1476. $("#cl01").addClass("page_cz_chongli_acr_name_b1 page_cz_chongli_no2");
  1477. }else{
  1478. $("#cl01").removeClass("page_cz_chongli_acr_name_b1 page_cz_chongli_no2");
  1479. $("#cl01").addClass("page_cz_chongli_acr_name_b page_cz_chongli_no2");
  1480. }
  1481. if("CL02_GC" == obj){
  1482. $("#cl02").removeClass("page_cz_chongli_name page_cz_chongli_no1");
  1483. $("#cl02").addClass("page_cz_chongli_name1 page_cz_chongli_no1");
  1484. }else{
  1485. $("#cl02").removeClass("page_cz_chongli_name1 page_cz_chongli_no1");
  1486. $("#cl02").addClass("page_cz_chongli_name page_cz_chongli_no1");
  1487. }
  1488. break;
  1489. case 2:
  1490. $("#hbgsdt").css("display","none");
  1491. $("#cldt").css("display","none");
  1492. $("#kbdt").css("display","");
  1493. $("#kbdt4").css("display","none");
  1494. $("#dxdt").css("display","none");
  1495. if("KB01_GC" == obj){
  1496. $("#kb01").removeClass("page_cz_kangbao_acr_name page_cz_kangbao_no1");
  1497. $("#kb01").addClass("page_cz_kangbao_acr_name1 page_cz_kangbao_no1");
  1498. }else{
  1499. $("#kb01").removeClass("page_cz_kangbao_acr_name1 page_cz_kangbao_no1");
  1500. $("#kb01").addClass("page_cz_kangbao_acr_name page_cz_kangbao_no1");
  1501. }
  1502. if("KB02_GC" == obj){
  1503. $("#kb02").removeClass("page_cz_kangbao_acr_name_b page_cz_kangbao_no2");
  1504. $("#kb02").addClass("page_cz_kangbao_acr_name_b1 page_cz_kangbao_no2");
  1505. }else{
  1506. $("#kb02").removeClass("page_cz_kangbao_acr_name_b1 page_cz_kangbao_no2");
  1507. $("#kb02").addClass("page_cz_kangbao_acr_name_b page_cz_kangbao_no2");
  1508. }
  1509. if("KB03_GC" == obj){
  1510. $("#kb03").removeClass("page_cz_kangbao_acr_name page_cz_kangbao_no3");
  1511. $("#kb03").addClass("page_cz_kangbao_acr_name1 page_cz_kangbao_no3");
  1512. }else{
  1513. $("#kb03").removeClass("page_cz_kangbao_acr_name1 page_cz_kangbao_no3");
  1514. $("#kb03").addClass("page_cz_kangbao_acr_name page_cz_kangbao_no3");
  1515. }
  1516. break;
  1517. case 3:
  1518. $("#hbgsdt").css("display","none");
  1519. $("#cldt").css("display","none");
  1520. $("#kbdt").css("display","none");
  1521. $("#kbdt4").css("display","");
  1522. $("#dxdt").css("display","none");
  1523. if("KB04_GC" == obj){
  1524. $("#kb04").removeClass("page_cz_kangbao_name page_cz_kangbao_no4");
  1525. $("#kb04").addClass("page_cz_kangbao_name1 page_cz_kangbao_no4");
  1526. }else{
  1527. $("#kb04").removeClass("page_cz_kangbao_name1 page_cz_kangbao_no4");
  1528. $("#kb04").addClass("page_cz_kangbao_name page_cz_kangbao_no4");
  1529. }
  1530. break;
  1531. case 4:
  1532. $("#hbgsdt").css("display","none");
  1533. $("#cldt").css("display","none");
  1534. $("#kbdt").css("display","none");
  1535. $("#kbdt4").css("display","none");
  1536. $("#dxdt").css("display","");
  1537. break;
  1538. case 5:
  1539. break;
  1540. }
  1541. }else{
  1542. if(obj=="0"){
  1543. $("#hbgs_bt").css("display","");
  1544. $("#cl_bt").css("display","none");
  1545. $("#kb_bt").css("display","none");
  1546. $("#dx_bt").css("display","none");
  1547. }else if(obj=="1"){
  1548. $("#hbgs_bt").css("display","none");
  1549. $("#cl_bt").css("display","");
  1550. $("#kb_bt").css("display","none");
  1551. $("#dx_bt").css("display","none");
  1552. }else if(obj=="2"){
  1553. $("#hbgs_bt").css("display","none");
  1554. $("#cl_bt").css("display","none");
  1555. $("#kb_bt").css("display","");
  1556. $("#dx_bt").css("display","none");
  1557. }else if(obj=="3"){
  1558. }else if(obj=="4") {
  1559. $("#hbgs_bt").css("display","none");
  1560. $("#cl_bt").css("display","none");
  1561. $("#kb_bt").css("display","none");
  1562. $("#dx_bt").css("display","");
  1563. }
  1564. }
  1565. wpInfoAjax();
  1566. powerAjax();
  1567. realPowerAjax();
  1568. }