engineeringIndustry.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import request from '@/utils/request'
  2. // 根据url直接获取type
  3. function getTypeFromUrl(url) {
  4. // 使用正则表达式或其他方法从 URL 中提取 type 参数
  5. const params = new URLSearchParams(url.split('?')[1]);
  6. return params.get('type');
  7. }
  8. export function getEngineeIndustryList(sata) {
  9. sata.type = getTypeFromUrl(window.location.href)
  10. return request({
  11. url: `/zdsz/engineeringIndustry/list`,
  12. method: 'get',
  13. params:sata
  14. })
  15. }
  16. export function addEngineeEngineeIndustry(data) {
  17. return request({
  18. url: '/zdsz/engineeringIndustry',
  19. method: 'post',
  20. data
  21. })
  22. }
  23. export function putEngineeEngineeIndustry(id) {
  24. return request({
  25. url: `/zdsz/engineeringIndustry/${id}`,
  26. method: 'get',
  27. })
  28. }
  29. export function EditEngineeEngineeIndustry(data) {
  30. return request({
  31. url: '/zdsz/engineeringIndustry',
  32. method: 'put',
  33. data
  34. })
  35. }
  36. export function DelEngineeEngineeIndustry(id) {
  37. return request({
  38. url: `/zdsz/engineeringIndustry/${id}`,
  39. method: 'delete',
  40. })
  41. }
  42. export function QueryEngineeIndustry({id}) {
  43. return request({
  44. url: `/zdsz/engineeringIndustry/${id}/1`,
  45. method: 'get',
  46. })
  47. }
  48. export function UpdateEngineeIndustry(data) {
  49. return request({
  50. url: '/zdsz/engineeringIndustry/updateNodeByBo',
  51. method: 'put',
  52. data
  53. })
  54. }