feat:添加自动刷新按钮 以及 aler rule的根据告警数量排序的功能

This commit is contained in:
zhangyu
2020-11-30 14:34:26 +08:00
parent c2d82393e6
commit 25276590b6
7 changed files with 38 additions and 12 deletions

View File

@@ -13,6 +13,7 @@
<div class="week">{{sysWeek}}</div>
<div class="sys-date">{{sysDate}}</div>
</div>
<pick-time :showTimePicker="false" class="float-right pickTime margin-l-20" :refresh-data-func="setFreshDataTimer" v-model="searchTime" :use-chart-unit="false" ref="pickTime"></pick-time>
<div class="operation" @click="switchFullScreen" ><span ><i class="nz-icon screen-icon" :class="{'nz-icon-maxview':!isFullScreen,'nz-icon-exit-full-screen':isFullScreen}"></i></span></div>
</div>
</div>
@@ -292,6 +293,7 @@
x: 0,
y: 0
},
searchTime:bus.getTimezontDateRange(),
}
},
filters: {
@@ -351,16 +353,21 @@
]
},
setFreshDataTimer:function(){
this.freshDataTimer=setInterval(()=>{
// this.freshDataTimer=setInterval(()=>{
// if(this.$refs.overviewLoading){
// this.$refs.overviewLoading.startLoading();
// }
// Promise.all(this.initData()).then(()=>{
// if(this.$refs.overviewLoading){
// this.$refs.overviewLoading.endLoading();
// }
// })
// },5*60*1000)
Promise.all(this.initData()).then(()=>{
if(this.$refs.overviewLoading){
this.$refs.overviewLoading.startLoading();
this.$refs.overviewLoading.endLoading();
}
Promise.all(this.initData()).then(()=>{
if(this.$refs.overviewLoading){
this.$refs.overviewLoading.endLoading();
}
})
},5*60*1000)
})
},
querySystemState:function(){
return new Promise(resolve => {
@@ -1584,7 +1591,7 @@
this.initData();
this.querySystemState().then(()=>{
this.initDate();
this.setFreshDataTimer();
// this.setFreshDataTimer();
})
// window.onresize = () => {