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
31
32
33
34
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<%@ 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');
}
});
});
</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">
<iframe id="taskManageFrame" style="height:800px" src="${ctx}/BaseManage/TaskManage/taskListFrame?defaultTaskType=1"> </iframe>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="">
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";
}
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(); //执行当前对象
}
function imgOnclick(e) {
openwin("${ctx}/BaseManage/TaskManage/ImgDisplay?"+e.src)
}
function OpenDialog(data,id,taskType) {
var df=new SimpleDateFormat();
df.applyPattern("yyyy-MM-dd HH:mm:ss");
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'>" +
" <div class='panel-heading'>模型预览<input onclick='editTask(this)' id='"+taskType+"_"+id+"' style='float:right' type='button' class='btn btn-primary' value='参数修改'></div>" +
" <div class='panel-body'>"+
" <table class='table table-vertical'>"+
" <tr><td>"+
" <table class='table table-vertical'>" +
" <tr>" +
" <td width='10%'>省份</td>" +
" <td>"+data.provinceName+"</td>" +
" <td width='10%'>数据来源</td>" +
" <td>"+data.datasourceName+"</td>" +
" <td width='10%'>业务</td>" +
" <td>"+data.busname+"</td>" +
" </tr>" +
" <tr>" +
" <td width='10%'>渠道</td>" +
" <td>"+data.channelName+"</td>" +
" <td>指标编码</td>" +
" <td>"+data.kpiCode+"</td>" +
" <td>指标名称</td>" +
" <td>"+data.kpiName+"</td>" +
" </tr>" +
" <tr>" +
" <td>预测开始时间</td>" +
" <td>"+df.format(new Date(data.busdatabegTime))+"</td>" +
" <td>预测结束时间</td>" +
" <td>"+df.format(new Date(data.busdataendTime))+"</td>" +
" <td>阈值1</td>" +
" <td>"+removeNull(data.threshold1Val)+"</td>" +
" </tr>" +
" <tr>" +
" <td>阈值2</td>" +
" <td>"+removeNull(data.threshold2Val)+"</td>" +
" <td>阈值3</td>" +
" <td>"+removeNull(data.threshold3Val)+"</td>" +
" <td>阈值告警1</td>" +
" <td>"+removeNull(data.warn1Val)+"</td>" +
" </tr>" +
" <tr>" +
" <td>阈值告警2</td>" +
" <td>"+removeNull(data.warn2Val)+"</td>" +
" <td>阈值告警3</td>" +
" <td>"+removeNull(data.warn3Val)+"</td>" +
" </tr>" +
" <tr>" +
" <td colspan='8' align='center'>图表展示</td>" +
" </tr>" +
" <tr>" +
" <td colspan='8'>" +
" <div class=''>" +
" <img id='img' onclick='imgOnclick(this)' style='width:622px' src='${ctx}/BaseManage/TaskManage/modelPreviewImg?path="+data.fileAddress+"'/>" +
" </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>"+
" </div>" +
" </td>" +
" </tr>" +
"</table>";
dilog= $.dialog({
title:'模型预览结果',
content:content,
lock: true
});
}
function removeNull(val) {
return val==null?"":val
}
</script>
</body>
</html>