Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Springboot Plus
Commits
075b388e
Commit
075b388e
authored
Feb 27, 2018
by
李家智
Browse files
filesytem
parent
fea41b40
Changes
7
Hide whitespace changes
Inline
Side-by-side
admin-console/.gitignore
View file @
075b388e
/target/
/target/
/filesystem/
admin-console/src/main/java/com/ibeetl/admin/console/web/UserConsoleController.java
View file @
075b388e
...
@@ -278,9 +278,10 @@ public class UserConsoleController {
...
@@ -278,9 +278,10 @@ public class UserConsoleController {
}
}
@
Ge
tMapping
(
MODEL
+
"/excel/export.json"
)
@
Pos
tMapping
(
MODEL
+
"/excel/export.json"
)
@Function
(
"user.export"
)
@Function
(
"user.export"
)
public
JsonResult
export
(
HttpServletResponse
response
,
UserQuery
condtion
)
{
@ResponseBody
public
JsonResult
<
String
>
export
(
HttpServletResponse
response
,
UserQuery
condtion
)
{
String
excelTemplate
=
"excelTemplates/admin/user/user_collection_template.xls"
;
String
excelTemplate
=
"excelTemplates/admin/user/user_collection_template.xls"
;
PageQuery
<
CoreUser
>
page
=
condtion
.
getPageQuery
();
PageQuery
<
CoreUser
>
page
=
condtion
.
getPageQuery
();
//取出全部符合条件的
//取出全部符合条件的
...
@@ -297,6 +298,7 @@ public class UserConsoleController {
...
@@ -297,6 +298,7 @@ public class UserConsoleController {
Context
context
=
new
Context
();
Context
context
=
new
Context
();
context
.
putVar
(
"users"
,
users
);
context
.
putVar
(
"users"
,
users
);
JxlsHelper
.
getInstance
().
processTemplate
(
is
,
os
,
context
);
JxlsHelper
.
getInstance
().
processTemplate
(
is
,
os
,
context
);
//下载参考FileSystemContorller
return
JsonResult
.
success
(
item
.
getId
());
return
JsonResult
.
success
(
item
.
getId
());
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
throw
new
PlatformException
(
e
.
getMessage
());
throw
new
PlatformException
(
e
.
getMessage
());
...
...
admin-console/src/main/resources/static/js/admin/user/index.js
View file @
075b388e
...
@@ -126,8 +126,8 @@ layui.define([ 'form', 'laydate', 'table','userApi' ], function(exports) {
...
@@ -126,8 +126,8 @@ layui.define([ 'form', 'laydate', 'table','userApi' ], function(exports) {
},
},
exportUsers
:
function
(){
exportUsers
:
function
(){
Common
.
openConfirm
(
"
确认要导出这些用户?
"
,
function
(){
Common
.
openConfirm
(
"
确认要导出这些用户?
"
,
function
(){
userApi
.
exportUsers
(
$
(
"
#searchForm
"
),
function
(){
userApi
.
exportUsers
(
$
(
"
#searchForm
"
),
function
(
fileId
){
Common
.
info
(
"
导出成功
"
)
Lib
.
download
(
fileId
);
})
})
})
})
...
...
admin-console/src/main/resources/static/js/admin/user/userApi.js
View file @
075b388e
...
@@ -30,8 +30,8 @@ layui.define([], function(exports) {
...
@@ -30,8 +30,8 @@ layui.define([], function(exports) {
},
},
exportUsers
:
function
(
form
,
callback
){
exportUsers
:
function
(
form
,
callback
){
var
formPara
=
form
.
serializeJson
();
var
formPara
=
form
.
serializeJson
();
Common
.
post
(
"
/admin/user/excel/export.json
"
,
formPara
,
function
()
{
Common
.
post
(
"
/admin/user/excel/export.json
"
,
formPara
,
function
(
fileId
)
{
callback
();
callback
(
fileId
);
})
})
}
}
...
...
admin-console/src/main/resources/templates/admin/user/index.html
View file @
075b388e
...
@@ -9,8 +9,8 @@
...
@@ -9,8 +9,8 @@
<layui:accessButton
function=
"user.role"
action=
"userRole"
>
操作角色
</layui:accessButton>
<layui:accessButton
function=
"user.role"
action=
"userRole"
>
操作角色
</layui:accessButton>
<layui:accessButton
function=
"user.role"
action=
"userRole"
>
流程角色
</layui:accessButton>
<layui:accessButton
function=
"user.role"
action=
"userRole"
>
流程角色
</layui:accessButton>
<layui:accessButton
function=
"user.password"
action=
"changePassword"
>
修改密码
</layui:accessButton>
<layui:accessButton
function=
"user.password"
action=
"changePassword"
>
修改密码
</layui:accessButton>
<layui:accessButton
function=
"user.export"
action=
"export
"
>
导出
</layui:accessButton>
<layui:accessButton
function=
"user.export"
action=
"export
Users"
>
导出Excel
</layui:accessButton>
<layui:accessButton
function=
"user.import"
action=
"import"
>
导入
</layui:accessButton>
<layui:accessButton
function=
"user.import"
action=
"import
Users
"
>
导入
</layui:accessButton>
</div>
</div>
<table
id=
"userTable"
lay-filter=
"userTable"
></table>
<table
id=
"userTable"
lay-filter=
"userTable"
></table>
...
...
admin-core/src/main/java/com/ibeetl/admin/core/web/FileSystemContorller.java
View file @
075b388e
...
@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletResponse;
...
@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletResponse;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.apache.commons.logging.LogFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.servlet.ModelAndView
;
import
org.springframework.web.servlet.ModelAndView
;
...
@@ -17,6 +18,7 @@ import com.ibeetl.admin.core.file.FileService;
...
@@ -17,6 +18,7 @@ import com.ibeetl.admin.core.file.FileService;
public
class
FileSystemContorller
{
public
class
FileSystemContorller
{
private
final
Log
log
=
LogFactory
.
getLog
(
this
.
getClass
());
private
final
Log
log
=
LogFactory
.
getLog
(
this
.
getClass
());
private
static
final
String
MODEL
=
"/core/file"
;
private
static
final
String
MODEL
=
"/core/file"
;
@Autowired
FileService
fileService
;
FileService
fileService
;
@GetMapping
(
MODEL
+
"/get.do"
)
@GetMapping
(
MODEL
+
"/get.do"
)
public
ModelAndView
index
(
HttpServletResponse
response
,
String
id
)
throws
IOException
{
public
ModelAndView
index
(
HttpServletResponse
response
,
String
id
)
throws
IOException
{
...
...
admin-core/src/main/resources/static/js/lib.js
View file @
075b388e
...
@@ -228,6 +228,10 @@ var Lib = {
...
@@ -228,6 +228,10 @@ var Lib = {
+
"
</option>
"
);
+
"
</option>
"
);
}
}
},
},
download
:
function
(
fileId
){
window
.
location
.
href
=
Common
.
ctxPath
+
"
/core/file/get.do?id=
"
+
fileId
},
/* 搜索 */
/* 搜索 */
doSearchForm
:
function
(
form
,
tableIns
,
page
)
{
doSearchForm
:
function
(
form
,
tableIns
,
page
)
{
...
...
Write
Preview
Supports
Markdown
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