From 0a35cba5cc52c0ff8894d80574c5f745b16c204d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=8A=B2=E6=9D=BE?= Date: Fri, 17 Apr 2020 21:27:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20alert-message=E6=90=9C=E7=B4=A2state?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=90=8Dbug=E4=BF=AE=E5=A4=8D=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.搜索框下拉选择区域滚动条优化 2.alert-message搜索支持asset 3.alert-message搜索state参数名bug修复 --- nezha-fronted/src/assets/stylus/main.scss | 2 +- .../src/components/common/searchInput.vue | 29 ++++++++++++++++--- .../src/components/page/alert/list.vue | 12 +++++--- 3 files changed, 34 insertions(+), 9 deletions(-) diff --git a/nezha-fronted/src/assets/stylus/main.scss b/nezha-fronted/src/assets/stylus/main.scss index 64f7dd38e..f4834ce88 100644 --- a/nezha-fronted/src/assets/stylus/main.scss +++ b/nezha-fronted/src/assets/stylus/main.scss @@ -158,7 +158,7 @@ li{ border: none; cursor: pointer; opacity: 0.5; - background-color: #aaa; + background-color: #bbb; outline: none; z-index: 10; } diff --git a/nezha-fronted/src/components/common/searchInput.vue b/nezha-fronted/src/components/common/searchInput.vue index 5fb74cfea..864d765b9 100644 --- a/nezha-fronted/src/components/common/searchInput.vue +++ b/nezha-fronted/src/components/common/searchInput.vue @@ -40,24 +40,44 @@
+
  • {{item.label}}
+
+
    +
  • {{item.label}}
  • +
+
  • {{item.label}}
+
+
    +
  • {{item.label}}
  • +
+
    -
  • {{item.name}}
  • +
  • {{item.name}}
+
+
    +
  • {{item.name}}
  • +
+
  • {{item.host}}
+
+
    +
  • {{item.host}}
  • +
@@ -144,6 +164,8 @@ actionSelect:[], dcSelect: [], //数据中心 assetSelect: [], //资产 + projectSelect: [], + moduleSelect: [], schemaTypeSelect:[], //日志检索Protocol下拉菜单 TypeSelect:[],//Protocol二层下拉菜单 secondShow:'',//二层显示控制 @@ -253,7 +275,7 @@ } else { this.clearSearchShow = true; } - if (this.$route.path.indexOf("alertList") > -1 || this.$route.path.indexOf("alertConfig") > -1) { + /*if (this.$route.path.indexOf("alertList") > -1 || this.$route.path.indexOf("alertConfig") > -1) { // 处理alertType--asset联动问题: // 当已选alertType为asset时,将可选列表中的asset的disabled恢复为false; // 当已选alertType不为asset时,将可选列表中的asset的disabled设为true,若有已选的asset,则删除; @@ -295,7 +317,7 @@ } } } - } + }*/ } }, no_condition: { @@ -1531,7 +1553,6 @@ position: fixed; /*left: 100px; top: 36px;*/ - height: auto; width: auto; max-height: 240px; padding: 5px 0; diff --git a/nezha-fronted/src/components/page/alert/list.vue b/nezha-fronted/src/components/page/alert/list.vue index 75c59311e..bed4e3fa1 100644 --- a/nezha-fronted/src/components/page/alert/list.vue +++ b/nezha-fronted/src/components/page/alert/list.vue @@ -269,13 +269,13 @@ type: 'input', label: 'alertName', disabled: false - }, { + }, /*{ id: 3, name: this.$t('alert.list.type'), type: 'select', label: 'alertType', disabled: false - }, { + }, */{ id: 4, name: this.$t('alert.severity'), type: 'selectString', @@ -286,7 +286,7 @@ name: this.$t('asset.asset'), type: 'asset', label: 'asset', - disabled: true + disabled: false }, { id: 12, name: this.$t('alert.list.state'), @@ -549,7 +549,11 @@ this.pageObj.pageNo = 1; for (let item in searchObj) { if (searchObj[item]) { - this.$set(this.searchLabel, item, searchObj[item]); + if (item == "alertMessageState") { + this.$set(this.searchLabel, "state", searchObj[item]); + } else { + this.$set(this.searchLabel, item, searchObj[item]); + } } } this.getAlertList();