index.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import { defHttp } from '@/config/axios'
  2. import type { FileConfigVO } from './types'
  3. // 查询文件配置列表
  4. export const getFileConfigPageApi = ({ params }) => {
  5. return defHttp.get<PageResult<FileConfigVO>>({ url: '/infra/file-config/page', params })
  6. }
  7. // 查询文件配置详情
  8. export const getFileConfigApi = (id: number) => {
  9. return defHttp.get<FileConfigVO>({ url: '/infra/file-config/get?id=' + id })
  10. }
  11. // 更新文件配置为主配置
  12. export const updateFileConfigMasterApi = (id: number) => {
  13. return defHttp.get<FileConfigVO>({ url: '/infra/file-config/update-master?id=' + id })
  14. }
  15. // 新增文件配置
  16. export const createFileConfigApi = (params: FileConfigVO) => {
  17. return defHttp.post({ url: '/infra/file-config/create', params })
  18. }
  19. // 修改文件配置
  20. export const updateFileConfigApi = (params: FileConfigVO) => {
  21. return defHttp.put({ url: '/infra/file-config/update', params })
  22. }
  23. // 删除文件配置
  24. export const deleteFileConfigApi = (id: number) => {
  25. return defHttp.delete({ url: '/infra/file-config/delete?id=' + id })
  26. }
  27. // 测试文件配置
  28. export const testFileConfigApi = (id: number) => {
  29. return defHttp.get({ url: '/infra/file-config/test?id=' + id })
  30. }