infraStorageConfigApi.ts 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. import { defHttp } from '/@/utils/http/axios';
  2. import { setParams } from '/@/utils/index';
  3. enum Api {
  4. infraStorageconfigQueryPage = '/infra/storageconfig/query/page',
  5. infraStorageconfigDetail = '/infra/storageconfig/detail',
  6. infraStorageconfigAdd = '/infra/storageconfig/add',
  7. infraStorageconfigEdit = '/infra/storageconfig/edit',
  8. infraStorageconfigRemove = '/infra/storageconfig/removeByIds',
  9. }
  10. /**
  11. *
  12. * @author fan
  13. * @date 2023/05/04 14:21
  14. * @description: 根据条件查询文件存储配置列表,权限 - infra:storageconfig:query
  15. * @method: POST
  16. * @param:
  17. * {String} name 文件配置名称
  18. * {String} type 存储类型
  19. * @return:
  20. * {String} code 文件配置编码
  21. * {String} name 文件配置名称
  22. * {Boolean} master 主配置
  23. * {String} type 存储类型
  24. * {String} config 文件配置
  25. * {String} remark 备注
  26. */
  27. export const infraStorageconfigQueryPage = (params?: object) => {
  28. return defHttp.post({ url: Api.infraStorageconfigQueryPage, params: setParams(params) });
  29. };
  30. /**
  31. *
  32. * @author fan
  33. * @date 2023/05/04 14:21
  34. * @description: 根据id查询文件存储配置详细信息,权限 - infra:storageconfig:query
  35. * @method: GET
  36. * @param: id 文件存储配置主键id
  37. * @return:
  38. * {String} code 文件配置编码
  39. * {String} name 文件配置名称
  40. * {Boolean} master 主配置
  41. * {String} type 存储类型
  42. * {String} config 文件配置
  43. * {String} remark 备注
  44. */
  45. export const infraStorageconfigDetail = (id: string) => {
  46. return defHttp.get({ url: Api.infraStorageconfigDetail + '/' + id });
  47. };
  48. /**
  49. *
  50. * @author fan
  51. * @date 2023/05/04 14:21
  52. * @description: 添加文件存储配置,权限 - infra:storageconfig:add
  53. * @method: POST
  54. * @param:
  55. * {String} code 文件配置编码
  56. * {String} name 文件配置名称
  57. * {Boolean} master 主配置
  58. * {String} type 存储类型
  59. * {String} config 文件配置
  60. * {String} remark 备注
  61. * @return:
  62. * 0 添加失败
  63. * 1 添加成功
  64. */
  65. export const infraStorageconfigAdd = (params?: object) => {
  66. return defHttp.post({ url: Api.infraStorageconfigAdd, params: params });
  67. };
  68. /**
  69. *
  70. * @author fan
  71. * @date 2023/05/04 14:21
  72. * @description: 通过主键id编辑文件存储配置,权限 - infra:storageconfig:edit
  73. * @method: POST
  74. * @param:
  75. * {String} code 文件配置编码
  76. * {String} name 文件配置名称
  77. * {Boolean} master 主配置
  78. * {String} type 存储类型
  79. * {String} config 文件配置
  80. * {String} remark 备注
  81. * @return:
  82. * 0 编辑失败
  83. * 1 编辑成功
  84. */
  85. export const infraStorageconfigEdit = (params?: object) => {
  86. return defHttp.post({ url: Api.infraStorageconfigEdit, params: params });
  87. };
  88. /**
  89. * @description: 删除,权限 - infra:storageconfig:remove
  90. * @method: POST
  91. */
  92. export const infraStorageconfigRemove = (params: Array<string | number>) => {
  93. return defHttp.post({ url: Api.infraStorageconfigRemove, params: params });
  94. };