From 2476a19dc152a7a048441be5402796a47504de1b Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期五, 06 六月 2025 14:06:19 +0800 Subject: [PATCH] 建议快照 上下限 越界时间 --- src/views/model/sche/suggest/suggestSnapshot.vue | 67 +++++++++++++++++++++++++++++---- 1 files changed, 59 insertions(+), 8 deletions(-) diff --git a/src/views/model/sche/suggest/suggestSnapshot.vue b/src/views/model/sche/suggest/suggestSnapshot.vue index f23ae2e..ca89233 100644 --- a/src/views/model/sche/suggest/suggestSnapshot.vue +++ b/src/views/model/sche/suggest/suggestSnapshot.vue @@ -113,6 +113,64 @@ if (!chartInfo) return chart + const markLineData = [ + { + yAxis: chartInfo.data?.limitH, // 上限 + label: { + show: true, + formatter: '上限', + position: 'insideStartTop', + color: '#FF9A3D' + }, + lineStyle: { + color: '#FF9A3D', + type: 'dashed' + }, + }, + { + yAxis: chartInfo.data?.limitL, // 下限 + label: { + show: true, + formatter: '下限', + position: 'insideStartBottom', + color: '#00C2FF' + }, + lineStyle: { + color: '#00C2FF', + type: 'dashed' + }, + }, + { + xAxis: chartInfo.data?.scheduleTime || 0, // 真实数据分割线 + label: { + show: true, + formatter: '预测时间', + position: 'end', + color: '#5DFF9E' + }, + lineStyle: { + color: '#5DFF9E', + }, + } + ] + // 冲顶触底时间 + if (chartInfo.data?.overLimitTimes?.length > 0) { + chartInfo.data?.overLimitTimes.forEach(overLimitTime => { + markLineData.push({ + xAxis: overLimitTime, // 真实数据分割线 + label: { + show: false, + formatter: '预测时间', + position: 'end', + color: '#5DFF9E' + }, + lineStyle: { + color: '#ff0000', + }, + }) + }) + } + const option = { title: { text: chartInfo.name, @@ -138,14 +196,7 @@ label: { show: false, }, - data: [ - { - xAxis: chartInfo.data?.scheduleTime || 0, // 真实数据分割线 - lineStyle: { - color: '#5DFF9E', - }, - } - ], + data: markLineData, }, }] } -- Gitblit v1.9.3