BatchInspection.jsp 12.7 KB
<!DOCTYPE html>
<html>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="weaver.templetecheck.filecheck.NonStandardFiles" %>
<%@ page import="com.weaver.function.ConfigInfo" %>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/>
	<meta name="viewport"
		  content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
	<title>特殊文件检测</title>
	<link rel="stylesheet" href="/wui/theme/ecology8/jquery/js/zDialog_e8_wev8.css" type="text/css"/>
	<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>
	<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
	<SCRIPT language="javascript" src="/js/weaver_wev8.js"></script>
	<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>
	<%
		int userid = user.getUID();
		if(userid!=1) {
			response.sendRedirect("/notice/noright.jsp");
			return;
		}
String tableStr = "";
String checktype = Util.null2String(request.getParameter("checktype"));

if("1".equals(checktype)) {
	NonStandardFiles nonStandardFiles = new NonStandardFiles();
	tableStr = nonStandardFiles.getNonStandardFiles(user,"");
} else {
}
 %>

<style type="text/css">
/*.node {*/
	/*width:800px;*/
	/*height:30px;*/
	/*line-height:30px;*/
	/*padding-left:10px;*/
	/*margin-top:10px;*/
	/*background-color:#489dd2;*/
/*}*/

.level1 {
	display:inline-block;
}
.line1 {
	/* width:15px;
	border-right:1px; */
}
.line2 {
	/* height:15px;
	width:15px;
	border-bottom:1px;
	border-style:solid; */
}
.btn {
	height:40px;
	width:150px;
	line-height:40px;
	border-radius:5px;
	background-color:#169BD5;
	border:none;
}

.btnnoclick {
    height:40px;
    width:150px;
    line-height:40px;
    border-radius:5px;
    background-color:#AAAAAA;
    border:none;
}
#messagediv {
	width:100%;
	border-radius:10px;
	border:1px solid;
	margin-top:2%;
	padding:1%;
	background-color:#FFFFCC
}
.padding-left {
	padding:0px!important;
}

</style>
	<style type="text/css">
		ul,li{list-style-type:none;}
		.reportDiv{display:block;position:relative;padding:5px 15px;}
		.reportDiv span.node{display:inline-block;box-sizing:border-box;height:35px;line-height:30px;min-width:60px;text-align:center;color:black;border:1px solid #ddd;border-radius:5px;padding:0 15px;background-color:#489dd2;}
		.reportDiv ul{position:relative;padding-left:60px;margin:0;}
		.reportDiv ul>li{position:relative;padding:5px 0;}
		.reportDiv>ul{padding:0;margin:0;}
		/** 水平方向连线 */
		.reportDiv>ul ul>li:after{content:' ';position:absolute;top:20px;left:-45px;width:45px;border:none;border-top:1px solid #767676;}
		/** 垂直方向连线 */
		.reportDiv ul>li:not(:last-child):before{content:' ';position:absolute;top:0;left:-45px;height:100%;border:none;border-left:1px solid #767676;}
		.reportDiv ul>li>ul>li:last-child:before{content:' ';position:absolute;top:0;left:-45px;height:20px;border:none;border-left:1px solid #767676;}
		/** 控制鼠标移上去的颜色 */
		.reportDiv span:hover, .reportDiv span:hover+ul span{color:#fff;background-color:orange;}
		.reportDiv span.node :hover, .reportDiv span.node:hover+ul span, .reportDiv span.node:hover+ul li:before, .reportDiv span.node:hover+ul li:after{border-color:orange;}
		/** 折叠图标 */
		.reportDiv .fa:before{margin-right:5px;}
		.reportDiv .fa-minus-circle, .reportDiv .fa-plus-circle{cursor:pointer;}
		.btn { height:40px; width:150px;line-height:40px;border-radius:5px;background-color:#169BD5;border:none;}
		#messagediv {width:100%;border-radius:10px;border:1px solid;margin-top:1%;padding:1%;background-color:#FFFFCC }
		.link{padding-left: 28px}
	</style>
</head>

<body style="width:90%;margin:0px auto;height:90%;">
<iframe name="downiframe" id="downiframe" src="" style="display:none" ></iframe>
<div class="reportDiv">
	<ul>
		<li>
			<span  class="node" ><i class="fa fa-minus-circle"></i>系统功能批量检测</span>
			<ul>
				<li >
					<a href="javascript:void(0)"><span class="node" onclick="javascript:change1(1,'')"><i class="fa fa-minus-circle"></i>检测流程模板  <span class="link">点击跳转页面</span></span></a>
				</li>
				<li >
					<a href="javascript:void(0)"><span class="node" onclick="javascript:change1(2,'')"><i class="fa fa-minus-circle"></i>检测移动建模模板   <span class="link">点击跳转页面</span></span></a>
				</li>
				<li >
					<a href="javascript:void(0)"><span class="node" onclick="javascript:change1(3,'')"><i class="fa fa-minus-circle"></i>检测表单建模模板   <span class="link">点击跳转页面</span></span></a>
				</li>
				<li >
					<a href="javascript:void(0)"><span class="node" onclick="javascript:change1(4,'')"><i class="fa fa-minus-circle"></i>检测自定义开发功能 <span class="link">点击跳转页面</span></span></a>
				</li>
				<%--<li onclick="javascript:change1(5,'')">--%>
					<%--<span class="node"><i class="fa fa-minus-circle"></i>检测指定文件  <span class="link">点击跳转页面</span></span>--%>
				<%--</li>--%>
			</ul>
		</li>
	</ul>
</div>

	<div id="btndiv" style="width:100%;margin-top:2%;">
		<input type="button" class="btn" value="开始检测" onclick="startcheck()" id="startcheckfile"/>&nbsp;&nbsp;&nbsp;&nbsp;
		<%--<input type="button" class="btn" value="导出报告" onclick="startcheck()" id="export"/>&nbsp;&nbsp;&nbsp;&nbsp;--%>
	</div>

	<div id="messagediv" style="margin-bottom: 10px;">
		<span style="color:red">
    <b>操作步骤:</b><br>
    1.点击“开始检测”按钮,开始进行文件检测<br>
    2.如果客户做了大量的复杂模块以及模板中插入了js,做了大量的自定义的开发(流程模板、表单建模可配置开发、移动建模可配置开发、门户页面等),升级后需要做很大程度的调整,需要在升级评估时,将报告提供给总部进行工作量评估。
<br>
    3.导出报告后,根据报告中的说明内容进行相关操作:<br>
    &nbsp;&nbsp;&nbsp;&nbsp;>请根据检测结果的“被检测对象位置”,检查对应的功能是否正常,如存在问题,记录并告知开发人员<br>
    &nbsp;&nbsp;&nbsp;&nbsp;>请将检测结果报告提交一份到版本升级服务部对应的开发人员<br>
    </span><br>
	  <b>说明:</b><br>
		1.点击“开始检测”按钮将进行流程模板检测、移动建模模板检测、表单建模模板检测、自定义开发功能检测<br>
		2.如果需要对进行规则替换的话,需要到对应功能检测页面进行操作<br>
		<br><b>版本信息</b><br>
		V<%=ConfigInfo.getToolVersion() %>
	</div>

<div id="message_table_Div2" class="xTable_message"
	 style="display: none; position: absolute; top: 203px; left: 787.5px;">正在加载数据,请稍候...
</div>
</body>
<script type="text/javascript">
    function change1(type,param) {
        $(".tab_menu", window.parent.document).find("li").each(function () {
            $(".tab_menu", window.parent.document).find("li").eq(0).removeClass("current")
        });

        if ("0" == type) {
            $("#tabcontentframe", window.parent.document).attr("src", "filecheck/BatchInspection.jsp");
            $(".tab_menu", window.parent.document).find("li").eq(0).addClass("current");
        } else if ("1" == type) {
            $("#tabcontentframe", window.parent.document).attr("src", "filecheck/WorkflowReport.jsp");
            $(".tab_menu", window.parent.document).find("li").eq(1).addClass("current");
        } else if ("2" == type) {
            $("#tabcontentframe", window.parent.document).attr("src", "filecheck/MobileModeReport.jsp");
            $(".tab_menu", window.parent.document).find("li").eq(2).addClass("current");
        } else if ("3" == type) {
            $("#tabcontentframe", window.parent.document).attr("src", "filecheck/ModeReport.jsp");
            $(".tab_menu", window.parent.document).find("li").eq(3).addClass("current");
        } else if ("4" == type) {
            $("#tabcontentframe", window.parent.document).attr("src", "filecheck/PortalReport.jsp");
            $(".tab_menu", window.parent.document).find("li").eq(4).addClass("current");
        // } else if ("5" == type) {
        //     $("#tabcontentframe", window.parent.document).attr("src", "filecheck/SpecialFileCheck.jsp");
        //     $(".tab_menu", window.parent.document).find("li").eq(5).addClass("current");
        }
    }

    var dialog = null;
    function closeDialog(){
        if(dialog)
            dialog.close();
    }
    var dWidth = 800;
    var dHeight = 350;
    // var clientWidth = document.body.clientWidth;
    // dWidth = clientWidth*0.;
    // var clientHeight = document.body.clientHeight;
    // dHeight = clientHeight*0.9;
    $(document).ready(function(){
        changetype("<%=checktype%>");
        var type = "<%=checktype%>";
        $(".checktype").attr("checked",false);
        $(".jNiceRadio").removeClass("jNiceChecked");
        if("0" == type || "" == type) {
            $(".checktype").eq(0).attr("checked","checked");
            $(".jNiceRadio").eq(0).addClass("jNiceChecked");
        } else {
            $(".checktype").eq(1).attr("checked","checked");
            $(".jNiceRadio").eq(1).addClass("jNiceChecked");
        }
        $("td[_samepair='rulelisttd']").removeClass("fieldName");
    });

    //类型转化
    function changetype(type) {
        if("0" == type || "" == type) {
            $("#pathdiv").show();
            $("#filelist").hide();
            $("#nonstandardfilebtn").hide();
            $("#getNonStandardFileBtn").hide();
        } else {
            $("#pathdiv").hide();
            $("#filelist").show();
            $("#nonstandardfilebtn").show();
            $("#getNonStandardFileBtn").show();
        }

    }

    //提交
    function submitForm(){
            $("#message_table_Div2").show();
            $("#form").submit();
    }

    function startcheck() {
        doOpen1("/templetecheck/filecheck/BatchInspectionDoing.jsp","文件检测结果")
    }
    function matchsingle(index,filepath){

        $.ajax({
            url:'SpecialFileCheckOperation.jsp',
            dataType:'json',
            type:'post',
            data:{
                'operation':'checkrunstatus'
            },
            success:function(data){
                if(data) {
                    var res = data.status;
                    if(res == "ok") {
                        if(filepath == "") {
                            top.Dialog.alert("非标准文件路径不存在!");
                            return;
                        }
                        var re = new RegExp("\\\\","g");
                        filepath = filepath.replace(re, "/");
                        filepath=escape(filepath);
                        //开始执行检查
                        doOpen1("/templetecheck/filecheck/SpecialFileCheckResult.jsp?filepath="+filepath,"文件检测结果");
                    } else {
                        top.Dialog.alert("系统正在检测文件,请稍候");
                        return;
                    }
                }
            }
        });
	}
    function downDoc2() {//执行文件下载,文件实际的路径的名字,文件下载的名字
        // document.getElementById("downiframe").src = "/system/upgradetoe9/report/templetecheckReport_all.zip";
        document.getElementById("downiframe").src = "/templetecheck/filecheck/ReportDownload.jsp?en_name=allfilereport&cn_name="+encodeURIComponent("批量文件检测报告");
    }

    function doOpen1(url,title){
        if(typeof dialog  == 'undefined' || dialog==null){
            dialog = new window.top.Dialog();
        }
        dialog.currentWindow = window;
        dialog.Title = title;
        dialog.Width =  dWidth;
        dialog.Height =  dHeight;
        dialog.Drag = true;
        dialog.maxiumnable = true;
		dialog.URL = url;
        dialog.CancelEvent = function(){
            top.Dialog.confirm("离开页面将停止检测,请确认?",function(){
                closedialog();
			});
        };
        try {
            dialog.show();
        }catch(e) {

        }
    }

    function closedialog(){
        $.ajax({
           url:'BatchInspectionOperation.jsp',
           dataType:'json',
           type:'post',
           data:{
               'operation':'stopcheckrule'
           },
           success:function(){
               dialog.close();
           }
        });
    }

</script>
</html>