thymeleaf-select
<select id="taskType" name="taskType" th:value="${rwTask.taskType}" class="form-control" type="text">
<option value ="1" th:selected="${rwTask.taskType} == '1'">周期任务</option>
<option value ="2" th:selected="${rwTask.taskType} == '2'">临时任务</option>
</select>
bootstrap
{
field : 'taskType',
title : '任务类型(1周期任务2临时任务)',
formatter : function(value, row, index) {
if (row.taskType == "1") {
return "周期任务";
}else {
return "临时任务";
}
// switch (row.taskType){
// case "1":
// return "1周期任务";
// case "2":
// return "临时任务";
// }
}
},