fix: 修复endpoint-query改时间数据不刷新的问题

This commit is contained in:
陈劲松
2020-04-27 21:51:02 +08:00
parent e596dfbcce
commit e7932b3115
4 changed files with 6 additions and 2 deletions

View File

@@ -448,6 +448,7 @@
axiosArr.push(axios.get("/prom/api/v1/query_range?query="+endpoint.element+"&start="+start+"&end="+end+"&step="+step)); axiosArr.push(axios.get("/prom/api/v1/query_range?query="+endpoint.element+"&start="+start+"&end="+end+"&step="+step));
} }
this.legend=[]; this.legend=[];
this.chartDatas = [];
axios.all(axiosArr).then(res =>{ axios.all(axiosArr).then(res =>{
res.forEach((response,promIndex)=>{ res.forEach((response,promIndex)=>{
if (response.status == 200) { if (response.status == 200) {

View File

@@ -517,7 +517,6 @@
} }
} }
this.moduleList = response.data.list; this.moduleList = response.data.list;
console.info(this.moduleList)
} }
}); });
}, },

View File

@@ -299,6 +299,11 @@
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4()); return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
}, },
clearChart() {
if(this.chart) {
this.chart.clear();
}
}
}, },
mounted() { mounted() {
this.chart=echarts.init(document.getElementById(this.chartId)); this.chart=echarts.init(document.getElementById(this.chartId));

View File

@@ -467,7 +467,6 @@
// this.$refs.projectLeft.setActiveNames([]); // this.$refs.projectLeft.setActiveNames([]);
}else{ }else{
console.info(this.currentProject)
this.currentProjectTitle=this.currentProject.name+"-"+this.currentProject.id this.currentProjectTitle=this.currentProject.name+"-"+this.currentProject.id
} }
}, },