parent
e6a5ed9b4f
commit
7c594216e4
@ -0,0 +1,63 @@ |
||||
<!DOCTYPE html> |
||||
<!--解决idea thymeleaf 表达式模板报红波浪线--> |
||||
<!--suppress ALL --> |
||||
<html xmlns:th="http://www.thymeleaf.org"> |
||||
<head> |
||||
</head> |
||||
<body> |
||||
<frame th:fragment="myFragment"> |
||||
|
||||
<div th:class=" 'layui-form-item ' + ${'item-'+ tag }+ ' ' + ${tag=='drill_base' ? 'item-'+tag+'-'+field.fieldName: 'layui-hide item-'+tag+'-'+field.fieldName }" |
||||
th:each="field,iterStat : ${dataType}" |
||||
th:if="${field.isShow && field.fieldName!='dataType'}" |
||||
th:style="${field.fieldType == 'textarea' ? 'width: calc(100% - 30px);' : ''}" |
||||
th:with="username=*{userName}"> |
||||
<label th:if="${field.isRequired}" class="layui-form-label"> |
||||
<label style="color: red">*</label> |
||||
<label th:text="${field.showTitle}">*</label> |
||||
</label> |
||||
<label th:if="${!field.isRequired}" class="layui-form-label" th:text="${field.showTitle}"></label> |
||||
<div class="layui-input-block"> |
||||
<!-- 文本框类型 --> |
||||
<input class="layui-input" type="text" autocomplete="off" |
||||
th:if="${field.fieldType == 'input' || field.fieldType == 'date'}" |
||||
th:name="${field.fieldName}" |
||||
th:value="${field.fieldName=='entryStaff'?username:''}" |
||||
th:disabled="${field.isDisabled}" |
||||
th:placeholder="${field.showTitle}" |
||||
th:lay-verify="${field.isRequired ? 'required' : ''}"> |
||||
<!-- 文本域类型 --> |
||||
<textarea class="layui-textarea" type="text" autocomplete="off" |
||||
th:if="${field.fieldType == 'textarea'}" |
||||
th:name="${field.fieldName}" |
||||
th:disabled="${field.isDisabled}" |
||||
th:placeholder="${field.showTitle}" |
||||
th:lay-verify="${field.isRequired ? 'required' : ''}"></textarea> |
||||
<th:block th:if="${field.fieldType == 'radio' && field.isShow}"> |
||||
<input class="layui-inline" type="radio" |
||||
th:each="exp, stat : ${#strings.listSplit(field.dictType, ';')}" |
||||
th:with="tmp=${#strings.arraySplit(exp, '-')}, value=${tmp[0]}, title=${tmp[1]}, checked=${#arrays.length(tmp)==3?tmp[2]:false}" |
||||
th:name="${field.fieldName}" |
||||
th:value="${value}" |
||||
th:title="${title}" |
||||
th:checked="${checked}" |
||||
/> |
||||
</th:block> |
||||
<!-- 数据字典类型 --> |
||||
<div dict-component="select" |
||||
th:if="${field.fieldType == 'dict'}" |
||||
th:disabled="${field.isDisabled}" |
||||
th:dict-type="${field.dictType}" |
||||
th:dict-name="${field.fieldName}" |
||||
th:id="${'dict-'+tag+field.fieldName}"></div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
</frame> |
||||
<script> |
||||
|
||||
|
||||
</script> |
||||
</body> |
||||
</html> |
Reference in new issue