videoStable.ts 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import http from '@/api'
  2. // @ts-expect-error
  3. import { VideoStableVO, VideoStableForm, VideoStableQuery } from '@/api/interface/demo/videoStable'
  4. /**
  5. * @name 查询视频去抖动列表
  6. * @param query 参数
  7. * @returns 返回列表
  8. */
  9. export const listVideoStableApi = (query: VideoStableQuery) => {
  10. return http.get<VideoStableVO[]>('/demo/videoStable/list', query, { loading: true })
  11. }
  12. /**
  13. * @name 查询视频去抖动详细
  14. * @param id id
  15. * @returns returns
  16. */
  17. export const getVideoStableApi = (id: string | number) => {
  18. return http.get<VideoStableVO>(`/demo/videoStable/${id}`)
  19. }
  20. /**
  21. * @name 新增视频去抖动
  22. * @param data data
  23. * @returns returns
  24. */
  25. export const addVideoStableApi = (data: VideoStableForm) => {
  26. return http.post<any>('/demo/videoStable', data, { loading: false })
  27. }
  28. /**
  29. * @name 修改视频去抖动
  30. * @param data data
  31. * @returns returns
  32. */
  33. export const updateVideoStableApi = (data: VideoStableForm) => {
  34. return http.put<any>('/demo/videoStable', data, { loading: false })
  35. }
  36. /**
  37. * @name 删除视频去抖动
  38. * @param id id
  39. * @returns returns
  40. */
  41. export const delVideoStableApi = (id: string | number | Array<string | number>) => {
  42. return http.delete<any>(`/demo/videoStable/${id}`)
  43. }
  44. /**
  45. * @name 下载模板
  46. * @returns returns
  47. */
  48. export const importTemplateApi = () => {
  49. return http.downloadPost('/demo/videoStable/importTemplate', {})
  50. }
  51. /**
  52. * @name 导入数据
  53. * @returns returns
  54. */
  55. export const importVideoStableDataApi = (data: any) => {
  56. return http.post('/demo/videoStable/importData', data)
  57. }
  58. /**
  59. * @name 导出数据
  60. * @returns returns
  61. */
  62. export const exportVideoStableApi = (data: any) => {
  63. return http.downloadPost('/demo/videoStable/export', data)
  64. }