fix:修改BUG

dashboard模块
1.修改问题:调整table类型图表空白区域大小导致图表间间隔变大
2.修改问题:曲线图刚加载时挤在左上角一团
3.曲线图显示加载2次
This commit is contained in:
hanyuxia
2020-02-25 14:33:51 +08:00
parent 5fd17fca27
commit 76706e2f8e
3 changed files with 14 additions and 19 deletions

View File

@@ -313,6 +313,7 @@
this.chartType = 'line';
}
let chartId = '';
if (chartSite === 'local') {
this.echartStore = echarts.init(ele);
chartId='lineChartArea';
@@ -663,11 +664,6 @@
return obj;
});
*/
this.echartStore.clear();
//option.title = title;
this.echartStore.setOption(option);//创建图表
//this.echartStore.hideLoading();
this.$refs['localLoading'+this.chartIndex].endLoading();
if(legend){
this.legendList = [];
legend.forEach((item, i) => {
@@ -686,8 +682,14 @@
}else {
this.echartStore.resize({height:(chartInfo.height-divHeight-25-35)});
}
this.echartStore.clear();
//option.title = title;
this.echartStore.setOption(option);//创建图表
this.$refs['localLoading'+this.chartIndex].endLoading();
this.firstShow = true; // 展示操作按键
});
this.firstShow = true; // 展示操作按键
} else if (chartSite === 'screen') { // 全屏显示
/*
option.series = dataArg.map((item) => {// params.series = dataArg.map((item) => {
@@ -740,10 +742,8 @@
}
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){
this.screenLegendList = [];
legend.forEach((item, i) => {
@@ -758,14 +758,6 @@
this.$nextTick(() => {
let divHeight = this.$refs.screenLegendArea.offsetHeight;
this.echartModalStore.resize({height:(400-divHeight)});
/*
let divHeight = this.$refs.screenLegendArea.offsetHeight;
if(!chartInfo.height){
this.echartModalStore.resize({height:(400-divHeight)});
}else {
this.echartModalStore.resize({height:(chartInfo.height-divHeight-25)});
}
*/
});
}
},
@@ -1298,13 +1290,14 @@
},
mounted() {
this.firstLoad = false;
/*
let Myecharts2 = echarts.init(document.getElementById('lineChartArea'));
console.log(Myecharts2);
setTimeout(function () {
Myecharts2.resize()
}, 500)
*/
},
beforeDestroy() {},
};