数据字典应用
This commit is contained in:
@ -10,6 +10,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="dictLabel" column="dict_label" />
|
||||
<result property="dictValue" column="dict_value" />
|
||||
<result property="dictType" column="dict_type" />
|
||||
<result property="cssClass" column="css_class" />
|
||||
<result property="isDefault" column="is_default" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
@ -18,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<select id="selectDictDataList" parameterType="DictData" resultMap="DictDataResult">
|
||||
select dict_code, dict_sort, dict_label, dict_value, dict_type, status, create_by, create_time, remark from sys_dict_data
|
||||
select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, is_default, status, create_by, create_time, remark from sys_dict_data
|
||||
<where>
|
||||
<if test="searchValue != null and searchValue != ''">
|
||||
AND dict_label like concat(concat('%', #{searchValue}), '%')
|
||||
@ -29,8 +31,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDictDataByType" parameterType="DictData" resultMap="DictDataResult">
|
||||
select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, is_default, status, create_by, create_time, remark from sys_dict_data
|
||||
where dict_type = #{dictType} order by dict_sort asc
|
||||
</select>
|
||||
|
||||
<select id="selectDictDataById" parameterType="Long" resultMap="DictDataResult">
|
||||
select dict_code, dict_sort, dict_label, dict_value, dict_type, status, create_by, create_time, remark
|
||||
select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, is_default, status, create_by, create_time, remark
|
||||
from sys_dict_data
|
||||
where dict_code = #{dictCode}
|
||||
</select>
|
||||
@ -53,6 +60,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="dictLabel != null and dictLabel != ''">dict_label = #{dictLabel},</if>
|
||||
<if test="dictValue != null and dictValue != ''">dict_value = #{dictValue},</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
|
||||
<if test="cssClass != null and cssClass != ''">css_class = #{cssClass},</if>
|
||||
<if test="isDefault != null and isDefault != ''">is_default = #{isDefault},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
@ -68,6 +77,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="dictLabel != null and dictLabel != ''">dict_label,</if>
|
||||
<if test="dictValue != null and dictValue != ''">dict_value,</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type,</if>
|
||||
<if test="cssClass != null and cssClass != ''">css_class,</if>
|
||||
<if test="isDefault != null and isDefault != ''">is_default,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
@ -77,6 +88,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="dictLabel != null and dictLabel != ''">#{dictLabel},</if>
|
||||
<if test="dictValue != null and dictValue != ''">#{dictValue},</if>
|
||||
<if test="dictType != null and dictType != ''">#{dictType},</if>
|
||||
<if test="cssClass != null and cssClass != ''">#{cssClass},</if>
|
||||
<if test="isDefault != null and isDefault != ''">#{isDefault},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
|
@ -178,8 +178,6 @@ $.ajaxSetup({
|
||||
$.modalConfirm("登陆超时!请重新登陆!", function() {
|
||||
window.location.href = ctx + "login";
|
||||
})
|
||||
} else if (textStatus == "error") {
|
||||
$.modalAlert("请求超时!请稍后再试!", 'warning');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -16,5 +16,5 @@ $("#form-job-add").validate({
|
||||
});
|
||||
|
||||
function add() {
|
||||
_ajax_save(ctx + "/monitor/job/save", $("#form-job-add").serialize());
|
||||
_ajax_save(ctx + "monitor/job/save", $("#form-job-add").serialize());
|
||||
}
|
@ -16,5 +16,5 @@ $("#form-job-edit").validate({
|
||||
});
|
||||
|
||||
function edit() {
|
||||
_ajax_save(ctx + "/monitor/job/save", $("#form-job-edit").serialize());
|
||||
_ajax_save(ctx + "monitor/job/save", $("#form-job-edit").serialize());
|
||||
}
|
@ -22,13 +22,13 @@ $(function() {
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '操作状态',
|
||||
title: '状态',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
if (value == 0) {
|
||||
return '<span class="label label-success">正常</span>';
|
||||
} else if (value == 1) {
|
||||
return '<span class="label label-danger">禁用</span>';
|
||||
return '<span class="label label-danger">停用</span>';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -18,13 +18,13 @@ $(function() {
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '操作状态',
|
||||
title: '状态',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
if (value == 0) {
|
||||
return '<span class="label label-success">正常</span>';
|
||||
} else if (value == 1) {
|
||||
return '<span class="label label-danger">禁用</span>';
|
||||
return '<span class="label label-danger">停用</span>';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -37,14 +37,10 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio radio-info radio-inline">
|
||||
<input type="radio" id="radio1" name="status" value="0" checked="">
|
||||
<label for="radio1">正常</label>
|
||||
</div>
|
||||
<div class="radio radio-danger radio-inline">
|
||||
<input type="radio" id="radio2" name="status" value="1">
|
||||
<label for="radio2">禁用</label>
|
||||
<div class="col-sm-8" th:with="datas=${@dictService.selectDictData('sys_job_status')}">
|
||||
<div th:each="dict : ${datas}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="status" th:value="${dict['dictValue']}" th:checked="${dict['isDefault'] == 'Y' ? true : false}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -38,14 +38,10 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio radio-info radio-inline">
|
||||
<input type="radio" id="radio1" th:field="*{job.status}" name="status" value="0">
|
||||
<label for="radio1">正常</label>
|
||||
</div>
|
||||
<div class="radio radio-danger radio-inline">
|
||||
<input type="radio" id="radio2" th:field="*{job.status}" name="status" value="1">
|
||||
<label for="radio2">禁用</label>
|
||||
<div class="col-sm-8" th:with="datas=${@dictService.selectDictData('sys_job_status')}">
|
||||
<div th:each="dict : ${datas}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="status" th:value="${dict['dictValue']}" th:field="*{job.status}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -25,14 +25,10 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">系统内置:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio radio-info radio-inline">
|
||||
<input type="radio" id="radio1" name="configType" value="Y" checked="">
|
||||
<label for="radio1">是</label>
|
||||
</div>
|
||||
<div class="radio radio-danger radio-inline">
|
||||
<input type="radio" id="radio2" name="configType" value="N">
|
||||
<label for="radio2">否</label>
|
||||
<div class="col-sm-8" th:with="datas=${@dictService.selectDictData('sys_yes_no')}">
|
||||
<div th:each="dict : ${datas}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="configType" th:value="${dict['dictValue']}" th:checked="${dict['isDefault'] == 'Y' ? true : false}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -26,14 +26,10 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">系统内置:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio radio-info radio-inline">
|
||||
<input type="radio" id="radio1" th:field="*{config.configType}" name="configType" value="Y">
|
||||
<label for="radio1">是</label>
|
||||
</div>
|
||||
<div class="radio radio-danger radio-inline">
|
||||
<input type="radio" id="radio2" th:field="*{config.configType}" name="configType" value="N">
|
||||
<label for="radio2">否</label>
|
||||
<div class="col-sm-8" th:with="datas=${@dictService.selectDictData('sys_yes_no')}">
|
||||
<div th:each="dict : ${datas}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="configType" th:value="${dict['dictValue']}" th:field="*{config.configType}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -44,14 +44,10 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">部门状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio radio-info radio-inline">
|
||||
<input type="radio" id="radio1" name="status" value="0" checked="">
|
||||
<label for="radio1">正常</label>
|
||||
</div>
|
||||
<div class="radio radio-danger radio-inline">
|
||||
<input type="radio" id="radio2" name="status" value="1">
|
||||
<label for="radio2">停用</label>
|
||||
<div class="col-sm-8" th:with="datas=${@dictService.selectDictData('sys_post_status')}">
|
||||
<div th:each="dict : ${datas}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="status" th:value="${dict['dictValue']}" th:checked="${dict['isDefault'] == 'Y' ? true : false}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -45,14 +45,10 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">部门状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio radio-info radio-inline">
|
||||
<input type="radio" id="radio1" th:field="*{dept.status}" name="status" value="0">
|
||||
<label for="radio1">正常</label>
|
||||
</div>
|
||||
<div class="radio radio-danger radio-inline">
|
||||
<input type="radio" id="radio2" th:field="*{dept.status}" name="status" value="1">
|
||||
<label for="radio2">停用</label>
|
||||
<div class="col-sm-8" th:with="datas=${@dictService.selectDictData('sys_post_status')}">
|
||||
<div th:each="dict : ${datas}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="status" th:value="${dict['dictValue']}" th:field="*{dept.status}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -23,6 +23,21 @@
|
||||
<input class="form-control" type="text" id="dictType" name="dictType" readonly="true" th:value="${dictType}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">样式属性:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" id="cssClass" name="cssClass">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">系统默认:</label>
|
||||
<div class="col-sm-8" th:with="datas=${@dictService.selectDictData('sys_yes_no')}">
|
||||
<div th:each="dict : ${datas}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="isDefault" th:value="${dict['dictValue']}" th:checked="${dict['isDefault'] == 'Y' ? true : false}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">字典排序:</label>
|
||||
<div class="col-sm-8">
|
||||
@ -31,14 +46,10 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio radio-info radio-inline">
|
||||
<input type="radio" id="radio1" name="status" value="0" checked="">
|
||||
<label for="radio1">正常</label>
|
||||
</div>
|
||||
<div class="radio radio-danger radio-inline">
|
||||
<input type="radio" id="radio2" name="status" value="1">
|
||||
<label for="radio2">禁用</label>
|
||||
<div class="col-sm-8" th:with="datas=${@dictService.selectDictData('sys_post_status')}">
|
||||
<div th:each="dict : ${datas}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="status" th:value="${dict['dictValue']}" th:checked="${dict['isDefault'] == 'Y' ? true : false}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -24,6 +24,21 @@
|
||||
<input class="form-control" type="text" readonly="true" th:value="${dict.dictType}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">样式属性:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" id="cssClass" name="cssClass" th:value="${dict.cssClass}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">系统默认:</label>
|
||||
<div class="col-sm-8" th:with="datas=${@dictService.selectDictData('sys_yes_no')}">
|
||||
<div th:each="dict : ${datas}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="isDefault" th:value="${dict['dictValue']}" th:field="*{dict.isDefault}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">字典排序:</label>
|
||||
<div class="col-sm-8">
|
||||
@ -32,14 +47,10 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio radio-info radio-inline">
|
||||
<input type="radio" id="radio1" th:field="*{dict.status}" name="status" value="0">
|
||||
<label for="radio1">正常</label>
|
||||
</div>
|
||||
<div class="radio radio-danger radio-inline">
|
||||
<input type="radio" id="radio2" th:field="*{dict.status}" name="status" value="1">
|
||||
<label for="radio2">禁用</label>
|
||||
<div class="col-sm-8" th:with="datas=${@dictService.selectDictData('sys_dict_status')}">
|
||||
<div th:each="dict : ${datas}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="status" th:value="${dict['dictValue']}" th:field="*{dict.status}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -19,14 +19,10 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio radio-info radio-inline">
|
||||
<input type="radio" id="radio1" name="status" value="0" checked="">
|
||||
<label for="radio1">正常</label>
|
||||
</div>
|
||||
<div class="radio radio-danger radio-inline">
|
||||
<input type="radio" id="radio2" name="status" value="1">
|
||||
<label for="radio2">禁用</label>
|
||||
<div class="col-sm-8" th:with="datas=${@dictService.selectDictData('sys_dict_status')}">
|
||||
<div th:each="dict : ${datas}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="status" th:value="${dict['dictValue']}" th:checked="${dict['isDefault'] == 'Y' ? true : false}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -20,14 +20,10 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio radio-info radio-inline">
|
||||
<input type="radio" id="radio1" th:field="*{dict.status}" name="status" value="0">
|
||||
<label for="radio1">正常</label>
|
||||
</div>
|
||||
<div class="radio radio-danger radio-inline">
|
||||
<input type="radio" id="radio2" th:field="*{dict.status}" name="status" value="1">
|
||||
<label for="radio2">禁用</label>
|
||||
<div class="col-sm-8" th:with="datas=${@dictService.selectDictData('sys_dict_status')}">
|
||||
<div th:each="dict : ${datas}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="status" th:value="${dict['dictValue']}" th:field="*{dict.status}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -58,14 +58,10 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">菜单状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio radio-info radio-inline">
|
||||
<input type="radio" id="radio1" name="visible" value="0" checked="">
|
||||
<label for="radio1">显示</label>
|
||||
</div>
|
||||
<div class="radio radio-danger radio-inline">
|
||||
<input type="radio" id="radio2" name="visible" value="1">
|
||||
<label for="radio2">隐藏</label>
|
||||
<div class="col-sm-8" th:with="datas=${@dictService.selectDictData('sys_menu_visible')}">
|
||||
<div th:each="dict : ${datas}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="visible" th:value="${dict['dictValue']}" th:checked="${dict['isDefault'] == 'Y' ? true : false}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -58,15 +58,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">菜单:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio radio-info radio-inline">
|
||||
<input type="radio" id="radio1" th:field="*{menu.visible}" name="visible" value="0">
|
||||
<label for="radio1">显示</label>
|
||||
</div>
|
||||
<div class="radio radio-danger radio-inline">
|
||||
<input type="radio" id="radio2" th:field="*{menu.visible}" name="visible" value="1">
|
||||
<label for="radio2">隐藏</label>
|
||||
<label class="col-sm-3 control-label">菜单状态:</label>
|
||||
<div class="col-sm-8" th:with="datas=${@dictService.selectDictData('sys_menu_visible')}">
|
||||
<div th:each="dict : ${datas}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="visible" th:value="${dict['dictValue']}" th:field="*{menu.visible}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -25,14 +25,10 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">岗位状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio radio-info radio-inline">
|
||||
<input type="radio" id="radio1" name="status" value="0" checked="">
|
||||
<label for="radio1">正常</label>
|
||||
</div>
|
||||
<div class="radio radio-danger radio-inline">
|
||||
<input type="radio" id="radio2" name="status" value="1">
|
||||
<label for="radio2">禁用</label>
|
||||
<div class="col-sm-8" th:with="datas=${@dictService.selectDictData('sys_post_status')}">
|
||||
<div th:each="dict : ${datas}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="status" th:value="${dict['dictValue']}" th:checked="${dict['isDefault'] == 'Y' ? true : false}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -26,14 +26,10 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">岗位状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio radio-info radio-inline">
|
||||
<input type="radio" id="radio1" th:field="*{post.status}" name="status" value="0">
|
||||
<label for="radio1">正常</label>
|
||||
</div>
|
||||
<div class="radio radio-danger radio-inline">
|
||||
<input type="radio" id="radio2" th:field="*{post.status}" name="status" value="1">
|
||||
<label for="radio2">禁用</label>
|
||||
<div class="col-sm-8" th:with="datas=${@dictService.selectDictData('sys_post_status')}">
|
||||
<div th:each="dict : ${datas}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="status" th:value="${dict['dictValue']}" th:field="*{post.status}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -47,14 +47,10 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">性别:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio radio-info radio-inline">
|
||||
<input type="radio" id="radio1" name="sex" value="0" checked="">
|
||||
<label for="radio1">男</label>
|
||||
</div>
|
||||
<div class="radio radio-danger radio-inline">
|
||||
<input type="radio" id="radio2" name="sex" value="1">
|
||||
<label for="radio2">女</label>
|
||||
<div class="col-sm-8" th:with="datas=${@dictService.selectDictData('sys_user_sex')}">
|
||||
<div th:each="dict : ${datas}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="sex" th:value="${dict['dictValue']}" th:checked="${dict['isDefault'] == 'Y' ? true : false}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -42,14 +42,10 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">性别:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio radio-info radio-inline">
|
||||
<input type="radio" id="radio1" th:field="*{user.sex}" name="sex" value="0">
|
||||
<label for="radio1">男</label>
|
||||
</div>
|
||||
<div class="radio radio-danger radio-inline">
|
||||
<input type="radio" id="radio2" th:field="*{user.sex}" name="sex" value="1">
|
||||
<label for="radio2">女</label>
|
||||
<div class="col-sm-8" th:with="datas=${@dictService.selectDictData('sys_user_sex')}">
|
||||
<div th:each="dict : ${datas}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="sex" th:value="${dict['dictValue']}" th:field="*{user.sex}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user