From 294eee526c97a3e04ba92ced8f71698fd883255c Mon Sep 17 00:00:00 2001 From: zhangyu Date: Wed, 1 Dec 2021 18:17:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=20valueMapping=20?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E6=9C=AA=E4=BF=9D=E5=AD=98=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rightBox/chartRightBox/chartRightBox.scss | 27 ++++++++++++++-- .../rightBox/chart/metricsChartConfig.vue | 31 +++++++++++++++---- .../common/rightBox/chart/publicConfig.js | 9 ++++++ 3 files changed, 59 insertions(+), 8 deletions(-) diff --git a/nezha-fronted/src/assets/css/components/common/rightBox/chartRightBox/chartRightBox.scss b/nezha-fronted/src/assets/css/components/common/rightBox/chartRightBox/chartRightBox.scss index 1d134e51f..7f2318218 100644 --- a/nezha-fronted/src/assets/css/components/common/rightBox/chartRightBox/chartRightBox.scss +++ b/nezha-fronted/src/assets/css/components/common/rightBox/chartRightBox/chartRightBox.scss @@ -12,10 +12,17 @@ border: 1px solid $--border-color-light; border-radius: 2px; display: flex; - padding: 3px 10px 3px 5px; + padding: 0; + padding-left: 5px; + line-height: 30px; justify-content: space-between; margin-bottom: 10px; box-sizing: border-box; + height: 32px; + .title-content-left{ + display: inline-flex; + align-items: center; + } .nz-icon-copy { padding: 0 4px; color: $--color-primary; @@ -50,7 +57,7 @@ margin-left: 5px; } .mapping-display{ - width: 124px; + width: 100px; font-size: 14px; border: 1px solid $--border-color-light; border-radius: 2px 0 0 2px; @@ -67,5 +74,21 @@ margin-bottom: 10px; padding: 3px 10px; } + .prev-mapping-box{ + border: 1px solid $--border-color-light; + display: inline-block; + min-width: 18px; + height: 25px; + line-height: 25px; + border-radius: 5px; + margin-left: 120px; + padding: 0 3px; + text-align: center; + } + .element-item { + padding: 0; + border-bottom: none; + margin-bottom: 10px; + } } } diff --git a/nezha-fronted/src/components/common/rightBox/chart/metricsChartConfig.vue b/nezha-fronted/src/components/common/rightBox/chart/metricsChartConfig.vue index 3369d4f84..561454c67 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/metricsChartConfig.vue +++ b/nezha-fronted/src/components/common/rightBox/chart/metricsChartConfig.vue @@ -195,7 +195,22 @@
- 123 + + + {{item.value}} + + + {{item.from}} -> {{item.to}} + + + {{item.regx}} + +
+ + {{item.display || "T"}} + +
+
@@ -211,18 +226,22 @@
- - - +
+ + + +
-
Display
+
+
Display
+
- +
diff --git a/nezha-fronted/src/components/common/rightBox/chart/publicConfig.js b/nezha-fronted/src/components/common/rightBox/chart/publicConfig.js index 80899cebd..1d908c8b3 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/publicConfig.js +++ b/nezha-fronted/src/components/common/rightBox/chart/publicConfig.js @@ -213,6 +213,15 @@ export default { if (key === 'thresholds') { this.chartConfig.param.thresholds[index].color = val } + if (key === 'bac') { + console.log(this.chartConfig.param.valueMapping.mapping,this.chartConfig.param.valueMapping.mapping[0],this.chartConfig.param.valueMapping.mapping[index]) + this.chartConfig.param.valueMapping.mapping[index].color.bac = val + this.$set(this.chartConfig.param.valueMapping.mapping, index, this.chartConfig.param.valueMapping.mapping[index]) + } + if (key === 'text') { + this.chartConfig.param.valueMapping.mapping[index].color.text = val + this.$set(this.chartConfig.param.valueMapping.mapping, index, this.chartConfig.param.valueMapping.mapping[index]) + } this.change() }, change () {