Compare commits
No commits in common. "d353df9c1d57453c467fb4528a0baddcf1766dce" and "94516f4b47ade50d6281fd5f05253f2f7d4e48ad" have entirely different histories.
d353df9c1d
...
94516f4b47
|
|
@ -113,6 +113,7 @@ export default {
|
|||
})
|
||||
},
|
||||
handleClick(val){
|
||||
console.log('handleClick',val)
|
||||
let that = this;
|
||||
that.mpointList.forEach(item=>{
|
||||
if(item.nickname == that.activeName){
|
||||
|
|
@ -127,22 +128,11 @@ export default {
|
|||
params.timex__lte = that.endTime;
|
||||
params.page = 0;
|
||||
that.$API.enm.mplogx.req(params).then((res) => {
|
||||
let xAxisData = [],seriesData = [];
|
||||
res.forEach(item=>{
|
||||
xAxisData.unshift(item.timex);
|
||||
that.option.xAxis.data.unshift(item.timex);
|
||||
let value = Number(item.val_float).toFixed(3);
|
||||
seriesData.unshift(value);
|
||||
that.option.series.data.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