Skip to content

Commit 76c5c7c

Browse files
committed
REVIEW 代码生成
1 parent 95b7eb9 commit 76c5c7c

File tree

6 files changed

+127
-172
lines changed

6 files changed

+127
-172
lines changed

src/api/infra/codegen/index.ts

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,74 @@
11
import request from '@/config/axios'
2-
import type { CodegenUpdateReqVO, CodegenCreateListReqVO } from './types'
2+
3+
export type CodegenTableVO = {
4+
id: number
5+
tableId: number
6+
isParentMenuIdValid: boolean
7+
dataSourceConfigId: number
8+
scene: number
9+
tableName: string
10+
tableComment: string
11+
remark: string
12+
moduleName: string
13+
businessName: string
14+
className: string
15+
classComment: string
16+
author: string
17+
createTime: Date
18+
updateTime: Date
19+
templateType: number
20+
parentMenuId: number
21+
}
22+
23+
export type CodegenColumnVO = {
24+
id: number
25+
tableId: number
26+
columnName: string
27+
dataType: string
28+
columnComment: string
29+
nullable: number
30+
primaryKey: number
31+
autoIncrement: string
32+
ordinalPosition: number
33+
javaType: string
34+
javaField: string
35+
dictType: string
36+
example: string
37+
createOperation: number
38+
updateOperation: number
39+
listOperation: number
40+
listOperationCondition: string
41+
listOperationResult: number
42+
htmlType: string
43+
}
44+
45+
export type DatabaseTableVO = {
46+
name: string
47+
comment: string
48+
}
49+
50+
export type CodegenDetailVO = {
51+
table: CodegenTableVO
52+
columns: CodegenColumnVO[]
53+
}
54+
55+
export type CodegenPreviewVO = {
56+
filePath: string
57+
code: string
58+
}
59+
60+
export type CodegenUpdateReqVO = {
61+
table: CodegenTableVO | any
62+
columns: CodegenColumnVO[]
63+
}
64+
65+
export type CodegenCreateListReqVO = {
66+
dataSourceConfigId: number
67+
tableNames: string[]
68+
}
369

470
// 查询列表代码生成表定义
5-
export const getCodegenTablePage = (params) => {
71+
export const getCodegenTablePage = (params: PageParam) => {
672
return request.get({ url: '/infra/codegen/table/page', params })
773
}
874

src/api/infra/codegen/types.ts

Lines changed: 0 additions & 61 deletions
This file was deleted.

src/locales/zh-CN.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,7 @@ export default {
298298
typeUpdate: '字典类型编辑',
299299
dataCreate: '字典数据新增',
300300
dataUpdate: '字典数据编辑',
301-
fileUpload: '上传文件',
302-
back: '返回'
301+
fileUpload: '上传文件'
303302
},
304303
dialog: {
305304
dialog: '弹窗',

src/views/infra/codegen/EditTable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<el-button type="primary" @click="submitForm" :loading="submitLoading">
1717
{{ t('action.save') }}
1818
</el-button>
19-
<el-button @click="close">{{ t('action.back') }}</el-button>
19+
<el-button @click="close">返回</el-button>
2020
</el-form-item>
2121
</el-form>
2222
</content-wrap>

src/views/infra/codegen/codegen.data.ts

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)