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
db9d1a77
Commit
db9d1a77
authored
Nov 01, 2019
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复文件上传多级目录识别问题
parent
6ad6f909
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
42 deletions
+10
-42
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js
+1
-1
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java
+1
-1
ruoyi-generator/src/main/java/com/ruoyi/generator/controller/GenController.java
+2
-4
ruoyi-generator/src/main/resources/templates/tool/gen/gen.html
+3
-18
ruoyi-generator/src/main/resources/templates/tool/gen/importTable.html
+3
-18
No files found.
ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js
View file @
db9d1a77
...
...
@@ -29,7 +29,7 @@
$
.
extend
(
$
.
fn
.
bootstrapTable
.
locales
,
{
formatExport
:
function
()
{
return
'
Export data
'
;
return
'
导出
'
;
}
});
$
.
extend
(
$
.
fn
.
bootstrapTable
.
defaults
,
$
.
fn
.
bootstrapTable
.
locales
);
...
...
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java
View file @
db9d1a77
...
...
@@ -146,7 +146,7 @@ public class FileUploadUtils
private
static
final
String
getPathFileName
(
String
uploadDir
,
String
fileName
)
throws
IOException
{
int
dirLastIndex
=
uploadDir
.
lastIndexOf
(
"/"
)
+
1
;
int
dirLastIndex
=
Global
.
getProfile
().
length
(
)
+
1
;
String
currentDir
=
StringUtils
.
substring
(
uploadDir
,
dirLastIndex
);
String
pathFileName
=
Constants
.
RESOURCE_PREFIX
+
"/"
+
currentDir
+
"/"
+
fileName
;
return
pathFileName
;
...
...
ruoyi-generator/src/main/java/com/ruoyi/generator/controller/GenController.java
View file @
db9d1a77
...
...
@@ -46,9 +46,8 @@ public class GenController extends BaseController
@RequiresPermissions
(
"tool:gen:view"
)
@GetMapping
()
public
String
gen
(
ModelMap
mmap
)
public
String
gen
()
{
mmap
.
put
(
"genTables"
,
genTableService
.
selectGenTableList
(
new
GenTable
()));
return
prefix
+
"/gen"
;
}
...
...
@@ -98,9 +97,8 @@ public class GenController extends BaseController
*/
@RequiresPermissions
(
"tool:gen:list"
)
@GetMapping
(
"/importTable"
)
public
String
importTable
(
ModelMap
mmap
)
public
String
importTable
()
{
mmap
.
put
(
"dbTables"
,
genTableService
.
selectDbTableList
(
new
GenTable
()));
return
prefix
+
"/importTable"
;
}
...
...
ruoyi-generator/src/main/resources/templates/tool/gen/gen.html
View file @
db9d1a77
...
...
@@ -2,7 +2,6 @@
<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"
>
...
...
@@ -12,16 +11,10 @@
<div
class=
"select-list"
>
<ul>
<li>
表名称:
<select
name=
"tableName"
class=
"form-control"
>
<option
value=
""
>
所有
</option>
<option
th:each=
"table : ${genTables}"
th:text=
"${table.tableName}"
th:value=
"${table.tableName}"
></option>
</select>
表名称:
<input
type=
"text"
name=
"tableName"
/>
</li>
<li>
表描述:
<select
name=
"tableComment"
class=
"form-control"
>
<option
value=
""
>
所有
</option>
<option
th:each=
"table : ${genTables}"
th:text=
"${table.tableComment}"
th:value=
"${table.tableComment}"
></option>
</select>
表描述:
<input
type=
"text"
name=
"tableComment"
/>
</li>
<li
class=
"select-time"
>
<label>
表时间:
</label>
...
...
@@ -31,7 +24,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=
"
resetPre
()"
><i
class=
"fa fa-refresh"
></i>
重置
</a>
<a
class=
"btn btn-warning btn-rounded btn-sm"
onclick=
"
$.form.reset
()"
><i
class=
"fa fa-refresh"
></i>
重置
</a>
</li>
</ul>
</div>
...
...
@@ -59,7 +52,6 @@
</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'
)}]];
...
...
@@ -186,12 +178,6 @@
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 @
db9d1a77
...
...
@@ -2,7 +2,6 @@
<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"
>
...
...
@@ -12,20 +11,14 @@
<div
class=
"select-list"
>
<ul>
<li>
表名称:
<select
name=
"tableName"
class=
"form-control"
>
<option
value=
""
>
所有
</option>
<option
th:each=
"table : ${dbTables}"
th:text=
"${table.tableName}"
th:value=
"${table.tableName}"
></option>
</select>
表名称:
<input
type=
"text"
name=
"tableName"
/>
</li>
<li>
表描述:
<select
name=
"tableComment"
class=
"form-control"
>
<option
value=
""
>
所有
</option>
<option
th:each=
"table : ${dbTables}"
th:text=
"${table.tableComment}"
th:value=
"${table.tableComment}"
></option>
</select>
表描述:
<input
type=
"text"
name=
"tableComment"
/>
</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=
"
resetPre
()"
><i
class=
"fa fa-refresh"
></i>
重置
</a>
<a
class=
"btn btn-warning btn-rounded btn-sm"
onclick=
"
$.form.reset
()"
><i
class=
"fa fa-refresh"
></i>
重置
</a>
</li>
</ul>
</div>
...
...
@@ -38,7 +31,6 @@
</div>
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: select2-js"
/>
<script
type=
"text/javascript"
>
var
prefix
=
ctx
+
"tool/gen"
;
...
...
@@ -99,12 +91,6 @@
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