From 0eee05eaa802f184131cd366a9da936a99ee153e Mon Sep 17 00:00:00 2001 From: JINGYJ <1458671527@qq.com> Date: Fri, 14 Mar 2025 10:37:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8E=A5=E5=8F=A3=E8=81=94=E8=B0=83?= =?UTF-8?q?=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/dashboard.ts | 5 +++ src/views/dashboard/DataOverview.scss | 26 ++++++++++-- src/views/dashboard/DataOverview.vue | 58 ++++++++++++++++++++------- 3 files changed, 71 insertions(+), 18 deletions(-) diff --git a/src/api/dashboard.ts b/src/api/dashboard.ts index 36105a3..8a5070d 100644 --- a/src/api/dashboard.ts +++ b/src/api/dashboard.ts @@ -43,3 +43,8 @@ export const getRecordFaultApi = (params: any) => { return request.get(`/api/v1/system/get_record_fault_stats/`, params); }; +// 获取实时监控 +export const getRealTimeApi = () => { + return request.get(`/api/v1/record/get_latest_second_records/`); +}; + diff --git a/src/views/dashboard/DataOverview.scss b/src/views/dashboard/DataOverview.scss index 0b60220..e01d55a 100644 --- a/src/views/dashboard/DataOverview.scss +++ b/src/views/dashboard/DataOverview.scss @@ -93,10 +93,30 @@ box-sizing: border-box; gap: 16px; padding: 20px 16px 20px 16px; - img { - width: 100%; - height: auto; + .monitor-images-left, + .monitor-images-right { + flex: 1; + position: relative; + img { + width: 100%; + height: 256px; + } + .fault-info { + position: absolute; + padding: 0 10px; + // miomwidth: 80px; + height: 28px; + background: rgba(0,0,0,0.6); + border-radius: 16px 16px 16px 16px; + top: 16px; + left: 16px; + font-size: 14px; + color: #FFF; + text-align: center; + line-height: 28px; + } } + } } diff --git a/src/views/dashboard/DataOverview.vue b/src/views/dashboard/DataOverview.vue index c2459d1..27d989d 100644 --- a/src/views/dashboard/DataOverview.vue +++ b/src/views/dashboard/DataOverview.vue @@ -77,7 +77,7 @@