ModelMonitorHome.jsp 7.19 KB
Newer Older
afe's avatar
afe committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<title>全网监控智能分析平台</title>

<script type="text/javascript" src="${ctx}/static/js/modernizr.custom.js"></script>
<script type="text/javascript" src="${ctx}/static/js/classie.js"></script>
<script type="text/javascript" src="${ctx}/static/js/mlpushmenu.js"></script>

<script type="text/javascript">
	$(document).ready(function() {
		/* $("#a_taskManage").click(
			function() {
				if (!$("#taskManageFrame").attr('src')) { 
					$("#taskManageFrame").attr('src', '${ctx}/BaseManage/TaskManage/taskListFrame');
				}
		}); */

		$("#a_taskLog").click(
			function() {
				if (!$("#taskLogFrame").attr('src')) {
					$("#taskLogFrame").attr('src', '${ctx}/BaseManage/TaskLogManage/taskLogListFrame');
				}
		});
31 32 33 34




afe's avatar
afe committed
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
	});
</script>

</head>
<body>
	<div id="sticky-wrap"></div>

	<div>
		<div class="container">
			<ol class="breadcrumb">
				<li><a href="${ctx}/index">首页</a></li>
				<li>预分析与建模</li>
				<li class="active">数据模型管理</li>
			</ol>
		</div>
	</div>

	<div id="main-container main-tab-container">
		<div id="content" class="container">
			<div class="tab-bar-bt">
				<ul class="nav nav-tabs">
					<li ><a id="a_taskManage" href="${ctx}/ModelManage/ModelResult">模型维护</a></li>
					<li class="active"><a href="#monitor">模型监控</a></li>
				</ul>
			</div>
			<div class="section">
				<div class="tab-content">
					
					<div class="tab-pane fade in active" id="taskManage">
						<div class="row me-row" style="margin-top:0px">
							<div class="content clearfix">
								<div class="row" style="margin-top:0px">
67
									<iframe id="taskManageFrame" style="height:800px" src="${ctx}/BaseManage/TaskManage/taskListFrame?defaultTaskType=1"> </iframe>
afe's avatar
afe committed
68 69 70 71 72 73 74 75
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
76 77
<script type="">

78 79 80 81 82 83 84 85 86
	var dilog;

    function editTask(e){
//        var id = $('input[name="taskId"]:checked').val();
		var id = e.id.split("_")[1];
		var taskType=e.id.split("_")[0];
        dilog.close();
        document.getElementById("taskManageFrame").src='${ctx}'+"/BaseManage/TaskManage/taskFormFrame?defaultTaskType="+taskType+"&taskId=" + id+"&type=modify";
    }
胡斌's avatar
胡斌 committed
87 88 89 90 91 92 93
    function openwin(url) {
        var a = document.createElement("a"); //创建a对象
        a.setAttribute("href", url);
        a.setAttribute("target", "_blank");
        a.setAttribute("id", "camnpr");
        document.body.appendChild(a);
        a.click(); //执行当前对象
94

胡斌's avatar
胡斌 committed
95 96 97
    }
    function imgOnclick(e) {
        openwin("${ctx}/BaseManage/TaskManage/ImgDisplay?"+e.src)
98

胡斌's avatar
胡斌 committed
99
    }
100

101 102 103
    function OpenDialog(data,id,taskType) {
        var df=new SimpleDateFormat();
        df.applyPattern("yyyy-MM-dd HH:mm:ss");
104 105 106 107

        var content ="<div class='dialog-p' style='max-height: 560px; overflow-y: scroll; overflow-x: auto;'>" +
            "    <div class='col-xs-12'>" +
            "        <div class='panel panel-default'>" +
108
            "            <div class='panel-heading'>模型预览</div>" +
109 110 111 112 113 114
            "            <div class='panel-body'>"+
            "                <table class='table table-vertical'>"+
            "					<tr><td>"+
            "					<table class='table table-vertical'>" +
            "    <tr>" +
            "        <td width='10%'>省份</td>" +
115
            "        <td>"+data.provinceName+"</td>" +
116
            "        <td width='10%'>数据来源</td>" +
117
            "        <td>"+data.datasourceName+"</td>" +
118
            "        <td width='10%'>业务</td>" +
119
            "        <td>"+data.busname+"</td>" +
120 121
            "    </tr>" +
            "    <tr>" +
122 123
            "        <td width='10%'>渠道</td>" +
            "        <td>"+data.channelName+"</td>" +
124
            "        <td>指标编码</td>" +
125
            "        <td>"+data.kpiCode+"</td>" +
126
            "        <td>指标名称</td>" +
127 128 129
            "        <td>"+data.kpiName+"</td>" +
            "    </tr>" +
            "    <tr>" +
130 131 132 133
            "        <td>预测开始</td>" +
            "        <td colspan='3'>"+df.format(new Date(data.busdatabegTime))+"</td>" +
            "        <td>预测结束</td>" +
            "        <td colspan='3'>"+df.format(new Date(data.busdataendTime))+"</td>" +
134 135
            "    </tr>" +
            "    <tr>" +
136 137
            "        <td>阈值1</td>" +
            "        <td>"+removeNull(data.threshold1Val)+"</td>" +
138 139 140 141 142 143
            "        <td>阈值2</td>" +
            "        <td>"+removeNull(data.threshold2Val)+"</td>" +
            "        <td>阈值3</td>" +
            "        <td>"+removeNull(data.threshold3Val)+"</td>" +
            "    </tr>" +
            "    <tr>" +
144 145
            "        <td>阈值告警1</td>" +
            "        <td>"+removeNull(data.warn1Val)+"</td>" +
146 147 148 149
            "        <td>阈值告警2</td>" +
            "        <td>"+removeNull(data.warn2Val)+"</td>" +
            "        <td>阈值告警3</td>" +
            "        <td>"+removeNull(data.warn3Val)+"</td>" +
150 151
            "    </tr>" +
            "    <tr>" +
152 153 154 155
            "        <td>模型评价</td>" +
            "        <td colspan='6' align='center'>"+data.evaluationResult+"</td>" +
            "    </tr>" +
            "    <tr>" +
156 157 158 159 160
            "        <td colspan='8' align='center'>图表展示</td>" +
            "    </tr>" +
            "    <tr>" +
            "        <td colspan='8'>" +
            "            <div class=''>" +
胡斌's avatar
胡斌 committed
161
            "               <img id='img' onclick='imgOnclick(this)' style='width:622px' src='${ctx}/BaseManage/TaskManage/modelPreviewImg?path="+data.fileAddress+"'/>" +
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
            "            </div>" +
            "        </td>" +
            "    </tr>" +
            "    <tr>" +
            "        <td colspan='8' align='center'>模型数据明细展示</td>" +
            "    </tr>" +
            "    <tr>" +
            "        <td colspan='8'>" +
            "            <div  class='panel-body'>" +
            "                <table class='table '>" +
            "    				<thead>" +
            "        				<tr><th colspan='2'>时间</th><th colspan='2'>真实值</th><th colspan='2'>预测值</th></tr>" +
            "    				</thead>" +
            "    				<tbody>" ;

        data.eWarningCalcResult = data.eWarningCalcResult.sort(function (a,b) {
			return a.resultDate-b.resultDate
        });
		data.eWarningCalcResult.forEach(function (t) {
			content = content+"<tr><td colspan='2'>"+df.format(new Date(t.resultDate))+"<td><td colspan='2'>"+t.dim1Val+"</td><td colspan='2'>"+t.dim2Val+"</td></tr>"
		});
        content = content+
			"					</tbody>" +
			"				</table>"+
186 187 188 189
            "            </div>" +
            "        </td>" +
            "    </tr>" +
            "</table>";
190
        dilog= $.dialog({
191 192 193 194 195
            title:'模型预览结果',
            content:content,
            lock: true
        });
    }
196 197
	function removeNull(val) {
		return val==null?"":val
198
    }
199 200


201
</script>
afe's avatar
afe committed
202
</body>
203

afe's avatar
afe committed
204
</html>