From 7ff1dac64679e0d34ace50331b9f1ec017110b0f Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 14 Feb 2022 14:13:49 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-1555=20fix=EF=BC=9A=E6=82=AC=E6=B5=AE?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E4=BD=8D=E7=BD=AE=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/common/alert/alertLabel.scss | 5 +++++ .../src/components/chart/chart/chartStat.vue | 1 - .../chart/chart/grid/GridLayout.vue | 2 -- .../components/common/alert/alertRuleInfo.vue | 6 ++++-- .../list/alertRule/alertRuleDetail.vue | 19 +++++++------------ .../list/endpoint/endpointDetail.vue | 2 +- .../page/asset/components/assetTagEx.vue | 1 - 7 files changed, 17 insertions(+), 19 deletions(-) diff --git a/nezha-fronted/src/assets/css/components/common/alert/alertLabel.scss b/nezha-fronted/src/assets/css/components/common/alert/alertLabel.scss index 0b7ff93ba..e2db4c7ce 100644 --- a/nezha-fronted/src/assets/css/components/common/alert/alertLabel.scss +++ b/nezha-fronted/src/assets/css/components/common/alert/alertLabel.scss @@ -58,6 +58,11 @@ max-width: 210px; } } +.alert-rule-detail{ + .alert-label, .alert-labelUp{ + position: absolute; + } +} //.alert-label::after, .alert-labelUp::after { // content: ''; // display: block; diff --git a/nezha-fronted/src/components/chart/chart/chartStat.vue b/nezha-fronted/src/components/chart/chart/chartStat.vue index 4585dbbf0..b98375703 100644 --- a/nezha-fronted/src/components/chart/chart/chartStat.vue +++ b/nezha-fronted/src/components/chart/chart/chartStat.vue @@ -113,7 +113,6 @@ export default { }) }, statMouseMove (e) { - console.log(e) const windowWidth = window.innerWidth// 窗口宽度 const windowHeight = window.innerHeight// 窗口高度 const box = document.getElementById(`chart-canvas-tooltip-${this.chartId}`) diff --git a/nezha-fronted/src/components/chart/chart/grid/GridLayout.vue b/nezha-fronted/src/components/chart/chart/grid/GridLayout.vue index f6c23bf34..c3685ea21 100644 --- a/nezha-fronted/src/components/chart/chart/grid/GridLayout.vue +++ b/nezha-fronted/src/components/chart/chart/grid/GridLayout.vue @@ -297,8 +297,6 @@ export default { }, containerHeight: function () { if (!this.autoSize) return - // console.log("bottom: " + bottom(this.layout)) - // console.log("rowHeight + margins: " + (this.rowHeight + this.margin[1]) + this.margin[1]) const containerHeight = bottom(this.layout) * (this.rowHeight + this.margin[1]) + this.margin[1] + 'px' return containerHeight }, diff --git a/nezha-fronted/src/components/common/alert/alertRuleInfo.vue b/nezha-fronted/src/components/common/alert/alertRuleInfo.vue index 39a12ca69..555dc0052 100644 --- a/nezha-fronted/src/components/common/alert/alertRuleInfo.vue +++ b/nezha-fronted/src/components/common/alert/alertRuleInfo.vue @@ -65,6 +65,7 @@ export default { props: { id: {}, messageLoad: {}, + detailList: Boolean, that: {}, severityData: Array }, @@ -91,14 +92,15 @@ export default { // const windowWidth = window.innerWidth const boxHeight = this.$refs.alertLabels ? this.$refs.alertLabels.offsetHeight : 231 const windowHeight = window.innerHeight + const leftOffSetView = this.detailList ? -80 : 10 if (position.top > windowHeight / 2) { return { - left: `${position.left + position.width + 10}px`, + left: `${position.left + position.width + leftOffSetView}px`, top: `${position.top - boxHeight}px` } } else { return { - left: `${position.left + position.width + 10}px`, + left: `${position.left + position.width + leftOffSetView}px`, top: `${position.top}px` } } diff --git a/nezha-fronted/src/components/common/detailView/list/alertRule/alertRuleDetail.vue b/nezha-fronted/src/components/common/detailView/list/alertRule/alertRuleDetail.vue index ccf36e426..13b9fbe66 100644 --- a/nezha-fronted/src/components/common/detailView/list/alertRule/alertRuleDetail.vue +++ b/nezha-fronted/src/components/common/detailView/list/alertRule/alertRuleDetail.vue @@ -20,19 +20,15 @@
  • - - -
    + @click="detailViewRightShow(item)" + @mouseenter="alertMessageHover(item, true, $event)" + @mouseleave="alertMessageHover(item, false)" + > + +
    {{item.name}} @@ -46,7 +42,6 @@
    -