From def744926f35912d83067adac83666493de7a759 Mon Sep 17 00:00:00 2001 From: zhaohy <1695786511@qq.com> Date: Tue, 20 Aug 2024 16:34:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E6=BB=91=E5=9D=97?= =?UTF-8?q?=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../view/alarmManagement/alarmOverview/index.vue | 94 +++++++++++++++------- 1 file changed, 63 insertions(+), 31 deletions(-) diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue index 593fd48..4e35c9d 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue @@ -190,28 +190,17 @@ type: 'shadow', }, formatter: function (params: any) { - let res = - params[0].axisValue + - '
' + - params[0].marker + - ' ' + - params[0].seriesName + - ' : ' + - params[0].data + - '
' + - params[1].marker + - ' ' + - params[1].seriesName + - ' : ' + - params[1].data + - '
' + - params[2].marker + - ' ' + - params[2].seriesName + - ' : ' + - params[2].data + - '
'; - return res; + console.log(params, '错误'); + if (params.length > 0) { + let res = params[0].axisValue + '
'; + params.forEach((item: any) => { + if (item.seriesName !== '总数') { + res = res + item.marker + ' ' + item.seriesName + ' : ' + item.data + '
'; + } + }); + return res; + } + return ''; }, }, grid: { @@ -285,14 +274,25 @@ //滑块样式 dataZoom: [ { - type: 'inside', - start: 0, - end: 100, - }, - { type: 'slider', // backgroundColor: 'yellow', - // fillerColor: 'yellow', + fillerColor: new echarts.graphic.LinearGradient( + 0, + 0, + 1, + 0, + [ + { + offset: 0, + color: 'rgba(97, 134, 255, 1)', + }, + { + offset: 1, + color: 'rgba(36, 186, 255, 1)', + }, + ], + false, + ), height: 12, // 设置slider的高度为15 start: 0, end: 100, @@ -304,9 +304,41 @@ handleSize: '140%', // 放大按钮 // borderColor: 'none', handleStyle: { - // color: 'red', - // shadowBlur: 6, - // shadowColor: 'yellow', + color: new echarts.graphic.LinearGradient( + 0, + 0, + 1, + 0, + [ + { + offset: 0, + color: 'rgba(97, 134, 255, 1)', + }, + { + offset: 1, + color: 'rgba(36, 186, 255, 1)', + }, + ], + false, + ), + borderWidth: 4, + borderColor: new echarts.graphic.LinearGradient( + 0, + 0, + 0, + 1, + [ + { + offset: 0, + color: 'rgba(255, 255, 255, 1)', + }, + { + offset: 1, + color: 'rgba(204, 238, 255, 1)', + }, + ], + false, + ), shadowOffsetX: 0, // 阴影偏移x轴多少 shadowOffsetY: 0, // 阴影偏移y轴多少 },