wjxxy.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. // import http from '@/http/api.js'
  2. import base64 from '@/utils/base64.js'
  3. import http from './api.js'
  4. export const getrequest = (className, methodName) => {
  5. return http.request({
  6. url: '/zf/request',
  7. method: 'POST',
  8. data: {
  9. // "username": "admin",
  10. // "username": "sqmj1",
  11. // "password": "937b0ec364aff24c011307493f5155b4",
  12. // "password": "e10adc3949ba59abbe56e057f20f883e",
  13. "className": className,
  14. "methodName": methodName,
  15. "params": {
  16. "current": "1",
  17. "size": "10"
  18. }
  19. }
  20. })
  21. }
  22. // 获取 地址 树
  23. export const getLdListPt = () => {
  24. return http.request({
  25. url: '/api/blade-xxy/Xxy/getLdList-pt',
  26. method: 'get',
  27. });
  28. };
  29. // 获取单元和物建员 传ldphxlh
  30. export const getLdDetail = (ldphxlh) => {
  31. return http.request({
  32. url: '/zf/request',
  33. method: 'POST',
  34. data: {
  35. "className": 'xxyController',
  36. "methodName": 'getLdDetail',
  37. "params": {
  38. "ldphxlh": ldphxlh
  39. }
  40. }
  41. });
  42. };
  43. // export const getLdDetail = (ldphxlh) => {
  44. // return http.request({
  45. // url: '/api/blade-xxy/Xxy/getLdDetail',
  46. // method: 'get',
  47. // params: {
  48. // "ldphxlh": ldphxlh
  49. // }
  50. // });
  51. // };
  52. // 新增物建员
  53. export const saveXxy = (data) => {
  54. return http.request({
  55. // url: '/api/blade-xxy/Xxy/save',
  56. url: '/zf/request',
  57. method: 'post',
  58. data: {
  59. "appId": '1846809831194980354',
  60. "className": 'xxyController',
  61. "methodName": 'save',
  62. "params": {
  63. "xm": data.xm,
  64. "sfzh": data.sfzh,
  65. "lxfs": data.lxfs,
  66. "ldId": data.ldId,
  67. "dyh": data.dyh,
  68. "zzmm": data.zzmm,
  69. "szlb": data.szlb,
  70. "dwzw": data.dwzw,
  71. "zz": data.zz
  72. }
  73. }
  74. });
  75. };
  76. // 物建员详情
  77. export const detail = (id) => {
  78. return http.request({
  79. // url: '/api/blade-xxy/Xxy/detail',
  80. url: '/zf/request',
  81. method: 'post',
  82. data: {
  83. "appId": '1846809831194980354',
  84. "className": 'xxyController',
  85. "methodName": 'detail',
  86. "params": {
  87. "id": id
  88. }
  89. }
  90. });
  91. };
  92. // 字典
  93. export const dictionary = () => {
  94. return http.request({
  95. // url: '/api/blade-fwInfo/fwInfo/dictionary',
  96. url: '/zf/request',
  97. method: 'post',
  98. data: {
  99. "appId": '1846809831194980354',
  100. "className": 'fwInfoController',
  101. "methodName": 'dictionary',
  102. "params": {}
  103. }
  104. });
  105. };
  106. export const login = (tenantId, username, password, type) => {
  107. return http.request({
  108. url: '/api/blade-auth/oauth/token',
  109. method: 'POST',
  110. header: {
  111. 'Tenant-Id': tenantId,
  112. 'Blade-Requested-With': 'BladeHttpRequest',
  113. },
  114. params: {
  115. tenantId,
  116. username,
  117. password,
  118. grant_type: "password",
  119. scope: "all",
  120. type
  121. }
  122. })
  123. }