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
JSH ERP
Commits
8d3325e2
Commit
8d3325e2
authored
Oct 30, 2016
by
季圣华
Browse files
No commit message
No commit message
parent
87895484
Changes
2
Hide whitespace changes
Inline
Side-by-side
WebRoot/pages/log/home.jsp
0 → 100644
View file @
8d3325e2
<%@page
language=
"java"
contentType=
"text/html; charset=utf-8"
pageEncoding=
"utf-8"
%>
<%
String
path
=
request
.
getContextPath
();
String
basePath
=
request
.
getScheme
()+
"://"
+
request
.
getServerName
()+
":"
+
request
.
getServerPort
()+
path
+
"/"
;
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta
http-equiv=
Content-Type
content=
"text/html; charset=utf-8"
>
<!-- 指定以IE8的方式来渲染 -->
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=EmulateIE8"
/>
<link
rel=
"shortcut icon"
href=
"
<%=
path
%>
/images/favicon.ico"
type=
"image/x-icon"
/>
<link
href=
"css/admin.css"
type=
"text/css"
rel=
"stylesheet"
>
<title>
首页说明
</title>
<style
type=
"text/css"
>
<!
--
body
{
margin-left
:
0px
;
margin-top
:
0px
;
margin-right
:
0px
;
margin-bottom
:
0px
;
background-color
:
#EAF2FD
;
}
.STYLE1
{
font-size
:
12px
}
.STYLE4
{
font-size
:
12px
;
color
:
#1F4A65
;
font-weight
:
bold
;
}
a
:link
{
font-size
:
12px
;
color
:
#06482a
;
text-decoration
:
none
;
}
a
:visited
{
font-size
:
12px
;
color
:
#06482a
;
text-decoration
:
none
;
}
a
:hover
{
font-size
:
12px
;
color
:
#FF0000
;
text-decoration
:
underline
;
}
a
:active
{
font-size
:
12px
;
color
:
#FF0000
;
text-decoration
:
none
;
}
.STYLE7
{
font-size
:
12
}
--
>
</style>
</head>
<body>
<table
cellSpacing=
0
cellPadding=
0
width=
"100%"
align=
center
border=
0
>
<tr
height=
28
>
<td
width=
"1101"
class=
"STYLE4"
>
<img
src=
"
<%=
path
%>
/images/blogging.png"
width=
"16"
height=
"16"
/>
<span
>
日志管理
</span>
</td>
</tr>
<tr>
<td
bgColor=
#b1ceef
height=
1
></td>
</tr>
<tr
height=
"5px"
>
<td
background=
images/shadow_bg.jpg
></td>
</tr>
</table>
<p
style=
"font-size: 12px;color: #1F4A65;padding: 10px"
>
日志管理是记录资产管理系统增删改查操作明细,包括资产管理、系统管理等操作信息,通过日志管理,可以记录平时资产管理系统操作明细信息。日志管理主要以搜索操作信息为主。
</p>
</body>
</html>
\ No newline at end of file
WebRoot/pages/log/operatelog.jsp
0 → 100644
View file @
8d3325e2
<%@page
import=
"com.jsh.util.common.Tools"
%>
<%@ page
language=
"java"
import=
"java.util.*"
pageEncoding=
"utf-8"
%>
<%
String
path
=
request
.
getContextPath
();
String
basePath
=
request
.
getScheme
()+
"://"
+
request
.
getServerName
()+
":"
+
request
.
getServerPort
()+
path
+
"/"
;
String
clientIp
=
Tools
.
getCurrentUserIP
();
%>
<!DOCTYPE html>
<html>
<head>
<title>
资产管理
</title>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<!-- 指定以IE8的方式来渲染 -->
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=EmulateIE8"
/>
<link
rel=
"shortcut icon"
href=
"
<%=
path
%>
/images/favicon.ico"
type=
"image/x-icon"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
<%=
path
%>
/js/easyui-1.3.5/themes/default/easyui.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
<%=
path
%>
/js/easyui-1.3.5/themes/icon.css"
/>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"
<%=
path
%>
/css/common.css"
/>
<script
type=
"text/javascript"
src=
"
<%=
path
%>
/js/jquery-1.8.0.min.js"
></script>
<script
type=
"text/javascript"
src=
"
<%=
path
%>
/js/easyui-1.3.5/jquery.easyui.min.js"
></script>
<script
type=
"text/javascript"
src=
"
<%=
path
%>
/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"
></script>
<script
type=
"text/javascript"
src=
"
<%=
path
%>
/js/common/common.js"
></script>
</head>
<body>
<!-- 查询 -->
<div
id =
"searchPanel"
class=
"easyui-panel"
style=
"padding:10px;position: center;"
title=
"查询窗口"
iconCls=
"icon-search"
collapsible=
"true"
closable=
"false"
>
<table
id=
"searchTable"
>
<tr>
<td>
操作模块:
</td>
<td>
<input
type=
"text"
name=
"searchOperation"
id=
"searchOperation"
style=
"width:150px;"
/>
</td>
<td>
</td>
<td>
</td>
<td>
操作人员:
</td>
<td>
<select
name=
"searchUsernameID"
id=
"searchUsernameID"
style=
"width:150px;"
/>
</td>
<td>
</td>
<td>
</td>
<td>
操作IP:
</td>
<td>
<input
type=
"text"
name=
"searchIP"
id=
"searchIP"
style=
"width:150px;"
/>
</td>
<td>
</td>
<td>
</td>
<td>
操作状态:
</td>
<td>
<select
name=
"searchStatus"
id=
"searchStatus"
style=
"width:150px;"
>
<option
value=
""
>
请选择
</option>
<option
value=
"0"
>
成功
</option>
<option
value=
"1"
>
失败
</option>
</select>
</td>
</tr>
<tr>
<td>
开始时间:
</td>
<td>
<input
type=
"text"
name=
"searchBeginTime"
id=
"searchBeginTime"
class=
"easyui-datebox"
style=
"width:150px;"
/>
</td>
<td>
</td>
<td>
</td>
<td>
结束时间:
</td>
<td>
<input
type=
"text"
name=
"searchEndTime"
id=
"searchEndTime"
class=
"easyui-datebox"
style=
"width:150px;"
/>
</td>
<td>
</td>
<td>
</td>
<td>
操作详情:
</td>
<td>
<input
type=
"text"
name=
"searchDesc"
id=
"searchDesc"
style=
"width:150px;"
/>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
<a
href=
"javascript:void(0)"
class=
"easyui-linkbutton"
iconCls=
"icon-search"
id=
"searchBtn"
>
查询
</a>
<a
href=
"javascript:void(0)"
class=
"easyui-linkbutton"
iconCls=
"icon-redo"
id=
"searchResetBtn"
>
重置
</a>
</td>
</tr>
</table>
</div>
<!-- 数据显示table -->
<div
id =
"tablePanel"
class=
"easyui-panel"
style=
"padding:1px;top:300px;"
title=
"操作日志列表"
iconCls=
"icon-list"
collapsible=
"true"
closable=
"false"
>
<table
id=
"tableData"
style=
"height:340px;top:300px;border-bottom-color:#FFFFFF"
></table>
</div>
<script
type=
"text/javascript"
>
var
userList
=
null
;
//初始化界面
$
(
function
()
{
initTableData
();
ininPager
();
//初始化系统基础信息
initSystemData
();
//初始化页面系统基础信息选项卡
initSelectInfo
();
});
//初始化表格数据
function
initTableData
()
{
$
(
'
#tableData
'
).
datagrid
({
//title:'供应商列表',
//iconCls:'icon-save',
//width:700,
height
:
heightInfo
,
nowrap
:
false
,
rownumbers
:
true
,
//动画效果
animate
:
false
,
//选中单行
singleSelect
:
true
,
collapsible
:
false
,
selectOnCheck
:
false
,
//fitColumns:true,
//单击行是否选中
checkOnSelect
:
false
,
//交替出现背景
striped
:
true
,
url
:
'
<%=
path
%>
/log/findBy.action?pageSize=
'
+
initPageSize
,
pagination
:
true
,
//loadFilter: pagerFilter,
pageSize
:
initPageSize
,
pageList
:
initPageNum
,
columns
:[[
{
title
:
'
操作模块
'
,
field
:
'
operation
'
,
width
:
120
},
{
title
:
'
操作人员
'
,
field
:
'
username
'
,
width
:
100
,
align
:
"
center
"
},
{
title
:
'
操作IP
'
,
field
:
'
clientIP
'
,
width
:
90
,
align
:
"
center
"
},
{
title
:
'
操作时间
'
,
field
:
'
createTime
'
,
width
:
150
,
align
:
"
center
"
},
{
title
:
'
操作详情
'
,
field
:
'
details
'
,
width
:
380
},
{
title
:
'
操作状态
'
,
field
:
'
status
'
,
width
:
70
},
{
title
:
'
备注
'
,
field
:
'
remark
'
,
width
:
180
}
]],
onLoadError
:
function
()
{
$
.
messager
.
alert
(
'
页面加载提示
'
,
'
页面加载异常,请稍后再试!
'
,
'
error
'
);
return
;
}
});
}
//初始化键盘enter事件
$
(
document
).
keydown
(
function
(
event
)
{
//兼容 IE和firefox 事件
var
e
=
window
.
event
||
event
;
var
k
=
e
.
keyCode
||
e
.
which
||
e
.
charCode
;
//兼容 IE,firefox 兼容
var
obj
=
e
.
srcElement
?
e
.
srcElement
:
e
.
target
;
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件
//搜索按钮添加快捷键
if
(
k
==
"
13
"
&&
(
obj
.
id
==
"
searchOperation
"
||
obj
.
id
==
"
searchUsernameID
"
||
obj
.
id
==
"
searchIP
"
||
obj
.
id
==
"
searchStatus
"
||
obj
.
id
==
"
searchBeginTime
"
||
obj
.
id
==
"
searchEndTime
"
||
obj
.
id
==
"
searchDesc
"
))
{
$
(
"
#searchBtn
"
).
click
();
}
});
//分页信息处理
function
ininPager
()
{
try
{
var
opts
=
$
(
"
#tableData
"
).
datagrid
(
'
options
'
);
var
pager
=
$
(
"
#tableData
"
).
datagrid
(
'
getPager
'
);
pager
.
pagination
({
onSelectPage
:
function
(
pageNum
,
pageSize
)
{
opts
.
pageNumber
=
pageNum
;
opts
.
pageSize
=
pageSize
;
pager
.
pagination
(
'
refresh
'
,
{
pageNumber
:
pageNum
,
pageSize
:
pageSize
});
showLogDetails
(
pageNum
,
pageSize
);
}
});
}
catch
(
e
)
{
$
.
messager
.
alert
(
'
异常处理提示
'
,
"
分页信息异常 :
"
+
e
.
name
+
"
:
"
+
e
.
message
,
'
error
'
);
}
}
//初始化系统基础信息
function
initSystemData
()
{
$
.
ajax
({
type
:
"
post
"
,
url
:
"
<%=
path
%>
/log/getBasicData.action
"
,
//设置为同步
async
:
false
,
dataType
:
"
json
"
,
success
:
function
(
systemInfo
)
{
//成功关闭loading
userList
=
systemInfo
.
showModel
.
map
.
userList
;
var
msgTip
=
systemInfo
.
showModel
.
msgTip
;
if
(
msgTip
==
"
exceptoin
"
)
{
$
.
messager
.
alert
(
'
提示
'
,
'
查找系统基础信息异常,请与管理员联系!
'
,
'
error
'
);
return
;
}
}
});
}
//初始化页面选项卡
function
initSelectInfo
()
{
var
options
=
""
;
if
(
userList
!=
null
)
{
options
=
""
;
for
(
var
i
=
0
;
i
<
userList
.
length
;
i
++
)
{
var
user
=
userList
[
i
];
if
(
0
==
i
)
{
userID
=
user
.
id
}
options
+=
'
<option value="
'
+
user
.
id
+
'
">
'
+
user
.
username
+
'
</option>
'
;
}
$
(
"
#searchUsernameID
"
).
empty
().
append
(
'
<option value="">请选择</option>
'
).
append
(
options
);
}
}
//搜索处理
$
(
"
#searchBtn
"
).
unbind
().
bind
({
click
:
function
()
{
showLogDetails
(
1
,
initPageSize
);
var
opts
=
$
(
"
#tableData
"
).
datagrid
(
'
options
'
);
var
pager
=
$
(
"
#tableData
"
).
datagrid
(
'
getPager
'
);
opts
.
pageNumber
=
1
;
opts
.
pageSize
=
initPageSize
;
pager
.
pagination
(
'
refresh
'
,
{
pageNumber
:
1
,
pageSize
:
initPageSize
});
}
});
function
showLogDetails
(
pageNo
,
pageSize
)
{
$
.
ajax
({
type
:
"
post
"
,
url
:
"
<%=
path
%>
/log/findBy.action
"
,
dataType
:
"
json
"
,
data
:
({
operation
:
$
.
trim
(
$
(
"
#searchOperation
"
).
val
()),
usernameID
:
$
.
trim
(
$
(
"
#searchUsernameID
"
).
val
()),
clientIp
:
$
.
trim
(
$
(
"
#searchIP
"
).
val
()),
status
:
$
.
trim
(
$
(
"
#searchStatus
"
).
val
()),
beginTime
:
$
.
trim
(
$
(
"
#searchBeginTime
"
).
datebox
(
"
getValue
"
)),
endTime
:
$
.
trim
(
$
(
"
#searchEndTime
"
).
datebox
(
"
getValue
"
)),
contentdetails
:
$
.
trim
(
$
(
"
#searchDesc
"
).
val
()),
pageNo
:
pageNo
,
pageSize
:
pageSize
}),
success
:
function
(
data
)
{
$
(
"
#tableData
"
).
datagrid
(
'
loadData
'
,
data
);
//$('#tableData').datagrid('reload');
},
//此处添加错误处理
error
:
function
()
{
$
.
messager
.
alert
(
'
查询提示
'
,
'
查询数据后台异常,请稍后再试!
'
,
'
error
'
);
return
;
}
});
}
//重置按钮
$
(
"
#searchResetBtn
"
).
unbind
().
bind
({
click
:
function
()
{
$
(
"
#searchOperation
"
).
val
(
""
);
$
(
"
#searchUsernameID
"
).
val
(
""
);
$
(
"
#searchIP
"
).
val
(
""
);
$
(
"
#searchStatus
"
).
val
(
""
);
$
(
"
#searchBeginTime
"
).
datebox
(
"
clear
"
);
$
(
"
#searchEndTime
"
).
datebox
(
"
clear
"
);
$
(
"
#searchDesc
"
).
val
(
""
);
//加载完以后重新初始化
$
(
"
#searchBtn
"
).
click
();
}
});
</script>
</body>
</html>
\ No newline at end of file
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