以isExecuted
字段为例数据库设置为varchar
类型
新增页面
<div class="row"><div class="col-sm-6"><div class="form-group"><label class="col-sm-4 control-label">部门协调:</label><div class="col-sm-7 flex-nowrap"><div class="checkbox-box m-l" th:each="dict : ${@dict.getType('tb_sale_contracts_exec')}"><input type="checkbox" th:id="${'isExecuted_' + dict.dictCode}" name="isExecuted"th:value="${dict.dictValue}" th:checked="${dict.default}"><label th:for="${'isExecuted_' + dict.dictCode}"th:text="${dict.dictLabel}"></label></div></div></div></div>
</div>
修改页面
<div class="row"><div class="col-sm-6"><div class="form-group"><label class="col-sm-4 control-label">部门协调:</label><div class="col-sm-7" th:with="type=${@dict.getType('tb_sale_contracts_exec')}"><label th:each="dict : ${type}" class="check-box"><input name="isExecuted" type="checkbox" th:value="${dict.dictValue}" th:text="${dict.dictLabel}" th:attr="checked=${tbEarlySalesApply.isExecuted.contains(dict.dictValue)?true:false}"></label></div></div></div>
</div>