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
982ce06c
Commit
982ce06c
authored
Aug 01, 2018
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善导出权限
parent
c7595fe5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
51 additions
and
11 deletions
+51
-11
sql/ry_20180801.sql
+0
-0
src/main/java/com/ruoyi/common/constant/PermissionConstants.java
+3
-0
src/main/java/com/ruoyi/common/utils/security/PermissionUtils.java
+4
-0
src/main/java/com/ruoyi/framework/web/controller/BaseController.java
+1
-0
src/main/java/com/ruoyi/framework/web/page/TableDataInfo.java
+11
-0
src/main/java/com/ruoyi/project/monitor/job/controller/JobController.java
+1
-0
src/main/java/com/ruoyi/project/monitor/job/controller/JobLogController.java
+1
-0
src/main/java/com/ruoyi/project/monitor/logininfor/controller/LogininforController.java
+1
-0
src/main/java/com/ruoyi/project/monitor/operlog/controller/OperlogController.java
+1
-0
src/main/java/com/ruoyi/project/system/config/controller/ConfigController.java
+1
-0
src/main/java/com/ruoyi/project/system/dict/controller/DictDataController.java
+1
-0
src/main/java/com/ruoyi/project/system/dict/controller/DictTypeController.java
+1
-0
src/main/java/com/ruoyi/project/system/post/controller/PostController.java
+1
-0
src/main/java/com/ruoyi/project/system/role/controller/RoleController.java
+1
-0
src/main/java/com/ruoyi/project/system/user/controller/UserController.java
+1
-0
src/main/resources/i18n/messages.properties
+1
-0
src/main/resources/static/ruoyi/js/ry-ui.js
+11
-1
src/main/resources/static/ruoyi/js/ry-ui.min.js
+0
-0
src/main/resources/templates/monitor/job/job.html
+1
-1
src/main/resources/templates/monitor/job/jobLog.html
+1
-1
src/main/resources/templates/monitor/logininfor/logininfor.html
+1
-1
src/main/resources/templates/monitor/operlog/operlog.html
+1
-1
src/main/resources/templates/system/config/config.html
+1
-1
src/main/resources/templates/system/dict/data/data.html
+1
-1
src/main/resources/templates/system/dict/type/type.html
+1
-1
src/main/resources/templates/system/post/post.html
+1
-1
src/main/resources/templates/system/role/role.html
+1
-1
src/main/resources/templates/system/user/user.html
+1
-1
No files found.
sql/ry_20180
723
.sql
→
sql/ry_20180
801
.sql
View file @
982ce06c
This diff is collapsed.
Click to expand it.
src/main/java/com/ruoyi/common/constant/PermissionConstants.java
View file @
982ce06c
...
...
@@ -16,6 +16,9 @@ public class PermissionConstants
/** 删除权限 */
public
static
final
String
REMOVE_PERMISSION
=
"remove"
;
/** 导出权限 */
public
static
final
String
EXPORT_PERMISSION
=
"export"
;
/** 显示权限 */
public
static
final
String
VIEW_PERMISSION
=
"view"
;
...
...
src/main/java/com/ruoyi/common/utils/security/PermissionUtils.java
View file @
982ce06c
...
...
@@ -33,6 +33,10 @@ public class PermissionUtils
{
msg
=
MessageUtils
.
message
(
"no.delete.permission"
,
permission
);
}
else
if
(
StringUtils
.
endsWithIgnoreCase
(
permission
,
PermissionConstants
.
EXPORT_PERMISSION
))
{
msg
=
MessageUtils
.
message
(
"no.export.permission"
,
permission
);
}
else
if
(
StringUtils
.
endsWithAny
(
permission
,
new
String
[]
{
PermissionConstants
.
VIEW_PERMISSION
,
PermissionConstants
.
LIST_PERMISSION
}))
{
msg
=
MessageUtils
.
message
(
"no.view.permission"
,
permission
);
...
...
src/main/java/com/ruoyi/framework/web/controller/BaseController.java
View file @
982ce06c
...
...
@@ -56,6 +56,7 @@ public class BaseController
protected
TableDataInfo
getDataTable
(
List
<?>
list
)
{
TableDataInfo
rspData
=
new
TableDataInfo
();
rspData
.
setCode
(
0
);
rspData
.
setRows
(
list
);
rspData
.
setTotal
(
new
PageInfo
(
list
).
getTotal
());
return
rspData
;
...
...
src/main/java/com/ruoyi/framework/web/page/TableDataInfo.java
View file @
982ce06c
...
...
@@ -15,6 +15,8 @@ public class TableDataInfo implements Serializable
private
long
total
;
/** 列表数据 */
private
List
<?>
rows
;
/** 消息状态码 */
private
int
code
;
/**
* 表格数据对象
...
...
@@ -55,4 +57,13 @@ public class TableDataInfo implements Serializable
this
.
rows
=
rows
;
}
public
int
getCode
()
{
return
code
;
}
public
void
setCode
(
int
code
)
{
this
.
code
=
code
;
}
}
src/main/java/com/ruoyi/project/monitor/job/controller/JobController.java
View file @
982ce06c
...
...
@@ -51,6 +51,7 @@ public class JobController extends BaseController
}
@Log
(
title
=
"定时任务"
,
action
=
BusinessType
.
EXPORT
)
@RequiresPermissions
(
"monitor:job:export"
)
@PostMapping
(
"/export"
)
@ResponseBody
public
AjaxResult
export
(
Job
job
)
throws
Exception
...
...
src/main/java/com/ruoyi/project/monitor/job/controller/JobLogController.java
View file @
982ce06c
...
...
@@ -49,6 +49,7 @@ public class JobLogController extends BaseController
}
@Log
(
title
=
"调度日志"
,
action
=
BusinessType
.
EXPORT
)
@RequiresPermissions
(
"monitor:job:export"
)
@PostMapping
(
"/export"
)
@ResponseBody
public
AjaxResult
export
(
JobLog
jobLog
)
throws
Exception
...
...
src/main/java/com/ruoyi/project/monitor/logininfor/controller/LogininforController.java
View file @
982ce06c
...
...
@@ -49,6 +49,7 @@ public class LogininforController extends BaseController
}
@Log
(
title
=
"登陆日志"
,
action
=
BusinessType
.
EXPORT
)
@RequiresPermissions
(
"monitor:logininfor:export"
)
@PostMapping
(
"/export"
)
@ResponseBody
public
AjaxResult
export
(
Logininfor
logininfor
)
throws
Exception
...
...
src/main/java/com/ruoyi/project/monitor/operlog/controller/OperlogController.java
View file @
982ce06c
...
...
@@ -51,6 +51,7 @@ public class OperlogController extends BaseController
}
@Log
(
title
=
"操作日志"
,
action
=
BusinessType
.
EXPORT
)
@RequiresPermissions
(
"monitor:operlog:export"
)
@PostMapping
(
"/export"
)
@ResponseBody
public
AjaxResult
export
(
OperLog
operLog
)
throws
Exception
...
...
src/main/java/com/ruoyi/project/system/config/controller/ConfigController.java
View file @
982ce06c
...
...
@@ -54,6 +54,7 @@ public class ConfigController extends BaseController
}
@Log
(
title
=
"参数管理"
,
action
=
BusinessType
.
EXPORT
)
@RequiresPermissions
(
"system:config:export"
)
@PostMapping
(
"/export"
)
@ResponseBody
public
AjaxResult
export
(
Config
config
)
throws
Exception
...
...
src/main/java/com/ruoyi/project/system/dict/controller/DictDataController.java
View file @
982ce06c
...
...
@@ -51,6 +51,7 @@ public class DictDataController extends BaseController
}
@Log
(
title
=
"字典数据"
,
action
=
BusinessType
.
EXPORT
)
@RequiresPermissions
(
"system:dict:export"
)
@PostMapping
(
"/export"
)
@ResponseBody
public
AjaxResult
export
(
DictData
dictData
)
throws
Exception
...
...
src/main/java/com/ruoyi/project/system/dict/controller/DictTypeController.java
View file @
982ce06c
...
...
@@ -51,6 +51,7 @@ public class DictTypeController extends BaseController
}
@Log
(
title
=
"字典类型"
,
action
=
BusinessType
.
EXPORT
)
@RequiresPermissions
(
"system:dict:export"
)
@PostMapping
(
"/export"
)
@ResponseBody
public
AjaxResult
export
(
DictType
dictType
)
throws
Exception
...
...
src/main/java/com/ruoyi/project/system/post/controller/PostController.java
View file @
982ce06c
...
...
@@ -51,6 +51,7 @@ public class PostController extends BaseController
}
@Log
(
title
=
"岗位管理"
,
action
=
BusinessType
.
EXPORT
)
@RequiresPermissions
(
"system:post:export"
)
@PostMapping
(
"/export"
)
@ResponseBody
public
AjaxResult
export
(
Post
post
)
throws
Exception
...
...
src/main/java/com/ruoyi/project/system/role/controller/RoleController.java
View file @
982ce06c
...
...
@@ -53,6 +53,7 @@ public class RoleController extends BaseController
}
@Log
(
title
=
"角色管理"
,
action
=
BusinessType
.
EXPORT
)
@RequiresPermissions
(
"system:role:export"
)
@PostMapping
(
"/export"
)
@ResponseBody
public
AjaxResult
export
(
Role
role
)
throws
Exception
...
...
src/main/java/com/ruoyi/project/system/user/controller/UserController.java
View file @
982ce06c
...
...
@@ -61,6 +61,7 @@ public class UserController extends BaseController
}
@Log
(
title
=
"用户管理"
,
action
=
BusinessType
.
EXPORT
)
@RequiresPermissions
(
"system:user:export"
)
@PostMapping
(
"/export"
)
@ResponseBody
public
AjaxResult
export
(
User
user
)
throws
Exception
...
...
src/main/resources/i18n/messages.properties
View file @
982ce06c
...
...
@@ -33,4 +33,5 @@ no.permission=您没有数据的权限,请联系管理员添加权限 [{0}]
no.create.permission
=
您没有创建数据的权限,请联系管理员添加权限 [{0}]
no.update.permission
=
您没有修改数据的权限,请联系管理员添加权限 [{0}]
no.delete.permission
=
您没有删除数据的权限,请联系管理员添加权限 [{0}]
no.export.permission
=
您没有导出数据的权限,请联系管理员添加权限 [{0}]
no.view.permission
=
您没有查看数据的权限,请联系管理员添加权限 [{0}]
src/main/resources/static/ruoyi/js/ry-ui.js
View file @
982ce06c
...
...
@@ -36,7 +36,8 @@
showToggle
:
$
.
common
.
visible
(
options
.
showToggle
),
// 是否显示详细视图和列表视图的切换按钮
showExport
:
$
.
common
.
visible
(
options
.
showExport
),
// 是否支持导出文件
queryParams
:
$
.
table
.
_params
,
// 传递参数(*)
columns
:
options
.
columns
// 显示列信息(*)
columns
:
options
.
columns
,
// 显示列信息(*)
responseHandler
:
$
.
table
.
responseHandler
// 回调函数
});
},
// 查询条件
...
...
@@ -50,6 +51,15 @@
isAsc
:
params
.
order
};
},
// 请求获取数据后处理回调函数
responseHandler
:
function
(
res
)
{
if
(
res
.
code
==
0
)
{
return
{
rows
:
res
.
rows
,
total
:
res
.
total
};
}
else
{
$
.
modal
.
alertWarning
(
res
.
msg
);
return
{
rows
:
[],
total
:
0
};
}
},
// 搜索
search
:
function
(
formId
)
{
var
currentId
=
$
.
common
.
isEmpty
(
formId
)
?
$
(
'form'
).
attr
(
'id'
)
:
formId
;
...
...
src/main/resources/static/ruoyi/js/ry-ui.min.js
View file @
982ce06c
This diff is collapsed.
Click to expand it.
src/main/resources/templates/monitor/job/job.html
View file @
982ce06c
...
...
@@ -25,7 +25,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-success btn-rounded btn-sm"
onclick=
"$.table.exportExcel()"
><i
class=
"fa fa-download"
></i>
下载
</a>
<a
class=
"btn btn-success btn-rounded btn-sm"
onclick=
"$.table.exportExcel()"
shiro:hasPermission=
"monitor:job:export"
><i
class=
"fa fa-download"
></i>
导出
</a>
</li>
</ul>
</div>
...
...
src/main/resources/templates/monitor/job/jobLog.html
View file @
982ce06c
...
...
@@ -31,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-success btn-rounded btn-sm"
onclick=
"$.table.exportExcel()"
><i
class=
"fa fa-download"
></i>
下载
</a>
<a
class=
"btn btn-success btn-rounded btn-sm"
onclick=
"$.table.exportExcel()"
shiro:hasPermission=
"monitor:job:export"
><i
class=
"fa fa-download"
></i>
导出
</a>
</li>
</ul>
</div>
...
...
src/main/resources/templates/monitor/logininfor/logininfor.html
View file @
982ce06c
...
...
@@ -31,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-success btn-rounded btn-sm"
onclick=
"$.table.exportExcel()"
><i
class=
"fa fa-download"
></i>
下载
</a>
<a
class=
"btn btn-success btn-rounded btn-sm"
onclick=
"$.table.exportExcel()"
shiro:hasPermission=
"monitor:logininfor:export"
><i
class=
"fa fa-download"
></i>
导出
</a>
</li>
</ul>
</div>
...
...
src/main/resources/templates/monitor/operlog/operlog.html
View file @
982ce06c
...
...
@@ -31,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-success btn-rounded btn-sm"
onclick=
"$.table.exportExcel()"
><i
class=
"fa fa-download"
></i>
下载
</a>
<a
class=
"btn btn-success btn-rounded btn-sm"
onclick=
"$.table.exportExcel()"
shiro:hasPermission=
"monitor:logininfor:export"
><i
class=
"fa fa-download"
></i>
导出
</a>
</li>
</ul>
</div>
...
...
src/main/resources/templates/system/config/config.html
View file @
982ce06c
...
...
@@ -30,7 +30,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-success btn-rounded btn-sm"
onclick=
"$.table.exportExcel()"
><i
class=
"fa fa-download"
></i>
下载
</a>
<a
class=
"btn btn-success btn-rounded btn-sm"
onclick=
"$.table.exportExcel()"
shiro:hasPermission=
"system:config:export"
><i
class=
"fa fa-download"
></i>
导出
</a>
</li>
</ul>
</div>
...
...
src/main/resources/templates/system/dict/data/data.html
View file @
982ce06c
...
...
@@ -27,7 +27,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-success btn-rounded btn-sm"
onclick=
"$.table.exportExcel()"
><i
class=
"fa fa-download"
></i>
下载
</a>
<a
class=
"btn btn-success btn-rounded btn-sm"
onclick=
"$.table.exportExcel()"
shiro:hasPermission=
"system:dict:export"
><i
class=
"fa fa-download"
></i>
导出
</a>
</li>
</ul>
</div>
...
...
src/main/resources/templates/system/dict/type/type.html
View file @
982ce06c
...
...
@@ -31,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-success btn-rounded btn-sm"
onclick=
"$.table.exportExcel()"
><i
class=
"fa fa-download"
></i>
下载
</a>
<a
class=
"btn btn-success btn-rounded btn-sm"
onclick=
"$.table.exportExcel()"
shiro:hasPermission=
"system:dict:export"
><i
class=
"fa fa-download"
></i>
导出
</a>
</li>
</ul>
</div>
...
...
src/main/resources/templates/system/post/post.html
View file @
982ce06c
...
...
@@ -25,7 +25,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-success btn-rounded btn-sm"
onclick=
"$.table.exportExcel()"
><i
class=
"fa fa-download"
></i>
下载
</a>
<a
class=
"btn btn-success btn-rounded btn-sm"
onclick=
"$.table.exportExcel()"
shiro:hasPermission=
"system:post:export"
><i
class=
"fa fa-download"
></i>
导出
</a>
</li>
</ul>
</div>
...
...
src/main/resources/templates/system/role/role.html
View file @
982ce06c
...
...
@@ -31,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-success btn-rounded btn-sm"
onclick=
"$.table.exportExcel()"
><i
class=
"fa fa-download"
></i>
下载
</a>
<a
class=
"btn btn-success btn-rounded btn-sm"
onclick=
"$.table.exportExcel()"
shiro:hasPermission=
"system:role:export"
><i
class=
"fa fa-download"
></i>
导出
</a>
</li>
</ul>
</div>
...
...
src/main/resources/templates/system/user/user.html
View file @
982ce06c
...
...
@@ -56,7 +56,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-success btn-rounded btn-sm"
onclick=
"$.table.exportExcel()"
><i
class=
"fa fa-download"
></i>
下载
</a>
<a
class=
"btn btn-success btn-rounded btn-sm"
onclick=
"$.table.exportExcel()"
shiro:hasPermission=
"system:user:export"
><i
class=
"fa fa-download"
></i>
导出
</a>
</li>
</ul>
</div>
...
...
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