Commit faea04546e1004494b2a4444ce1da80fe1391097

Authored by jueying
1 parent 3cee922e

修复代码生成父菜单选择无效,前端代码缺少字段,格式错误

yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/api/api.ts.vm
1 import { useAxios } from '@/hooks/web/useAxios' 1 import { useAxios } from '@/hooks/web/useAxios'
2 -import { ${simpleClassName}VO,${simpleClassName}PageReqVO,${simpleClassName}ExcelReqVO } from './types' 2 +import { ${simpleClassName}VO, ${simpleClassName}PageReqVO, ${simpleClassName}ExcelReqVO } from './types'
3 3
4 const request = useAxios() 4 const request = useAxios()
5 5
6 #set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}") 6 #set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}")
7 // 查询${table.classComment}列表 7 // 查询${table.classComment}列表
8 export const get${simpleClassName}PageApi = async (params: ${simpleClassName}PageReqVO) => { 8 export const get${simpleClassName}PageApi = async (params: ${simpleClassName}PageReqVO) => {
9 - return await request.get({ url: '${baseURL}/page', params }) 9 + return await request.get({ url: '${baseURL}/page', params })
10 } 10 }
11 11
12 // 查询${table.classComment}详情 12 // 查询${table.classComment}详情
13 export const get${simpleClassName}Api = async (id: number) => { 13 export const get${simpleClassName}Api = async (id: number) => {
14 - return await request.get({ url: '${baseURL}/get?id=' + id }) 14 + return await request.get({ url: '${baseURL}/get?id=' + id })
15 } 15 }
16 16
17 // 新增${table.classComment} 17 // 新增${table.classComment}
18 export const create${simpleClassName}Api = async (data: ${simpleClassName}VO) => { 18 export const create${simpleClassName}Api = async (data: ${simpleClassName}VO) => {
19 - return await request.post({ url: '${baseURL}/create', data }) 19 + return await request.post({ url: '${baseURL}/create', data })
20 } 20 }
21 21
22 // 修改${table.classComment} 22 // 修改${table.classComment}
23 export const update${simpleClassName}Api = async (data: ${simpleClassName}VO) => { 23 export const update${simpleClassName}Api = async (data: ${simpleClassName}VO) => {
24 - return await request.put({ url: '${baseURL}/update', data }) 24 + return await request.put({ url: '${baseURL}/update', data })
25 } 25 }
26 26
27 // 删除${table.classComment} 27 // 删除${table.classComment}
28 export const delete${simpleClassName}Api = async (id: number) => { 28 export const delete${simpleClassName}Api = async (id: number) => {
29 - return await request.delete({ url: '${baseURL}/delete?id=' + id }) 29 + return await request.delete({ url: '${baseURL}/delete?id=' + id })
30 } 30 }
31 31
32 // 导出${table.classComment} Excel 32 // 导出${table.classComment} Excel
33 export const export${simpleClassName}Api = async (params: ${simpleClassName}ExcelReqVO) => { 33 export const export${simpleClassName}Api = async (params: ${simpleClassName}ExcelReqVO) => {
34 - return await request.download({ url: '${baseURL}/export-excel', params }) 34 + return await request.download({ url: '${baseURL}/export-excel', params })
35 } 35 }
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/api/types.ts.vm
@@ -2,9 +2,11 @@ export type ${simpleClassName}VO = { @@ -2,9 +2,11 @@ export type ${simpleClassName}VO = {
2 #foreach ($column in $columns) 2 #foreach ($column in $columns)
3 #if ($column.createOperation || $column.updateOperation) 3 #if ($column.createOperation || $column.updateOperation)
4 #if(${column.javaType.toLowerCase()} == "long" || ${column.javaType.toLowerCase()} == "integer") 4 #if(${column.javaType.toLowerCase()} == "long" || ${column.javaType.toLowerCase()} == "integer")
5 - ${column.javaField}: number 5 + ${column.javaField}: number
  6 +#elseif(${column.javaType.toLowerCase()} == "date")
  7 + ${column.javaField}: string
6 #else 8 #else
7 - ${column.javaField}: ${column.javaType.toLowerCase()} 9 + ${column.javaField}: ${column.javaType.toLowerCase()}
8 #end 10 #end
9 #end 11 #end
10 #end 12 #end
@@ -14,9 +16,11 @@ export type ${simpleClassName}PageReqVO = { @@ -14,9 +16,11 @@ export type ${simpleClassName}PageReqVO = {
14 #foreach ($column in $columns) 16 #foreach ($column in $columns)
15 #if (${column.listOperation})##查询操作 17 #if (${column.listOperation})##查询操作
16 #if(${column.javaType.toLowerCase()} == "long" || ${column.javaType.toLowerCase()} == "integer") 18 #if(${column.javaType.toLowerCase()} == "long" || ${column.javaType.toLowerCase()} == "integer")
17 - ${column.javaField}: number 19 + ${column.javaField}: number
  20 +#elseif(${column.javaType.toLowerCase()} == "date")
  21 + ${column.javaField}: string
18 #else 22 #else
19 - ${column.javaField}: ${column.javaType.toLowerCase()} 23 + ${column.javaField}: ${column.javaType.toLowerCase()}
20 #end 24 #end
21 #end 25 #end
22 #end 26 #end
@@ -26,9 +30,11 @@ export type ${simpleClassName}ExcelReqVO = { @@ -26,9 +30,11 @@ export type ${simpleClassName}ExcelReqVO = {
26 #foreach ($column in $columns) 30 #foreach ($column in $columns)
27 #if (${column.listOperation})##查询操作 31 #if (${column.listOperation})##查询操作
28 #if(${column.javaType.toLowerCase()} == "long" || ${column.javaType.toLowerCase()} == "integer") 32 #if(${column.javaType.toLowerCase()} == "long" || ${column.javaType.toLowerCase()} == "integer")
29 - ${column.javaField}: number 33 + ${column.javaField}: number
  34 +#elseif(${column.javaType.toLowerCase()} == "date")
  35 + ${column.javaField}: string
30 #else 36 #else
31 - ${column.javaField}: ${column.javaType.toLowerCase()} 37 + ${column.javaField}: ${column.javaType.toLowerCase()}
32 #end 38 #end
33 #end 39 #end
34 #end 40 #end
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/data.ts.vm
@@ -8,104 +8,104 @@ export const rules = reactive({ @@ -8,104 +8,104 @@ export const rules = reactive({
8 #foreach ($column in $columns) 8 #foreach ($column in $columns)
9 #if (($column.createOperation || $column.updateOperation) && !$column.nullable && !${column.primaryKey})## 创建或者更新操作 && 要求非空 && 非主键 9 #if (($column.createOperation || $column.updateOperation) && !$column.nullable && !${column.primaryKey})## 创建或者更新操作 && 要求非空 && 非主键
10 #set($comment=$column.columnComment) 10 #set($comment=$column.columnComment)
11 - $column.javaField: [{ required: true, message: "${comment}不能为空", trigger: #if($column.htmlType == "select")"change"#else"blur"#end }], 11 + $column.javaField: [{ required: true, message: '${comment}不能为空', trigger: #if($column.htmlType == "select")'change'#else'blur'#end }],
12 #end 12 #end
13 #end 13 #end
14 }) 14 })
15 // CrudSchema 15 // CrudSchema
16 const crudSchemas = reactive<CrudSchema[]>([ 16 const crudSchemas = reactive<CrudSchema[]>([
17 #foreach($column in $columns) 17 #foreach($column in $columns)
18 - #if ($column.listOperation || $column.listOperationResult || $column.createOperation || $column.updateOperation)  
19 - #set ($dictType = $column.dictType)  
20 - {  
21 - label: '${column.columnComment}',  
22 - field: '${column.javaField}',  
23 - #if ("" != $dictType)## 有数据字典  
24 - dictType: DICT_TYPE.$dictType.toUpperCase(),  
25 - #end  
26 - #if($column.primaryKey)  
27 - type: 'index',  
28 - form: {  
29 - show: false  
30 - },  
31 - detail: {  
32 - show: false 18 + #if ($column.listOperation || $column.listOperationResult || $column.createOperation || $column.updateOperation)
  19 + #set ($dictType = $column.dictType)
  20 + {
  21 + label: '${column.columnComment}',
  22 + field: '${column.javaField}',
  23 + #if ("" != $dictType)## 有数据字典
  24 + dictType: DICT_TYPE.$dictType.toUpperCase(),
  25 + #end
  26 + #if($column.primaryKey)
  27 + type: 'index',
  28 + form: {
  29 + show: false
  30 + },
  31 + detail: {
  32 + show: false
  33 + }
  34 + #else
  35 + #if (!$column.createOperation && !$column.updateOperation)
  36 + form: {
  37 + show: false
  38 + },
  39 + #elseif(!("" != $column.dictType))
  40 + form: {
  41 + show: true,
  42 + #if ($column.htmlType == "datetime")## 时间框
  43 + component: 'DatePicker',
  44 + componentProps: {
  45 + type: 'datetime',
  46 + valueFormat: 'YYYY-MM-DD HH:mm:ss'
33 } 47 }
34 - #else  
35 - #if (!$column.createOperation && !$column.updateOperation)  
36 - form: {  
37 - false 48 + #elseif($column.htmlType == "editor")## 文本编辑器
  49 + component: 'Editor',
  50 + colProps: {
  51 + span: 24
38 }, 52 },
39 - #elseif(!("" != $column.dictType))  
40 - form: {  
41 - show: true,  
42 - #if ($column.htmlType == "datetime")## 时间框  
43 - component: 'DatePicker',  
44 - componentProps: {  
45 - type: 'datetime',  
46 - valueFormat: 'YYYY-MM-DD HH:mm:ss'  
47 - }  
48 - #elseif($column.htmlType == "editor")## 文本编辑器  
49 - component: 'Editor',  
50 - colProps: {  
51 - span: 24  
52 - },  
53 - componentProps: {  
54 - valueHtml: ''  
55 - }  
56 - #elseif($column.htmlType == "textarea")## 文本框  
57 - component: 'Input',  
58 - componentProps: {  
59 - type: 'textarea',  
60 - rows: 4  
61 - },  
62 - colProps: {  
63 - span: 24  
64 - }  
65 - #end 53 + componentProps: {
  54 + valueHtml: ''
  55 + }
  56 + #elseif($column.htmlType == "textarea")## 文本框
  57 + component: 'Input',
  58 + componentProps: {
  59 + type: 'textarea',
  60 + rows: 4
66 }, 61 },
  62 + colProps: {
  63 + span: 24
  64 + }
67 #end 65 #end
68 - #if ($column.listOperationResult)  
69 - search: {  
70 - #if($column.htmlType == "input")  
71 - show: true  
72 - #else  
73 - #if($column.htmlType == "datetime")  
74 - show: true,  
75 - component: 'DatePicker',  
76 - componentProps: {  
77 - type: 'datetimerange',  
78 - valueFormat: 'YYYY-MM-DD HH:mm:ss'  
79 - }  
80 - #elseif($column.htmlType == "select" || $column.htmlType == "radio")  
81 - #if ("" == $dictType)## 没有数据字典  
82 - show: true,  
83 - component: 'Select',  
84 - componentProps: {  
85 - option: [{'','请选择字典生成'}]  
86 - }  
87 - #else  
88 - show: true  
89 - #end  
90 - #end  
91 - #end 66 + },
  67 + #end
  68 + #if ($column.listOperationResult)
  69 + search: {
  70 + #if($column.htmlType == "input")
  71 + show: true
  72 + #else
  73 + #if($column.htmlType == "datetime")
  74 + show: true,
  75 + component: 'DatePicker',
  76 + componentProps: {
  77 + type: 'datetimerange',
  78 + valueFormat: 'YYYY-MM-DD HH:mm:ss'
  79 + }
  80 + #elseif($column.htmlType == "select" || $column.htmlType == "radio")
  81 + #if ("" == $dictType)## 没有数据字典
  82 + show: true,
  83 + component: 'Select',
  84 + componentProps: {
  85 + option: [{'','请选择字典生成'}]
92 } 86 }
  87 + #else
  88 + show: true
93 #end 89 #end
94 #end 90 #end
95 - }, 91 + #end
  92 + }
96 #end 93 #end
  94 + #end
  95 + },
  96 + #end
97 #end 97 #end
98 - {  
99 - label: t('table.action'),  
100 - field: 'action',  
101 - width: '240px',  
102 - form: {  
103 - show: false  
104 - },  
105 - detail: {  
106 - show: false  
107 - } 98 + {
  99 + label: t('table.action'),
  100 + field: 'action',
  101 + width: '240px',
  102 + form: {
  103 + show: false
  104 + },
  105 + detail: {
  106 + show: false
108 } 107 }
  108 + }
109 ]) 109 ])
110 110
111 export const { allSchemas } = useCrudSchemas(crudSchemas) 111 export const { allSchemas } = useCrudSchemas(crudSchemas)
112 \ No newline at end of file 112 \ No newline at end of file
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm
1 <script setup lang="ts"> 1 <script setup lang="ts">
2 - import { ref, unref } from 'vue'  
3 - import dayjs from 'dayjs'  
4 - import { ElMessage } from 'element-plus'  
5 - import { DICT_TYPE } from '@/utils/dict'  
6 - import { useTable } from '@/hooks/web/useTable'  
7 - import { useI18n } from '@/hooks/web/useI18n'  
8 - import { FormExpose } from '@/components/Form'  
9 - import type { ${simpleClassName}VO } from '@/api/${table.moduleName}/${simpleClassName}/types'  
10 - import { rules, allSchemas } from './${simpleClassName}.data'  
11 - import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${simpleClassName}'  
12 - const { t } = useI18n() // 国际化 2 +import { ref, unref } from 'vue'
  3 +import dayjs from 'dayjs'
  4 +import { ElMessage } from 'element-plus'
  5 +import { DICT_TYPE } from '@/utils/dict'
  6 +import { useTable } from '@/hooks/web/useTable'
  7 +import { useI18n } from '@/hooks/web/useI18n'
  8 +import { FormExpose } from '@/components/Form'
  9 +import type { ${simpleClassName}VO } from '@/api/${table.moduleName}/${simpleClassName}/types'
  10 +import { rules, allSchemas } from './${simpleClassName}.data'
  11 +import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${simpleClassName}'
  12 +const { t } = useI18n() // 国际化
13 13
14 - // ========== 列表相关 ==========  
15 - const { register, tableObject, methods } = useTable<${simpleClassName}VO>({  
16 - getListApi: ${simpleClassName}Api.get${simpleClassName}PageApi,  
17 - delListApi: ${simpleClassName}Api.delete${simpleClassName}Api,  
18 - exportListApi: ${simpleClassName}Api.export${simpleClassName}Api  
19 - })  
20 - const { getList, setSearchParams, delList, exportList } = methods 14 +// ========== 列表相关 ==========
  15 +const { register, tableObject, methods } = useTable<${simpleClassName}VO>({
  16 + getListApi: ${simpleClassName}Api.get${simpleClassName}PageApi,
  17 + delListApi: ${simpleClassName}Api.delete${simpleClassName}Api,
  18 + exportListApi: ${simpleClassName}Api.export${simpleClassName}Api
  19 +})
  20 +const { getList, setSearchParams, delList, exportList } = methods
21 21
22 - // ========== CRUD 相关 ==========  
23 - const actionLoading = ref(false) // 遮罩层  
24 - const actionType = ref('') // 操作按钮的类型  
25 - const dialogVisible = ref(false) // 是否显示弹出层  
26 - const dialogTitle = ref('edit') // 弹出层标题  
27 - const formRef = ref<FormExpose>() // 表单 Ref 22 +// ========== CRUD 相关 ==========
  23 +const actionLoading = ref(false) // 遮罩层
  24 +const actionType = ref('') // 操作按钮的类型
  25 +const dialogVisible = ref(false) // 是否显示弹出层
  26 +const dialogTitle = ref('edit') // 弹出层标题
  27 +const formRef = ref<FormExpose>() // 表单 Ref
28 28
29 - // 设置标题  
30 - const setDialogTile = (type: string) => {  
31 - dialogTitle.value = t('action.' + type)  
32 - actionType.value = type  
33 - dialogVisible.value = true  
34 - } 29 +// 设置标题
  30 +const setDialogTile = (type: string) => {
  31 + dialogTitle.value = t('action.' + type)
  32 + actionType.value = type
  33 + dialogVisible.value = true
  34 +}
35 35
36 - // 新增操作  
37 - const handleCreate = () => {  
38 - setDialogTile('create')  
39 - // 重置表单  
40 - unref(formRef)?.getElFormRef()?.resetFields()  
41 - } 36 +// 新增操作
  37 +const handleCreate = () => {
  38 + setDialogTile('create')
  39 + // 重置表单
  40 + unref(formRef)?.getElFormRef()?.resetFields()
  41 +}
42 42
43 - // 修改操作  
44 - const handleUpdate = async (row: ${simpleClassName}VO) => {  
45 - setDialogTile('update')  
46 - // 设置数据  
47 - const res = await ${simpleClassName}Api.get${simpleClassName}Api(row.id)  
48 - unref(formRef)?.setValues(res)  
49 - } 43 +// 修改操作
  44 +const handleUpdate = async (row: ${simpleClassName}VO) => {
  45 + setDialogTile('update')
  46 + // 设置数据
  47 + const res = await ${simpleClassName}Api.get${simpleClassName}Api(row.id)
  48 + unref(formRef)?.setValues(res)
  49 +}
50 50
51 - // 提交按钮  
52 - const submitForm = async () => {  
53 - const elForm = unref(formRef)?.getElFormRef()  
54 - if (!elForm) return  
55 - elForm.validate(async (valid) => {  
56 - if (valid) {  
57 - actionLoading.value = true  
58 - // 提交请求  
59 - try {  
60 - const data = unref(formRef)?.formModel as ${simpleClassName}VO  
61 - if (actionType.value === 'create') {  
62 - await ${simpleClassName}Api.create${simpleClassName}Api(data)  
63 - ElMessage.success(t('common.createSuccess'))  
64 - } else {  
65 - await ${simpleClassName}Api.update${simpleClassName}Api(data)  
66 - ElMessage.success(t('common.updateSuccess'))  
67 - }  
68 - // 操作成功,重新加载列表  
69 - dialogVisible.value = false  
70 - await getList()  
71 - } finally {  
72 - actionLoading.value = false 51 +// 提交按钮
  52 +const submitForm = async () => {
  53 + const elForm = unref(formRef)?.getElFormRef()
  54 + if (!elForm) return
  55 + elForm.validate(async (valid) => {
  56 + if (valid) {
  57 + actionLoading.value = true
  58 + // 提交请求
  59 + try {
  60 + const data = unref(formRef)?.formModel as ${simpleClassName}VO
  61 + if (actionType.value === 'create') {
  62 + await ${simpleClassName}Api.create${simpleClassName}Api(data)
  63 + ElMessage.success(t('common.createSuccess'))
  64 + } else {
  65 + await ${simpleClassName}Api.update${simpleClassName}Api(data)
  66 + ElMessage.success(t('common.updateSuccess'))
73 } 67 }
  68 + // 操作成功,重新加载列表
  69 + dialogVisible.value = false
  70 + await getList()
  71 + } finally {
  72 + actionLoading.value = false
74 } 73 }
75 - })  
76 - } 74 + }
  75 + })
  76 +}
77 77
78 - // ========== 详情相关 ==========  
79 - const detailRef = ref() // 详情 Ref 78 +// ========== 详情相关 ==========
  79 +const detailRef = ref() // 详情 Ref
80 80
81 - // 详情操作  
82 - const handleDetail = async (row: ${simpleClassName}VO) => {  
83 - // 设置数据  
84 - detailRef.value = row  
85 - setDialogTile('detail')  
86 - } 81 +// 详情操作
  82 +const handleDetail = async (row: ${simpleClassName}VO) => {
  83 + // 设置数据
  84 + detailRef.value = row
  85 + setDialogTile('detail')
  86 +}
87 87
88 - // ========== 初始化 ==========  
89 - getList() 88 +// ========== 初始化 ==========
  89 +getList()
90 </script> 90 </script>
91 91
92 <template> 92 <template>
@@ -101,63 +101,63 @@ @@ -101,63 +101,63 @@
101 <Icon icon="ep:zoom-in" class="mr-5px" /> {{ t('action.add') }} 101 <Icon icon="ep:zoom-in" class="mr-5px" /> {{ t('action.add') }}
102 </el-button> 102 </el-button>
103 <el-button 103 <el-button
104 - type="warning"  
105 - v-hasPermi="['${permissionPrefix}:export']"  
106 - :loading="tableObject.exportLoading"  
107 - @click="exportList('数据.xls')" 104 + type="warning"
  105 + v-hasPermi="['${permissionPrefix}:export']"
  106 + :loading="tableObject.exportLoading"
  107 + @click="exportList('数据.xls')"
108 > 108 >
109 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }} 109 <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
110 </el-button> 110 </el-button>
111 </div> 111 </div>
112 <!-- 列表 --> 112 <!-- 列表 -->
113 <Table 113 <Table
114 - :columns="allSchemas.tableColumns"  
115 - :selection="false"  
116 - :data="tableObject.tableList"  
117 - :loading="tableObject.loading"  
118 - :pagination="{ 114 + :columns="allSchemas.tableColumns"
  115 + :selection="false"
  116 + :data="tableObject.tableList"
  117 + :loading="tableObject.loading"
  118 + :pagination="{
119 total: tableObject.total 119 total: tableObject.total
120 }" 120 }"
121 - v-model:pageSize="tableObject.pageSize"  
122 - v-model:currentPage="tableObject.currentPage"  
123 - @register="register" 121 + v-model:pageSize="tableObject.pageSize"
  122 + v-model:currentPage="tableObject.currentPage"
  123 + @register="register"
124 > 124 >
125 #foreach($column in $columns) 125 #foreach($column in $columns)
126 #if ($column.listOperationResult) 126 #if ($column.listOperationResult)
127 #set ($dictType=$column.dictType) 127 #set ($dictType=$column.dictType)
128 #if ($column.javaType == "Date")## 时间类型 128 #if ($column.javaType == "Date")## 时间类型
129 - <template #${column.javaField}="{ row }">  
130 - <span>{{ dayjs(row.${column.javaField}).format('YYYY-MM-DD HH:mm:ss') }}</span>  
131 - </template> 129 + <template #${column.javaField}="{ row }">
  130 + <span>{{ dayjs(row.${column.javaField}).format('YYYY-MM-DD HH:mm:ss') }}</span>
  131 + </template>
132 #elseif("" != $column.dictType)## 数据字典 132 #elseif("" != $column.dictType)## 数据字典
133 - <template #${column.javaField}="{ row }">  
134 - <DictTag :type="DICT_TYPE.$dictType.toUpperCase()" :value="row.${column.javaField}" />  
135 - </template> 133 + <template #${column.javaField}="{ row }">
  134 + <DictTag :type="DICT_TYPE.$dictType.toUpperCase()" :value="row.${column.javaField}" />
  135 + </template>
136 #end 136 #end
137 #end 137 #end
138 #end 138 #end
139 <template #action="{ row }"> 139 <template #action="{ row }">
140 <el-button 140 <el-button
141 - link  
142 - type="primary"  
143 - v-hasPermi="['${permissionPrefix}:update']"  
144 - @click="handleUpdate(row)" 141 + link
  142 + type="primary"
  143 + v-hasPermi="['${permissionPrefix}:update']"
  144 + @click="handleUpdate(row)"
145 > 145 >
146 <Icon icon="ep:edit" class="mr-1px" /> {{ t('action.edit') }} 146 <Icon icon="ep:edit" class="mr-1px" /> {{ t('action.edit') }}
147 </el-button> 147 </el-button>
148 <el-button 148 <el-button
149 - link  
150 - type="primary"  
151 - v-hasPermi="['${permissionPrefix}:update']"  
152 - @click="handleDetail(row)" 149 + link
  150 + type="primary"
  151 + v-hasPermi="['${permissionPrefix}:update']"
  152 + @click="handleDetail(row)"
153 > 153 >
154 <Icon icon="ep:view" class="mr-1px" /> {{ t('action.detail') }} 154 <Icon icon="ep:view" class="mr-1px" /> {{ t('action.detail') }}
155 </el-button> 155 </el-button>
156 <el-button 156 <el-button
157 - link  
158 - type="primary"  
159 - v-hasPermi="['${permissionPrefix}:delete']"  
160 - @click="delList(row.id, false)" 157 + link
  158 + type="primary"
  159 + v-hasPermi="['${permissionPrefix}:delete']"
  160 + @click="delList(row.id, false)"
161 > 161 >
162 <Icon icon="ep:delete" class="mr-1px" /> {{ t('action.del') }} 162 <Icon icon="ep:delete" class="mr-1px" /> {{ t('action.del') }}
163 </el-button> 163 </el-button>
@@ -168,16 +168,16 @@ @@ -168,16 +168,16 @@
168 <Dialog v-model="dialogVisible" :title="dialogTitle"> 168 <Dialog v-model="dialogVisible" :title="dialogTitle">
169 <!-- 对话框(添加 / 修改) --> 169 <!-- 对话框(添加 / 修改) -->
170 <Form 170 <Form
171 - v-if="['create', 'update'].includes(actionType)"  
172 - :schema="allSchemas.formSchema"  
173 - :rules="rules"  
174 - ref="formRef" 171 + v-if="['create', 'update'].includes(actionType)"
  172 + :schema="allSchemas.formSchema"
  173 + :rules="rules"
  174 + ref="formRef"
175 /> 175 />
176 <!-- 对话框(详情) --> 176 <!-- 对话框(详情) -->
177 <Descriptions 177 <Descriptions
178 - v-if="actionType === 'detail'"  
179 - :schema="allSchemas.detailSchema"  
180 - :data="detailRef" 178 + v-if="actionType === 'detail'"
  179 + :schema="allSchemas.detailSchema"
  180 + :data="detailRef"
181 > 181 >
182 #foreach($column in $columns) 182 #foreach($column in $columns)
183 #if ($column.listOperationResult) 183 #if ($column.listOperationResult)
@@ -197,10 +197,10 @@ @@ -197,10 +197,10 @@
197 <!-- 操作按钮 --> 197 <!-- 操作按钮 -->
198 <template #footer> 198 <template #footer>
199 <el-button 199 <el-button
200 - v-if="['create', 'update'].includes(actionType)"  
201 - type="primary"  
202 - :loading="actionLoading"  
203 - @click="submitForm" 200 + v-if="['create', 'update'].includes(actionType)"
  201 + type="primary"
  202 + :loading="actionLoading"
  203 + @click="submitForm"
204 > 204 >
205 {{ t('action.save') }} 205 {{ t('action.save') }}
206 </el-button> 206 </el-button>
yudao-ui-admin-vue3/src/views/infra/codegen/EditTable.vue
@@ -38,15 +38,15 @@ const submitForm = async () =&gt; { @@ -38,15 +38,15 @@ const submitForm = async () =&gt; {
38 if (basicForm && genForm) { 38 if (basicForm && genForm) {
39 const basicInfoData = (await basicInfo?.getFormData()) as CodegenTableVO 39 const basicInfoData = (await basicInfo?.getFormData()) as CodegenTableVO
40 const genInfoData = (await genInfo?.getFormData()) as CodegenTableVO 40 const genInfoData = (await genInfo?.getFormData()) as CodegenTableVO
41 - const genTable: CodegenUpdateReqVO = {  
42 - table: Object.assign({}, basicInfoData, genInfoData),  
43 - columns: cloumCurrentRow.value  
44 - }  
45 if (parentMenuId.value) { 41 if (parentMenuId.value) {
46 genInfoData.parentMenuId = parentMenuId.value 42 genInfoData.parentMenuId = parentMenuId.value
47 } else { 43 } else {
48 genInfoData.parentMenuId = 0 44 genInfoData.parentMenuId = 0
49 } 45 }
  46 + const genTable: CodegenUpdateReqVO = {
  47 + table: Object.assign({}, basicInfoData, genInfoData),
  48 + columns: cloumCurrentRow.value
  49 + }
50 await updateCodegenTableApi(genTable) 50 await updateCodegenTableApi(genTable)
51 ElMessage.success(t('common.updateSuccess')) 51 ElMessage.success(t('common.updateSuccess'))
52 push('/infra/codegen') 52 push('/infra/codegen')
yudao-ui-admin-vue3/src/views/infra/codegen/components/GenInfoForm.vue
@@ -150,7 +150,7 @@ defineExpose({ @@ -150,7 +150,7 @@ defineExpose({
150 :props="menuProps" 150 :props="menuProps"
151 :data="menuOptions" 151 :data="menuOptions"
152 check-strictly 152 check-strictly
153 - @node-click="handleNodeClick" 153 + @change="handleNodeClick"
154 /> 154 />
155 </template> 155 </template>
156 </Form> 156 </Form>