playback.ts 1021 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import { http } from '@/utils/http/axios';
  2. export interface GetReplayNvrBody {
  3. cameraId: number;
  4. endTime: string;
  5. startTime: string;
  6. }
  7. /** 回放nvr */
  8. export const getReplayNvr = (data: GetReplayNvrBody) => {
  9. return http.request({
  10. url: '/nvrOption/replayNvr',
  11. method: 'post',
  12. data,
  13. });
  14. };
  15. export interface GetRecordByTimeBody {
  16. algoList: number[];
  17. cameraId: number;
  18. endTime: string;
  19. startTime: string;
  20. }
  21. /** 根据时间段获取违规记录点 */
  22. export const getRecordByTime = (data: GetRecordByTimeBody): Promise<ViolationRecordItem[]> => {
  23. return http.request({
  24. url: '/minio/getRecordByTime',
  25. method: 'post',
  26. data,
  27. });
  28. };
  29. export interface ViolationRecordItem {
  30. algoId: number;
  31. algoName: string;
  32. cameraId: number;
  33. id: number;
  34. time: string;
  35. }
  36. /** 获取nvr下载链接 */
  37. export const getNvrDownloadUrl = (data: GetReplayNvrBody) => {
  38. return http.request({
  39. url: '/nvrOption/download',
  40. method: 'post',
  41. data,
  42. timeout: 100000000000,
  43. });
  44. };