File tree Expand file tree Collapse file tree 5 files changed +41
-25
lines changed Expand file tree Collapse file tree 5 files changed +41
-25
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export interface DictDataType {
21
21
}
22
22
23
23
export const getDictOptions = ( dictType : string ) => {
24
- return dictStore . getDictByType ( dictType )
24
+ return dictStore . getDictByType ( dictType ) || [ ]
25
25
}
26
26
27
27
export const getIntDictOptions = ( dictType : string ) => {
@@ -117,6 +117,7 @@ export enum DICT_TYPE {
117
117
INFRA_API_ERROR_LOG_PROCESS_STATUS = 'infra_api_error_log_process_status' ,
118
118
INFRA_CONFIG_TYPE = 'infra_config_type' ,
119
119
INFRA_CODEGEN_TEMPLATE_TYPE = 'infra_codegen_template_type' ,
120
+ INFRA_CODEGEN_FRONT_TYPE = 'infra_codegen_front_type' ,
120
121
INFRA_CODEGEN_SCENE = 'infra_codegen_scene' ,
121
122
INFRA_FILE_STORAGE = 'infra_file_storage' ,
122
123
Original file line number Diff line number Diff line change 15
15
v-loading =" loading"
16
16
element-loading-text =" 生成文件目录中..."
17
17
>
18
- <el-scrollbar height =" calc(100vh - 88px - 40px - 50px )" >
18
+ <el-scrollbar height =" calc(100vh - 88px - 40px)" >
19
19
<el-tree
20
20
ref =" treeRef"
21
21
node-key =" id"
Original file line number Diff line number Diff line change 13
13
</el-select >
14
14
</el-form-item >
15
15
</el-col >
16
+ <el-col :span =" 12" >
17
+ <el-form-item prop =" frontType" label =" 前端类型" >
18
+ <el-select v-model =" formData.frontType" >
19
+ <el-option
20
+ v-for =" dict in getIntDictOptions(DICT_TYPE.INFRA_CODEGEN_FRONT_TYPE)"
21
+ :key =" dict.value"
22
+ :label =" dict.label"
23
+ :value =" dict.value"
24
+ />
25
+ </el-select >
26
+ </el-form-item >
27
+ </el-col >
28
+
16
29
<el-col :span =" 12" >
17
30
<el-form-item prop =" scene" label =" 生成场景" >
18
31
<el-select v-model =" formData.scene" >
25
38
</el-select >
26
39
</el-form-item >
27
40
</el-col >
41
+ <el-col :span =" 12" >
42
+ <el-form-item >
43
+ <template #label >
44
+ <span >
45
+ 上级菜单
46
+ <el-tooltip content =" 分配到指定菜单下,例如 系统管理" placement =" top" >
47
+ <Icon icon =" ep:question-filled" />
48
+ </el-tooltip >
49
+ </span >
50
+ </template >
51
+ <el-tree-select
52
+ v-model =" formData.parentMenuId"
53
+ placeholder =" 请选择系统菜单"
54
+ node-key =" id"
55
+ check-strictly
56
+ :data =" menus"
57
+ :props =" menuTreeProps"
58
+ />
59
+ </el-form-item >
60
+ </el-col >
28
61
29
62
<!-- <el-col :span="12">-->
30
63
<!-- <el-form-item prop="packageName">-->
115
148
</el-form-item >
116
149
</el-col >
117
150
118
- <el-col :span =" 12" >
119
- <el-form-item >
120
- <template #label >
121
- <span >
122
- 上级菜单
123
- <el-tooltip content =" 分配到指定菜单下,例如 系统管理" placement =" top" >
124
- <Icon icon =" ep:question-filled" />
125
- </el-tooltip >
126
- </span >
127
- </template >
128
- <el-tree-select
129
- v-model =" formData.parentMenuId"
130
- placeholder =" 请选择系统菜单"
131
- node-key =" id"
132
- check-strictly
133
- :data =" menus"
134
- :props =" menuTreeProps"
135
- />
136
- </el-form-item >
137
- </el-col >
138
-
139
151
<el-col :span =" 24" v-if =" formData.genType === '1'" >
140
152
<el-form-item prop =" genPath" >
141
153
<template #label >
@@ -297,6 +309,7 @@ const props = defineProps({
297
309
const formRef = ref ()
298
310
const formData = ref ({
299
311
templateType: null ,
312
+ frontType: null ,
300
313
scene: null ,
301
314
moduleName: ' ' ,
302
315
businessName: ' ' ,
@@ -315,6 +328,7 @@ const formData = ref({
315
328
316
329
const rules = reactive ({
317
330
templateType: [required ],
331
+ frontType: [required ],
318
332
scene: [required ],
319
333
moduleName: [required ],
320
334
businessName: [required ],
Original file line number Diff line number Diff line change @@ -115,11 +115,12 @@ const colorTypeOptions = readonly([
115
115
])
116
116
117
117
/** 打开弹窗 */
118
- const open = async (type : string , id ? : number ) => {
118
+ const open = async (type : string , id ? : number , dictType ? : string ) => {
119
119
dialogVisible .value = true
120
120
dialogTitle .value = t (' action.' + type )
121
121
formType .value = type
122
122
resetForm ()
123
+ formData .value .dictType = dictType
123
124
// 修改时,设置数据
124
125
if (id ) {
125
126
formLoading .value = true
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ const resetQuery = () => {
167
167
/** 添加/修改操作 */
168
168
const formRef = ref ()
169
169
const openForm = (type : string , id ? : number ) => {
170
- formRef .value .open (type , id )
170
+ formRef .value .open (type , id , queryParams . dictType )
171
171
}
172
172
173
173
/** 删除按钮操作 */
You can’t perform that action at this time.
0 commit comments