NEZ-2494 feat: 处理chart rules 优化未生效的问题

This commit is contained in:
zhangyu
2023-01-05 17:53:42 +08:00
parent 3661eb6584
commit b527f54500
8 changed files with 75 additions and 21 deletions

View File

@@ -260,11 +260,12 @@ export default {
result: 'show'
}
},
elements: [{ expression: '', legend: '', type: 'expert', id: '', name: 'A', state: 1 }],
elements: [{ expression: '', legend: '', type: 'expert', id: '', name: 'A', state: 1, orderNum: 0 }],
panel: '',
sync: 0,
remark: '',
groupId: ''
groupId: '',
varType: ''
},
pageObj: {
pageNo: 1,
@@ -532,6 +533,9 @@ export default {
this.chart.param.thresholds = [{ value: undefined, color: randomcolor() }]
this.chart.panelId = this.showPanel.id
this.chart.panelName = this.showPanel.name
this.$nextTick(() => {
this.$refs.addChartModal.isStable = 'stable'
})
},
addChartByTemp () {
this.chart = JSON.parse(JSON.stringify(this.blankChartTemp))
@@ -556,6 +560,9 @@ export default {
this.chart.panelId = this.showPanel.id
this.chart.panelName = this.showPanel.name
this.chart.isGroup = true
this.$nextTick(() => {
this.$refs.addChartModal.isStable = 'stable'
})
},
newChart () {
return JSON.parse(JSON.stringify(this.blankChart))
@@ -607,6 +614,9 @@ export default {
}
})
}
this.$nextTick(() => {
this.$refs.addChartModal.isStable = 'stable'
})
} else {
this.$message.error(res.msg)
}
@@ -1184,6 +1194,8 @@ export default {
handler (n) {
if (n) {
this.disposeChart()
} else {
this.$refs.addChartModal.isStable = 'instability'
}
}
},