表单渲染
<tr th:each="organization,stat:${pageResult.result}">
<td>
<input type="checkbox" name="uniqueCode" th:value="${organization.uniqueCode}">
</td>
<td th:text="${organization.name}"></td>
<td th:text="${organization.sortId}"></td>
<td th:text="${organization.typeId}"></td>
<td th:text="${organization.description}" onclick="showDescription(this.text())"></td>
<td th:text="${organization.cooperation}"></td>
<td th:text="${organization?.startTime == null?'':#dates.format(organization?.startTime,'yyyy-MM-dd HH:mm')}"></td>
<td th:text="${organization?.endTime == null?'':#dates.format(organization?.endTime,'yyyy-MM-dd HH:mm')}"></td>
<td class="td-status">
<span class="layui-btn layui-btn-normal " th:id="${'status_' + organization?.uniqueCode}" th:switch="${organization?.status}">
<font th:case="1">启用</font>
<font th:case="2">禁用</font>
</span>
</td>
<td class="td-manage">
<a title="编辑" th:onclick="|javascript:admin_update('添加','/api/organazition/get.html?uniqueCode=','${organization.uniqueCode}','1000','600') |"
class="ml-5" style="text-decoration:none">
<i class="layui-icon" style="font-size: 20px"></i>
</a>
<a title="审核通过"
th:id="${ 'enable_'+ organization?.uniqueCode }"
th:style="${organization?.status != 2 ?'display:inline-block':'display:none'}"
th:onclick="|javascript:updateStatus('审核通过','/api/organazition/review','${organization?.uniqueCode}',2) |"
class="ml-5" >
<i class="layui-icon layui-icon-ok" style="font-size: 20px; "></i>
</a>
<a title="拒绝通过"
th:id="${ 'disable_'+ organization.uniqueCode }"
th:style="${(organization?.status == 1 || organization?.status == 2) ?'display:inline-block':'display:none'}"
th:onclick="|javascript:updateStatus('拒绝通过','/api/organazition/review','${organization?.uniqueCode}',3) |"
class="ml-5" >
<i class="layui-icon layui-icon-close" style="font-size: 20px; "></i>
</a>
</td>
</tr>
select 渲染
<option th:each="temp:${cooperationList}" th:selected="${temp.id eq organazition?.cooperation}"
th:value="${temp.id}" th:text="${temp.name}"></option>