autoCode.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. import service from '@/utils/request'
  2. export const preview = (data) => {
  3. return service({
  4. url: '/autoCode/preview',
  5. method: 'post',
  6. data
  7. })
  8. }
  9. export const createTemp = (data) => {
  10. return service({
  11. url: '/autoCode/createTemp',
  12. method: 'post',
  13. data,
  14. responseType: 'blob'
  15. })
  16. }
  17. // @Tags SysApi
  18. // @Summary 获取当前所有数据库
  19. // @Security ApiKeyAuth
  20. // @accept application/json
  21. // @Produce application/json
  22. // @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
  23. // @Router /autoCode/getDatabase [get]
  24. export const getDB = (params) => {
  25. return service({
  26. url: '/autoCode/getDB',
  27. method: 'get',
  28. params
  29. })
  30. }
  31. // @Tags SysApi
  32. // @Summary 获取当前数据库所有表
  33. // @Security ApiKeyAuth
  34. // @accept application/json
  35. // @Produce application/json
  36. // @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
  37. // @Router /autoCode/getTables [get]
  38. export const getTable = (params) => {
  39. return service({
  40. url: '/autoCode/getTables',
  41. method: 'get',
  42. params
  43. })
  44. }
  45. // @Tags SysApi
  46. // @Summary 获取当前数据库所有表
  47. // @Security ApiKeyAuth
  48. // @accept application/json
  49. // @Produce application/json
  50. // @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
  51. // @Router /autoCode/getColumn [get]
  52. export const getColumn = (params) => {
  53. return service({
  54. url: '/autoCode/getColumn',
  55. method: 'get',
  56. params
  57. })
  58. }
  59. export const getSysHistory = (data) => {
  60. return service({
  61. url: '/autoCode/getSysHistory',
  62. method: 'post',
  63. data
  64. })
  65. }
  66. export const rollback = (data) => {
  67. return service({
  68. url: '/autoCode/rollback',
  69. method: 'post',
  70. data
  71. })
  72. }
  73. export const getMeta = (data) => {
  74. return service({
  75. url: '/autoCode/getMeta',
  76. method: 'post',
  77. data
  78. })
  79. }
  80. export const delSysHistory = (data) => {
  81. return service({
  82. url: '/autoCode/delSysHistory',
  83. method: 'post',
  84. data
  85. })
  86. }
  87. export const createPackageApi = (data) => {
  88. return service({
  89. url: '/autoCode/createPackage',
  90. method: 'post',
  91. data
  92. })
  93. }
  94. export const getPackageApi = () => {
  95. return service({
  96. url: '/autoCode/getPackage',
  97. method: 'post'
  98. })
  99. }
  100. export const deletePackageApi = (data) => {
  101. return service({
  102. url: '/autoCode/delPackage',
  103. method: 'post',
  104. data
  105. })
  106. }
  107. export const createPlugApi = (data) => {
  108. return service({
  109. url: '/autoCode/createPlug',
  110. method: 'post',
  111. data
  112. })
  113. }
  114. export const installPlug = (data) => {
  115. return service({
  116. url: '/autoCode/installPlug',
  117. method: 'post',
  118. data
  119. })
  120. }
  121. export const pubPlug = (params) => {
  122. return service({
  123. url: '/autoCode/pubPlug',
  124. method: 'post',
  125. params
  126. })
  127. }