|
@@ -163,7 +163,9 @@ export default {
|
|
|
dataY3: [],
|
|
|
loadY1: [],
|
|
|
loadY2: [],
|
|
|
- loadY3: []
|
|
|
+ loadY3: [],
|
|
|
+ dataY1Min:'',
|
|
|
+ dataY1Max:''
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -175,6 +177,28 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ getMax(arr) {
|
|
|
+ var max = arr[0]
|
|
|
+ for (var i = 0; i < arr.length; i++) {
|
|
|
+ if (max < arr[i]) {
|
|
|
+ max = arr[i]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return max
|
|
|
+ },
|
|
|
+ getMin(arr) {
|
|
|
+ var min = arr[0]
|
|
|
+ for (var i = 0; i < arr.length; i++) {
|
|
|
+ if (arr[i] == '') {
|
|
|
+ arr.splice(arr[i], 1)
|
|
|
+ }
|
|
|
+ if (min > arr[i]) {
|
|
|
+ min = arr[i]
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return min
|
|
|
+ },
|
|
|
getQuickData() {
|
|
|
let params = {
|
|
|
getParams: {
|
|
@@ -199,8 +223,29 @@ export default {
|
|
|
this.dataY3.push(el.maxTindoor);
|
|
|
this.loadY1.push(el.nowPlantLoad?(el.nowPlantLoad=='-9999'?undefined:el.nowPlantLoad):undefined);
|
|
|
this.loadY2.push(el.predictedLoadUpLimit?(el.predictedLoadUpLimit=='-9999'?undefined:el.predictedLoadUpLimit):undefined);
|
|
|
- this.loadY3.push(el.redictedLoadDownLimit?(el.redictedLoadDownLimit == '-9999'?undefined:el.redictedLoadDownLimit):undefined);
|
|
|
+ this.loadY3.push(el.redictedLoadDownLimit?(el.redictedLoadDownLimit == '-9999'?undefined:el.redictedLoadDownLimit):undefined);
|
|
|
});
|
|
|
+ let arr = []
|
|
|
+ arr = arr
|
|
|
+ .concat(this.dataY1)
|
|
|
+ .concat(this.dataY2)
|
|
|
+ .concat(this.dataY3)
|
|
|
+ this.dataY1Min = this.getMin(arr)
|
|
|
+ this.dataY1Max = this.getMax(arr)
|
|
|
+ let minG = parseInt(this.dataY1Min % 10),
|
|
|
+ minS = parseInt((this.dataY1Min % 100) / 10),
|
|
|
+ maxG = parseInt(this.dataY1Max % 10),
|
|
|
+ maxS = parseInt((this.dataY1Max % 100) / 10)
|
|
|
+ if (minG > 5) {
|
|
|
+ this.dataY1Min = String(minS) + '5'
|
|
|
+ } else if (minG <= 5) {
|
|
|
+ this.dataY1Min = String(minS) + '0'
|
|
|
+ }
|
|
|
+ if (maxG > 5) {
|
|
|
+ this.dataY1Max = String(maxS + 1) + '0'
|
|
|
+ } else if (maxG <= 5) {
|
|
|
+ this.dataY1Max = String(maxS) + '0'
|
|
|
+ }
|
|
|
this.drawSnapshotssLeft();
|
|
|
this.drawSnapshotssRight();
|
|
|
},
|
|
@@ -232,6 +277,9 @@ export default {
|
|
|
},
|
|
|
yAxis: {
|
|
|
type: "value",
|
|
|
+ min: Number(this.dataY1Min),
|
|
|
+ max: Number(this.dataY1Max),
|
|
|
+ interval: 5,
|
|
|
axisLabel:{formatter:'{value} ℃'}
|
|
|
},
|
|
|
series: [
|