提交 | 用户 | 时间
|
aed8e1
|
1 |
import request from '@/config/axios' |
H |
2 |
|
|
3 |
export interface ImageVO { |
|
4 |
id: undefined, |
|
5 |
cameraId: string, |
|
6 |
imagePath: string, |
|
7 |
imageUrl: string, |
|
8 |
createDate: undefined, |
|
9 |
} |
|
10 |
|
|
11 |
// 查询列表 |
|
12 |
export const getImagePage = (params: PageParam) => { |
|
13 |
return request.get({url: '/data/video/image/page', params}) |
|
14 |
} |
|
15 |
|
|
16 |
// 获得 |
|
17 |
export const getImage = (id: number) => { |
|
18 |
return request.get({url: '/data/video/image/get?id=' + id}) |
|
19 |
} |
|
20 |
|
|
21 |
// 查询应用列表 |
|
22 |
export const getImageList = () => { |
|
23 |
return request.get({url: '/data/video/image/list'}) |
|
24 |
} |
|
25 |
|
|
26 |
// 新增 |
|
27 |
export const createImage = (data: ImageVO) => { |
|
28 |
return request.post({url: '/data/video/image/create', data}) |
|
29 |
} |
|
30 |
|
|
31 |
// 修改 |
|
32 |
export const updateImage = (data: ImageVO) => { |
|
33 |
return request.put({url: '/data/video/image/update', data}) |
|
34 |
} |
|
35 |
|
|
36 |
// 删除 |
|
37 |
export const deleteImage = (id: number) => { |
|
38 |
return request.delete({url: '/data/video/image/delete?id=' + id}) |
|
39 |
} |
|
40 |
|
|
41 |
// 导出 |
|
42 |
export const exportImage = (params: ImageVO) => { |
|
43 |
return request.download({url: '/data/video/image/export-excel', params}) |
|
44 |
} |
|
45 |
|
|
46 |
//预览摄像头截图 |
|
47 |
export const getPreviewUrl = (url: string) => { |
|
48 |
const host = import.meta.env.VITE_VIDEO_CAMERA_DOMAIN ? import.meta.env.VITE_VIDEO_CAMERA_DOMAIN : window.location.host |
|
49 |
return `http://${host}:8899` + url |
|
50 |
} |