From 9d39d0231ca09264e198003a7b61bad94b56bd8b Mon Sep 17 00:00:00 2001 From: likexuan Date: Fri, 15 Jul 2022 10:42:09 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-1965=20feat=20:=20=E8=A1=A5=E5=85=85=20?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/alert/alertMessageInfo.scss | 3 + .../components/common/alert/alertLabel.vue | 57 ++++++--- .../components/common/alert/alertLabel3.vue | 56 +++++---- .../components/common/alert/alertRuleInfo.vue | 14 ++- .../common/alert/alertRuleInfo2.vue | 9 +- .../common/globalSearch/searchItemInfo.vue | 109 +++++++++++++++++- .../common/mixin/alertLabelMixin.js | 18 ++- .../common/table/alert/alertMessageTable.vue | 15 ++- .../common/table/asset/assetTable.vue | 1 + 9 files changed, 230 insertions(+), 52 deletions(-) diff --git a/nezha-fronted/src/assets/css/components/common/alert/alertMessageInfo.scss b/nezha-fronted/src/assets/css/components/common/alert/alertMessageInfo.scss index ed831067e..edf735e58 100644 --- a/nezha-fronted/src/assets/css/components/common/alert/alertMessageInfo.scss +++ b/nezha-fronted/src/assets/css/components/common/alert/alertMessageInfo.scss @@ -291,6 +291,9 @@ #alert .name-labe { display: none; } + #alert .asset-manageIp{ + visibility: hidden !important; + } .el-timeline { .el-timeline-item { .el-timeline-item__wrapper { diff --git a/nezha-fronted/src/components/common/alert/alertLabel.vue b/nezha-fronted/src/components/common/alert/alertLabel.vue index 2267dcc31..190762292 100644 --- a/nezha-fronted/src/components/common/alert/alertLabel.vue +++ b/nezha-fronted/src/components/common/alert/alertLabel.vue @@ -4,6 +4,8 @@ :style="calcPosition(that.position, that)" class="alert-label__border" ref="alertLabels" + @mouseenter="tipHover(true)" + @mouseleave="tipHover(false)" > @@ -520,6 +521,7 @@ export default { }, // alertName鼠标划入 alertMessageHover (item, loading, e) { + clearTimeout(this.timer) if (e) { const dom = e.currentTarget const position = dom.getBoundingClientRect() @@ -528,7 +530,16 @@ export default { this.alertRuleObj = item } this.$set(item.alertRule, 'loading', loading) - this.alertRuleShow = loading + this.timer = setTimeout(() => { + this.alertRuleShow = loading + }, 500) + this.flag = loading + }, + tipHoverRule (tipLoading) { + clearTimeout(this.timer) + if (this.flag === false) { + this.alertRuleShow = tipLoading + } }, // Severity Label returnSeverityLabel (key) { diff --git a/nezha-fronted/src/components/common/table/asset/assetTable.vue b/nezha-fronted/src/components/common/table/asset/assetTable.vue index da6201c7c..b7ff3a1eb 100644 --- a/nezha-fronted/src/components/common/table/asset/assetTable.vue +++ b/nezha-fronted/src/components/common/table/asset/assetTable.vue @@ -180,6 +180,7 @@ :id="alertLabelId" :that="alertLabelObj" :type="alertLabelType" + @tipHover='tipHover' >