diff --git a/src/apis/models/index.ts b/src/apis/models/index.ts index d659eda..718b449 100644 --- a/src/apis/models/index.ts +++ b/src/apis/models/index.ts @@ -2,3 +2,4 @@ export * from './base'; export * from './device'; export * from './system'; export * from './user'; +export * from './vimp'; diff --git a/src/apis/models/vimp/index.ts b/src/apis/models/vimp/index.ts new file mode 100644 index 0000000..29a8dc2 --- /dev/null +++ b/src/apis/models/vimp/index.ts @@ -0,0 +1 @@ +export * from './snap-result'; diff --git a/src/apis/models/vimp/snap-result.ts b/src/apis/models/vimp/snap-result.ts new file mode 100644 index 0000000..81aa63c --- /dev/null +++ b/src/apis/models/vimp/snap-result.ts @@ -0,0 +1,5 @@ +export interface SnapResult { + absoluteFilePath: string; + path: string; + url: string; +} diff --git a/src/apis/requests/device/video/ndm-camera.ts b/src/apis/requests/device/video/ndm-camera.ts index 1c4b310..2288818 100644 --- a/src/apis/requests/device/video/ndm-camera.ts +++ b/src/apis/requests/device/video/ndm-camera.ts @@ -1,4 +1,4 @@ -import { ndmClient, type NdmCameraPageQuery, type NdmCameraResultVO, type NdmCameraUpdateVO, type PageParams, type PageResult } from '@/apis'; +import { ndmClient, type NdmCameraPageQuery, type NdmCameraResultVO, type NdmCameraUpdateVO, type PageParams, type PageResult, type SnapResult } from '@/apis'; export const postNdmCameraPage = async (stationCode: string, pageQuery: PageParams, signal?: AbortSignal) => { const prefix = stationCode ? `/${stationCode}` : ''; @@ -29,3 +29,12 @@ export const putNdmCamera = async (stationCode: string, updateVO: NdmCameraUpdat } return await getNdmCameraDetail(stationCode, ndmCamera.id ?? ''); }; + +export const getSnapByDeviceIdApi = async (deviceId: string) => { + const resp = await ndmClient.get(`/api/ndm/ndmCamera/getSnapByDeviceId`, { params: { deviceId } }); + const [err, snap] = resp; + if (err || !snap) { + throw err; + } + return snap; +}; diff --git a/src/pages/alarm-page.vue b/src/pages/alarm-page.vue index 8688cea..42b7e2f 100644 --- a/src/pages/alarm-page.vue +++ b/src/pages/alarm-page.vue @@ -1,7 +1,7 @@