execute.jsp
3.29 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
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ include file="/systeminfo/init_wev8.jsp"%>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<%@ taglib uri="/WEB-INF/tld/browser.tld" prefix="brow"%>
<jsp:useBean id="baseBean" class="weaver.general.BaseBean" scope="page"/>
<%@page import="weaver.general.*"%>
<html>
<%
String titlename = "";
%>
<head>
<title>KB问题对应接口</title>
<script type="text/javascript" src="/js/jquery_wev8.js"></script>
<link rel="stylesheet" href="/css/main_wev8.css" type="text/css">
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<link rel="stylesheet" href="/wui/theme/ecology8/weaveredittable/css/WeaverEditTable_wev8.css">
<script src="/wui/theme/ecology8/weaveredittable/js/WeaverEditTable_wev8.js"></script>
<script type="text/javascript">
jQuery(document).ready(function(){
});
function execute() {
$.ajax({
url : "executeOperation.jsp",
type : "post",
dataType : "json",
success:function(data) {
var res = data.status;
if(res == "success") {
top.Dialog.alert("执行完成。");
} else {
var errormsg = data.errormsg;
top.Dialog.alert(errormsg+" 执行失败。执行中止。");
}
window.location.reload();
}
});
}
function edit() {
window.location.href="edit.jsp";
}
</script>
</head>
<body>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<jsp:include page="/systeminfo/commonTabHead.jsp">
<jsp:param name="mouldID" value="workflow" />
<jsp:param name="navName" value="KB问题对应接口" />
</jsp:include>
<%
OrderProperties prop = new OrderProperties();
String propfile = GCONST.getRootPath()+"WEB-INF"+File.separator+"prop"+File.separator+"SolveKBQuestion.properties";
List<String> classes = new ArrayList<String>();
prop.load(propfile);
String execStatus = Util.null2String(prop.getProperty("execStatus"));
String status = "";
if("1".equals(execStatus)) {
status = "已执行";
} else {
status = "未执行";
RCMenu += "{"+"开始执行"+",javascript:execute(),_self} " ;
RCMenuHeight += RCMenuHeightStep ;
}
RCMenu += "{"+"编辑"+",javascript:edit(),_self} " ;
RCMenuHeight += RCMenuHeightStep ;
%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<body style="height:100%;width:100%;">
<form>
<table id="topTitle" cellpadding="0" cellspacing="0">
<tr>
<td></td>
<td class="rightSearchSpan" style="text-align:right; width:500px!important">
<input type="button" value="编辑" class="e8_btn_top" onclick="edit()"/>
<%if(!"1".equals(execStatus)) { %>
<input type="button" value="开始执行" class="e8_btn_top" onclick="execute()"/>
<%} %>
</td>
</tr>
</table>
<wea:layout>
<wea:group context="执行状态">
<wea:item>执行状态</wea:item>
<wea:item><%=status %><span style="color:red">(*如果状态为“已执行”,想再次执行,请点击“编辑”进行设置)</span></wea:item>
</wea:group>
<wea:group context="执行类">
<%
List<String> keys = prop.getKeys();
int no = 1;
for(int i= 0; i < keys.size(); i++) {
String key = keys.get(i);
String val = Util.null2String(prop.getProperty(key));
if("".equals(val)||"execStatus".equals(key)) {
continue;
}
%>
<wea:item><%=(no++) %></wea:item>
<wea:item><%=val %></wea:item>
<%} %>
</wea:group>
</wea:layout>
</form>
</body>
</html>