From 6a1cc219c29a28fd863d4e38aee3e2ddeb05bfed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com> Date: Fri, 23 Aug 2024 17:52:54 +0800 Subject: [PATCH] =?UTF-8?q?CN-1690=20fix:=201=E3=80=81detection=E8=81=9A?= =?UTF-8?q?=E5=90=88=E6=A8=A1=E5=BC=8F=E4=B8=8Bindicator=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E9=97=B4=E5=AD=97=E6=AE=B5=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=9B2=E3=80=81threshold=E8=AF=A6=E6=83=85=E6=8A=98?= =?UTF-8?q?=E7=BA=BF=E5=9B=BE=E6=82=AC=E6=B5=AE=E6=A1=86=E5=B0=8F=E7=90=83?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../detections/options/detectionOptions.js | 9 +++++++- .../detections/overview/EventsTimeline.vue | 23 +++++++++++++------ .../overview/IndicatorMatchOverview.vue | 2 +- .../overview/detectionDetailMixin.js | 11 ++++++--- 4 files changed, 33 insertions(+), 12 deletions(-) diff --git a/src/views/detections/options/detectionOptions.js b/src/views/detections/options/detectionOptions.js index ebd50099..19aec869 100644 --- a/src/views/detections/options/detectionOptions.js +++ b/src/views/detections/options/detectionOptions.js @@ -516,6 +516,13 @@ export const lineOption = { } ], tooltip: { - trigger: 'axis' + trigger: 'axis', + formatter: function (params) { + const param = JSON.parse(JSON.stringify(params[0])) + param.marker = param.marker.replace('#ff9a79', param.data[2]) + const str = `
${param.marker}${param.seriesName}
${param.data[1]}
` + return `${param.axisValueLabel}
${str}` + }, + show: true } } diff --git a/src/views/detections/overview/EventsTimeline.vue b/src/views/detections/overview/EventsTimeline.vue index 26cec300..e49c2018 100644 --- a/src/views/detections/overview/EventsTimeline.vue +++ b/src/views/detections/overview/EventsTimeline.vue @@ -1,8 +1,8 @@