WorkflowReport.jsp
12 KB
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
<%@ page import="com.weaver.function.ConfigInfo" %>
<!DOCTYPE html>
<html>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%
//判断只有管理员才有权限
int userid = user.getUID();
if(userid!=1) {
response.sendRedirect("/notice/noright.jsp");
return;
}
%>
<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>
<style type="text/css">
.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:2%;
padding:1%;
background-color:#FFFFCC
}
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:not(:first-child):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:hover, .reportDiv span:hover+ul span, .reportDiv span:hover+ul li:before, .reportDiv span: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:2%;padding:1%;background-color:#FFFFCC }
.link{padding-left: 28px}
/*图片加载中div图层,用于遮挡页面*/
.loadingdiv {
position:absolute;
text-align:center;
left:0px;
top:0px;
z-index:70;
background-color:#000000;
opacity: 0.7;/*透明#CCCCCC*/
display:none;
}
/*加载中图片*/
.loadingdiv img {
position:absolute;
left:0px;
top:0px;
z-index:80;
}
.detailNode{
display:none;
}
</style>
</head>
<body style="width:90%;margin:0px auto;height:90%;">
<div id=reportDiv style="width:100%;" class="reportDiv">
<ul>
<li>
<span class="node">系统中共有流程数量:<span id="workflowcount">统计中...</span>个</span>
<ul>
<li>
<span class="node">其中使用html模式的流程:<span id="workflowcountusehtml">统计中...</span>条 <span class="detailNode" id="workflowhtmlnum">点击查看详情</span></span>
</li>
<li>
<span class="node">其中使用html模式的节点数:<span id="htmlnodecount">统计中...</span>个,占总节点数(<span id="nodecount">统计中...</span>个)的比例为<span id="htmlnodepercent">统计中...</span>% <span class="detailNode" id="htmlnodenum">点击查看详情</span></span>
</li>
<li>
<span class="node">其中使用模板模式的流程:<span id="workflowcountuseexcel">统计中...</span>条 <span class="detailNode" id="workflowexcelnum">点击查看详情</span></span>
</li>
<li>
<span class="node">其中使用模板模式的节点数:<span id="excelnodecount">统计中...</span>个,占总节点数(<span id="nodecount1">统计中...</span>个)的比例为<span id="excelnodepercent">统计中...</span>% <span class="detailNode" id="excelnodenum">点击查看详情</span></span>
</li>
<li>
<span class="node">html文件模板的数量:<span id="htmlFilecount">统计中...</span>个,占模板总数(<span id="htmlnodecount2">统计中...</span>)的比例为<span id="notchangepercent">统计中...</span>% <span class="detailNode" id="nodechangenum">点击查看详情</span></span>
</li>
</ul>
</li>
</ul>
</div>
<div id="btndiv" style="width:100%;margin-top:2%">
<input type="button" class="btn" value="开始检测" onclick="match()"/>
<input type="button" class="btn" value="可配置开发内容检测" onclick="matchDevContent()" />
<input type="button" class="btn" value="检测规则详情" onclick="match1()"/>
<%--<input type="button" class="btn" value="老模板初始化" onclick="match2()"/>--%>
</div>
<div id="message_table_Div2" class="xTable_message" style="display: none; position: absolute; top: 203px; left: 787.5px;">正在统计,请稍候...</div>
<div id="messagediv" style="margin-bottom: 10px;">
<span style="color:red">
<b>操作步骤:</b><br>
1.点击“开始检测”按钮,进入检测结果页面<br>
2.在检测结果页面点击右上角“导出报告”按钮,下载Excel报告文件<br>
3.导出报告后,根据报告中的说明内容进行相关操作:<br>
>请根据检测结果的“被检测对象位置”,检查对应的功能是否正常,如存在问题,记录并告知开发人员<br>
>如果部分内容无法自动替换,需要手动修改,请告知开发人员,按照“规则描述”进行手动修改<br>
>请将检测结果报告提交一份到版本升级服务部对应的开发人员<br>
</span><br>
<b>说明:</b><br>
1.如果需要新增检测规则,请点击“检测规则详情”页面查看并新增规则;<br>
2.如果在检测结果页面进行“批量替换”,将自动备份模板文件或者对应的字段文件。<br>
3.检测规则详情页面,默认检查所有有效流程,包括正常以及测试状态的流程;如果指定了流程,则只会针对选中的流程进行检测。<br>
<br><b>版本信息</b><br>
V<%=ConfigInfo.getToolVersion() %>
</div>
</body>
</html>
<script type="text/javascript">
var dialog = null;
function closeDialog() {
if (dialog)
dialog.close();
}
var dWidth = 800;
var dHeight = 500;
var clientWidth = document.body.clientWidth;
dWidth = clientWidth * 0.95;
var clientHeight = document.body.clientHeight;
dHeight = clientHeight * 0.95;
function doOpen(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;
try {
dialog.show();
} catch (e) {
}
}
function openDetail(type) {
doOpen('/templetecheck/filecheck/WorkflowReportDetail.jsp?type='+type, '详细信息');
}
function matchDevContent(){
$.ajax({
dataType: 'json',
type: 'post',
url: 'WorkflowReportOperation.jsp',
data: {
"operation": "matchDevContent",
},
success: function (data) {
var ruleid = data.ruleid;
if(ruleid==''){
$.DialogByZ.Alert({Title: "提示", Content: "工具中未维护该功能的检测规则", BtnL: "确定"});
}
doOpen("/templetecheck/filecheck/FilecheckGetReport.jsp?ruleid="+ruleid+"&fromtab=matchDevContent","文件检查结果");
}
})
}
//ajax请求过程中,显示加载中图片并显示图层,请求完成隐藏图片
$(function () {
//注册ajax加载事件
$("#message_table_Div2").ajaxStart(function () {
//一个div,用来遮挡页面,请求过程中,不可操作页面
var lockwin = $(this);
lockwin.show();
});
$("#message_table_Div2").ajaxStop(function () {
//隐藏div
var lockwin = $(this);
lockwin.hide();
});
});
jQuery(document).ready(function () {
getWorkflowReportInfo();
});
function getWorkflowReportInfo() {
$.ajax({
url: "WorkflowReportOperation.jsp?operation=getReportInfo",
type: "post",
dataType: "json",
success: function (data) {
var WorkflowCount = data.workflowCount;
var HtmlNodeCount = data.htmlNodeCount;
var htmlFilecount = data.htmlFilecount;
var NodeCount = data.nodeCount;
var workflowCountAll =data.workflowCountAll;
var WorkflowCountUseHtml = data.workflowCountUseHtml;
var workflowCountUseExcel=data.workflowCountUseExcel;
var excelNodeCount = data.excelNodeCount;
var htmlnodepercent = (100*(HtmlNodeCount/NodeCount)).toFixed(2);
var excelnodepercent = (100*(excelNodeCount/NodeCount)).toFixed(2);
if(NodeCount==0){
htmlnodepercent=0;
excelnodepercent=0;
}
var notchangepercent = (100*(htmlFilecount/workflowCountAll)).toFixed(2);
if(workflowCountAll==0){
notchangepercent=0;
}
$("#nodecount").html(NodeCount);
$("#nodecount1").html(NodeCount);
$("#workflowcountusehtml").html(WorkflowCountUseHtml);
$("#workflowcountuseexcel").html(workflowCountUseExcel);//使用excel流程
$("#htmlFilecount").html(htmlFilecount);
$("#htmlnodecount").html(HtmlNodeCount);
$("#excelnodecount").html(excelNodeCount);
$("#htmlnodecount2").html(workflowCountAll);
$("#workflowcount").html(WorkflowCount);
$("#htmlnodepercent").html(htmlnodepercent);
$("#excelnodepercent").html(excelnodepercent);
$("#notchangepercent").html(notchangepercent);
$(".detailNode").css("display","inline").css("cursor","pointer");
$("#workflowhtmlnum").click(function(){
openDetail("workflowhtml");
});
$("#htmlnodenum").click(function(){
openDetail("htmlnode");
});
$("#nodechangenum").click(function(){
openDetail("nodechange");
});
$("#workflowexcelnum").click(function(){
openDetail("workflowexcel");
});
$("#excelnodenum").click(function(){
openDetail("excelnode");
});
}
});
};
function match() {
doOpen("/templetecheck/filecheck/FilecheckGetReport.jsp","文件检查结果");
}
function match1(){
doOpen("/templetecheck/filecheck/WorkflowCheckRule.jsp","检测规则详情");
}
function match2(){
doOpen("/templetecheck/filecheck/WorkflowHtml2Json.jsp","老模板初始化");
}
</script>