feat(pages): call-log-page
This commit is contained in:
@@ -7,6 +7,7 @@ import type { NdmKeyboardVO } from './video/ndm-keyboard';
|
||||
import type { NdmMediaServerVO } from './video/ndm-media-server';
|
||||
import type { NdmVideoServerVO } from './video/ndm-video-server';
|
||||
|
||||
export * from './log/ndm-call-log';
|
||||
export * from './log/ndm-device-alarm-log';
|
||||
export * from './log/ndm-icmp-log';
|
||||
export * from './log/ndm-snmp-log';
|
||||
|
||||
17
src/apis/models/device/log/ndm-call-log.ts
Normal file
17
src/apis/models/device/log/ndm-call-log.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import type { BaseModel, ReduceForPageQuery, ReduceForSaveVO, ReduceForUpdateVO } from '../../base';
|
||||
|
||||
export interface NdmCallLogVO extends BaseModel {
|
||||
sourceGbId: string;
|
||||
targetGbId: string;
|
||||
method: string;
|
||||
messageType: string;
|
||||
cmdType: string;
|
||||
}
|
||||
|
||||
export type NdmCallLogResultVO = Partial<NdmCallLogVO>;
|
||||
|
||||
export type NdmCallLogSaveVO = Partial<Omit<NdmCallLogVO, ReduceForSaveVO>>;
|
||||
|
||||
export type NdmCallLogUpdateVO = Partial<Omit<NdmCallLogVO, ReduceForUpdateVO>>;
|
||||
|
||||
export type NdmCallLogPageQuery = Partial<Omit<NdmCallLogVO, ReduceForPageQuery>>;
|
||||
@@ -1,5 +1,6 @@
|
||||
export * from './export/ndm-icmp-export';
|
||||
|
||||
export * from './log/ndm-call-log';
|
||||
export * from './log/ndm-device-alarm-log';
|
||||
export * from './log/ndm-icmp-log';
|
||||
export * from './log/ndm-snmp-log';
|
||||
|
||||
25
src/apis/requests/device/log/ndm-call-log.ts
Normal file
25
src/apis/requests/device/log/ndm-call-log.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { ndmClient } from '@/apis/client';
|
||||
import type { NdmCallLogPageQuery, NdmCallLogResultVO, PageParams, PageResult } from '@/apis/models';
|
||||
|
||||
export const postNdmCallLogPage = async (stationCode: string, pageQuery: PageParams<NdmCallLogPageQuery>) => {
|
||||
const prefix = stationCode ? `/${stationCode}` : '';
|
||||
const resp = await ndmClient.post<PageResult<NdmCallLogResultVO>>(`${prefix}/api/ndm/ndmCallLog/page`, pageQuery);
|
||||
const [err, callLogData] = resp;
|
||||
if (err || !callLogData) {
|
||||
throw err;
|
||||
}
|
||||
return callLogData;
|
||||
};
|
||||
|
||||
export const ndmCallLogDefaultExportByTemplate = async (stationCode: string, pageQuery: PageParams<NdmCallLogPageQuery>) => {
|
||||
const endpoint = '/api/ndm/ndmCallLog/defaultExportByTemplate';
|
||||
if (!stationCode) {
|
||||
throw new Error('请选择车站');
|
||||
}
|
||||
const resp = await ndmClient.post<Blob>(`/${stationCode}${endpoint}`, pageQuery, { responseType: 'blob', retRaw: true });
|
||||
const [err, data] = resp;
|
||||
if (err || !data) {
|
||||
throw err;
|
||||
}
|
||||
return data;
|
||||
};
|
||||
Reference in New Issue
Block a user