forked from likeadmin-likeshop/likeadmin_java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.ts
More file actions
75 lines (64 loc) · 1.76 KB
/
Copy pathcode.ts
File metadata and controls
75 lines (64 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import request from '@/utils/request'
// 代码生成已选数据表列表接口
export function generateTable(params: any) {
return request.get({ url: '/gen/list', params })
}
// 数据表列表接口
export function dataTable(params: any) {
return request.get({ url: '/gen/db', params })
}
// 数据表所有列表接口
export function dataTableAll() {
return request.get({ url: '/gen/dbAll' })
}
//表名查字段
export function dataTableToColumn(params: any) {
return request.get({ url: '/gen/dbColumn', params })
}
//选择要生成代码的数据表
export function selectTable(params: any) {
return request.post(
{ url: '/gen/importTable', params },
{
isParamsToData: false
}
)
}
// 已选择的数据表详情
export function tableDetail(params: any) {
return request.get({ url: '/gen/detail', params })
}
//同步字段
export function syncColumn(params: any) {
return request.post(
{ url: '/gen/syncTable', params },
{
isParamsToData: false
}
)
}
//删除已选择的数据表
export function generateDelete(params: any) {
return request.post({ url: '/gen/delTable', params })
}
//编辑已选表字段
export function generateEdit(params: any) {
return request.post({ url: '/gen/editTable', params })
}
//预览代码
export function generatePreview(params: any) {
return request.get({ url: '/gen/previewCode', params })
}
//生成代码
export function generateCode(params: any) {
return request.get({ url: '/gen/genCode', params })
}
//下载代码
export function downloadCode(params: any) {
return request.get(
{ responseType: 'blob', url: '/gen/downloadCode', params },
{
isTransformResponse: false
}
)
}