补充文件
parent
2295788977
commit
a28acd5991
@ -0,0 +1,62 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface DeviceOperationOverviewParams {
|
||||
ids?: string
|
||||
startTime?: string
|
||||
endTime?: string
|
||||
timelinePageNo?: number
|
||||
timelinePageSize?: number
|
||||
}
|
||||
|
||||
export interface DeviceOperationOverviewMetricVO {
|
||||
key: string
|
||||
icon: string
|
||||
value: number
|
||||
unit: string
|
||||
change: number
|
||||
}
|
||||
|
||||
export interface DeviceOperationOverviewHourlyStatusVO {
|
||||
hour: string
|
||||
running: number
|
||||
standby: number
|
||||
fault: number
|
||||
offline: number
|
||||
}
|
||||
|
||||
export interface DeviceOperationOverviewSummaryVO {
|
||||
status: 'running' | 'standby' | 'fault' | 'offline'
|
||||
percent: number
|
||||
hours: number
|
||||
}
|
||||
|
||||
export interface DeviceOperationOverviewTimelineSegmentVO {
|
||||
status: 'running' | 'standby' | 'fault' | 'offline'
|
||||
startHour: number
|
||||
endHour: number
|
||||
}
|
||||
|
||||
export interface DeviceOperationOverviewTimelineRowVO {
|
||||
id: string
|
||||
name: string
|
||||
utilizationRate: number
|
||||
segments: DeviceOperationOverviewTimelineSegmentVO[]
|
||||
}
|
||||
|
||||
export interface DeviceOperationOverviewRespVO {
|
||||
metrics: DeviceOperationOverviewMetricVO[]
|
||||
hourlyStatus: DeviceOperationOverviewHourlyStatusVO[]
|
||||
summary: DeviceOperationOverviewSummaryVO[]
|
||||
summaryTotalHours: number
|
||||
timelineRows: DeviceOperationOverviewTimelineRowVO[]
|
||||
totalDevices: number
|
||||
}
|
||||
|
||||
export const DeviceOperationOverviewApi = {
|
||||
getRunOverview: async (params: DeviceOperationOverviewParams) => {
|
||||
return await request.get<DeviceOperationOverviewRespVO>({
|
||||
url: `/iot/device-operation-record/runOverview`,
|
||||
params
|
||||
})
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue