You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.4 KiB
TypeScript

import request from '@/config/axios'
export interface DeviceOperationRecordVO {
id: number
deviceCode: string
deviceName: string
totalRunningTime: number
totalStandbyTime: number
totalFaultTime: number
totalWarningTime: number
totalOfflineTime?: number
utilizationRate: string
powerOnRate?: string
startTime?: string
endTime?: string
lineCode?: string
lineName?: string
deviceId?: number
}
export interface DeviceOperationRecordPageParams {
pageNo: number
pageSize: number
deviceCode?: string
deviceName?: string
startTime?: string
endTime?: string
ids?: string
}
export interface DeviceOperationListParams {
deviceCode?: string
deviceName?: string
startTime?: string
endTime?: string
lineCode?: string
lineName?: string
deviceId?: number | string
}
export const DeviceOperationRecordApi = {
getDeviceOperationRecordPage: async (params: DeviceOperationRecordPageParams) => {
return await request.get({ url: `/iot/device-operation-record/deviceOperationPage`, params })
},
getDeviceOperationList: async (params?: DeviceOperationListParams) => {
return await request.get({ url: `/iot/device-operation-record/deviceOperationList`, params })
},
exportDeviceOperationReport: async (params: DeviceOperationRecordPageParams) => {
return await request.download({ url: `/iot/device-operation-record/export-device-operation-report`, params })
}
}