From 054d5fb5ca672ad2b9dffc7dd37fcd812b226c6b Mon Sep 17 00:00:00 2001 From: luojiayi <1712054227@qq.com> Date: Thu, 10 Apr 2025 13:33:38 +0800 Subject: [PATCH] =?UTF-8?q?2025=E5=B9=B404=E6=9C=8810=E6=97=A513:33:36?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 2 + src/api/index.d.ts | 25 ++- src/api/index.ts | 11 +- src/components/table-custom.vue | 21 ++- src/views/alarmCenter/index.vue | 2 +- src/views/monitoringCenter/deviceHistory.vue | 21 ++- src/views/monitoringCenter/deviceInfo.vue | 87 ++++++++--- src/views/monitoringCenter/deviceRecord.vue | 105 +++++++++---- src/views/monitoringCenter/index.vue | 147 ++++++++++++++---- src/views/monitoringCenter/monitoringTop.vue | 26 ++-- src/views/statisticalCenter/emergencyList.vue | 20 ++- .../synthesizeManage/areaManage/index.vue | 2 +- .../synthesizeManage/deviceInfo/index.vue | 2 +- .../synthesizeManage/deviceManage/index.vue | 4 +- .../synthesizeManage/userManage/index.vue | 2 +- 15 files changed, 361 insertions(+), 116 deletions(-) diff --git a/components.d.ts b/components.d.ts index 7d0d6cb..63dd579 100644 --- a/components.d.ts +++ b/components.d.ts @@ -14,6 +14,7 @@ declare module '@vue/runtime-core' { CustomInput: typeof import('./src/components/CustomInput.vue')['default'] DeviceInfo: typeof import('./src/components/deviceInfo.vue')['default'] ElAvatar: typeof import('element-plus/es')['ElAvatar'] + ElButradioton: typeof import('element-plus/es')['ElButradioton'] ElButton: typeof import('element-plus/es')['ElButton'] ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup'] ElCard: typeof import('element-plus/es')['ElCard'] @@ -36,6 +37,7 @@ declare module '@vue/runtime-core' { ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] ElPopover: typeof import('element-plus/es')['ElPopover'] + ElRadio: typeof import('element-plus/es')['ElRadio'] ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElRow: typeof import('element-plus/es')['ElRow'] diff --git a/src/api/index.d.ts b/src/api/index.d.ts index 20b1b6c..4dd83f4 100644 --- a/src/api/index.d.ts +++ b/src/api/index.d.ts @@ -164,6 +164,10 @@ export namespace TDevice { mode: number monitorMode: number battery: number + adminUsername: string + adminPhone: string + userNumber: string + adminType: string name: string username: string password: string @@ -183,7 +187,7 @@ export namespace TDevice { } export interface IRecordReq extends Ipaging { - deviceId?: string | string[]; + deviceId?: any; } export interface IRecordRes { id: number @@ -323,3 +327,22 @@ export namespace TWarningDetail { warnType: number } } + +export namespace THealthLatestData { + + interface TReq { + deviceId: number | string + } + interface TRes { + hr: number + hrTime: string + hrArr: any[], + bo: number + boArr: any[], + boTime: string + temp: number + tempTime: string + tempArr: any[] + } +} + diff --git a/src/api/index.ts b/src/api/index.ts index d8d30de..9faf4ce 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,5 +1,5 @@ import request from '../utils/request'; -import { TLogin, TAccount, IpagingRes, TDevice, TOrg, TRoleList, TStatisticsDevice, statisticsContentReq, statisticsContentRes, TStatisticsCount, TWarnRecord, TWarningDetail, TWarningConfirm, TDeviceConfigModify, TDeviceConfig } from "./index.d"; +import { TLogin, TAccount, IpagingRes, TDevice, TOrg, TRoleList, TStatisticsDevice, statisticsContentReq, statisticsContentRes, TStatisticsCount, TWarnRecord, TWarningDetail, TWarningConfirm, TDeviceConfigModify, TDeviceConfig, THealthLatestData } from "./index.d"; export const fetchLogin = (p: TLogin.Ireq): Promise => { return request({ @@ -269,4 +269,13 @@ export const deviceConfigModify = (p: TDeviceConfigModify): Promise => { }); }; +// 获取最新健康数据 +export const healthLatestData = (p: THealthLatestData.TReq): Promise => { + return request({ + url: '/v1/web/health/latestData', + method: 'get', + params: p + }); +}; + diff --git a/src/components/table-custom.vue b/src/components/table-custom.vue index e80630f..f76d8bf 100644 --- a/src/components/table-custom.vue +++ b/src/components/table-custom.vue @@ -68,12 +68,12 @@ @@ -84,8 +84,23 @@ import { toRefs, PropType, ref } from "vue"; import { Delete, Edit, View, Refresh } from "@element-plus/icons-vue"; import { ElMessageBox } from "element-plus"; import { TableItem } from "@/types/table"; +interface TPaging { + page: number; + size: number; + total: number; +} const props = defineProps({ + paging: { + type: Object as PropType, + default: () => { + return { + page: 1, + size: 10, + total: 0, + }; + }, + }, // 表格相关 tableData: { type: Array, diff --git a/src/views/alarmCenter/index.vue b/src/views/alarmCenter/index.vue index 4dcc2d9..95dfd87 100644 --- a/src/views/alarmCenter/index.vue +++ b/src/views/alarmCenter/index.vue @@ -2,7 +2,7 @@
- + - + diff --git a/src/views/monitoringCenter/deviceRecord.vue b/src/views/monitoringCenter/deviceRecord.vue index 79c7b89..77d0be8 100644 --- a/src/views/monitoringCenter/deviceRecord.vue +++ b/src/views/monitoringCenter/deviceRecord.vue @@ -3,53 +3,98 @@
当前设备告警记录
- - -