MobileModeCheckResultDetail.jsp 9.98 KB
<%@ page import="weaver.general.Util" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<%@ page import="weaver.templetecheck.filecheck.CheckRule" %>
<HTML><HEAD>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<SCRIPT language="javascript" src="/js/weaver_wev8.js"></script>
<link rel="stylesheet" href="/css/ecology8/request/requestTopMenu_wev8.css" type="text/css" />
<link rel="stylesheet" href="/wui/theme/ecology8/jquery/js/zDialog_e8_wev8.css" type="text/css" />
<script type="text/javascript" src="/js/dragBox/parentShowcol_wev8.js"></script>
<link rel="stylesheet" href="/css/ecology8/request/requestView_wev8.css" type="text/css" />
<link rel="stylesheet" href="/wui/theme/ecology8/weaveredittable/css/WeaverEditTable_wev8.css">
<script  src="/wui/theme/ecology8/weaveredittable/js/WeaverEditTable_wev8.js"></script>
<link href="/js/checkbox/jquery.tzCheckbox_wev8.css" type=text/css rel=STYLESHEET>
<script type="text/javascript" src="/js/ecology8/jNice/jNice/jquery.jNice_wev8.js"></script>
<%!
public String replaceStr(String str) {
	if(str != null) {
		str = str.replace("<","&lt;");
		str = str.replace(">","&gt;");
	}
	return str;
}
%>
<%
//判断只有管理员才有权限
int userid = user.getUID();
if(userid!=1) {
	response.sendRedirect("/notice/noright.jsp");
  return;
}

String tabtype = request.getParameter("tabtype");

String ishtml = "";
String path = "";


%>
<script type="text/javascript">
	jQuery(document).ready(function(){
		 jQuery("td[_samepair='rulelist']").css("padding","0px!important");
	});
</script>
</head>
<%

String imagefilename = "/images/hdMaintenance_wev8.gif";
String titlename = "流程模板检测结果明细";
String needfav ="1";
String needhelp ="";
String type = Util.null2String(request.getParameter("type"));
String note = "选填。输入多个路径请以\",\"分隔";
String sourceparams = "";
String description = Util.null2String(request.getParameter("description"));
String name  = Util.null2String(request.getParameter("name"));
String content = Util.null2String(request.getParameter("content"));
String navName = java.net.URLDecoder.decode(Util.null2String(request.getParameter("navName")),"UTF-8");

%>
<BODY>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
String nodehtmllayoutid = request.getParameter("nodehtmllayoutid");
String detailtype = request.getParameter("detailtype");
String PageConstId = "checkmobilemoderesult2";
String backfields = " t1.* ";
String fromSql  = " from checkmobilemoderesult t1 ";
String sqlWhere = " where 1=1 and t1.nodehtmllayoutid ='"+nodehtmllayoutid+"' and t1.detailtype='"+detailtype+"'";
String orderby  = "t1.id";

String tableStringrule = "<table instanceid=\"mobileModeCheckResultDetail\" pageId=\"" + "checkmobilemoderesult2" + "\" tabletype=\"none\" pagesize=\""+PageIdConst.getPageSize(PageConstId,user.getUID())+"\" >"+
"	   <sql backfields=\""+backfields+"\" sqlform=\""+fromSql+"\"  sqlorderby=\"" + orderby + "\" sqlwhere=\""+Util.toHtmlForSplitPage(sqlWhere)+"\"    sqlprimarykey=\"t1.id\" sqlsortway=\"Desc\"/>"+
"			<head>";
tableStringrule += "<col width=\"10%\"  text=\"标识\" column=\"id\"  display=\"false\"/>"+
				"<col width=\"8%\"  text=\"被检测内容\" column=\"sourcecontent\" otherpara=\"column:id\"  transmethod=\"weaver.templetecheck.transmethod.RuleTrans.showResourceContent\"/>" +
	             "<col width=\"25%\"  text=\"规则名称\" column=\"rulename\"  />"+
	             "<col width=\"20%\"  text=\"规则描述\" column=\"ruledesc\"  />"+
	             "<col width=\"27%\"  text=\"规则内容\" column=\"content\" transmethod=\"weaver.templetecheck.transmethod.RuleTrans.changeStr3\"/>"+
	             "<col width=\"20%\"  text=\"替换内容\" column=\"replacecontent\" transmethod=\"weaver.templetecheck.transmethod.RuleTrans.changeStr3\"/>"+
	             "<col width=\"20%\"  text=\"模板ID\" column=\"nodehtmllayoutid\"  display=\"false\"/>"+
	       "</head>"+
			"		<operates>"+
			" <popedom transmethod=\"weaver.templetecheck.transmethod.RuleTrans.getOperatesForMobileModeCheckResultDetail\" otherpara=\" column:replacecontent\" ></popedom> "+
			"           <operate href=\"javascript:fastEdit();\" otherpara=\"column:nodehtmllayoutid+column:detailtype\"  text=\"快捷编辑\"  index=\"0\"/>"+
			"			<operate href=\"javascript:replaceSingle();\" text=\"替换\" otherpara=\"column:nodehtmllayoutid\"  index=\"1\"/>"+
			"</operates></table>";
%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<form action="" method="post" name="form1" id="form1">
<table id="topTitle" cellpadding="0" cellspacing="0">
	<tr>
		<td></td>
		<td class="rightSearchSpan" style="text-align:right; width:500px!important">
		<input type="hidden" class="searchInput" id="flowTitle" name="flowTitle" value="" onchange=""/>
			<input type="button" value="批量检测规则" style="width:100%;max-width:120px!important;" class="e8_btn_top" onclick="match()"/>
			<span id="advancedSearch" class="advancedSearch">高级搜索</span>&nbsp;&nbsp;
			<span title="菜单" class="cornerMenu"></span>
		</td>
	</tr>
</table>
<div id="tabDiv" >
   <span style="font-size:14px;font-weight:bold;">流程模板检查</span>
</div>
	
<div class="cornerMenuDiv"></div>
<div class="advancedSearchDiv" id="advancedSearchDiv">
	<wea:layout type="4col">
		<wea:group context="高级搜索">
			<wea:item>名称</wea:item>
			<wea:item><input  type="text" name="name" value="<%=name%>"></wea:item>
			<wea:item>描述</wea:item>
			<wea:item><input   type="text" name="description" value="<%=description%>"></wea:item>
			<wea:item>规则</wea:item>
			<wea:item><input   type="text" name="content" value="<%=content%>"></wea:item>
		</wea:group>
		<wea:group context="" attributes="{'groupDisplay':'none'}">
			<wea:item type="toolbar">
					<input type="submit"  onclick="doRefresh()" value="搜索" class="zd_btn_submit"/>
					<input type="button" value="重置" class="e8_btn_cancel" onclick="resetCondtion();"/>
					<input type="button" value="取消" class="e8_btn_cancel" id="cancel"/>
			</wea:item>
		</wea:group>
	</wea:layout>
</div>	

<TABLE width="100%">
    <tr>
        <td valign="top">  
        	<input type="hidden" name="pageId" id="pageId" value="upgradecheckmoderesult2"/>
           	<wea:SplitPageTag  tableString="<%=tableStringrule %>" isShowTopInfo="true" mode="run" />
        </td>
    </tr>
</TABLE>
<input name="type" value="" type="hidden"></input>
<input name="ruleid" value="" type="hidden"></input>
<input name="tabtype" value="<%=tabtype %>" type="hidden"></input>
<input name="ishtml" value="<%=ishtml %>" type="hidden"></input>
<input type="hidden" name="navName" value="<%=navName%>"></input>
<input type="hidden" name="type" value="<%=type%>"></input>
</form>
<div id="message_table_Div2" class="xTable_message" style="display: none; position: absolute; top: 203px; left: 787.5px;">正在加载数据,请稍候...</div>

<iframe id="excels" src="" style="display:none"></iframe>
</BODY>
</HTML>
<script language="javascript" src="/wui/theme/ecology8/jquery/js/zDialog_wev8.js"></script>
<script language="javascript" src="/wui/theme/ecology8/jquery/js/zDrag_wev8.js"></script>
<script type="text/javascript">
	var parentWin = null;
	var dialog = null;
	var method = null;
	try{
		parentWin = parent.getParentWindow(window);
		dialog = parent.getDialog(window);
	}catch(e){

	}
$(document).ready(function(){
	$(parent.document.getElementById("objName")).html("<%=navName %>");
	$("#tableitem").removeClass("fieldName");
	
	//$("#topTitle").topMenuTitle({searchFn:doRefresh});
	$(".topMenuTitle td:eq(0)").html($("#tabDiv").html());
	$("#tabDiv").remove();
	
});



var dialog = null;
function closeDialog(){
	if(dialog)
		dialog.close();
}
	function showContentDetail(id){
		showResourceContentDialog("/templetecheck/filecheck/MessageDialog.jsp?id="+id+"&resultTableName=checkmobilemoderesult&contentColumnName=sourcecontent")
	}

	function showResourceContentDialog(url){
		var dialog = new window.top.Dialog();
		dialog.currentWindow = window;
		dialog.Title = "内容详情";
		dialog.Width = $(window).width()-100;
		dialog.Height = $(window).height()+200;
		dialog.maxiumnable = true;
		dialog.Drag = true;
		dialog.URL = url;
		dialog.show();
	}
	//快捷编辑
	function  fastEdit(id,params){
		var paramsArr = params.split("+");
		try{
			var objid_t = paramsArr[0];
			var detailtype_t = paramsArr[1];
			if (objid_t == "" || detailtype_t == "") {
				top.Dialog.alert("当前记录无法打开快捷编辑页面!");
				return;
			}
			$.ajax({
				url: "MobileModeReportOperation.jsp",
				type: "post",
				data: {
					"method": "getAppidForFastEdit",
					"objid": objid_t,
					"detailtype":detailtype_t
				},
				dataType: "json",
				success: function (data) {
					var status_t = data.status;
					var msg_t = data.message;
					var appid_t = data.appid;
					if(status_t=='success'){
						if(appid_t!=""){
							window.open("/mobilemode/admin/appDesigner.jsp?appid="+appid_t)
						}else{
							top.Dialog.alert(msg_t);
						}
					}
				}
			});
		}catch (e) {
			top.Dialog.alert("快捷编辑窗口打开失败,参数不合法:"+params);
		}
	}


function replaceSingle(id) {
	if(id == "") {
		top.Dialog.alert("内容为空!");
		return;
	}
	
	top.Dialog.confirm("请确认模板已备份", function(){
		$("#message_table_Div2").ajaxStart(function(){$("#message_table_Div2").show();});
		$.ajax({
			url:"ReplaceOperation.jsp",
			dataType:'json',
			type:'post',
			data:{
				"ids":id,
				"rulefrom":"mobilemode",
				"ismodeormobilemodeflag":"1"
			},
			ayc:false,//同步加载
			success:function(data){
				if(data) {
					$("#message_table_Div2").hide();
					var res = data.status;
					if(res == "ok") {
						top.Dialog.alert("替换成功!");
						_table.reLoad();
						parentWin._table.reLoad();//先刷新列表 否则IE先不会刷新
						return;
					} else {
						return;
					}
				}
			}
		});
	});
}


</script>