fix:修改endpoit 保存图表 unit未传递的问题
This commit is contained in:
@@ -1130,7 +1130,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 创建打开
|
// 创建打开
|
||||||
createData (panelId, elementInfo) {
|
createData (panelId, elementInfo, unit) {
|
||||||
if (panelId == -1) {
|
if (panelId == -1) {
|
||||||
const p = this.panelData[0]
|
const p = this.panelData[0]
|
||||||
this.editChart.panelName = p.name
|
this.editChart.panelName = p.name
|
||||||
@@ -1158,7 +1158,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.isedit = false
|
this.isedit = false
|
||||||
this.initInfo() // 初始化图表信息
|
this.initInfo(unit) // 初始化图表信息
|
||||||
// this.editChartModal = true;//????控制弹出框显示和隐藏的,不需要了
|
// this.editChartModal = true;//????控制弹出框显示和隐藏的,不需要了
|
||||||
this.initOpen() // 获取metric, productId数据
|
this.initOpen() // 获取metric, productId数据
|
||||||
},
|
},
|
||||||
@@ -1251,12 +1251,12 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 初始化信息
|
// 初始化信息
|
||||||
initInfo () {
|
initInfo (unit) {
|
||||||
this.editChart.title = ''
|
this.editChart.title = ''
|
||||||
this.editChart.type = 'line'
|
this.editChart.type = 'line'
|
||||||
this.editChart.span = 12
|
this.editChart.span = 12
|
||||||
this.editChart.height = 400 + ''
|
this.editChart.height = 400 + ''
|
||||||
this.editChart.unit = 2
|
this.editChart.unit = unit || 2
|
||||||
const param = {}
|
const param = {}
|
||||||
param.last = 0
|
param.last = 0
|
||||||
param.url = ''
|
param.url = ''
|
||||||
@@ -1660,7 +1660,7 @@ export default {
|
|||||||
if (n.id) {
|
if (n.id) {
|
||||||
this.editData(this.editChart, this.showPanel.id)
|
this.editData(this.editChart, this.showPanel.id)
|
||||||
} else {
|
} else {
|
||||||
this.createData(this.showPanel.id)
|
this.createData(this.showPanel.id, '', n.unit)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user