import http from '@/api' import { TargetDetectionVO, TargetDetectionForm, TargetDetectionQuery } from '@/api/interface/demo/TargetDetection' /** * @name 查询目标检测列表 * @param query 参数 * @returns 返回列表 */ export const listTargetDetectionApi = (query: TargetDetectionQuery) => { return http.get('/demo/TargetDetection/list', query, { loading: true }) } /** * @name 查询目标检测详细 * @param id id * @returns returns */ export const getTargetDetectionApi = (id: string | number) => { return http.get(`/demo/TargetDetection/${id}`) } /** * @name 新增目标检测 * @param data data * @returns returns */ export const addTargetDetectionApi = (data: TargetDetectionForm) => { return http.post('/demo/TargetDetection', data, { loading: false }) } /** * @name 修改目标检测 * @param data data * @returns returns */ export const updateTargetDetectionApi = (data: TargetDetectionForm) => { return http.put('/demo/TargetDetection', data, { loading: false }) } /** * @name 删除目标检测 * @param id id * @returns returns */ export const delTargetDetectionApi = (id: string | number | Array) => { return http.delete(`/demo/TargetDetection/${id}`) } /** * @name 下载模板 * @returns returns */ export const importTemplateApi = () => { return http.downloadPost('/demo/TargetDetection/importTemplate', {}) } /** * @name 导入数据 * @returns returns */ export const importTargetDetectionDataApi = (data: any) => { return http.post('/demo/TargetDetection/importData', data) } /** * @name 导出数据 * @returns returns */ export const exportTargetDetectionApi = (data: any) => { return http.downloadPost('/demo/TargetDetection/export', data) } export const startTargetDetectionApi = (id: string | number) => { return http.get(`/demo/TargetDetection/start/${id}`) } export const stopTargetDetectionApi = (id: string | number) => { return http.get('/demo/TargetDetection/stop/' + id) } /** * @name 下载压缩包 * @returns returns */ export const dowloadTargetDetectionApi = (id: string | number): Promise => { return http.downloadGet('/demo/TargetDetection/zip/' + id) }