45
45
/>
46
46
<el-table-column label =" 创建时间" align =" center" prop =" createTime" />
47
47
48
- <el-table-column fixed =" right" label =" 操作" width =" 150 " >
48
+ <el-table-column fixed =" right" label =" 操作" width =" 200 " >
49
49
<template #default =" scope " >
50
50
<el-button
51
51
type =" primary"
101
101
</el-col >
102
102
<el-col :span =" 12" >
103
103
<el-form-item label =" 业务名" >
104
- <el-input v-model =" formData.businessName" />
104
+ <el-input v-model =" formData.businessName" placeholder = " 用户 " />
105
105
</el-form-item >
106
106
</el-col >
107
107
</el-row >
108
108
109
109
<el-row >
110
110
<el-col :span =" 12" >
111
111
<el-form-item label =" 模块名" >
112
- <el-input v-model =" formData.moduleName" />
112
+ <el-input v-model =" formData.moduleName" placeholder = " system " />
113
113
</el-form-item >
114
114
</el-col >
115
115
<el-col :span =" 12" >
116
116
<el-form-item label =" 包名" >
117
- <el-input v-model =" formData.packageName" />
117
+ <el-input
118
+ v-model =" formData.packageName"
119
+ placeholder =" com.youlai.boot"
120
+ />
118
121
</el-form-item >
119
122
</el-col >
120
123
</el-row >
121
124
122
125
<el-row >
123
126
<el-col :span =" 12" >
124
127
<el-form-item label =" 实体名" >
125
- <el-input v-model =" formData.entityName" />
128
+ <el-input v-model =" formData.entityName" placeholder = " User " />
126
129
</el-form-item >
127
130
</el-col >
128
131
<el-col :span =" 12" >
129
132
<el-form-item label =" 作者" >
130
- <el-input v-model =" formData.author" />
133
+ <el-input v-model =" formData.author" placeholder =" youlai" />
134
+ </el-form-item >
135
+ </el-col >
136
+ </el-row >
137
+
138
+ <el-row >
139
+ <el-col :span =" 24" >
140
+ <el-form-item label =" 父菜单" >
141
+ <el-tree-select
142
+ v-model =" formData.parentMenuId"
143
+ placeholder =" 选择父菜单"
144
+ :data =" menuOptions"
145
+ filterable
146
+ check-strictly
147
+ :render-after-expand =" false"
148
+ />
131
149
</el-form-item >
132
150
</el-col >
133
151
</el-row >
@@ -361,6 +379,7 @@ import GeneratorAPI, {
361
379
} from " @/api/generator" ;
362
380
363
381
import DictAPI from " @/api/dict" ;
382
+ import MenuAPI from " @/api/menu" ;
364
383
365
384
const queryFormRef = ref (ElForm );
366
385
@@ -376,6 +395,7 @@ const formData = ref<GenConfigForm>({});
376
395
const formTypeOptions: Record <string , OptionType > = FormTypeEnum ;
377
396
const queryTypeOptions: Record <string , OptionType > = QueryTypeEnum ;
378
397
const dictOptions = ref <OptionType []>();
398
+ const menuOptions = ref <OptionType []>([]);
379
399
380
400
const dialog = reactive ({
381
401
visible: false ,
@@ -463,9 +483,11 @@ function handleResetQuery() {
463
483
}
464
484
465
485
/** 打开弹窗 */
466
- function handleOpenDialog(tableName : string ) {
486
+ async function handleOpenDialog(tableName : string ) {
467
487
dialog .visible = true ;
468
488
489
+ menuOptions .value = await MenuAPI .getOptions ();
490
+
469
491
// 获取字典数据
470
492
DictAPI .getList ().then ((data ) => {
471
493
dictOptions .value = data ;
@@ -494,6 +516,7 @@ function handleResetConfig(tableName: string) {
494
516
type: " warning" ,
495
517
}).then (() => {
496
518
GeneratorAPI .resetGenConfig (tableName ).then (() => {
519
+ ElMessage .success (" 重置成功" );
497
520
handleQuery ();
498
521
});
499
522
});
0 commit comments