diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/form.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/form.vue.vm index 53414e9b0c..8209c92c39 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/form.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/form.vue.vm @@ -7,63 +7,64 @@ label-width="100px" v-loading="formLoading" > +#set ($dictMethods = [])## 使用到的 dict 字典方法 #foreach($column in $columns) #if ($column.createOperation || $column.updateOperation) #set ($dictType = $column.dictType) #set ($javaField = $column.javaField) + #set ($javaType = $column.javaType) #set ($AttrName = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) #set ($comment = $column.columnComment) - #set ($dictMethod = "getDictOptions") ## 计算使用哪个 dict 字典方法 - #if ($javaType == "Integer" || $javaType == "Long" || $javaType == "Byte" || $javaType == "Short") - #set ($dictMethod = "getIntDictOptions") - #elseif ($javaType == "String") - #set ($dictMethod = "getStrDictOptions") - #elseif ($javaType == "Boolean") - #set ($dictMethod = "getBoolDictOptions") - #end - #if ($column.htmlType == "input" && !$column.primaryKey) ## 忽略主键,不用在表单里 + #set ($dictMethod = "getDictOptions")## 计算使用哪个 dict 字典方法 + #if ($javaType == "Integer" || $javaType == "Long" || $javaType == "Byte" || $javaType == "Short") + #set ($dictMethod = "getIntDictOptions") + #elseif ($javaType == "String") + #set ($dictMethod = "getStrDictOptions") + #elseif ($javaType == "Boolean") + #set ($dictMethod = "getBoolDictOptions") + #end + #if ($column.htmlType == "input" && !$column.primaryKey)## 忽略主键,不用在表单里 - + #elseif($column.htmlType == "imageUpload")## 图片上传 TODO 芋艿:待测试 #set ($hasImageUploadColumn = true) - + #elseif($column.htmlType == "fileUpload")## 文件上传 TODO 芋艿:待测试 #set ($hasFileUploadColumn = true) - + #elseif($column.htmlType == "editor")## 文本编辑器 TODO 芋艿:待测试 - #set ($hasEditorColumn = true) - - - + + + #elseif($column.htmlType == "select")## 下拉框 - - + + #if ("" != $dictType)## 有数据字典 - #if (!$dictMethods.contains($dictMethod)) ## 如果不存在,则添加到 dictMethods 数组中,后续好 import - #( $dictMethods.add($dictMethod) ) + #if (!$dictMethods.contains($dictMethod))## 如果不存在,则添加到 dictMethods 数组中,后续好 import + #set($ignore = $dictMethods.add($dictMethod) ) #end - + #else##没数据字典 - + #end - - + + #elseif($column.htmlType == "checkbox")## 多选框 TODO 芋艿:待测试 - - + + #if ("" != $dictType)## 有数据字典 - #if (!$dictMethods.contains($dictMethod)) ## 如果不存在,则添加到 dictMethods 数组中,后续好 import - #( $dictMethods.add($dictMethod) ) + #if (!$dictMethods.contains($dictMethod))## 如果不存在,则添加到 dictMethods 数组中,后续好 import + #set($ignore = $dictMethods.add($dictMethod) ) #end #else##没数据字典 - 请选择字典生成 + 请选择字典生成 #end - - + + #elseif($column.htmlType == "radio")## 单选框 - - + + #if ("" != $dictType)## 有数据字典 - #if (!$dictMethods.contains($dictMethod)) ## 如果不存在,则添加到 dictMethods 数组中,后续好 import - #( $dictMethods.add($dictMethod) ) + #if (!$dictMethods.contains($dictMethod))## 如果不存在,则添加到 dictMethods 数组中,后续好 import + #set($ignore = $dictMethods.add($dictMethod) ) #end - - {{dict.label}} - + + {{ dict.label }} + #else##没数据字典 - 请选择字典生成 + 请选择字典生成 #end - - + + #elseif($column.htmlType == "datetime")## 时间框 TODO 芋艿:待测试 - + #elseif($column.htmlType == "textarea")## 文本框 TODO 芋艿:待测试 - + #end #end @@ -114,3 +116,115 @@ + diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm index 5622d7895e..9a57c83f9f 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm @@ -92,7 +92,7 @@ 搜索 重置 - #if ($permissionPrefix <= 14) + #if ($permissionPrefix.length() < 15) #else