字典数据支持模糊条件查询

pull/80/MERGE
RuoYi 2019-10-18 11:23:10 +08:00
parent 9ac3ca79f8
commit 46b08d9474
1 changed files with 11 additions and 4 deletions

View File

@ -2,6 +2,7 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head> <head>
<th:block th:include="include :: header('字典数据列表')" /> <th:block th:include="include :: header('字典数据列表')" />
<th:block th:include="include :: select2-css" />
</head> </head>
<body class="gray-bg"> <body class="gray-bg">
<div class="container-div"> <div class="container-div">
@ -11,9 +12,9 @@
<div class="select-list"> <div class="select-list">
<ul> <ul>
<li> <li>
字典名称:<select id="dictType" name="dictType"> 字典名称:<select id="dictType" name="dictType" class="form-control">
<option th:each="dict : ${dictList}" th:text="${dict['dictName']}" th:value="${dict['dictType']}" th:field="*{dict.dictType}"></option> <option th:each="dict : ${dictList}" th:text="${dict['dictName']}" th:value="${dict['dictType']}" th:field="*{dict.dictType}"></option>
</select> </select>
</li> </li>
<li> <li>
字典标签:<input type="text" name="dictLabel"/> 字典标签:<input type="text" name="dictLabel"/>
@ -26,7 +27,7 @@
</li> </li>
<li> <li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a> <a class="btn btn-warning btn-rounded btn-sm" onclick="resetPre()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li> </li>
</ul> </ul>
</div> </div>
@ -54,6 +55,7 @@
</div> </div>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<script th:inline="javascript"> <script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:dict:edit')}]]; var editFlag = [[${@permission.hasPermi('system:dict:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:dict:remove')}]]; var removeFlag = [[${@permission.hasPermi('system:dict:remove')}]];
@ -132,6 +134,11 @@
var dictType = $("#dictType option:selected").val(); var dictType = $("#dictType option:selected").val();
$.operate.add(dictType); $.operate.add(dictType);
} }
function resetPre() {
$.form.reset();
$("#dictType").val($("#dictType").val()).trigger("change");
}
</script> </script>
</body> </body>
</html> </html>