fix:修改BUG
dashboard模块 1.修改问题:调整table类型图表空白区域大小导致图表间间隔变大 2.修改问题:曲线图刚加载时挤在左上角一团 3.曲线图显示加载2次
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
margin-right: 40px;
|
margin-right: 40px;
|
||||||
}
|
}
|
||||||
.chart-table {
|
.chart-table {
|
||||||
width: calc(100% - 62px);
|
width: calc(100% - 18px);
|
||||||
height: 100%;//calc(100% - 40px);
|
height: 100%;//calc(100% - 40px);
|
||||||
// min-height: 500px;
|
// min-height: 500px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
@@ -313,6 +313,7 @@
|
|||||||
this.chartType = 'line';
|
this.chartType = 'line';
|
||||||
}
|
}
|
||||||
let chartId = '';
|
let chartId = '';
|
||||||
|
|
||||||
if (chartSite === 'local') {
|
if (chartSite === 'local') {
|
||||||
this.echartStore = echarts.init(ele);
|
this.echartStore = echarts.init(ele);
|
||||||
chartId='lineChartArea';
|
chartId='lineChartArea';
|
||||||
@@ -663,11 +664,6 @@
|
|||||||
return obj;
|
return obj;
|
||||||
});
|
});
|
||||||
*/
|
*/
|
||||||
this.echartStore.clear();
|
|
||||||
//option.title = title;
|
|
||||||
this.echartStore.setOption(option);//创建图表
|
|
||||||
//this.echartStore.hideLoading();
|
|
||||||
this.$refs['localLoading'+this.chartIndex].endLoading();
|
|
||||||
if(legend){
|
if(legend){
|
||||||
this.legendList = [];
|
this.legendList = [];
|
||||||
legend.forEach((item, i) => {
|
legend.forEach((item, i) => {
|
||||||
@@ -686,8 +682,14 @@
|
|||||||
}else {
|
}else {
|
||||||
this.echartStore.resize({height:(chartInfo.height-divHeight-25-35)});
|
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') { // 全屏显示
|
} else if (chartSite === 'screen') { // 全屏显示
|
||||||
/*
|
/*
|
||||||
option.series = dataArg.map((item) => {// params.series = dataArg.map((item) => {
|
option.series = dataArg.map((item) => {// params.series = dataArg.map((item) => {
|
||||||
@@ -740,10 +742,8 @@
|
|||||||
}
|
}
|
||||||
option.title = {};
|
option.title = {};
|
||||||
this.echartModalStore.setOption(option);//显示全屏界面
|
this.echartModalStore.setOption(option);//显示全屏界面
|
||||||
//this.echartModalStore.hideLoading();
|
|
||||||
this.showLegend = true;
|
this.showLegend = true;
|
||||||
this.$refs['localLoadingScreen'+this.chartIndex].endLoading();
|
this.$refs['localLoadingScreen'+this.chartIndex].endLoading();
|
||||||
//this.echartModalStore.resize({height:chartInfo.height});
|
|
||||||
if(legend){
|
if(legend){
|
||||||
this.screenLegendList = [];
|
this.screenLegendList = [];
|
||||||
legend.forEach((item, i) => {
|
legend.forEach((item, i) => {
|
||||||
@@ -758,14 +758,6 @@
|
|||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
let divHeight = this.$refs.screenLegendArea.offsetHeight;
|
let divHeight = this.$refs.screenLegendArea.offsetHeight;
|
||||||
this.echartModalStore.resize({height:(400-divHeight)});
|
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() {
|
mounted() {
|
||||||
this.firstLoad = false;
|
this.firstLoad = false;
|
||||||
|
/*
|
||||||
let Myecharts2 = echarts.init(document.getElementById('lineChartArea'));
|
let Myecharts2 = echarts.init(document.getElementById('lineChartArea'));
|
||||||
console.log(Myecharts2);
|
console.log(Myecharts2);
|
||||||
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
Myecharts2.resize()
|
Myecharts2.resize()
|
||||||
}, 500)
|
}, 500)
|
||||||
|
*/
|
||||||
},
|
},
|
||||||
beforeDestroy() {},
|
beforeDestroy() {},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -440,6 +440,7 @@
|
|||||||
this.$get('panel?pageNo=1&pageSize=-1').then(response => {
|
this.$get('panel?pageNo=1&pageSize=-1').then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.panelData = response.data.list;
|
this.panelData = response.data.list;
|
||||||
|
let isInitData = false;
|
||||||
if (response.data.list.length > 0) {
|
if (response.data.list.length > 0) {
|
||||||
if (this.$store.state.showPanel.id !== 0 && this.$store.state.showPanel.name !== '') {
|
if (this.$store.state.showPanel.id !== 0 && this.$store.state.showPanel.name !== '') {
|
||||||
this.showPanel.name = this.$store.state.showPanel.name;
|
this.showPanel.name = this.$store.state.showPanel.name;
|
||||||
@@ -453,6 +454,7 @@
|
|||||||
this.showPanel.name = response.data.list[0].name;
|
this.showPanel.name = response.data.list[0].name;
|
||||||
this.filter.panelId = this.showPanel.id;
|
this.filter.panelId = this.showPanel.id;
|
||||||
this.getData(this.filter);
|
this.getData(this.filter);
|
||||||
|
isInitData = true;
|
||||||
}
|
}
|
||||||
this.filter.panelId = this.showPanel.id;
|
this.filter.panelId = this.showPanel.id;
|
||||||
} else {
|
} else {
|
||||||
@@ -460,7 +462,7 @@
|
|||||||
this.filter.panelId = '';
|
this.filter.panelId = '';
|
||||||
}
|
}
|
||||||
this.pageObj.total = response.data.total;
|
this.pageObj.total = response.data.total;
|
||||||
if (this.panel.id === '' || this.panel.id === this.showPanel.id) {
|
if (!isInitData &&(this.panel.id === '' || this.panel.id === this.showPanel.id)) {
|
||||||
this.getData(this.filter);
|
this.getData(this.filter);
|
||||||
}
|
}
|
||||||
this.$store.state.showPanel.id = 0;
|
this.$store.state.showPanel.id = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user