Skip to content

Commit 42e1e02

Browse files
YunaiVgitee-org
authored andcommitted
!453 代码生成时,增加 UI 类型的选择,可生成 Vue2、Vue3 多种管理后台的代码,支持 CRUD Schema 模式
Merge pull request !453 from 芋道源码/feature/codegen-front
2 parents ad689b0 + c330a47 commit 42e1e02

File tree

75 files changed

+184
-289
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+184
-289
lines changed

src/api/infra/redis.js

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -7,48 +7,3 @@ export function getCache() {
77
method: 'get'
88
})
99
}
10-
11-
// 获取模块
12-
export function getKeyDefineList() {
13-
return request({
14-
url: '/infra/redis/get-key-define-list',
15-
method: 'get'
16-
})
17-
}
18-
19-
// 获取键名列表
20-
export function getKeyList(keyTemplate) {
21-
return request({
22-
url: '/infra/redis/get-key-list',
23-
method: 'get',
24-
params: {
25-
keyTemplate
26-
}
27-
})
28-
}
29-
30-
// 获取缓存内容
31-
export function getKeyValue(key) {
32-
return request({
33-
url: '/infra/redis/get-key-value?key=' + key,
34-
method: 'get'
35-
})
36-
}
37-
38-
// 根据键名删除缓存
39-
export function deleteKey(key) {
40-
return request({
41-
url: '/infra/redis/delete-key?key=' + key,
42-
method: 'delete'
43-
})
44-
}
45-
46-
export function deleteKeys(keyTemplate) {
47-
return request({
48-
url: '/infra/redis/delete-keys?',
49-
method: 'delete',
50-
params: {
51-
keyTemplate
52-
}
53-
})
54-
}

src/router/index.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export const constantRoutes = [
100100
children: [{
101101
path: 'type/data/:dictId(\\d+)',
102102
component: (resolve) => require(['@/views/system/dict/data'], resolve),
103-
name: 'Data',
103+
name: 'SystemDictData',
104104
meta: {title: '字典数据', icon: '', activeMenu: '/system/dict'}
105105
}
106106
]
@@ -112,7 +112,7 @@ export const constantRoutes = [
112112
children: [{
113113
path: 'log',
114114
component: (resolve) => require(['@/views/infra/job/log'], resolve),
115-
name: 'JobLog',
115+
name: 'InfraJobLog',
116116
meta: {title: '调度日志', activeMenu: '/infra/job'}
117117
}
118118
]
@@ -123,7 +123,7 @@ export const constantRoutes = [
123123
children: [{
124124
path: 'edit/:tableId(\\d+)',
125125
component: (resolve) => require(['@/views/infra/codegen/editTable'], resolve),
126-
name: 'GenEdit',
126+
name: 'InfraCodegenEditTable',
127127
meta: {title: '修改生成配置', activeMenu: '/infra/codegen'}
128128
}
129129
]
@@ -136,12 +136,12 @@ export const constantRoutes = [
136136
children: [{
137137
path: 'oa/leave/create',
138138
component: (resolve) => require(['@/views/bpm/oa/leave/create'], resolve),
139-
name: '发起 OA 请假',
139+
name: 'BpmOALeaveCreate',
140140
meta: {title: '发起 OA 请假', icon: 'form', activeMenu: '/bpm/oa/leave'}
141141
}, {
142142
path: 'oa/leave/detail',
143143
component: (resolve) => require(['@/views/bpm/oa/leave/detail'], resolve),
144-
name: '查看 OA 请假',
144+
name: 'BpmOALeaveDetail',
145145
meta: {title: '查看 OA 请假', icon: 'view', activeMenu: '/bpm/oa/leave'}
146146
}
147147
]
@@ -153,27 +153,27 @@ export const constantRoutes = [
153153
children: [{
154154
path: 'manager/form/edit',
155155
component: (resolve) => require(['@/views/bpm/form/formEditor'], resolve),
156-
name: '流程表单-编辑',
156+
name: 'BpmFormEditor',
157157
meta: {title: '流程表单-编辑', activeMenu: '/bpm/manager/form'}
158158
}, {
159159
path: 'manager/definition',
160160
component: (resolve) => require(['@/views/bpm/definition/index'], resolve),
161-
name: '流程定义',
161+
name: 'BpmProcessDefinition',
162162
meta: {title: '流程定义', activeMenu: '/bpm/manager/model'}
163163
}, {
164164
path: 'manager/model/design',
165165
component: (resolve) => require(['@/views/bpm/model/modelEditor'], resolve),
166-
name: '设计流程',
166+
name: 'BpmModelEditor',
167167
meta: {title: '设计流程', activeMenu: '/bpm/manager/model'}
168168
}, {
169169
path: 'process-instance/create',
170170
component: (resolve) => require(['@/views/bpm/processInstance/create'], resolve),
171-
name: '发起流程',
171+
name: 'BpmProcessInstanceCreate',
172172
meta: {title: '发起流程', activeMenu: '/bpm/task/my'}
173173
}, {
174174
path: 'process-instance/detail',
175175
component: (resolve) => require(['@/views/bpm/processInstance/detail'], resolve),
176-
name: '流程详情',
176+
name: 'BpmProcessInstanceDetail',
177177
meta: {title: '流程详情', activeMenu: '/bpm/task/my'}
178178
}
179179
]
@@ -185,7 +185,7 @@ export const constantRoutes = [
185185
children: [{
186186
path: 'value/:propertyId(\\d+)',
187187
component: (resolve) => require(['@/views/mall/product/property/value'], resolve),
188-
name: 'PropertyValue',
188+
name: 'ProductPropertyValue',
189189
meta: {title: '商品属性值', icon: '', activeMenu: '/product/property'}
190190
}
191191
]
@@ -197,13 +197,13 @@ export const constantRoutes = [
197197
children: [{
198198
path: 'edit/:spuId(\\d+)',
199199
component: (resolve) => require(['@/views/mall/product/spu/save'], resolve),
200-
name: 'SpuEdit',
200+
name: 'ProductSpuUpdate',
201201
meta: {title: '修改商品', activeMenu: '/product/spu'}
202202
},
203203
{
204204
path: 'add',
205205
component: (resolve) => require(['@/views/mall/product/spu/save'], resolve),
206-
name: 'SpuAdd',
206+
name: 'ProductSpuCreate',
207207
meta: {title: '添加商品', activeMenu: '/product/spu'}
208208
}
209209
]
@@ -215,7 +215,7 @@ export const constantRoutes = [
215215
children: [
216216
{
217217
path: 'detail',
218-
name: '订单详情',
218+
name: 'TradeOrderDetail',
219219
hidden: true,
220220
meta: { title: '订单详情' },
221221
component: (resolve) => require(['@/views/mall/trade/order/detail'], resolve)

src/utils/dict.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export const DICT_TYPE = {
3636
INFRA_API_ERROR_LOG_PROCESS_STATUS: 'infra_api_error_log_process_status',
3737
INFRA_CONFIG_TYPE: 'infra_config_type',
3838
INFRA_CODEGEN_TEMPLATE_TYPE: 'infra_codegen_template_type',
39+
INFRA_CODEGEN_FRONT_TYPE: 'infra_codegen_front_type',
3940
INFRA_CODEGEN_SCENE: 'infra_codegen_scene',
4041
INFRA_FILE_STORAGE: 'infra_file_storage',
4142

src/views/bpm/definition/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ import Parser from '@/components/parser/Parser'
8181
import taskAssignRuleDialog from "../taskAssignRule/taskAssignRuleDialog";
8282
8383
export default {
84-
name: "processDefinition",
84+
name: "BpmProcessDefinition",
8585
components: {
8686
Parser,
8787
taskAssignRuleDialog

src/views/bpm/form/index.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ import Parser from '@/components/parser/Parser'
6767
import {decodeFields} from "@/utils/formGenerator";
6868
6969
export default {
70-
name: "Form",
70+
name: "BpmForm",
7171
components: {
7272
Parser
7373
},
@@ -134,13 +134,13 @@ export default {
134134
/** 新增按钮操作 */
135135
handleAdd() {
136136
this.$router.push({
137-
path:"/bpm/manager/form/edit"
137+
name: "BpmFormEditor"
138138
});
139139
},
140140
/** 修改按钮操作 */
141141
handleUpdate(row) {
142142
this.$router.push({
143-
path:"/bpm/manager/form/edit",
143+
name: "BpmFormEditor",
144144
query:{
145145
formId: row.id
146146
}

src/views/bpm/group/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ import {CommonStatusEnum} from "@/utils/constants";
102102
import {listSimpleUsers} from "@/api/system/user";
103103
104104
export default {
105-
name: "UserGroup",
105+
name: "BpmUserGroup",
106106
components: {
107107
},
108108
data() {

src/views/bpm/model/index.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ import Treeselect from "@riophae/vue-treeselect";
233233
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
234234
235235
export default {
236-
name: "model",
236+
name: "BpmModel",
237237
components: {
238238
Parser,
239239
Treeselect,
@@ -380,7 +380,7 @@ export default {
380380
/** 设计按钮操作 */
381381
handleDesign(row) {
382382
this.$router.push({
383-
path:"/bpm/manager/model/design",
383+
name: "BpmModelEditor",
384384
query:{
385385
modelId: row.id
386386
}
@@ -473,7 +473,7 @@ export default {
473473
/** 跳转流程定义的列表 */
474474
handleDefinitionList(row) {
475475
this.$router.push({
476-
path:"/bpm/manager/definition",
476+
name: "BpmProcessDefinition",
477477
query:{
478478
key: row.key
479479
}

src/views/bpm/model/modelEditor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {createModel, getModel, updateModel} from "@/api/bpm/model";
2626
// import MyProcessPanel from "../package/process-panel/ProcessPanel";
2727
2828
export default {
29-
name: "App",
29+
name: "BpmModelEditor",
3030
components: { MyProcessPalette },
3131
data() {
3232
return {

src/views/bpm/oa/leave/create.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { createLeave} from "@/api/bpm/leave"
3030
import { getDictDatas, DICT_TYPE } from '@/utils/dict'
3131
3232
export default {
33-
name: "LeaveCreate",
33+
name: "BpmOALeaveCreate",
3434
components: {
3535
},
3636
data() {

src/views/bpm/oa/leave/detail.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import { getLeave} from "@/api/bpm/leave"
1717
import {getDictDatas, DICT_TYPE} from '@/utils/dict'
1818
export default {
19-
name: "LeaveDetail",
19+
name: "BpmOALeaveDetail",
2020
components: {
2121
},
2222
data() {

0 commit comments

Comments
 (0)