From 96e4f7874f4090aca97437b6df260b399165fa0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8F=9C?= <43331987+JiaLiBai@users.noreply.github.com> Date: Tue, 21 Oct 2025 15:41:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=88=97=E8=A1=A8=E3=80=81?= =?UTF-8?q?=E7=94=B5=E4=BB=B7=E5=88=97=E8=A1=A8=E3=80=81=E7=BB=BC=E5=90=88?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E3=80=81=E5=9B=BE=E8=A1=A8=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ems/search/index.vue | 49 ++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/src/views/ems/search/index.vue b/src/views/ems/search/index.vue index 494445f..61b20ed 100644 --- a/src/views/ems/search/index.vue +++ b/src/views/ems/search/index.vue @@ -228,6 +228,48 @@ export default { : "" }${inner.deviceId}`, type: "line", + markPoint: { + symbolSize: 30, + emphasis: { + disabled:false//打开 鼠标高亮 + }, + data: [//最大值、最小值 + { + // type: 'max', + name: `最大值`, + coord:[inner.maxDate,inner.maxValue], + relativeTo:'coordinate', + label: { + position: "top", + formatter: item.dataType === 2 ? ([ + `最大值:${inner.maxValue}`, + // `平均值:${inner.avgValue}`, + `差值:${inner.diffValue}`, + ]).join('\n') : ([ + `最大值:${inner.maxValue}`, + // `平均值:${inner.avgValue}`, + ]).join('\n'), + }, + }, + { + // type: 'min', + name: `最小值`, + coord:[inner.minDate,inner.minValue], + relativeTo:'coordinate', + label: { + position: "top", + formatter: item.dataType === 2 ? ([ + `最小值:${inner.minValue}`, + // `平均值:${inner.avgValue}`, + `差值:${inner.diffValue}`, + ]).join('\n') : ([ + `最小值:${inner.minValue}`, + // `平均值:${inner.avgValue}`, + ]).join('\n'), + } + } + ] + }, xdata: [], data: [], }); @@ -253,9 +295,12 @@ export default { tooltip: { trigger: "axis", axisPointer: { - // 坐标轴指示器,坐标轴触发有效 - type: "shadow", // 默认为直线,可选为:'line' | 'shadow' + type: 'cross', }, + // axisPointer: { + // // 坐标轴指示器,坐标轴触发有效 + // type: "shadow", // 默认为直线,可选为:'line' | 'shadow' + // }, }, textStyle: { color: "#333333",