slelist.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import { AxiosResponse } from 'axios'
  2. import { ContentType, HttpClient, RequestParams } from '/@/api/admin/http-client'
  3. import { ProjectGetPageDto } from './slelistDto'
  4. export class Api<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
  5. /**
  6. * No description
  7. *
  8. * @tags
  9. * @name GetList
  10. * @summary 查询列表
  11. * @request POST:'/api/app/project/get-page'
  12. * @secure
  13. */
  14. getList = (data: any, params: RequestParams = {}): any =>
  15. this.request<AxiosResponse, any>({
  16. path: '/api/app/project/get-page',
  17. method: 'POST',
  18. body: data,
  19. type: ContentType.Json,
  20. secure: true,
  21. format: 'json',
  22. ...params
  23. })
  24. /**
  25. * 上传/添加项目
  26. */
  27. uploadProject = (data: ProjectGetPageDto, params: RequestParams = {}) => {
  28. return this.request({
  29. path: '/api/app/project/upload-project',
  30. method: 'POST',
  31. body: data,
  32. type: ContentType.Json,
  33. format: 'json',
  34. ...params
  35. })
  36. }
  37. /**
  38. * 更新项目
  39. */
  40. updateProject = (data: ProjectGetPageDto & { id: string }, params: RequestParams = {}) => {
  41. return this.request({
  42. path: '/api/app/project/update-project',
  43. method: 'POST',
  44. body: data,
  45. type: ContentType.Json,
  46. format: 'json',
  47. ...params
  48. })
  49. }
  50. /** 获取所有项目的主键,项目名称,项目编码 */
  51. getProjectMainInfo = () => {
  52. return this.request({
  53. path:'/api/app/project/get-main-info',
  54. method:'get',
  55. })
  56. }
  57. }