Commit 74d5b5da by 黄明步

新增oa用户识别记录

parent b482c074
...@@ -205,19 +205,19 @@ public class ViewController { ...@@ -205,19 +205,19 @@ public class ViewController {
@GetMapping("admin") @GetMapping("admin")
public String index(ModelMap modelMap) { public String index(ModelMap modelMap) {
DoorUser currentUser = UserUtil.getCurrentUser(); DoorUser currentUser = UserUtil.getCurrentUser();
System.out.println(currentUser); // System.out.println(currentUser);
List<Role> roles = currentUser.getRoles(); List<Role> roles = currentUser.getRoles();
List<Menu> menuList = new ArrayList<>(); List<Menu> menuList = new ArrayList<>();
boolean admin = false; boolean admin = false;
for (Role role : roles) { for (Role role : roles) {
System.out.println(role.toString()); // System.out.println(role.toString());
if (role.getName().equals("admin")) { if (role.getName().equals("admin")) {
admin = true; admin = true;
} }
List<Menu> menus = menuService.selectRoleId(role.getId()); List<Menu> menus = menuService.selectRoleId(role.getId());
if (menus != null) { if (menus != null) {
for (Menu menu : menus) { for (Menu menu : menus) {
System.out.println(menu.toString()); // System.out.println(menu.toString());
if (!menuList.contains(menu) && menu.getSort() != null && !menu.getUrl().equals("/admin")) { if (!menuList.contains(menu) && menu.getSort() != null && !menu.getUrl().equals("/admin")) {
menuList.add(menu); menuList.add(menu);
} }
...@@ -227,7 +227,7 @@ public class ViewController { ...@@ -227,7 +227,7 @@ public class ViewController {
if (menuList.size() > 0) { if (menuList.size() > 0) {
menuList.sort(Comparator.comparingInt(Menu::getSort)); menuList.sort(Comparator.comparingInt(Menu::getSort));
} }
System.out.println(menuList.toString()); // System.out.println(menuList.toString());
modelMap.put("isAdmin", admin); modelMap.put("isAdmin", admin);
modelMap.put("menuList", menuList); modelMap.put("menuList", menuList);
modelMap.put("user", currentUser); modelMap.put("user", currentUser);
...@@ -402,6 +402,12 @@ public class ViewController { ...@@ -402,6 +402,12 @@ public class ViewController {
return "appAbilityRecord/details"; return "appAbilityRecord/details";
} }
@RequestMapping("/appAbilityRecord/oaRecordList")
public String oaRecordPage(ModelMap modelMap) {
modelMap.put("gatewayUrl", gatewayUrl);
return "appAbilityRecord/oaRecordList";
}
@RequestMapping("/test") @RequestMapping("/test")
public String test(ModelMap modelMap) { public String test(ModelMap modelMap) {
modelMap.put("gatewayUrl", gatewayUrl); modelMap.put("gatewayUrl", gatewayUrl);
......
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<base th:href="${#request.getContextPath()}+'/'">
<meta charset="UTF-8">
<title>法院信息管理</title>
<link rel="stylesheet" href="newLayui/css/layui.css" media="all">
<script src="js/jquery.min.js"></script>
<script src="newLayui/layui.js"></script>
</head>
<body>
<div class="weadmin-body">
<div class="layui-row" style="margin-top: 5px; margin-left: 5px">
<form class="layui-form layui-col-md12 we-search">
姓名:
<div class="layui-inline">
<input type="text" style="height: 30px" name="nickName" placeholder="请输入姓名" autocomplete="off" class="layui-input" />
</div>
部门名称:
<div class="layui-inline">
<input type="text" style="height: 30px" name="deptName" placeholder="请输入部门名称" autocomplete="off" class="layui-input" />
</div>
<button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="sreach">
<i class="layui-icon layui-icon-search"></i>
</button>
</form>
</div>
</div>
<table class="layui-hide" id="recordList" lay-filter="record"></table>
<script type="text/html" id="lineOperation">
<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
</script>
<script th:inline="javascript">
var gatewayUrl = [[${gatewayUrl}]];
</script>
<script>
var layuiObj = null;
layui.use(['laydate', 'laypage', 'layer', 'form','table', 'carousel', 'upload', 'element', 'slider'], function(){
var laydate = layui.laydate //日期
,laypage = layui.laypage //分页
,form=layui.form
,layer = layui.layer //弹层
,table = layui.table //表格
//日期时间选择器
laydate.render({
elem: '#endTimeStr'
});
//执行一个 table 实例
var tableIns = table.render({
elem: '#recordList',
id: "record",
url: gatewayUrl + "/appAbilityRecordAll/getOaCallRecords",
title: '门户用户OCR使用记录',
cellMinWidth: 100,
response: {
statusCode: 200
},
page: true,
// toolbar: 'default',
cols: [
[
{field: 'id', title: 'ID', align: "center", hide: true}
, {field: 'nickName', title: '姓名', align: "center"}
, {field: 'deptName', title: '部门', align: "center"}
, {field: 'ip', title: 'IP', align: "center"}
, {field: 'pages', title: '识别页数', align: "center"}
, {field: 'createTime', title: '识别时间', align: "center"}
]
],
where: {
},
parseData: function (res) {
return {
code: res.code,
msg: res.msg,
count: res.data.total,
data: res.data.records
}
}
});
//模糊查询
form.on("submit(sreach)",function (data) {
tableIns.reload({
where: data.field,
page: {
curr: 1
}
});
return false;
});
var tableForm;
function ShowLay(title, url, w, h) {
if(title == null || title == '') {
title = false;
};
if(w == null || w == '') {
w = ($(window).width() * 0.9);
};
if(h == null || h == '') {
h = ($(window).height() - 50);
};
tableForm = layer.open({
type: 2,
area: [w + 'px', h + 'px'],
fix: false, //不固定
maxmin: true,
shadeClose: true,
shade: 0.4,
title: title,
content: url,
success: function(layero, index) {
},
});
}
layui.define(function(exports){
exports("dynamicUpdateRowLayui", function(){
var jsonData = JSON.parse(sessionStorage.getItem("updateData"));
layuiObj.update({
adcode : jsonData.adcode,
courtCode : jsonData.courtCode,
parentCourtCode : jsonData.parentCourtCode,
classificationCode : jsonData.classificationCode,
name : jsonData.name,
portalId : jsonData.portalId,
forSort : jsonData.forSort,
shortName : jsonData.shortName,
ipScope : jsonData.ipScope,
operation: ''
})
layer.close(editForm);
//设置1秒后还原layuiObj对象
setTimeout(function(){
layuiObj = null;
}, 1000)
})
});
var editForm;
/*弹出层+传递ID参数*/
function EditLay(title, url, w, h) {
if(title == null || title == '') {
title = false;
};
if(url == null || url == '') {
url = "/list";
};
if(w == null || w == '') {
w = ($(window).width() * 0.9);
};
if(h == null || h == '') {
h = ($(window).height() - 50);
};
editForm = layer.open({
type: 2,
area: [w + 'px', h + 'px'],
fix: false,
maxmin: true,
shadeClose: true,
shade: 0.4,
title: title,
content: url,
success: function(layero, index) {
},
error: function(layero, index) {
alert("异常错误!");
}
});
}
});
/**
* 修改数据后回调,在不用刷新主页的情况下实现数据更新
*/
function dynamicUpdateRow(){
layui.dynamicUpdateRowLayui()
}
</script>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment