feat: alarm records query
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
export interface Station {
|
||||
// id: string;
|
||||
code: string;
|
||||
name: string;
|
||||
deviceIdPrefix: string; // 当查询设备告警记录时,需要通过deviceId的前4位来判断车站
|
||||
online: boolean;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ import type { BaseModel } from '../../base/model';
|
||||
import type { ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base/reduce';
|
||||
|
||||
export interface NdmDeviceAlarmLogVO extends BaseModel {
|
||||
[key: string]: any; // 告警数据表格中会加一些别的标记字段
|
||||
alarmNo: string;
|
||||
alarmDate: string;
|
||||
faultLocation: string;
|
||||
|
||||
@@ -22,3 +22,21 @@ export const postNdmDeviceAlarmLogPage = async (stationCode: string, pageQuery:
|
||||
}
|
||||
return alarmData;
|
||||
};
|
||||
|
||||
export const defaultExportByTemplate = async (stationCode: string, pageQuery: PageParams<NdmDeviceAlarmLogPageQuery>) => {
|
||||
const endpoint = '/api/ndm/ndmDeviceAlarmLog/defaultExportByTemplate';
|
||||
if (!stationCode) {
|
||||
const resp = await userClient.post<BlobPart>(`${endpoint}`, pageQuery, { responseType: 'blob', retRaw: true });
|
||||
const [err, data] = resp;
|
||||
if (err || !data) {
|
||||
throw err;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
const resp = await ndmClient.post<BlobPart>(`${endpoint}`, pageQuery, { responseType: 'blob', retRaw: true });
|
||||
const [err, data] = resp;
|
||||
if (err || !data) {
|
||||
throw err;
|
||||
}
|
||||
return data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user