<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/common/inc_bns.jsp"%>
<%@ page import="com.jiuqi.common.PageControl"%>
<%@ page import="com.jiuqi.ccp.common.DicMap" %>
<%@ page import="com.jiuqi.ccp.formbean.form.CcpMscMonitorExtForm"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%
PageControl pageCtrl = (PageControl) request.getAttribute(Constants.PAGE_CONTROL);
String orgGuid = (String)request.getAttribute("orgGuid");
String opResult = (String)request.getAttribute("opResult");
String beginTime = (String)request.getAttribute("beginTime");
String endTime = (String)request.getAttribute("endTime");
String inputUserTitle = (String)request.getAttribute("inputUserTitle");
%>
<html>
<head>
<script language="javascript" src="<%=mainWeb%>/script/table/table.js"></script>
<script language="javascript" src="<%=mainWeb%>/script/ajax/ajax.js"></script>
<style>
.txtInput{
width:140px;
}
</style>
</head>
<body >
<!-- 查询条件 begin -->
<html:form action="/BusLogAction.do" method="post">
<input type="hidden" name="method" value="queryBusLog">
<input type="hidden" name="orgGuid" value="<%=orgGuid%>">
<html:hidden property="pageNum" value="" />
<html:hidden property="pageSize" value="" />
<table border="0" cellspacing="0" cellpadding="0" class="data_tb" width="100%">
<tr height="25px">
<td class="data_tb_td" width="20%">开始时间</td>
<td width="30%"><input type="text" class="txtInput" name="beginTime" ></td>
<td class="data_tb_td" width="15%">结束时间</td>
<td width="30%"><input type="text" class="txtInput" name="endTime" ></td>
</tr>
<tr height="25px">
<td class="data_tb_td">用户姓名</td>
<td><input type="text" class="txtInput" name="inputUserTitle" ></td>
<td class="data_tb_td">操作结果</td>
<td>
<select style="width:155px" name="opResult" onchange="doQuerySelect(this.value)">
<option value="00">00 | 全部</option>
<%=DicMap.getInstance().getSelectOptionHtml("DIC_OPRESULT","")%>
</select>
</td>
</tr>
<tr height="25px">
<td colspan="4" align="right"><input type="button" class="button" name="btnQuery" id="btnQuery" value="过 滤" onclick="doQuery();"/></td>
</tr>
</table>
</html:form>
<div class="splitDiv" id="dataDiv" name="dataDiv" align="center">
<div class="tip" align="left"><img src="<%=skinImage%>/main/arrow.gif">业务日志列表</div>
<table width="100%" border="0" name="dataTB" id="dataTB" >
<tr height="25px">
<td width="5%" id="chse" datatype="CNPY" ><a href="#" onclick="javascript:sel()">选择</a></td>
<td width="5%">序号</td>
<td width="6%">用户名</td>
<td width="10%">姓名</td>
<td width="12%">所属机构</td>
<td width="12%">操作时间</td>
<td width="25%">业务描述</td>
<td width="7%">操作结果</td>
<td width="8%">IP地址</td>
</tr>
<logic:present name="busLogList">
<logic:iterate id="itbusLogList" name="busLogList" scope="request" type="com.jiuqi.ccp.formbean.form.CcpMscMonitorExtForm" indexId="index">
<tr height="25px">
<td align="center"><input type="checkbox" name="cbMetadata" value='<bean:write name="itbusLogList" property="cmmGuid" />' class="checkbox"/></td>
<td align="center" cmmGuid='<bean:write name="itbusLogList" property="cmmGuid" />'><%=(pageCtrl.getPageNum()-1)*pageCtrl.getPageSize()+ index.intValue() + 1%></td>
<td align="center"><bean:write name="itbusLogList" property="userName" /></td>
<td align="center"><a href="#" onclick="msgbox('<%=mainWeb%>/BusLogAction.do?method=getUserInfo&orgGuid=<%=orgGuid%>&userGuid=<bean:write name="itbusLogList" property="userGuid" />&userTitle=<bean:write name="itbusLogList" property="userTitle" />','用户信息与日志记录',700,500);"><bean:write name="itbusLogList" property="userTitle" /></a></td>
<td align="center"><bean:write name="itbusLogList" property="orgTitle" /></td>
<td align="center"><bean:write name="itbusLogList" property="opTime" /></td>
<td align="center"><bean:write name="itbusLogList" property="businessDesc" /></td>
<td align="center">
<logic:equal name="itbusLogList" property="opResult" value="03" >
<a href="#" onclick="msgbox('<%=mainWeb%>/BusLogAction.do?method=viewException&cmmGuid=<bean:write name="itbusLogList" property="cmmGuid" />','查看异常信息',500,380);">
<font style="font-size: 13px;" color="red"><bean:write name="itbusLogList" property="opResultValue" /></font></a>
</logic:equal>
<logic:equal name="itbusLogList" property="opResult" value="02" >
<font style="font-size: 13px" color="orange">
<bean:write name="itbusLogList" property="opResultValue" />
</font>
</logic:equal>
<logic:equal name="itbusLogList" property="opResult" value="01" >
<font style="font-size: 13px" color="green">
<bean:write name="itbusLogList" property="opResultValue" />
</font>
</logic:equal>
</td>
<td align="center"><bean:write name="itbusLogList" property="loginIp" /></td>
</tr>
</logic:iterate>
</logic:present>
</table>
</div>
<!--引入分页控件开始-->
<%@ include file="/common/pagectrl.jsp" %>
<!--引入分页控件结束-->
</body>
</html>
<script>
var tcApply = new table(dataTB);
applyTB(tcApply, dataDiv);
var cmmGuid = "";
var orgGuid = '<%=orgGuid%>';
if ('<%=opResult%>' != null && '<%=opResult%>' != '' && '<%=opResult%>' != 'null') {
document.all.opResult.value = '<%=opResult%>';
}else {
document.all.opResult.value = '00';
}
if ('<%=beginTime%>' != null && '<%=beginTime%>' != '' && '<%=beginTime%>' != 'null') {
document.all.beginTime.value = '<%=beginTime%>';
}else {
document.all.beginTime.value = "";
}
if ('<%=endTime%>' != null && '<%=endTime%>' != '' && '<%=endTime%>' != 'null') {
document.all.endTime.value = '<%=endTime%>';
}else {
document.all.endTime.value = "";
}
if ('<%=inputUserTitle%>' != 'null' ) {
document.all.inputUserTitle.value = '<%=inputUserTitle%>';
}else {
document.all.inputUserTitle.value = "";
}
function doSelectRow(rowObj){
if(rowObj != null && rowObj != ""){
cmmGuid = rowObj.cells[1].getAttribute('cmmGuid');
}
}
//分页
function gotoPage(pagenum){
var orgGuid = "";
orgGuid = '<%=orgGuid%>';
if (orgGuid != null && orgGuid != "" && orgGuid != 'null') {
document.location.href="<%=mainWeb%>/BusLogAction.do?method=queryBusLog&pageNum="+pagenum+"&pageSize="+document.all.goPageSize.value+"&orgGuid="+orgGuid;
}
}
//执行业务日志查询
function doQuery() {
var orgGuid = "";
orgGuid = '<%=orgGuid%>';
if (orgGuid != null && orgGuid != "" && orgGuid != 'null') {
ccpMscMonitorForm.submit();
}
}
//选择条件执行业务日志查询
function doQuerySelect(obj) {
var orgGuid = "";
orgGuid = '<%=orgGuid%>';
if (orgGuid != null && orgGuid != "" && orgGuid != 'null') {
ccpMscMonitorForm.submit();
}
}
//删除业务日志,组织参数,执行删除操作
function delmscmonitor() {
if(typeof(document.all.cbMetadata)=="undefined"){
alert("当前没有记录!");
return;
}
window.setTimeout("countsel()",1000);
window.setTimeout("doRemove()",1000);
}
var logGuidString = "";
function countsel() {
if(typeof(document.all.cbMetadata.length)!="undefined"){
for(var i=0;i<document.all.cbMetadata.length;i++){
if(document.all.cbMetadata[i].checked) {
logGuidString += dataTB.rows[i+1].cells[1].getAttribute("cmmGuid") + "~";
}
}
}else{
return;
}
}
//执行删除业务日志操作
function doRemove(){
if(cmmGuid==""||cmmGuid==undefined){
popAlert("请选择记录!");
return;
}
var removeConfirm = function (){
sendRequest('<%=mainWeb%>/BusLogAction.do?method=removeBusLog&logGuidString='+logGuidString,"fDealDel()");
}
popConfirm("确定删除业务日志?",removeConfirm);
}
//处理删除回调
function fDealDel(){
if(http_request.responseText != ''){
var temp = http_request.responseText.split('|');
if(temp[0] == 'true')
popAlert(temp[1]);
document.location.href="<%=mainWeb%>/BusLogAction.do?method=queryBusLog&orgGuid=<%=orgGuid%>";
}
}
//根据条件导出业务日志
function doExport() {
showDiv();
}
function showDiv() {
var obj=document.createElement("div");
obj.style.border="solid 1px;"
obj.innerHTML = '<div id="select" align="right" style="margin-top:4px"><table width="20%" height="15%" border="0" cellpadding="1" cellspacing="1"><tr><td width="10%" class="data_tb_td"><input type="radio" value="01" id="choice" name="choice" checked />当前所有查询结果</td></tr><tr><td width="10%" class="data_tb_td"><input type="radio" value="02" id="choice" name="choice" />所有业务日志记录</td></tr><tr><td width="10%" class="data_tb_td"><input type="button" class="button" name="btnExport" id="btnExport" value="导 出" onclick="daoChu();"/><input type="button" class="button" name="btnExportClose" id="btnExportClose" value="关 闭" onclick="closeWindow();"/></td></tr></table></div>';
obj.style.position="absolute";
obj.style.right="0px";
obj.style.top="0px";
document.all.opResult.style.display="none";
document.body.appendChild(obj);
}
function daoChu(){
var exportConfirm = function (){
if(document.all.choice[0].checked) {
sendRequest('<%=mainWeb%>/BusLogAction.do?method=exportBusLog&orgGuid='+document.all.orgGuid.value+'&beginTime='+document.all.beginTime.value+'&endTime='+document.all.endTime.value+'&inputUserTitle='+document.all.inputUserTitle.value+'&opResult='+document.all.opResult.value+"&select="+document.all.choice[0].value,"fDealExport()");
}else if (document.all.choice[1].checked) {
sendRequest('<%=mainWeb%>/BusLogAction.do?method=exportBusLog&orgGuid='+document.all.orgGuid.value+'&beginTime='+document.all.beginTime.value+'&endTime='+document.all.endTime.value+'&inputUserTitle='+document.all.inputUserTitle.value+'&opResult='+document.all.opResult.value+"&select="+document.all.choice[1].value,"fDealExport()");
}
closeWindow();
}
popConfirm("确定导出业务日志?",exportConfirm);
}
//删除显示的导出选择框
function closeWindow() {
var obj=document.getElementById("select");
obj.removeNode(true);
document.all.opResult.style.display="";
}
//处理导出业务日志回调
function fDealExport(){
if(http_request.responseText != ''){
var temp = http_request.responseText.split('|');
if(temp[0] == 'true')
popAlert(temp[1]);
}
}
</script>