fix:修改BUG

dashboard模块
1.预览模块loading统一,及预览全屏按时间查询不显示数据
2.修改metric及label接口,并把label修改为owl的样式
3.调整新增图表模块样式(宽度、高等)
This commit is contained in:
hanyuxia
2020-02-21 17:32:59 +08:00
parent 7c0583a352
commit b1a426fb36
8 changed files with 390 additions and 310 deletions

View File

@@ -243,6 +243,9 @@
},
watch: {},
methods: {
setDivFirstShow(showDiv){
this.divFirstShow = showDiv;
},
clickLegend(legendName,index){
if (this.echartStore) {
this.echartStore.dispatchAction({
@@ -654,7 +657,7 @@
this.echartStore.setOption(option);//创建图表
//this.echartStore.hideLoading();
this.$refs['localLoading'+this.chartIndex].endLoading();
if(legend && legend.length>0){
if(legend){
this.legendList = [];
legend.forEach((item, i) => {
const legend = {
@@ -721,14 +724,16 @@
});
*/
// eslint-disable-next-line
this.echartModalStore.clear();
if(this.echartModalStore){
this.echartModalStore.clear();
}
option.title = {};
this.echartModalStore.setOption(option);//显示全屏界面
//this.echartModalStore.hideLoading();
this.showLegend = true;
this.$refs['localLoadingScreen'+this.chartIndex].endLoading();
//this.echartModalStore.resize({height:chartInfo.height});
if(legend && legend.length>0){
if(legend){
this.screenLegendList = [];
legend.forEach((item, i) => {
const legend = {
@@ -950,6 +955,9 @@
visible: true,
threshold: null,
};
if(!this.data.type){
this.data.type='line';
}
res.forEach((response) => {
if (response.status === 'success') {
if (response.data.result) {
@@ -1029,10 +1037,7 @@
}
}).catch((error) => {
if (error) {
this.$message.warning({
content: this.$t("tip.refreshLater"),//'Please refesh later',//请稍后刷新
duration: 3,
});
this.$message.error(error.toString());
}
});
});
@@ -1050,6 +1055,8 @@
// const chartBox = document.getElementById('lineChartDiv'+this.chartIndex);
//tableBox.style.height = `${height-75}px`;
});
this.clearData();
this.firstShow = false;
this.$refs['localLoading'+this.chartIndex].startLoading();
this.divFirstShow = true;