From 7990c1ee8dbe98f77c5c40fe4263984a9471bf07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=8A=B2=E6=9D=BE?= Date: Wed, 25 Mar 2020 18:38:13 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20dc-=E6=9C=BA=E6=9F=9C=E4=BA=8C=E7=BA=A7?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/assets/stylus/main.scss | 5 +- .../common/bottomBox/alertMessageBox.vue | 7 +- .../common/bottomBox/cabinetBottomBox.vue | 295 ++++++++++ .../components/common/rightBox/cabinetBox.vue | 4 +- .../src/components/page/config/dc.vue | 514 +++++++++--------- nezha-fronted/src/main.js | 10 +- 6 files changed, 560 insertions(+), 275 deletions(-) create mode 100644 nezha-fronted/src/components/common/bottomBox/cabinetBottomBox.vue diff --git a/nezha-fronted/src/assets/stylus/main.scss b/nezha-fronted/src/assets/stylus/main.scss index 260921ea3..3777ecfdd 100644 --- a/nezha-fronted/src/assets/stylus/main.scss +++ b/nezha-fronted/src/assets/stylus/main.scss @@ -801,7 +801,7 @@ li{ } /*此处自定义弹框尺寸,不同功能可能需要的尺寸不一样,需自行添加*/ -.right-box-account, .right-box-prom, .right-box-alert-config, .right-box-project, .right-box-module, +.right-box-account, .right-box-prom, .right-box-alert-config, .right-box-project, .right-box-module, .right-box-cabinet, .right-box-edit-endpoint, .right-box-panel, .right-box-dc, .right-box-model, .right-box-add-asset, .right-box-add-chart { width: 520px; } @@ -811,9 +811,6 @@ li{ .right-box-add-endpoint { width: 850px; } -.right-box-cabinet{ - width: 400px -} /* begin--右侧弹框--顶部按钮*/ .right-box-top-btns { text-align: center; diff --git a/nezha-fronted/src/components/common/bottomBox/alertMessageBox.vue b/nezha-fronted/src/components/common/bottomBox/alertMessageBox.vue index ad89d770d..8943eaeb3 100644 --- a/nezha-fronted/src/components/common/bottomBox/alertMessageBox.vue +++ b/nezha-fronted/src/components/common/bottomBox/alertMessageBox.vue @@ -312,7 +312,8 @@ if (this.from == "alertRule") { this.searchLabel.alertName = this.obj.alertName; } else if (this.from == "asset") { - + this.searchLabel.type = 3; + this.searchLabel.linkId = this.obj.id; } this.pageObj.pageNo = 1; for (let item in searchObj) { @@ -389,13 +390,13 @@ this.searchMsg.searchLabelList = this.searchMsg.searchLabelList.filter((item, index) => { return item.label != "alertName" && item.label != "severity" }); - this.searchLabel.alertName = this.obj.alertName; + this.searchLabel.alertName = n.alertName; } else if (this.from == "asset") { this.searchMsg.searchLabelList = this.searchMsg.searchLabelList.filter((item, index) => { return item.label != "alertType" && item.label != "asset" }); this.searchLabel.type = 3; - this.searchLabel.linkId = this.obj.id; + this.searchLabel.linkId = n.id; } this.getAlertList(); } diff --git a/nezha-fronted/src/components/common/bottomBox/cabinetBottomBox.vue b/nezha-fronted/src/components/common/bottomBox/cabinetBottomBox.vue new file mode 100644 index 000000000..09403b5d8 --- /dev/null +++ b/nezha-fronted/src/components/common/bottomBox/cabinetBottomBox.vue @@ -0,0 +1,295 @@ + + + + + diff --git a/nezha-fronted/src/components/common/rightBox/cabinetBox.vue b/nezha-fronted/src/components/common/rightBox/cabinetBox.vue index 702015ea8..802c04df0 100644 --- a/nezha-fronted/src/components/common/rightBox/cabinetBox.vue +++ b/nezha-fronted/src/components/common/rightBox/cabinetBox.vue @@ -186,7 +186,9 @@ deep:true, immediate:true, handler:function(n,o){ - this.cabinet=JSON.parse(JSON.stringify(n)); + if (n) { + this.cabinet=JSON.parse(JSON.stringify(n)); + } } }, cabinet:{ diff --git a/nezha-fronted/src/components/page/config/dc.vue b/nezha-fronted/src/components/page/config/dc.vue index 252f3dc3b..878c2269d 100644 --- a/nezha-fronted/src/components/page/config/dc.vue +++ b/nezha-fronted/src/components/page/config/dc.vue @@ -1,4 +1,4 @@ -