NEZ-2100 fix: 编辑system图表时,点击预览按钮图表不显示,控制台报错

This commit is contained in:
zhangyu
2022-08-04 10:39:51 +08:00
parent 8ae84248aa
commit b7ec906825
2 changed files with 8 additions and 5 deletions

View File

@@ -449,6 +449,7 @@
.el-dialog__body {
height: 100%;
padding: 0;
overflow: hidden;
}
.panel-chart--fullscreen {
display: flex;
@@ -595,4 +596,4 @@
}
.hiddenItem{
box-shadow: $--chart-shadow;
}
}

View File

@@ -27,6 +27,10 @@ export default {
showAllData: {
type: Boolean,
default: false
},
dialogPadding: {
type: Number,
default: 0
}
},
computed: {
@@ -133,7 +137,7 @@ export default {
}
const tagKeysArr = Object.keys(data.metric)
tagKeysArr.forEach(tagKey => {
if (tagKey !== '__name__') {
if (tagKey !== '__name__' && tagKey !== 'legend' && tagKey !== 'values' && tagKey !== '$value') {
legend += `${tagKey}="${data.metric[tagKey]}",`
}
})
@@ -333,9 +337,7 @@ export default {
deep: true,
handler (n) {
if (n) {
this.$nextTick(() => {
this.initChart && this.initChart(this.chartOption)
})
this.initChart && this.initChart(this.chartOption)
}
}
}