fix:修改问题
1 panel页面渲染chart时直接显示占好位置,不根据滚动条监测懒加载chart图表。只有当chart 出现在 浏览器窗口后才请求prom接口获取数据。
This commit is contained in:
@@ -273,6 +273,18 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
getCurrentTime(){
|
||||
let timeTypeId = this.showTime.id;
|
||||
if(timeTypeId===0){
|
||||
return this.searchTime;
|
||||
}else {
|
||||
if(!timeTypeId){timeTypeId = 4;}
|
||||
let currentTime = this.timeData.find(item => item.id === timeTypeId);
|
||||
this.setSearchTime(currentTime.type,currentTime.value);
|
||||
return this.searchTime;
|
||||
}
|
||||
|
||||
},
|
||||
setSearchTime(type,val){
|
||||
if(type==='minute'){
|
||||
let startTime = bus.timeFormate(new Date(bus.computeTimezone(new Date().getTime())).setMinutes(new Date(bus.computeTimezone(new Date().getTime())).getMinutes() - val),'yyyy-MM-dd hh:mm:ss');
|
||||
|
||||
Reference in New Issue
Block a user