import type {IEquipmentErrorSearch} from "@/interface/page/recordEquipmentSearch/IEquipmentErrorSearch.ts";
import axiosInstance from "@/api/axios.ts";

export default class RecordErrorApi {

    // 查询设备报警信息
    static queryEquipmentError(params: IEquipmentErrorSearch, pageSize: number, pageIndex: number) {
        return axiosInstance.post('/app/recordError/queryEquipmentError', params, {
            params: {
                pageSize: pageSize,
                pageIndex: pageIndex
            }
        })
    };

    // 导出设备错误信息
    static exportEquipmentError(params: IEquipmentErrorSearch) {
        return axiosInstance.post('/app/recordError/exportEquipmentError', params, {
            responseType: 'blob',
            timeout: 30000
        })
    }
}