autoCode.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 = () => {
  25. return service({
  26. url: '/autoCode/getDB',
  27. method: 'get'
  28. })
  29. }
  30. // @Tags SysApi
  31. // @Summary 获取当前数据库所有表
  32. // @Security ApiKeyAuth
  33. // @accept application/json
  34. // @Produce application/json
  35. // @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
  36. // @Router /autoCode/getTables [get]
  37. export const getTable = (params) => {
  38. return service({
  39. url: '/autoCode/getTables',
  40. method: 'get',
  41. params
  42. })
  43. }
  44. // @Tags SysApi
  45. // @Summary 获取当前数据库所有表
  46. // @Security ApiKeyAuth
  47. // @accept application/json
  48. // @Produce application/json
  49. // @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
  50. // @Router /autoCode/getColumn [get]
  51. export const getColumn = (params) => {
  52. return service({
  53. url: '/autoCode/getColumn',
  54. method: 'get',
  55. params
  56. })
  57. }
  58. export const getSysHistory = (data) => {
  59. return service({
  60. url: '/autoCode/getSysHistory',
  61. method: 'post',
  62. data
  63. })
  64. }
  65. export const rollback = (data) => {
  66. return service({
  67. url: '/autoCode/rollback',
  68. method: 'post',
  69. data
  70. })
  71. }
  72. export const getMeta = (data) => {
  73. return service({
  74. url: '/autoCode/getMeta',
  75. method: 'post',
  76. data
  77. })
  78. }
  79. export const delSysHistory = (data) => {
  80. return service({
  81. url: '/autoCode/delSysHistory',
  82. method: 'post',
  83. data
  84. })
  85. }