place.js 1010 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import request from '@/utils/request'
  2. // 查询药品产地列表
  3. export function listPlace(query) {
  4. return request({
  5. url: '/yfc-admin/drugs/place/list',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. // 查询药品产地详细
  11. export function getPlace(id) {
  12. return request({
  13. url: '/yfc-admin/drugs/place/' + id,
  14. method: 'get'
  15. })
  16. }
  17. // 新增药品产地
  18. export function addPlace(data) {
  19. return request({
  20. url: '/yfc-admin/drugs/place',
  21. method: 'post',
  22. data: data
  23. })
  24. }
  25. // 修改药品产地
  26. export function updatePlace(data) {
  27. return request({
  28. url: '/yfc-admin/drugs/place',
  29. method: 'put',
  30. data: data
  31. })
  32. }
  33. // 删除药品产地
  34. export function delPlace(id) {
  35. return request({
  36. url: '/yfc-admin/drugs/place/' + id,
  37. method: 'delete'
  38. })
  39. }
  40. // 导出药品产地
  41. export function exportPlace(query) {
  42. return request({
  43. url: '/yfc-admin/drugs/place/export',
  44. method: 'get',
  45. params: query,
  46. responseType: 'blob',
  47. download: true,
  48. })
  49. }