Dispatch.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. import axiosApi from './AxiosApi.js'
  2. const apiList = {
  3. page: {
  4. url: `/authority/dispatchRecord/page`,
  5. method: 'POST'
  6. },
  7. pageException: {
  8. url: `/authority/dispatchException/page`,
  9. method: 'POST'
  10. },
  11. save: {
  12. url: `/authority/dispatchException`,
  13. method: 'POST'
  14. },
  15. update: {
  16. url: `/authority/dispatchException`,
  17. method: 'PUT'
  18. },
  19. delete: {
  20. url: `/authority/dispatchException`,
  21. method: 'DELETE'
  22. },
  23. preview: {
  24. method: 'POST',
  25. url: `/authority/dispatch/preview`
  26. },
  27. selectLogs: {
  28. method: 'POST',
  29. url: `/authority/dispatchRecord/selectLogs`
  30. },
  31. getPointInfo: {
  32. method: 'POST',
  33. url: `/authority/plc/getPointInfo`
  34. }
  35. }
  36. export default {
  37. page (data) {
  38. return axiosApi({
  39. ...apiList.page,
  40. data
  41. })
  42. },
  43. pageException (data) {
  44. return axiosApi({
  45. ...apiList.pageException,
  46. data
  47. })
  48. },
  49. save (data) {
  50. return axiosApi({
  51. ...apiList.save,
  52. data
  53. })
  54. },
  55. update (data) {
  56. return axiosApi({
  57. ...apiList.update,
  58. data
  59. })
  60. },
  61. delete (data) {
  62. return axiosApi({
  63. ...apiList.delete,
  64. data
  65. })
  66. },
  67. selectLogs(data){
  68. return axiosApi({
  69. ...apiList.selectLogs,
  70. data
  71. })
  72. },
  73. getPointInfo(){
  74. return axiosApi({
  75. ...apiList.getPointInfo
  76. })
  77. },
  78. clearPlcPoint(point,flag){
  79. return axiosApi({
  80. method: 'GET',
  81. url: `/authority/plc/clearPlcPoint`,
  82. data: {point: point,flag:flag}
  83. })
  84. },
  85. resendCommand(id){
  86. return axiosApi({
  87. method: 'GET',
  88. url: `/authority/plc/resendCommand`,
  89. data: {id: id}
  90. })
  91. },
  92. unlockStorge(id,moveFlag){
  93. return axiosApi({
  94. method: 'GET',
  95. url: `/authority/dispatchRecord/unlockStorge`,
  96. data: {id: id,moveFlag: moveFlag}
  97. })
  98. },
  99. executeNextNode(id){
  100. return axiosApi({
  101. method: 'GET',
  102. url: `/authority/dispatchRecord/executeNextNode`,
  103. data: {id: id}
  104. })
  105. },
  106. cancelTaskNodeLog(id){
  107. return axiosApi({
  108. method: 'GET',
  109. url: `/authority/dispatchRecord/cancelTaskNodeLog`,
  110. data: {id: id}
  111. })
  112. },
  113. taskNodeCallback(data){
  114. return axiosApi({
  115. method: 'POST',
  116. url: `/authority/taskNode/taskNodeCallback`,
  117. data
  118. })
  119. }
  120. }