From 1758302b337a2e6b7f5f2561a280d02fca9458ea Mon Sep 17 00:00:00 2001 From: zhangyu Date: Wed, 31 Mar 2021 14:20:31 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9endpoit=20?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E5=9B=BE=E8=A1=A8=20unit=E6=9C=AA=E4=BC=A0?= =?UTF-8?q?=E9=80=92=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/page/dashboard/chartBox.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nezha-fronted/src/components/page/dashboard/chartBox.vue b/nezha-fronted/src/components/page/dashboard/chartBox.vue index e624dc2f2..aaef0d6ee 100644 --- a/nezha-fronted/src/components/page/dashboard/chartBox.vue +++ b/nezha-fronted/src/components/page/dashboard/chartBox.vue @@ -1130,7 +1130,7 @@ export default { }) }, // 创建打开 - createData (panelId, elementInfo) { + createData (panelId, elementInfo, unit) { if (panelId == -1) { const p = this.panelData[0] this.editChart.panelName = p.name @@ -1158,7 +1158,7 @@ export default { } } this.isedit = false - this.initInfo() // 初始化图表信息 + this.initInfo(unit) // 初始化图表信息 // this.editChartModal = true;//????控制弹出框显示和隐藏的,不需要了 this.initOpen() // 获取metric, productId数据 }, @@ -1251,12 +1251,12 @@ export default { }, // 初始化信息 - initInfo () { + initInfo (unit) { this.editChart.title = '' this.editChart.type = 'line' this.editChart.span = 12 this.editChart.height = 400 + '' - this.editChart.unit = 2 + this.editChart.unit = unit || 2 const param = {} param.last = 0 param.url = '' @@ -1660,7 +1660,7 @@ export default { if (n.id) { this.editData(this.editChart, this.showPanel.id) } else { - this.createData(this.showPanel.id) + this.createData(this.showPanel.id, '', n.unit) } } }