NEZ-1358 fix: 处理Panel切换后无法加载 以及部分页面报错的问题

This commit is contained in:
zhangyu
2021-11-26 09:56:53 +08:00
parent e0d01d7ab4
commit fc0b5a1fcb
3 changed files with 22 additions and 22 deletions

View File

@@ -451,7 +451,7 @@ export default {
}
getChart(this.chartIndex).setOption({
yAxis: {
...option.yAxis
...option.yAxis
}
})
}
@@ -1056,8 +1056,8 @@ export default {
this.$nextTick(() => {
const vm = this
setTimeout(function () {
const divHeight = self.$refs.legendArea.offsetHeight
if (!chartInfo.height) {
const divHeight = self.$refs.legendArea ? self.$refs.legendArea.offsetHeight : 0
if (!chartInfo.height && getChart(self.chartIndex)) {
getChart(self.chartIndex).resize({ height: (250 - divHeight - chartResizeTool.titleHeight - chartResizeTool.chartBlankHeight) })
} else {
getChart(self.chartIndex).resize({ height: (chartInfo.height * vm.stepWidth - divHeight - chartResizeTool.titleHeight - chartResizeTool.chartBlankHeight) })
@@ -1682,7 +1682,7 @@ export default {
this.chartInfo.param.nullType = this.chartInfo.param.nullType || 'null'
query += '&nullType=' + this.chartInfo.param.nullType
}
axiosArr = [this.$get('/prom/api/v1/query_range?query=' + query+ '&start=' + this.$stringTimeParseToUnix(startTime) + '&end=' + this.$stringTimeParseToUnix(endTime) + '&step=' + step)]
axiosArr = [this.$get('/prom/api/v1/query_range?query=' + query + '&start=' + this.$stringTimeParseToUnix(startTime) + '&end=' + this.$stringTimeParseToUnix(endTime) + '&step=' + step)]
}
}
// 一个图表