From c138a7c9f770bcfee2a10485cdb35bd6c5c230cf Mon Sep 17 00:00:00 2001 From: junjun Date: Tue, 26 Apr 2022 14:40:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8C=87=E6=A0=87=E5=8D=A1=E9=98=88?= =?UTF-8?q?=E5=80=BC=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/chart/components/normal/LabelNormal.vue | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/frontend/src/views/chart/components/normal/LabelNormal.vue b/frontend/src/views/chart/components/normal/LabelNormal.vue index f15c2b1c67..6a4468d571 100644 --- a/frontend/src/views/chart/components/normal/LabelNormal.vue +++ b/frontend/src/views/chart/components/normal/LabelNormal.vue @@ -175,37 +175,38 @@ export default { if (this.chart.senior) { const senior = JSON.parse(this.chart.senior) if (senior.threshold && senior.threshold.labelThreshold && senior.threshold.labelThreshold.length > 0) { - const value = this.chart.data.series[0].data[0] + const value = parseFloat(this.chart.data.series[0].data[0]) for (let i = 0; i < senior.threshold.labelThreshold.length; i++) { let flag = false const t = senior.threshold.labelThreshold[i] + const tv = parseFloat(t.value) if (t.term === 'eq') { - if (value === t.value) { + if (value === tv) { this.label_content_class.color = t.color flag = true } } else if (t.term === 'not_eq') { - if (value !== t.value) { + if (value !== tv) { this.label_content_class.color = t.color flag = true } } else if (t.term === 'lt') { - if (value < t.value) { + if (value < tv) { this.label_content_class.color = t.color flag = true } } else if (t.term === 'gt') { - if (value > t.value) { + if (value > tv) { this.label_content_class.color = t.color flag = true } } else if (t.term === 'le') { - if (value <= t.value) { + if (value <= tv) { this.label_content_class.color = t.color flag = true } } else if (t.term === 'ge') { - if (value >= t.value) { + if (value >= tv) { this.label_content_class.color = t.color flag = true }