commonfile.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import request from '@/utils/request'
  2. // 查询通用附件列表
  3. export function listCommonfile(query) {
  4. return request({
  5. url: '/common/commonfile/list',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. // 查询不分页通用附件列表
  11. export function allFileList(query) {
  12. return request({
  13. url: '/common/commonfile/allFileList',
  14. method: 'get',
  15. params: query
  16. })
  17. }
  18. // 查询不分页通用附件列表(pType模糊查询)
  19. export function allFileListFuzzy(query) {
  20. return request({
  21. url: '/common/commonfile/allFileListFuzzy',
  22. method: 'get',
  23. params: query
  24. })
  25. }
  26. // 查询通用附件详细
  27. export function getCommonfile(id) {
  28. return request({
  29. url: '/common/commonfile/' + id,
  30. method: 'get'
  31. })
  32. }
  33. // 新增通用附件
  34. export function addCommonfile(data) {
  35. return request({
  36. url: '/common/commonfile',
  37. method: 'post',
  38. data: data
  39. })
  40. }
  41. // 修改通用附件
  42. export function updateCommonfile(data) {
  43. return request({
  44. url: '/common/commonfile',
  45. method: 'put',
  46. data: data
  47. })
  48. }
  49. // 删除通用附件
  50. export function delCommonfile(id) {
  51. return request({
  52. url: '/common/commonfile/' + id,
  53. method: 'delete'
  54. })
  55. }
  56. // 导出通用附件
  57. export function exportCommonfile(query) {
  58. return request({
  59. url: '/common/commonfile/export',
  60. method: 'get',
  61. params: query
  62. })
  63. }