作者 Ricky

修复代码生成复选框字典遗漏问题

@@ -274,7 +274,8 @@ public class VelocityUtils @@ -274,7 +274,8 @@ public class VelocityUtils
274 for (GenTableColumn column : columns) 274 for (GenTableColumn column : columns)
275 { 275 {
276 if (!column.isSuperColumn() && StringUtils.isNotEmpty(column.getDictType()) && StringUtils.equalsAny( 276 if (!column.isSuperColumn() && StringUtils.isNotEmpty(column.getDictType()) && StringUtils.equalsAny(
277 - column.getHtmlType(), new String[] { GenConstants.HTML_SELECT, GenConstants.HTML_RADIO })) 277 + column.getHtmlType(),
  278 + new String[] { GenConstants.HTML_SELECT, GenConstants.HTML_RADIO, GenConstants.HTML_CHECKBOX }))
278 { 279 {
279 dicts.add("'" + column.getDictType() + "'"); 280 dicts.add("'" + column.getDictType() + "'");
280 } 281 }
@@ -108,7 +108,11 @@ @@ -108,7 +108,11 @@
108 #elseif($column.list && "" != $column.dictType) 108 #elseif($column.list && "" != $column.dictType)
109 <el-table-column label="${comment}" align="center" prop="${javaField}"> 109 <el-table-column label="${comment}" align="center" prop="${javaField}">
110 <template slot-scope="scope"> 110 <template slot-scope="scope">
  111 +#if($column.htmlType == "checkbox")
  112 + <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
  113 +#else
111 <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField}"/> 114 <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField}"/>
  115 +#end
112 </template> 116 </template>
113 </el-table-column> 117 </el-table-column>
114 #elseif($column.list && "" != $javaField) 118 #elseif($column.list && "" != $javaField)
@@ -136,7 +136,11 @@ @@ -136,7 +136,11 @@
136 #elseif($column.list && "" != $column.dictType) 136 #elseif($column.list && "" != $column.dictType)
137 <el-table-column label="${comment}" align="center" prop="${javaField}"> 137 <el-table-column label="${comment}" align="center" prop="${javaField}">
138 <template slot-scope="scope"> 138 <template slot-scope="scope">
  139 +#if($column.htmlType == "checkbox")
  140 + <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
  141 +#else
139 <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField}"/> 142 <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField}"/>
  143 +#end
140 </template> 144 </template>
141 </el-table-column> 145 </el-table-column>
142 #elseif($column.list && "" != $javaField) 146 #elseif($column.list && "" != $javaField)