import request from '@/config/axios'
|
|
export interface ImageVO {
|
id: undefined,
|
cameraId: string,
|
imagePath: string,
|
imageUrl: string,
|
createDate: undefined,
|
}
|
|
// 查询列表
|
export const getImagePage = (params: PageParam) => {
|
return request.get({url: '/data/video/image/page', params})
|
}
|
|
// 获得
|
export const getImage = (id: number) => {
|
return request.get({url: '/data/video/image/get?id=' + id})
|
}
|
|
// 查询应用列表
|
export const getImageList = () => {
|
return request.get({url: '/data/video/image/list'})
|
}
|
|
// 新增
|
export const createImage = (data: ImageVO) => {
|
return request.post({url: '/data/video/image/create', data})
|
}
|
|
// 修改
|
export const updateImage = (data: ImageVO) => {
|
return request.put({url: '/data/video/image/update', data})
|
}
|
|
// 删除
|
export const deleteImage = (id: number) => {
|
return request.delete({url: '/data/video/image/delete?id=' + id})
|
}
|
|
// 导出
|
export const exportImage = (params: ImageVO) => {
|
return request.download({url: '/data/video/image/export-excel', params})
|
}
|
|
//预览摄像头截图
|
export const getPreviewUrl = (url: string) => {
|
const host = import.meta.env.VITE_VIDEO_CAMERA_DOMAIN ? import.meta.env.VITE_VIDEO_CAMERA_DOMAIN : window.location.host
|
return `http://${host}:8899` + url
|
}
|