2021-02-09 15:55:54 +08:00
|
|
|
import request from '@/utils/request'
|
|
|
|
|
2021-02-09 22:14:01 +08:00
|
|
|
// 获得表定义分页
|
|
|
|
export function getCodeGenTablePage(query) {
|
|
|
|
return request({
|
2021-02-10 13:41:00 +08:00
|
|
|
url: '/tool/codegen/table/page',
|
2021-02-09 22:14:01 +08:00
|
|
|
method: 'get',
|
|
|
|
params: query
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 获得表和字段的明细
|
|
|
|
export function getCodeGenDetail(tableId) {
|
|
|
|
return request({
|
|
|
|
url: '/tool/codegen/detail?tableId=' + tableId,
|
|
|
|
method: 'get',
|
|
|
|
})
|
|
|
|
}
|
2021-02-10 13:41:00 +08:00
|
|
|
|
|
|
|
// 修改代码生成信息
|
|
|
|
export function updateCodegen(data) {
|
|
|
|
return request({
|
|
|
|
url: '/tool/codegen/update',
|
|
|
|
method: 'put',
|
|
|
|
data: data
|
|
|
|
})
|
|
|
|
}
|
2021-02-10 17:45:04 +08:00
|
|
|
|
|
|
|
// 预览生成代码
|
|
|
|
export function previewCodegen(tableId) {
|
|
|
|
return request({
|
|
|
|
url: '/tool/codegen/preview?tableId=' + tableId,
|
|
|
|
method: 'get'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 下载生成代码
|
|
|
|
export function downloadCodegen(tableId) {
|
|
|
|
return request({
|
|
|
|
url: '/tool/codegen/download?tableId=' + tableId,
|
|
|
|
method: 'get',
|
|
|
|
responseType: 'blob'
|
|
|
|
})
|
|
|
|
}
|