fix:处理panel 页面报错信息
This commit is contained in:
@@ -1430,7 +1430,7 @@ export default {
|
|||||||
if (this.additionalInfo) {
|
if (this.additionalInfo) {
|
||||||
this.$set(chartInfo, 'param', { endpointId: this.additionalInfo.id })
|
this.$set(chartInfo, 'param', { endpointId: this.additionalInfo.id })
|
||||||
}
|
}
|
||||||
this.$refs['editChart' + chartInfo.id][0].getAlertList(filterType)
|
this.$refs['editChart' + chartInfo.id][0] && this.$refs['editChart' + chartInfo.id][0].getAlertList(filterType)
|
||||||
},
|
},
|
||||||
getAlertRuleChartData (chartInfo) {
|
getAlertRuleChartData (chartInfo) {
|
||||||
const vm = this
|
const vm = this
|
||||||
|
|||||||
@@ -884,7 +884,7 @@ export default {
|
|||||||
getChartData (chartInfo, pos, filterType) {
|
getChartData (chartInfo, pos, filterType) {
|
||||||
const chartItem = chartInfo
|
const chartItem = chartInfo
|
||||||
if (chartItem.type === 'group') {
|
if (chartItem.type === 'group') {
|
||||||
this.$refs['editChart' + chartItem.id][0].setData(chartItem)
|
this.$refs['editChart' + chartItem.id][0] && this.$refs['editChart' + chartItem.id][0].setData(chartItem)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (chartItem.type === 'assetInfo') {
|
if (chartItem.type === 'assetInfo') {
|
||||||
@@ -1686,7 +1686,7 @@ export default {
|
|||||||
if (this.obj) {
|
if (this.obj) {
|
||||||
this.$set(chartInfo, 'param', { endpointId: this.obj.id })
|
this.$set(chartInfo, 'param', { endpointId: this.obj.id })
|
||||||
}
|
}
|
||||||
this.$refs['editChart' + chartInfo.id][0].getAlertList(null, null, chartInfo)
|
this.$refs['editChart' + chartInfo.id][0] && this.$refs['editChart' + chartInfo.id][0].getAlertList(null, null, chartInfo)
|
||||||
},
|
},
|
||||||
getAlertRuleChartData (chartInfo) {
|
getAlertRuleChartData (chartInfo) {
|
||||||
const vm = this
|
const vm = this
|
||||||
|
|||||||
@@ -1057,14 +1057,14 @@ export default {
|
|||||||
const vm = this
|
const vm = this
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
const divHeight = self.$refs.legendArea ? self.$refs.legendArea.offsetHeight : 0
|
const divHeight = self.$refs.legendArea ? self.$refs.legendArea.offsetHeight : 0
|
||||||
if (!chartInfo.height && getChart(self.chartIndex)) {
|
if (!chartInfo.height) {
|
||||||
getChart(self.chartIndex).resize({ height: (250 - divHeight - chartResizeTool.titleHeight - chartResizeTool.chartBlankHeight) })
|
getChart(self.chartIndex) && getChart(self.chartIndex).resize({ height: (250 - divHeight - chartResizeTool.titleHeight - chartResizeTool.chartBlankHeight) })
|
||||||
} else {
|
} else {
|
||||||
getChart(self.chartIndex).resize({ height: (chartInfo.height * vm.stepWidth - divHeight - chartResizeTool.titleHeight - chartResizeTool.chartBlankHeight) })
|
getChart(self.chartIndex) && getChart(self.chartIndex).resize({ height: (chartInfo.height * vm.stepWidth - divHeight - chartResizeTool.titleHeight - chartResizeTool.chartBlankHeight) })
|
||||||
}
|
}
|
||||||
if (dataArg && dataArg.length > 0) {
|
if (dataArg && dataArg.length > 0) {
|
||||||
getChart(self.chartIndex).clear()
|
getChart(self.chartIndex) && getChart(self.chartIndex).clear()
|
||||||
getChart(self.chartIndex).setOption(option)// 创建图表
|
getChart(self.chartIndex) && getChart(self.chartIndex).setOption(option)// 创建图表
|
||||||
self.noData = false
|
self.noData = false
|
||||||
} else {
|
} else {
|
||||||
self.noData = true
|
self.noData = true
|
||||||
@@ -1076,8 +1076,8 @@ export default {
|
|||||||
} else if (self.$refs.resizeBox.offsetWidth < 500) {
|
} else if (self.$refs.resizeBox.offsetWidth < 500) {
|
||||||
option.xAxis.splitNumber = 5
|
option.xAxis.splitNumber = 5
|
||||||
}
|
}
|
||||||
getChart(self.chartIndex).clear()
|
getChart(self.chartIndex) && getChart(self.chartIndex).clear()
|
||||||
getChart(self.chartIndex).setOption(option)// 创建图表
|
getChart(self.chartIndex) && getChart(self.chartIndex).setOption(option)// 创建图表
|
||||||
}
|
}
|
||||||
self.$refs['localLoading' + self.chartIndex].endLoading()
|
self.$refs['localLoading' + self.chartIndex].endLoading()
|
||||||
self.firstShow = true // 展示操作按键
|
self.firstShow = true // 展示操作按键
|
||||||
@@ -1087,7 +1087,7 @@ export default {
|
|||||||
getChart(this.chartIndex).on('magictypechanged', function (params) {
|
getChart(this.chartIndex).on('magictypechanged', function (params) {
|
||||||
self.isStackArea = !self.isStackArea
|
self.isStackArea = !self.isStackArea
|
||||||
if (self.isStackArea) {
|
if (self.isStackArea) {
|
||||||
getChart(self.chartIndex).setOption({
|
getChart(self.chartIndex) && getChart(self.chartIndex).setOption({
|
||||||
toolbox: {
|
toolbox: {
|
||||||
feature: {
|
feature: {
|
||||||
dataZoom: {
|
dataZoom: {
|
||||||
@@ -1160,7 +1160,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
getChart(self.chartIndex).setOption({
|
getChart(self.chartIndex) && getChart(self.chartIndex).setOption({
|
||||||
toolbox: {
|
toolbox: {
|
||||||
feature: {
|
feature: {
|
||||||
dataZoom: {
|
dataZoom: {
|
||||||
|
|||||||
Reference in New Issue
Block a user