Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fgqyxxlr
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yaru
fgqyxxlr
Commits
9ac3ca79
Commit
9ac3ca79
authored
Oct 18, 2019
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码生成支持模糊条件查询
parent
7eade0d4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
11 deletions
+57
-11
ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css
+14
-0
ruoyi-admin/src/main/resources/templates/index.html
+3
-3
ruoyi-generator/src/main/java/com/ruoyi/generator/controller/GenController.java
+4
-2
ruoyi-generator/src/main/resources/templates/tool/gen/gen.html
+18
-3
ruoyi-generator/src/main/resources/templates/tool/gen/importTable.html
+18
-3
No files found.
ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css
View file @
9ac3ca79
...
...
@@ -737,6 +737,20 @@ label {
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
{
width
:
93px
;
}
...
...
ruoyi-admin/src/main/resources/templates/index.html
View file @
9ac3ca79
...
...
@@ -47,10 +47,10 @@
</div>
</div>
</li>
<li>
<a
href=
"
index.html
"
><i
class=
"fa fa-home"
></i>
<span
class=
"nav-label"
>
主页
</span>
<span
class=
"fa arrow"
></span></a>
<li>
<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"
>
<li
class=
"active"
><a
class=
"menuItem"
th:href=
"@{/system/main}"
>
了解若依
</a></li>
<li><a
class=
"menuItem"
th:href=
"@{/system/main}"
>
了解若依
</a></li>
</ul>
</li>
<li
th:each=
"menu : ${menus}"
>
...
...
ruoyi-generator/src/main/java/com/ruoyi/generator/controller/GenController.java
View file @
9ac3ca79
...
...
@@ -46,8 +46,9 @@ public class GenController extends BaseController
@RequiresPermissions
(
"tool:gen:view"
)
@GetMapping
()
public
String
gen
()
public
String
gen
(
ModelMap
mmap
)
{
mmap
.
put
(
"genTables"
,
genTableService
.
selectGenTableList
(
new
GenTable
()));
return
prefix
+
"/gen"
;
}
...
...
@@ -97,8 +98,9 @@ public class GenController extends BaseController
*/
@RequiresPermissions
(
"tool:gen:list"
)
@GetMapping
(
"/importTable"
)
public
String
importTable
()
public
String
importTable
(
ModelMap
mmap
)
{
mmap
.
put
(
"dbTables"
,
genTableService
.
selectDbTableList
(
new
GenTable
()));
return
prefix
+
"/importTable"
;
}
...
...
ruoyi-generator/src/main/resources/templates/tool/gen/gen.html
View file @
9ac3ca79
...
...
@@ -2,6 +2,7 @@
<html
lang=
"zh"
xmlns:th=
"http://www.thymeleaf.org"
xmlns:shiro=
"http://www.pollix.at/thymeleaf/shiro"
>
<head>
<th:block
th:include=
"include :: header('代码生成列表')"
/>
<th:block
th:include=
"include :: select2-css"
/>
</head>
<body
class=
"gray-bg"
>
<div
class=
"container-div"
>
...
...
@@ -11,10 +12,16 @@
<div
class=
"select-list"
>
<ul>
<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>
表描述:
<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
class=
"select-time"
>
<label>
表时间:
</label>
...
...
@@ -24,7 +31,7 @@
</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-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>
</ul>
</div>
...
...
@@ -52,6 +59,7 @@
</div>
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: select2-js"
/>
<script
th:inline=
"javascript"
>
var
prefix
=
ctx
+
"tool/gen"
;
var
editFlag
=
[[
$
{@
permission
.
hasPermi
(
'tool:gen:edit'
)}]];
...
...
@@ -178,6 +186,12 @@
var
importTableUrl
=
prefix
+
"/importTable"
;
$
.
modal
.
open
(
"导入表结构"
,
importTableUrl
);
}
function
resetPre
()
{
$
.
form
.
reset
();
$
(
"select[name='tableName']"
).
val
(
null
).
trigger
(
"change"
);
$
(
"select[name='tableComment']"
).
val
(
null
).
trigger
(
"change"
);
}
</script>
</body>
</html>
\ No newline at end of file
ruoyi-generator/src/main/resources/templates/tool/gen/importTable.html
View file @
9ac3ca79
...
...
@@ -2,6 +2,7 @@
<html
lang=
"zh"
xmlns:th=
"http://www.thymeleaf.org"
xmlns:shiro=
"http://www.pollix.at/thymeleaf/shiro"
>
<head>
<th:block
th:include=
"include :: header('导入表结构')"
/>
<th:block
th:include=
"include :: select2-css"
/>
</head>
<body
class=
"gray-bg"
>
<div
class=
"container-div"
>
...
...
@@ -11,14 +12,20 @@
<div
class=
"select-list"
>
<ul>
<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>
表描述:
<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>
<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>
</ul>
</div>
...
...
@@ -31,6 +38,7 @@
</div>
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: select2-js"
/>
<script
type=
"text/javascript"
>
var
prefix
=
ctx
+
"tool/gen"
;
...
...
@@ -91,6 +99,12 @@
var
data
=
{
"tables"
:
rows
.
join
()};
$
.
operate
.
save
(
prefix
+
"/importTable"
,
data
);
}
function
resetPre
()
{
$
.
form
.
reset
();
$
(
"select[name='tableName']"
).
val
(
null
).
trigger
(
"change"
);
$
(
"select[name='tableComment']"
).
val
(
null
).
trigger
(
"change"
);
}
</script>
</body>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment