autoCode.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. }