NEZ-343 fix: 修复修改chart不生效的问题
This commit is contained in:
@@ -686,7 +686,7 @@
|
|||||||
},
|
},
|
||||||
// 更新图表
|
// 更新图表
|
||||||
updateCharts(params) {
|
updateCharts(params) {
|
||||||
this.$put('panel/' + this.panelId + '/charts', params).then(response2 => {
|
this.$put('panel/' + this.panelId + '/charts', params ? params : this.chart).then(response2 => {
|
||||||
if (response2.code === 200) {
|
if (response2.code === 200) {
|
||||||
this.esc();
|
this.esc();
|
||||||
this.$message({duration: 1000, type: 'success', message: this.$t("tip.saveSuccess")});
|
this.$message({duration: 1000, type: 'success', message: this.$t("tip.saveSuccess")});
|
||||||
@@ -812,7 +812,11 @@
|
|||||||
this.chart.elements.push({id: this.elementIds[i], expression: expr, type: "expert", legend: this.legends[i]});
|
this.chart.elements.push({id: this.elementIds[i], expression: expr, type: "expert", legend: this.legends[i]});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (this.chart.id) {
|
||||||
|
this.updateCharts();
|
||||||
|
} else {
|
||||||
this.addCharts();
|
this.addCharts();
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
this.$refs.chartForm.validate((valid) => {
|
this.$refs.chartForm.validate((valid) => {
|
||||||
const params = {
|
const params = {
|
||||||
|
|||||||
Reference in New Issue
Block a user