mirror of https://gitee.com/y_project/RuoYi.git
代码生成支持模糊条件查询
parent
7eade0d43c
commit
9ac3ca79f8
|
@ -737,6 +737,20 @@ label {
|
||||||
background-color: #12889a
|
background-color: #12889a
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.select-list .select2-container--bootstrap {
|
||||||
|
width: 200px!important;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-list .select2-container--bootstrap .select2-selection {
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-list .select2-container--bootstrap .select2-selection--single {
|
||||||
|
height: 30px!important;
|
||||||
|
padding: 5px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.select-list .select-time input {
|
.select-list .select-time input {
|
||||||
width: 93px;
|
width: 93px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,10 +47,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="index.html"><i class="fa fa-home"></i> <span class="nav-label">主页</span> <span class="fa arrow"></span></a>
|
<a href="#"><i class="fa fa-home"></i> <span class="nav-label">主页</span> <span class="fa arrow"></span></a>
|
||||||
<ul class="nav nav-second-level">
|
<ul class="nav nav-second-level">
|
||||||
<li class="active"><a class="menuItem" th:href="@{/system/main}">了解若依</a></li>
|
<li><a class="menuItem" th:href="@{/system/main}">了解若依</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li th:each="menu : ${menus}">
|
<li th:each="menu : ${menus}">
|
||||||
|
|
|
@ -46,8 +46,9 @@ public class GenController extends BaseController
|
||||||
|
|
||||||
@RequiresPermissions("tool:gen:view")
|
@RequiresPermissions("tool:gen:view")
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
public String gen()
|
public String gen(ModelMap mmap)
|
||||||
{
|
{
|
||||||
|
mmap.put("genTables", genTableService.selectGenTableList(new GenTable()));
|
||||||
return prefix + "/gen";
|
return prefix + "/gen";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,8 +98,9 @@ public class GenController extends BaseController
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("tool:gen:list")
|
@RequiresPermissions("tool:gen:list")
|
||||||
@GetMapping("/importTable")
|
@GetMapping("/importTable")
|
||||||
public String importTable()
|
public String importTable(ModelMap mmap)
|
||||||
{
|
{
|
||||||
|
mmap.put("dbTables", genTableService.selectDbTableList(new GenTable()));
|
||||||
return prefix + "/importTable";
|
return prefix + "/importTable";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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,10 +12,16 @@
|
||||||
<div class="select-list">
|
<div class="select-list">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
表名称:<input type="text" name="tableName"/>
|
表名称:<select name="tableName" class="form-control">
|
||||||
|
<option value="">所有</option>
|
||||||
|
<option th:each="table : ${genTables}" th:text="${table.tableName}" th:value="${table.tableName}"></option>
|
||||||
|
</select>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
表描述:<input type="text" name="tableComment"/>
|
表描述:<select name="tableComment" class="form-control">
|
||||||
|
<option value="">所有</option>
|
||||||
|
<option th:each="table : ${genTables}" th:text="${table.tableComment}" th:value="${table.tableComment}"></option>
|
||||||
|
</select>
|
||||||
</li>
|
</li>
|
||||||
<li class="select-time">
|
<li class="select-time">
|
||||||
<label>表时间: </label>
|
<label>表时间: </label>
|
||||||
|
@ -24,7 +31,7 @@
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="resetPre()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -52,6 +59,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 prefix = ctx + "tool/gen";
|
var prefix = ctx + "tool/gen";
|
||||||
var editFlag = [[${@permission.hasPermi('tool:gen:edit')}]];
|
var editFlag = [[${@permission.hasPermi('tool:gen:edit')}]];
|
||||||
|
@ -178,6 +186,12 @@
|
||||||
var importTableUrl = prefix + "/importTable";
|
var importTableUrl = prefix + "/importTable";
|
||||||
$.modal.open("导入表结构", importTableUrl);
|
$.modal.open("导入表结构", importTableUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function resetPre() {
|
||||||
|
$.form.reset();
|
||||||
|
$("select[name='tableName']").val(null).trigger("change");
|
||||||
|
$("select[name='tableComment']").val(null).trigger("change");
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -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,14 +12,20 @@
|
||||||
<div class="select-list">
|
<div class="select-list">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
表名称:<input type="text" name="tableName"/>
|
表名称:<select name="tableName" class="form-control">
|
||||||
|
<option value="">所有</option>
|
||||||
|
<option th:each="table : ${dbTables}" th:text="${table.tableName}" th:value="${table.tableName}"></option>
|
||||||
|
</select>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
表描述:<input type="text" name="tableComment"/>
|
表描述:<select name="tableComment" class="form-control">
|
||||||
|
<option value="">所有</option>
|
||||||
|
<option th:each="table : ${dbTables}" th:text="${table.tableComment}" th:value="${table.tableComment}"></option>
|
||||||
|
</select>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="resetPre()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -31,6 +38,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 type="text/javascript">
|
<script type="text/javascript">
|
||||||
var prefix = ctx + "tool/gen";
|
var prefix = ctx + "tool/gen";
|
||||||
|
|
||||||
|
@ -91,6 +99,12 @@
|
||||||
var data = {"tables": rows.join()};
|
var data = {"tables": rows.join()};
|
||||||
$.operate.save(prefix + "/importTable", data);
|
$.operate.save(prefix + "/importTable", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function resetPre() {
|
||||||
|
$.form.reset();
|
||||||
|
$("select[name='tableName']").val(null).trigger("change");
|
||||||
|
$("select[name='tableComment']").val(null).trigger("change");
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
Reference in New Issue