dataAugmentation.ts 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. import http from '@/api'
  2. import { DataAugmentationVO, DataAugmentationForm, DataAugmentationQuery } from '@/api/interface/demo/dataAugmentation'
  3. /**
  4. * @name 查询视频去抖动列表
  5. * @param query 参数
  6. * @returns 返回列表
  7. */
  8. export const listDataAugmentationApi = (query: DataAugmentationQuery) => {
  9. return http.get<DataAugmentationVO[]>('/demo/dataAugmentation/list', query, { loading: true })
  10. }
  11. /**
  12. * @name 查询视频去抖动详细
  13. * @param id id
  14. * @returns returns
  15. */
  16. export const getDataAugmentationApi = (id: string | number) => {
  17. return http.get<DataAugmentationVO>(`/demo/dataAugmentation/${id}`)
  18. }
  19. /**
  20. * @name 新增视频去抖动
  21. * @param data data
  22. * @returns returns
  23. */
  24. export const addDataAugmentationApi = (data: DataAugmentationForm) => {
  25. return http.post<any>('/demo/dataAugmentation', data, { loading: false })
  26. }
  27. /**
  28. * @name 修改视频去抖动
  29. * @param data data
  30. * @returns returns
  31. */
  32. export const updateDataAugmentationApi = (data: DataAugmentationForm) => {
  33. return http.put<any>('/demo/dataAugmentation', data, { loading: false })
  34. }
  35. /**
  36. * @name 删除视频去抖动
  37. * @param id id
  38. * @returns returns
  39. */
  40. export const delDataAugmentationApi = (id: string | number | Array<string | number>) => {
  41. return http.delete<any>(`/demo/dataAugmentation/${id}`)
  42. }
  43. /**
  44. * @name 下载模板
  45. * @returns returns
  46. */
  47. export const importTemplateApi = () => {
  48. return http.downloadPost('/demo/dataAugmentation/importTemplate', {})
  49. }
  50. /**
  51. * @name 导入数据
  52. * @returns returns
  53. */
  54. export const importDataAugmentationDataApi = (data: any) => {
  55. return http.post('/demo/dataAugmentation/importData', data)
  56. }
  57. /**
  58. * @name 导出数据
  59. * @returns returns
  60. */
  61. export const exportDataAugmentationApi = (data: any) => {
  62. return http.downloadPost('/demo/dataAugmentation/export', data)
  63. }
  64. export const startDataAugmentationApi = (id: String | Number) => {
  65. return http.get('/demo/dataAugmentation/start/' + id)
  66. }
  67. export const stopDataAugmentationApi = (id: String | Number) => {
  68. return http.get('/demo/dataAugmentation/stop/' + id)
  69. }
  70. export const getCompareImageApi = (taskId: String, idx: String | Number) => {
  71. return http.get('/demo/dataAugmentation/compare/' + taskId + '/' + idx)
  72. }
  73. export const getCompareImageCountApi = (taskId: String | Number) => {
  74. return http.get('/demo/dataAugmentation/compare/num/' + taskId)
  75. }
  76. export const getDialogApi = (id: String | Number) => {
  77. return http.get('/demo/dataAugmentation/log/' + id)
  78. }