Compare commits
2 Commits
94516f4b47
...
d353df9c1d
Author | SHA1 | Date |
---|---|---|
|
d353df9c1d | |
|
67b6678033 |
|
@ -113,7 +113,6 @@ export default {
|
|||
})
|
||||
},
|
||||
handleClick(val){
|
||||
console.log('handleClick',val)
|
||||
let that = this;
|
||||
that.mpointList.forEach(item=>{
|
||||
if(item.nickname == that.activeName){
|
||||
|
@ -128,11 +127,22 @@ export default {
|
|||
params.timex__lte = that.endTime;
|
||||
params.page = 0;
|
||||
that.$API.enm.mplogx.req(params).then((res) => {
|
||||
let xAxisData = [],seriesData = [];
|
||||
res.forEach(item=>{
|
||||
that.option.xAxis.data.unshift(item.timex);
|
||||
xAxisData.unshift(item.timex);
|
||||
let value = Number(item.val_float).toFixed(3);
|
||||
that.option.series.data.unshift(value);
|
||||
seriesData.unshift(value);
|
||||
})
|
||||
function getMinValue(arr) {
|
||||
return Math.min.apply(null, arr);
|
||||
}
|
||||
if(that.activeName.indexOf("温度") != -1){
|
||||
let minNum = getMinValue(seriesData);
|
||||
console.log(minNum);
|
||||
that.option.yAxis.min = minNum;
|
||||
}
|
||||
that.option.xAxis.data = xAxisData;
|
||||
that.option.series.data = seriesData;
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue