From 78ed94c1c856405448fabcb40c67672b36c4bfb5 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Sun, 25 Apr 2021 15:52:12 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9charttype?= =?UTF-8?q?=E9=80=89=E6=8B=A9url=E6=97=B6=20url=E4=B8=8D=E5=8F=AF=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/assets/stylus/main.scss | 4 ++-- .../src/components/page/config/template/chartTemp.vue | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/nezha-fronted/src/assets/stylus/main.scss b/nezha-fronted/src/assets/stylus/main.scss index 5361c2ff9..8e57fa1d6 100644 --- a/nezha-fronted/src/assets/stylus/main.scss +++ b/nezha-fronted/src/assets/stylus/main.scss @@ -1290,11 +1290,11 @@ li{ } .right-box-form .one-third-form-item-left{ display: inline-block; - width: 170px; + width: calc(50% - 5px); } .right-box-form .one-third-form-item-right{ display: inline-block; - width: 170px; + width: calc(50% - 5px); .el-form-item__label{ width: 20px !important; } diff --git a/nezha-fronted/src/components/page/config/template/chartTemp.vue b/nezha-fronted/src/components/page/config/template/chartTemp.vue index 4c8856235..afcfeec84 100644 --- a/nezha-fronted/src/components/page/config/template/chartTemp.vue +++ b/nezha-fronted/src/components/page/config/template/chartTemp.vue @@ -142,6 +142,15 @@ export default { this.object.panelName = 'template' this.rightBox.show = true }, + edit (u) { + if (!u.param) { + u.param = { url: '', threshold: '' } + } + this.object = JSON.parse(JSON.stringify(u)) + this.object.panelId = this.showPanel.id + this.object.panelName = this.showPanel.name + this.rightBox.show = true + }, getTableData (params) { if (params && Object.keys(params).length > 0) { for (const key in params) {