playback.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. {
  11. url: '/nvrOption/replayNvr',
  12. method: 'post',
  13. data,
  14. },
  15. {
  16. isTransformResponse: false,
  17. },
  18. );
  19. };
  20. export interface GetRecordByTimeBody {
  21. algoList: number[];
  22. cameraId: number;
  23. endTime: string;
  24. startTime: string;
  25. }
  26. /** 根据时间段获取违规记录点 */
  27. export const getRecordByTime = (data: GetRecordByTimeBody): Promise<ViolationRecordItem[]> => {
  28. return http.request({
  29. url: '/minio/getRecordByTime',
  30. method: 'post',
  31. data,
  32. });
  33. };
  34. export interface ViolationRecordItem {
  35. algoId: number;
  36. algoName: string;
  37. cameraId: number;
  38. id: number;
  39. time: string;
  40. }
  41. /** 获取nvr下载链接 */
  42. export const getNvrDownloadUrl = (data: GetReplayNvrBody) => {
  43. return http.request({
  44. url: '/nvrOption/download',
  45. method: 'post',
  46. data,
  47. timeout: 100000000000,
  48. });
  49. };