123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486 |
-
- var chart1;
- var chart2;
- var chart3;
- var chart4;
- var chart5;
- var options1;
- var options2;
- var options3;
- var options4;
- var options5;
- Highcharts.setOptions({
- global : {
- useUTC : false
- }
- });
- String.prototype.endWith=function(oString){
- var reg=new RegExp(oString+"$");
- return reg.test(this);
- }
- function windtowerAjax() {
-
- var wpid=$("#wpid").val();
- $.ajax({
- url : "windtowerAjax.action?windfarm="+wpid ,
- type : "post",
- cache : false,
- dataType : "json",
- data : {},
- ifModified : false,
- success : function(res) {
- $("#fs10").html(res["fs10"]);
- $("#fs30").html(res["fs30"]);
- $("#fs50").html(res["fs50"]);
-
- $("#fs70").html(res["fs70"]);
- $("#fs80").html(res["fs80"]);
-
- $("#fx10").html(res["fx10"]);
- $("#fx30").html(res["fx30"]);
- $("#fx50").html(res["fx50"]);
- $("#fx70").html(res["fx70"]);
- $("#fx80").html(res["fx80"]);
-
- $("#wd").html(res["wd"]);
- $("#sd").html(res["sd"]);
- $("#yq").html(res["yq"]);
-
- if(chart3.series[0])
- {
- var point = chart3.series[0].points[0];
- point.update(res["wd"]);
- }
- if(chart4.series[0])
- {
- var point = chart4.series[0].points[0];
- point.update(res["sd"]);
- }
- if(chart5.series[0])
- {
- var point = chart5.series[0].points[0];
- point.update(res["yq"]);
- }
- }
- });
- }
- function daychart() {
- var wpid=$("#wpid").val();
- var url = "dayfzy.action?windfarm="+wpid ;
- $.ajax( {
- url : url,
- type : "post",
- cache : false,
- dataType : "json",
- data : {},
- ifModified : false,
- success : function(result) {
- var data1 = [];
- var jfpl=result.jfpl;
- $.each(result.data, function(m, obj) {
- if (obj.data1 != null) {
- data1.push(parseFloat(obj.data1));
- }
-
- });
- if(null !=options1.series[0])
- {
- options1.series[0].data = data1;
- }
-
- options1.series[0].name = jfpl;
- chart1 = new Highcharts.Chart(options1);
- }
- });
- }
- function monthchart() {
- var wpid=$("#wpid").val();
- var url = "monthfzy.action?windfarm="+wpid ;
- $.ajax( {
- url : url,
- type : "post",
- cache : false,
- dataType : "json",
- data : {},
- ifModified : false,
- success : function(result) {
- var data1 = [];
- var jfpl=result.jfpl;
- $.each(result.data, function(m, obj) {
- if (obj.data1 != null) {
- data1.push(parseFloat(obj.data1));
- }
-
- });
- if(null !=options2.series[0])
- {
- options2.series[0].data = data1;
- }
-
- options2.series[0].name = jfpl;
- chart2 = new Highcharts.Chart(options2);
- }
- });
- }
- $(document).ready(
- function() {
- options3 = {
- chart: {
- renderTo: 'container3',
- type: 'solidgauge',
- events: {
- click: function (event) {
- findPJFSDetail();
- }
- }
- },
-
- title: null,
-
- pane: {
- center: ['50%', '75%'],
- size: '100%',
- startAngle: -90,
- endAngle: 90,
- background: {
- backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || '#EEE',
- innerRadius: '60%',
- outerRadius: '100%',
- shape: 'arc'
- }
- },
- tooltip: {
- enabled: false
- },
-
- // the value axis
- yAxis: {
- stops: [
- [0.1, '#55BF3B'], // green
- [0.5, '#DDDF0D'], // yellow
- [0.9, '#DF5353'] // red
- ],
- lineWidth: 0,
- minorTickInterval: null,
- tickPixelInterval: 400,
- tickWidth: 0,
- title: {
- y: -10
- },
- labels: {
- y: 0
- },
- min: -50,
- max: 50,
- title: {
- text: null
- }
- },
-
- plotOptions: {
- solidgauge: {
- dataLabels: {
- y: 15,
- borderWidth: 0,
- useHTML: true
- }
- }
- },
- credits: {
- enabled: false
- },
-
- series: [{
- name: '温度',
- data: [12],
- dataLabels: {
- format: '<div style="text-align:center"><span style="font-size:18px;color:' +
- ((Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black') + '">{y}</span><br/>' +
- '<span style="font-size:12px;color:silver">温度</span></div>'
- },
- tooltip: {
- valueSuffix: ' '
- }
- }]
-
- };
- options4 = {
- chart: {
- renderTo: 'container4',
- type: 'solidgauge',
- events: {
- click: function (event) {
- findBZGLDetail();
- }
- }
- },
-
- title: null,
-
- pane: {
- center: ['50%', '75%'],
- size: '100%',
- startAngle: -90,
- endAngle: 90,
- background: {
- backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || '#EEE',
- innerRadius: '60%',
- outerRadius: '100%',
- shape: 'arc'
- }
- },
- tooltip: {
- enabled: false
- },
-
- // the value axis
- yAxis: {
- stops: [
- [0.1, '#55BF3B'], // green
- [0.5, '#DDDF0D'], // yellow
- [0.9, '#DF5353'] // red
- ],
- lineWidth: 0,
- minorTickInterval: null,
- tickPixelInterval: 400,
- tickWidth: 0,
- title: {
- y: -10
- },
- labels: {
- y: 0
- },
- min: -200,
- max: 200,
- title: {
- text: null
- }
- },
-
- plotOptions: {
- solidgauge: {
- dataLabels: {
- y: 15,
- borderWidth: 0,
- useHTML: true
- }
- }
- },
- credits: {
- enabled: false
- },
-
- series: [{
- name: '湿度',
- data: [12],
- dataLabels: {
- format: '<div style="text-align:center"><span style="font-size:18px;color:' +
- ((Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black') + '">{y}</span><br/>' +
- '<span style="font-size:12px;color:silver">湿度</span></div>'
- },
- tooltip: {
- valueSuffix: ' '
- }
- }]
-
-
- };
- options5 = {
- chart: {
- renderTo: 'container5',
- type: 'solidgauge',
- events: {
- click: function (event) {
- findSJGLDetail();
- }
- }
- },
-
- title: null,
-
- pane: {
- center: ['50%', '75%'],
- size: '100%',
- startAngle: -90,
- endAngle: 90,
- background: {
- backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || '#EEE',
- innerRadius: '60%',
- outerRadius: '100%',
- shape: 'arc'
- }
- },
- tooltip: {
- enabled: false
- },
-
- // the value axis
- yAxis: {
- stops: [
- [0.1, '#55BF3B'], // green
- [0.5, '#DDDF0D'], // yellow
- [0.9, '#DF5353'] // red
- ],
- lineWidth: 0,
- minorTickInterval: null,
- tickPixelInterval: 400,
- tickWidth: 0,
- title: {
- y: -10
- },
- labels: {
- y: 0
- },
- min: 0,
- max: 500,
- title: {
- text: null
- }
- },
-
- plotOptions: {
- solidgauge: {
- dataLabels: {
- y: 15,
- borderWidth: 0,
- useHTML: true
- }
- }
- },
- credits: {
- enabled: false
- },
-
- series: [{
- name: '气压',
- data: [12],
- dataLabels: {
- format: '<div style="text-align:center"><span style="font-size:18px;color:' +
- ((Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black') + '">{y}</span><br/>' +
- '<span style="font-size:12px;color:silver">气压</span></div>'
- },
- tooltip: {
- valueSuffix: ' '
- }
- }]
-
- };
-
- options1 = {
- chart: {
- renderTo : 'fzy1',
- polar: true,
- type: 'area'
- },
-
- title: {
- text: '',
- x: 0
- },
-
- pane: {
- size: '80%'
- },
-
- xAxis: {
- categories: ['北', '北北东', '北东', '东北东','东', '东南东',
- '南东', '南南东', '南','南南西', '南西',
- '西南西', '西', '西北西', '北西','北北西'
- ],
- tickmarkPlacement: 'on',
- lineWidth: 0
- },
-
- yAxis: {
- gridLineInterpolation: 'polygon',
- lineWidth: 0,
- min: 0
- },
-
- tooltip: {
- shared: true,
- pointFormat: '<span style="color:{series.color}"> <b>{point.y:,.0f}</b><br/>'
- },
-
-
- series: [{
- name: 'name1',
- data: [],
- pointPlacement: 'on'
- }]
- }
- options2 = {
- chart: {
- renderTo : 'fzy2',
- polar: true,
- type: 'area'
- },
-
- title: {
- text: '',
- x: 0
- },
-
- pane: {
- size: '80%'
- },
-
- xAxis: {
- categories: ['北', '北北东', '北东', '东北东','东', '东南东',
- '南东', '南南东', '南','南南西', '南西',
- '西南西', '西', '西北西', '北西','北北西'
- ],
- tickmarkPlacement: 'on',
- lineWidth: 0
- },
-
- yAxis: {
- gridLineInterpolation: 'polygon',
- lineWidth: 0,
- min: 0
- },
-
- tooltip: {
- shared: true,
- pointFormat: '<span style="color:{series.color}"> <b>{point.y:,.0f}</b><br/>'
- },
-
-
- series: [{
- name: 'name1',
- data: [],
- pointPlacement: 'on'
- }]
- }
- chart1 = new Highcharts.Chart(options1);
- chart2 = new Highcharts.Chart(options2);
- chart3 = new Highcharts.Chart(options3);
- chart4 = new Highcharts.Chart(options4);
- chart5 = new Highcharts.Chart(options5);
-
-
- windtowerAjax();
- window.setInterval(windtowerAjax, 60000);
-
- daychart();
- monthchart();
- window.setInterval(daychart, 60000);
- wpAllInfoAjax();
- window.setInterval(wpAllInfoAjax, 60000);
- });
|