代码生成显示类型支持复选框

master
RuoYi 4 years ago committed by Limy
parent af08ea779a
commit 9c9efdd858

@ -65,6 +65,25 @@
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div> </div>
</div> </div>
#elseif($column.htmlType == "checkbox" && "" != $dictType)
<div class="form-group">
<label class="col-sm-3 control-label">${comment}</label>
<div class="col-sm-8" th:with="type=${@dict.getType('${dictType}')}">
<label th:each="dict : ${type}" class="check-box">
<input name="${field}" type="checkbox" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"#if($column.required) required#end>
</label>
</div>
</div>
#elseif($column.htmlType == "checkbox" && $dictType)
<div class="form-group">
<label class="col-sm-3 control-label">${comment}</label>
<div class="col-sm-8">
<label class="check-box">
<input name="${field}" type="checkbox"#if($column.required) required#end> 无
</label>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
#elseif($column.htmlType == "radio" && "" != $dictType) #elseif($column.htmlType == "radio" && "" != $dictType)
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">${comment}</label> <label class="col-sm-3 control-label">${comment}</label>

@ -65,6 +65,25 @@
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span> <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div> </div>
</div> </div>
#elseif($column.htmlType == "checkbox" && "" != $dictType)
<div class="form-group">
<label class="col-sm-3 control-label">${comment}</label>
<div class="col-sm-8" th:with="type=${@dict.getType('${dictType}')}">
<label th:each="dict : ${type}" class="check-box">
<input name="${field}" type="checkbox" th:value="${dict.dictValue}" th:text="${dict.dictLabel}" th:attr="checked=${${className}.${field}.contains(dict.dictValue)?true:false}"#if($column.required) required#end>
</label>
</div>
</div>
#elseif($column.htmlType == "checkbox" && $dictType)
<div class="form-group">
<label class="col-sm-3 control-label">${comment}</label>
<div class="col-sm-8">
<label class="check-box">
<input name="${field}" type="checkbox"#if($column.required) required#end> 无
</label>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
#elseif($column.htmlType == "radio" && "" != $dictType) #elseif($column.htmlType == "radio" && "" != $dictType)
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">${comment}</label> <label class="col-sm-3 control-label">${comment}</label>

@ -120,7 +120,7 @@
title: '${comment}', title: '${comment}',
align: 'left', align: 'left',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.selectDictLabel(${javaField}Datas, value); return $.table.selectDictLabel#if($column.htmlType == "checkbox")s#end(${javaField}Datas, value);
} }
}, },
#elseif($column.list && "" != $javaField) #elseif($column.list && "" != $javaField)

@ -121,7 +121,7 @@
field: '${javaField}', field: '${javaField}',
title: '${comment}', title: '${comment}',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.selectDictLabel(${javaField}Datas, value); return $.table.selectDictLabel#if($column.htmlType == "checkbox")s#end(${javaField}Datas, value);
} }
}, },
#elseif($column.list && "" != $javaField) #elseif($column.list && "" != $javaField)

Loading…
Cancel
Save