diff --git a/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java b/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java index 6bce127..9ddf265 100644 --- a/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java +++ b/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java @@ -271,6 +271,23 @@ public class VelocityUtils { List columns = genTable.getColumns(); Set dicts = new HashSet(); + addDicts(dicts, columns); + if (StringUtils.isNotNull(genTable.getSubTable())) + { + List subColumns = genTable.getSubTable().getColumns(); + addDicts(dicts, subColumns); + } + return StringUtils.join(dicts, ", "); + } + + /** + * 添加字典列表 + * + * @param dicts 字典列表 + * @param columns 列集合 + */ + public static void addDicts(Set dicts, List columns) + { for (GenTableColumn column : columns) { if (!column.isSuperColumn() && StringUtils.isNotEmpty(column.getDictType()) && StringUtils.equalsAny( @@ -280,7 +297,6 @@ public class VelocityUtils dicts.add("'" + column.getDictType() + "'"); } } - return StringUtils.join(dicts, ", "); } /** diff --git a/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm index e7687b7..f034d7d 100644 --- a/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm +++ b/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm @@ -44,7 +44,7 @@ v-model="queryParams.${column.javaField}" type="date" value-format="yyyy-MM-dd" - placeholder="选择${comment}"> + placeholder="请选择${comment}"> #elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN") @@ -269,7 +269,7 @@ v-model="form.${field}" type="date" value-format="yyyy-MM-dd" - placeholder="选择${comment}"> + placeholder="请选择${comment}"> #elseif($column.htmlType == "textarea") @@ -302,12 +302,39 @@ #set($comment=$column.columnComment) #end #if($column.pk || $javaField == ${subTableFkclassName}) -#elseif($column.list && "" != $javaField) - +#elseif($column.list && $column.htmlType == "input") + +#elseif($column.list && $column.htmlType == "datetime") + + + +#elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" != $column.dictType) + + + +#elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" == $column.dictType) + + + #end #end diff --git a/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm index 08bb071..a363ef3 100644 --- a/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm +++ b/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm @@ -43,7 +43,7 @@ v-model="queryParams.${column.javaField}" type="date" value-format="YYYY-MM-DD" - placeholder="选择${comment}"> + placeholder="请选择${comment}"> #elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN") @@ -260,7 +260,7 @@ v-model="form.${field}" type="date" value-format="YYYY-MM-DD" - placeholder="选择${comment}"> + placeholder="请选择${comment}"> #elseif($column.htmlType == "textarea") @@ -293,12 +293,44 @@ #set($comment=$column.columnComment) #end #if($column.pk || $javaField == ${subTableFkclassName}) -#elseif($column.list && "" != $javaField) - +#elseif($column.list && $column.htmlType == "input") + +#elseif($column.list && $column.htmlType == "datetime") + + + +#elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" != $column.dictType) + + + +#elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" == $column.dictType) + + + #end #end diff --git a/ruoyi-ui/src/views/monitor/job/index.vue b/ruoyi-ui/src/views/monitor/job/index.vue index 84ea6af..eba8e0f 100644 --- a/ruoyi-ui/src/views/monitor/job/index.vue +++ b/ruoyi-ui/src/views/monitor/job/index.vue @@ -165,7 +165,7 @@ - + - + - + - + - +