123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- 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<TargetDetectionVO[]>('/demo/TargetDetection/list', query, { loading: true })
- }
- /**
- * @name 查询目标检测详细
- * @param id id
- * @returns returns
- */
- export const getTargetDetectionApi = (id: string | number) => {
- return http.get<TargetDetectionVO>(`/demo/TargetDetection/${id}`)
- }
- /**
- * @name 新增目标检测
- * @param data data
- * @returns returns
- */
- export const addTargetDetectionApi = (data: TargetDetectionForm) => {
- return http.post<any>('/demo/TargetDetection', data, { loading: false })
- }
- /**
- * @name 修改目标检测
- * @param data data
- * @returns returns
- */
- export const updateTargetDetectionApi = (data: TargetDetectionForm) => {
- return http.put<any>('/demo/TargetDetection', data, { loading: false })
- }
- /**
- * @name 删除目标检测
- * @param id id
- * @returns returns
- */
- export const delTargetDetectionApi = (id: string | number | Array<string | number>) => {
- return http.delete<any>(`/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<any>(`/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<any> => {
- return http.downloadGet('/demo/TargetDetection/zip/' + id)
- }
|