判断字段是否存在(后台是否返回该字段)
th:if="${data.containsKey('details')}"
<table class="layui-table" th:if="${data.containsKey('details')}">
<thead>
<tr>
<th>序号</th>
<th>检验项目</th>
<th>检验结果</th>
</tr>
</thead>
<tr th:each="checkRecordResult,infoStat : ${data.details}">
<td>[[${infoStat.index + 1}]]</td>
<td>[[${checkRecordResult.result_name}]]</td>
<td>[[${checkRecordResult.result_value}]]</td>
</tr>
</table>
判断字段是否为null
th:if="${data.details!=null}"