reportManager.api.ts 840 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import { defHttp } from '/@/utils/http/axios';
  2. import { Modal } from 'ant-design-vue';
  3. enum Api {
  4. list = '/safety/reportInfo/list',
  5. save = '/safety/reportInfo/createReportFile',
  6. deleteById = '/safety/reportInfo/delete',
  7. downLoad='/safety/reportInfo/download'
  8. }
  9. /**
  10. * 列表接口
  11. * @param params
  12. */
  13. export const list = (params) => defHttp.get({ url: Api.list, params });
  14. /**
  15. * 保存或者更新用户
  16. * @param params
  17. */
  18. export const save = (params) => defHttp.post({ url: Api.save, params });
  19. /**
  20. * 删除用户
  21. */
  22. export const deleteById = (params, handleSuccess) => {
  23. return defHttp.delete({ url: Api.deleteById, params }, { joinParamsToUrl: true }).then(() => {
  24. handleSuccess();
  25. });
  26. };
  27. /*
  28. 下载
  29. */
  30. export const downLoad = (params) => defHttp.post({ url: Api.downLoad, params, responseType: 'blob' });