Skip to content

Commit bea7e27

Browse files
committed
将 tool 合并到 infra 模块
1 parent d979ccc commit bea7e27

27 files changed

+49
-51
lines changed

src/api/tool/codegen.js renamed to src/api/infra/codegen.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import request from '@/utils/request'
33
// 获得表定义分页
44
export function getCodegenTablePage(query) {
55
return request({
6-
url: '/tool/codegen/table/page',
6+
url: '/infra/codegen/table/page',
77
method: 'get',
88
params: query
99
})
@@ -12,15 +12,15 @@ export function getCodegenTablePage(query) {
1212
// 获得表和字段的明细
1313
export function getCodegenDetail(tableId) {
1414
return request({
15-
url: '/tool/codegen/detail?tableId=' + tableId,
15+
url: '/infra/codegen/detail?tableId=' + tableId,
1616
method: 'get',
1717
})
1818
}
1919

2020
// 修改代码生成信息
2121
export function updateCodegen(data) {
2222
return request({
23-
url: '/tool/codegen/update',
23+
url: '/infra/codegen/update',
2424
method: 'put',
2525
data: data
2626
})
@@ -29,15 +29,15 @@ export function updateCodegen(data) {
2929
// 基于数据库的表结构,同步数据库的表和字段定义
3030
export function syncCodegenFromDB(tableId) {
3131
return request({
32-
url: '/tool/codegen/sync-from-db?tableId=' + tableId,
32+
url: '/infra/codegen/sync-from-db?tableId=' + tableId,
3333
method: 'put'
3434
})
3535
}
3636

3737
// 基于 SQL 建表语句,同步数据库的表和字段定义
3838
export function syncCodegenFromSQL(tableId, sql) {
3939
return request({
40-
url: '/tool/codegen/sync-from-sql?tableId=' + tableId,
40+
url: '/infra/codegen/sync-from-sql?tableId=' + tableId,
4141
method: 'put',
4242
headers:{
4343
'Content-type': 'application/x-www-form-urlencoded'
@@ -49,15 +49,15 @@ export function syncCodegenFromSQL(tableId, sql) {
4949
// 预览生成代码
5050
export function previewCodegen(tableId) {
5151
return request({
52-
url: '/tool/codegen/preview?tableId=' + tableId,
52+
url: '/infra/codegen/preview?tableId=' + tableId,
5353
method: 'get',
5454
})
5555
}
5656

5757
// 下载生成代码
5858
export function downloadCodegen(tableId) {
5959
return request({
60-
url: '/tool/codegen/download?tableId=' + tableId,
60+
url: '/infra/codegen/download?tableId=' + tableId,
6161
method: 'get',
6262
responseType: 'blob'
6363
})
@@ -66,7 +66,7 @@ export function downloadCodegen(tableId) {
6666
// 获得表定义分页
6767
export function getSchemaTableList(query) {
6868
return request({
69-
url: '/tool/codegen/db/table/list',
69+
url: '/infra/codegen/db/table/list',
7070
method: 'get',
7171
params: query
7272
})
@@ -75,7 +75,7 @@ export function getSchemaTableList(query) {
7575
// 基于数据库的表结构,创建代码生成器的表定义
7676
export function createCodegenListFromDB(tableNames) {
7777
return request({
78-
url: '/tool/codegen/create-list-from-db',
78+
url: '/infra/codegen/create-list-from-db',
7979
method: 'post',
8080
headers:{
8181
'Content-type': 'application/x-www-form-urlencoded'
@@ -87,7 +87,7 @@ export function createCodegenListFromDB(tableNames) {
8787
// 基于 SQL 建表语句,创建代码生成器的表定义
8888
export function createCodegenListFromSQL(data) {
8989
return request({
90-
url: '/tool/codegen/create-list-from-sql',
90+
url: '/infra/codegen/create-list-from-sql',
9191
method: 'post',
9292
headers:{
9393
'Content-type': 'application/x-www-form-urlencoded'
@@ -99,7 +99,7 @@ export function createCodegenListFromSQL(data) {
9999
// 删除数据库的表和字段定义
100100
export function deleteCodegen(tableId) {
101101
return request({
102-
url: '/tool/codegen/delete?tableId=' + tableId,
102+
url: '/infra/codegen/delete?tableId=' + tableId,
103103
method: 'delete'
104104
})
105105
}

src/api/tool/dbDoc.js renamed to src/api/infra/dbDoc.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@ import request from "@/utils/request";
33

44
export function exportHtml() {
55
return request({
6-
url: '/tool/db-doc/export-html',
6+
url: '/infra/db-doc/export-html',
77
method: 'get',
88
responseType: 'blob'
99
})
1010
}
1111

1212
export function exportWord() {
1313
return request({
14-
url: '/tool/db-doc/export-word',
14+
url: '/infra/db-doc/export-word',
1515
method: 'get',
1616
responseType: 'blob'
1717
})
1818
}
1919

2020
export function exportMarkdown() {
2121
return request({
22-
url: '/tool/db-doc/export-markdown',
22+
url: '/infra/db-doc/export-markdown',
2323
method: 'get',
2424
responseType: 'blob'
2525
})

src/api/tool/testDemo.js renamed to src/api/infra/testDemo.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import request from '@/utils/request'
33
// 创建字典类型
44
export function createTestDemo(data) {
55
return request({
6-
url: '/tool/test-demo/create',
6+
url: '/infra/test-demo/create',
77
method: 'post',
88
data: data
99
})
@@ -12,7 +12,7 @@ export function createTestDemo(data) {
1212
// 更新字典类型
1313
export function updateTestDemo(data) {
1414
return request({
15-
url: '/tool/test-demo/update',
15+
url: '/infra/test-demo/update',
1616
method: 'put',
1717
data: data
1818
})
@@ -21,23 +21,23 @@ export function updateTestDemo(data) {
2121
// 删除字典类型
2222
export function deleteTestDemo(id) {
2323
return request({
24-
url: '/tool/test-demo/delete?id=' + id,
24+
url: '/infra/test-demo/delete?id=' + id,
2525
method: 'delete'
2626
})
2727
}
2828

2929
// 获得字典类型
3030
export function getTestDemo(id) {
3131
return request({
32-
url: '/tool/test-demo/get?id=' + id,
32+
url: '/infra/test-demo/get?id=' + id,
3333
method: 'get'
3434
})
3535
}
3636

3737
// 获得字典类型分页
3838
export function getTestDemoPage(query) {
3939
return request({
40-
url: '/tool/test-demo/page',
40+
url: '/infra/test-demo/page',
4141
method: 'get',
4242
params: query
4343
})
@@ -46,7 +46,7 @@ export function getTestDemoPage(query) {
4646
// 导出字典类型 Excel
4747
export function exportTestDemoExcel(query) {
4848
return request({
49-
url: '/tool/test-demo/export-excel',
49+
url: '/infra/test-demo/export-excel',
5050
method: 'get',
5151
params: query,
5252
responseType: 'blob'

src/router/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ export const constantRoutes = [
108108
hidden: true,
109109
children: [{
110110
path: 'edit/:tableId(\\d+)',
111-
component: (resolve) => require(['@/views/tool/codegen/editTable'], resolve),
111+
component: (resolve) => require(['@/views/infra/codegen/editTable'], resolve),
112112
name: 'GenEdit',
113-
meta: {title: '修改生成配置', activeMenu: '/tool/codegen'}
113+
meta: {title: '修改生成配置', activeMenu: '/infra/codegen'}
114114
}
115115
]
116116
}, {

src/utils/constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const SystemDataScopeEnum = {
4343
/**
4444
* 代码生成模板类型
4545
*/
46-
export const ToolCodegenTemplateTypeEnum = {
46+
export const InfraCodegenTemplateTypeEnum = {
4747
CRUD: 1, // 基础 CRUD
4848
TREE: 2, // 树形 CRUD
4949
SUB: 3, // 主子表 CRUD

src/utils/dict.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ export const DICT_TYPE = {
3030
INFRA_JOB_LOG_STATUS: 'infra_job_log_status',
3131
INFRA_API_ERROR_LOG_PROCESS_STATUS: 'infra_api_error_log_process_status',
3232
INFRA_CONFIG_TYPE: 'infra_config_type',
33-
34-
// ========== TOOL 模块 ==========
35-
TOOL_CODEGEN_TEMPLATE_TYPE: 'tool_codegen_template_type',
36-
TOOL_CODEGEN_SCENE: 'tool_codegen_scene',
33+
INFRA_CODEGEN_TEMPLATE_TYPE: 'infra_codegen_template_type',
34+
INFRA_CODEGEN_SCENE: 'infra_codegen_scene',
3735

3836
// ========== BPM 模块 ==========
3937
BPM_MODEL_CATEGORY: 'bpm_model_category',

src/views/bpm/form/formEditor.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ import { debounce } from 'throttle-debounce'
145145
import { saveAs } from 'file-saver'
146146
import ClipboardJS from 'clipboard'
147147
import render from '@/components/render/render'
148-
import FormDrawer from '@/views/tool/build/FormDrawer'
149-
import JsonDrawer from '@/views/tool/build/JsonDrawer'
150-
import RightPanel from '@/views/tool/build/RightPanel'
148+
import FormDrawer from '@/views/infra/build/FormDrawer'
149+
import JsonDrawer from '@/views/infra/build/JsonDrawer'
150+
import RightPanel from '@/views/infra/build/RightPanel'
151151
import {
152152
inputComponents, selectComponents, layoutComponents, formConf
153153
} from '@/components/generator/config'
@@ -161,8 +161,8 @@ import { makeUpJs } from '@/components/generator/js'
161161
import { makeUpCss } from '@/components/generator/css'
162162
import drawingDefalut from '@/components/generator/drawingDefalut'
163163
import logo from '@/assets/logo/logo.png'
164-
import CodeTypeDialog from '@/views/tool/build/CodeTypeDialog'
165-
import DraggableItem from '@/views/tool/build/DraggableItem'
164+
import CodeTypeDialog from '@/views/infra/build/CodeTypeDialog'
165+
import DraggableItem from '@/views/infra/build/DraggableItem'
166166
import {
167167
getDrawingList, saveDrawingList, getIdGlobal, saveIdGlobal, getFormConf
168168
} from '@/utils/db'
File renamed without changes.

0 commit comments

Comments
 (0)