123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548 |
- var ycgl = new Array();
- var ycgl2 = new Array();
- var ycgl3 = new Array();
- var ycgl4 = new Array();
- var d = new Array();
- function getCurve() {
- var windfarm = $("#windfarm").val();
- var ssdate2 = $("#ssdate2").val();
- var url = "getCurveAction.action?windfarm=" + windfarm + "&ssdate2="
- + ssdate2;
- $.getJSON(url, function(data) {
- if (data != null) {
- for ( var i = 0; i < data.length; i++) {
- ycgl[i] = Math.round(data[i].var1 * 100) / 100;
- ycgl2[i] = Math.round(data[i].var22 * 100) / 100;
- ycgl3[i] = Math.round(data[i].var33 * 100) / 100;
- ycgl4[i] = Math.round(data[i].var44 * 100) / 100;
- }
- }
- });
- }
- var ycgl1 = new Array();
- function getCurve2() {
- var windfarm = $("#windfarm").val();
- var ssdate2 = $("#ssdate2").val();
- var url = "getCurveAction2.action?windfarm=" + windfarm + "&ssdate2="
- + ssdate2;
- $.getJSON(url, function(data) {
- if (data != null) {
- for ( var i = 0; i < data.length; i++) {
- ycgl1[i] = Math.round(data[i].var1 * 100) / 100;
- d[i] = data[i].d;
- }
- }
- });
- }
- $(document).ready(
- function() {
- $.ajaxSetup( {
- async : false
- });
- getCurve();
- getCurve2();
- $.ajaxSetup( {
- async : true
- });
- showJqGrid();
- showJqGrid1();
- showJqGrid2();
- showJqGrid3();
- var sure = $("#sure").val();
- if (sure == 0) {
- } else if (sure == 1) {
- $("#div1").text("短期预测(已确认此方案)");
- $("#button").hide();
- $("#button2").hide();
- $("#button3").hide();
- $("#button4").hide();
- } else if (sure == 2) {
- $("#div2").text("短期预测(拟合)(已确认此方案)");
- $("#button").hide();
- $("#button2").hide();
- $("#button3").hide();
- $("#button4").hide();
- } else if (sure == 3) {
- $("#div3").text("超短期预测(已确认此方案)");
- $("#button").hide();
- $("#button2").hide();
- $("#button3").hide();
- $("#button4").hide();
- } else if (sure == 4) {
- $("#div4").text("超短期预测(拟合)(已确认此方案)");
- $("#button").hide();
- $("#button2").hide();
- $("#button3").hide();
- $("#button4").hide();
- }
- $('#container').highcharts(
- {
- chart : {
- type : 'spline'
- },
- title : {
- text : '短期预测'
- },
- xAxis : {
- categories : [ '0:00', '1:00', '2:00', '3:00',
- '4:00', '5:00', '6:00', '7:00', '8:00',
- '9:00', '10:00', '11:00', '12:00', '13:00',
- '14:00', '15:00', '16:00', '17:00',
- '18:00', '19:00', '20:00', '21:00',
- '22:00', '23:00', '23:45' ]
- },
- yAxis : {
- labels : {
- formatter : function() {
- return this.value
- }
- },
- title : {
- text : '短期预测'
- }
- },
- tooltip : {
- crosshairs : true,
- shared : true
- },
- credits : {
- enabled : false
- },
- plotOptions : {
- spline : {
- marker : {
- radius : 3,
- lineColor : '#666666',
- lineWidth : 1
- }
- }
- },
- series : [ {
- name : '短期预测功率(单位:MW)',
- marker : {
- enabled : false,
- name : '短期预测功率(单位:MW)'
- },
- data : ycgl
- }, {
- name : '实际功率(单位:MW)',
- marker : {
- enabled : false,
- name : '实际功率(单位:MW)'
- },
- data : ycgl3
- }, {
- name : '实际风速',
- marker : {
- enabled : false,
- name : '实际风速'
- },
- data : ycgl2
- } ]
- });
- $('#container1').highcharts(
- {
- chart : {
- type : 'spline'
- },
- title : {
- text : '短期预测(拟合)'
- },
- xAxis : {
- categories : [ '0:00', '1:00', '2:00', '3:00',
- '4:00', '5:00', '6:00', '7:00', '8:00',
- '9:00', '10:00', '11:00', '12:00', '13:00',
- '14:00', '15:00', '16:00', '17:00',
- '18:00', '19:00', '20:00', '21:00',
- '22:00', '23:00', '23:45' ]
- },
- yAxis : {
- labels : {
- formatter : function() {
- return this.value
- }
- },
- title : {
- text : '短期预测(拟合)'
- }
- },
- credits : {
- enabled : false
- },
- tooltip : {
- crosshairs : true,
- shared : true
- },
- plotOptions : {
- spline : {
- marker : {
- radius : 3,
- lineColor : '#666666',
- lineWidth : 1
- }
- }
- },
- series : [ {
- name : '拟合功率(单位:MW)',
- marker : {
- enabled : false,
- name : '拟合功率(单位:MW)'
- },
- data : ycgl4
- }, {
- name : '实际功率(单位:MW)',
- marker : {
- enabled : false,
- name : '实际功率(单位:MW)'
- },
- data : ycgl3
- }, {
- name : '实际风速',
- marker : {
- enabled : false,
- name : '实际风速'
- },
- data : ycgl2
- } ]
- });
- $('#container2').highcharts(
- {
- chart : {
- type : 'spline'
- },
- title : {
- text : '超短期预测'
- },
- xAxis : {
- categories : [ '0:00', '1:00', '2:00', '3:00',
- '4:00', '5:00', '6:00', '7:00', '8:00',
- '9:00', '10:00', '11:00', '12:00', '13:00',
- '14:00', '15:00', '16:00', '17:00',
- '18:00', '19:00', '20:00', '21:00',
- '22:00', '23:00', '23:45' ]
- },
- yAxis : {
- labels : {
- formatter : function() {
- return this.value
- }
- },
- title : {
- text : '超短期预测'
- }
- },
- credits : {
- enabled : false
- },
- tooltip : {
- crosshairs : {
- width : 2
- },
- shared : true
- },
- plotOptions : {
- spline : {
- marker : {
- radius : 3,
- lineColor : '#666666',
- lineWidth : 1
- }
- }
- },
- series : [ {
- name : '超短期预测功率(单位:MW)',
- marker : {
- symbol : 'square',
- enabled : false,
- name : '超短期预测功率(单位:MW)'
- },
- data : ycgl1
- }, {
- name : '实际功率(单位:MW)',
- marker : {
- enabled : false,
- name : '实际功率(单位:MW)'
- },
- data : ycgl3
- }, {
- name : '实际风速',
- marker : {
- enabled : false,
- name : '实际风速'
- },
- data : ycgl2
- } ]
- });
- $('#container3').highcharts(
- {
- chart : {
- type : 'spline'
- },
- title : {
- text : '超短期预测(拟合)'
- },
- xAxis : {
- categories : [ '0:00', '1:00', '2:00', '3:00',
- '4:00', '5:00', '6:00', '7:00', '8:00',
- '9:00', '10:00', '11:00', '12:00', '13:00',
- '14:00', '15:00', '16:00', '17:00',
- '18:00', '19:00', '20:00', '21:00',
- '22:00', '23:00', '23:45' ]
- },
- yAxis : {
- labels : {
- formatter : function() {
- return this.value
- }
- },
- title : {
- text : '超短期预测(拟合)'
- }
- },
- credits : {
- enabled : false
- },
- tooltip : {
- crosshairs : true,
- shared : true
- },
- plotOptions : {
- spline : {
- marker : {
- radius : 3,
- lineColor : '#666666',
- lineWidth : 1
- }
- }
- },
- series : [ {
- name : '拟合功率(单位:MW)',
- marker : {
- enabled : false,
- name : '拟合功率(单位:MW)'
- },
- data : ycgl4
- }, {
- name : '实际功率(单位:MW)',
- marker : {
- enabled : false,
- name : '实际功率(单位:MW)'
- },
- data : ycgl3
- }, {
- name : '实际风速',
- marker : {
- enabled : false,
- name : '实际风速'
- },
- data : ycgl2
- } ]
- });
- });
- function showJqGrid() {
- var furnishedno = $("#furnishedno").val();
- var temp = 'getInfo.action?furnishedno=' + furnishedno + "&type=短期";
- var url = encodeURI(encodeURI(temp));
- var id = 'gridTable';
- var datatype = 'json';
- var colNames = [ '开始时间', '结束时间', '预测内容', 'sure' ];
- var colModel = [ {
- name : 'begindate',
- index : 'begindate',
- width : 150,
- align : 'center'
- }, {
- name : 'enddate',
- index : 'enddate',
- width : 150,
- align : 'center'
- }, {
- name : 'predictioncontent',
- index : 'predictioncontent',
- width : 115,
- align : 'center'
- }, {
- name : 'sure',
- index : 'sure',
- width : 115,
- align : 'center',
- hidden : true
- } ];
- var caption = '';
- var sortname = 'begindate';
- var gridPagerID = 'gridPager';
- var sortorder = 'desc';
- var height = 'auto';
- var width = 'auto';
- var rownumbers = true;
- var multiselect = false;
- myJqGrid(id, url, datatype, colNames, colModel, caption, sortname,
- gridPagerID, sortorder, height, width, multiselect, rownumbers);
- }
- function showJqGrid1() {
- var furnishedno = $("#furnishedno").val();
- var temp = 'getInfo.action?furnishedno=' + furnishedno + "&type=短期拟合";
- var url = encodeURI(encodeURI(temp));
- var id = 'gridTable1';
- var datatype = 'json';
- var colNames = [ '开始时间', '结束时间', '预测内容', 'sure' ];
- var colModel = [ {
- name : 'begindate',
- index : 'begindate',
- width : 150,
- align : 'center'
- }, {
- name : 'enddate',
- index : 'enddate',
- width : 150,
- align : 'center'
- }, {
- name : 'predictioncontent',
- index : 'predictioncontent',
- width : 115,
- align : 'center'
- }, {
- name : 'sure',
- index : 'sure',
- width : 115,
- align : 'center',
- hidden : true
- } ];
- var caption = '';
- var sortname = 'begindate';
- var gridPagerID = 'gridPager1';
- var sortorder = 'desc';
- var height = 'auto';
- var width = 'auto';
- var rownumbers = true;
- var multiselect = false;
- myJqGrid(id, url, datatype, colNames, colModel, caption, sortname,
- gridPagerID, sortorder, height, width, multiselect, rownumbers);
- }
- function showJqGrid2() {
- var furnishedno = $("#furnishedno").val();
- var temp = 'getInfo.action?furnishedno=' + furnishedno + "&type=超短期";
- var url = encodeURI(encodeURI(temp));
- var id = 'gridTable2';
- var datatype = 'json';
- var colNames = [ '开始时间', '结束时间', '预测内容', 'sure' ];
- var colModel = [ {
- name : 'begindate',
- index : 'begindate',
- width : 150,
- align : 'center'
- }, {
- name : 'enddate',
- index : 'enddate',
- width : 150,
- align : 'center'
- }, {
- name : 'predictioncontent',
- index : 'predictioncontent',
- width : 115,
- align : 'center'
- }, {
- name : 'sure',
- index : 'sure',
- width : 115,
- align : 'center',
- hidden : true
- } ];
- var caption = '';
- var sortname = 'begindate';
- var gridPagerID = 'gridPager2';
- var sortorder = 'desc';
- var height = 'auto';
- var width = 'auto';
- var rownumbers = true;
- var multiselect = false;
- myJqGrid(id, url, datatype, colNames, colModel, caption, sortname,
- gridPagerID, sortorder, height, width, multiselect, rownumbers);
- }
- function showJqGrid3() {
- var furnishedno = $("#furnishedno").val();
- var temp = 'getInfo.action?furnishedno=' + furnishedno + "&type=超短期拟合";
- var url = encodeURI(encodeURI(temp));
- var id = 'gridTable3';
- var datatype = 'json';
- var colNames = [ '开始时间', '结束时间', '预测内容', 'sure' ];
- var colModel = [ {
- name : 'begindate',
- index : 'begindate',
- width : 150,
- align : 'center'
- }, {
- name : 'enddate',
- index : 'enddate',
- width : 150,
- align : 'center'
- }, {
- name : 'predictioncontent',
- index : 'predictioncontent',
- width : 115,
- align : 'center'
- }, {
- name : 'sure',
- index : 'sure',
- width : 115,
- align : 'center',
- hidden : true
- } ];
- var caption = '';
- var sortname = 'begindate';
- var gridPagerID = 'gridPager3';
- var sortorder = 'desc';
- var height = 'auto';
- var width = 'auto';
- var rownumbers = true;
- var multiselect = false;
- myJqGrid(id, url, datatype, colNames, colModel, caption, sortname,
- gridPagerID, sortorder, height, width, multiselect, rownumbers);
- }
|