TargetDetection.ts 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. import http from '@/api'
  2. import {TargetDetectionVO, TargetDetectionForm, TargetDetectionQuery} from '@/api/interface/demo/TargetDetection'
  3. /**
  4. * @name 查询目标检测列表
  5. * @param query 参数
  6. * @returns 返回列表
  7. */
  8. export const listTargetDetectionApi = (query: TargetDetectionQuery) => {
  9. return http.get<TargetDetectionVO[]>('/demo/TargetDetection/list', query, {loading: true})
  10. }
  11. /**
  12. * @name 查询目标检测详细
  13. * @param id id
  14. * @returns returns
  15. */
  16. export const getTargetDetectionApi = (id: string | number) => {
  17. return http.get<TargetDetectionVO>(`/demo/TargetDetection/${id}`)
  18. }
  19. /**
  20. * @name 新增目标检测
  21. * @param data data
  22. * @returns returns
  23. */
  24. export const addTargetDetectionApi = (data: TargetDetectionForm) => {
  25. return http.post<any>('/demo/TargetDetection', data, {loading: false})
  26. }
  27. /**
  28. * @name 修改目标检测
  29. * @param data data
  30. * @returns returns
  31. */
  32. export const updateTargetDetectionApi = (data: TargetDetectionForm) => {
  33. return http.put<any>('/demo/TargetDetection', data, {loading: false})
  34. }
  35. /**
  36. * @name 删除目标检测
  37. * @param id id
  38. * @returns returns
  39. */
  40. export const delTargetDetectionApi = (id: string | number | Array<string | number>) => {
  41. return http.delete<any>(`/demo/TargetDetection/${id}`)
  42. }
  43. /**
  44. * @name 下载模板
  45. * @returns returns
  46. */
  47. export const importTemplateApi = () => {
  48. return http.downloadPost('/demo/TargetDetection/importTemplate', {})
  49. }
  50. /**
  51. * @name 导入数据
  52. * @returns returns
  53. */
  54. export const importTargetDetectionDataApi = (data: any) => {
  55. return http.post('/demo/TargetDetection/importData', data)
  56. }
  57. /**
  58. * @name 导出数据
  59. * @returns returns
  60. */
  61. export const exportTargetDetectionApi = (data: any) => {
  62. return http.downloadPost('/demo/TargetDetection/export', data)
  63. }
  64. export const startTargetDetectionApi = (id: string | number) => {
  65. return http.get<any>(`/demo/TargetDetection/start/${id}`)
  66. }