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
<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>全网监控智能分析平台</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
</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="section">
<div class="tab-content">
<div class="row">
<div class="col-xs-12">
<div class="table-header">
故障创建
</div>
<div class="tab-content" style="width:600px;margin:30px auto 20px;">
<!---- -------------------------------故障创建 BEGINS onsubmit="return validate_form(this)"------------------------------------------------------------ -->
<form class="form-horizontal" role="form" action="#" enctype="multipart/form-data" method="post" id="failureCreateForm">
<div class="form-group">
<label class="col-sm-3 control-label">故障标题(<font color="red">必填</font>):</label>
<div class="col-sm-9"><input type="text" id="failureTitle" class="form-control" placeholder="故障标题" name="failureTitle" /></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">故障描述(<font color="red">必填</font>):</label>
<div class="col-sm-9"><textarea class="form-control" rows="3" placeholder="故障描述" id="failureDescription" name="failureDescription"></textarea></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">省份:</label>
<div class="col-sm-9"><select class="form-control" name="province" id="province" >
<c:forEach var="provinces" items="${provinceList}">
<option value="${provinces.provinceId}">${provinces.provinceName}</option>
</c:forEach>
</select></div>
</div>
<div id="dataSourceChanenel">
<tags:GZFX_Create_datasource_channel/>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">发生时间(<font color="red">必填</font>):</label>
<div class="col-sm-9"><input id="happen_time" name="happenTime" class="form-control" type="text" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'end_time\')}'})">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">结束时间:</label>
<div class="col-sm-9"><input type="text" class="form-control" id="end_time" name="endTime" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'happen_time\')||\'%y-%M-%d %H:%m:%s\'}'})" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">详细原因:</label>
<div class="col-sm-9"><textarea class="form-control" rows="3" placeholder="详细原因" id="reason_detail" name="reasonDetail">${xcdReason}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">解决方案:</label>
<div class="col-sm-9"><textarea class="form-control" rows="3" placeholder="解决方案" id="resolution" name="resolution">${xcdSolution}</textarea>
</div>
</div>
<!-- ************************** 附件上传 BEGIN*************************** -->
<div class="form-group" id="fileUpload">
<label class="col-sm-3 control-label">详细原因附件:</label>
<div class="col-sm-9">
<span id="spanButtonPlaceholder" class="btn btn-default form-control"></span>
<span style="color:red">(最大为5MB)</span>
<a href="javascript:cancelUpload();">取消所有上传</a>
</div>
<div id="divFileProgressContainer"></div>
<div class="col-sm-9">
<span>上传文件列表</span>
<table id="infoTable" class="table table-hover table-striped" border="0" width="530"></table>
</div>
</div>
<!-- ************************** 附件上传 END *************************** -->
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<button type="button" class="btn btn-primary" id="formSubmit">确定</button>
<button type="button" class="btn btn-warning" onclick="back()">返回</button>
</div>
</div>
</form>
<!---- -------------------------------故障创建 END------------------------------------------------------------ -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="${ctx}/static/swfupload/fileprogress.js"></script>
<script type="text/javascript" src="${ctx}/static/swfupload/handlers.js"></script>
<script type="text/javascript" src="${ctx}/static/swfupload/swfupload.js"></script>
<script type="text/javascript">
var fileSize = "${fileSize}";
var swfu;
window.onload = function () {
swfu = new SWFUpload({
upload_url: "../MonitorOperation/FailureCreate/saveAttachment",
//post_params: {"name" : "huliang"},
// File Upload Settings
file_size_limit : fileSize+" MB", // 5MB
file_types : "*.*",
file_types_description : "所有文件",
file_upload_limit : "0",
file_queue_error_handler : fileQueueError,
file_dialog_complete_handler : fileDialogComplete,//选择好文件后提交
file_queued_handler : fileQueued,
upload_progress_handler : uploadProgress,
upload_error_handler : uploadError,
upload_success_handler : uploadSuccess,
upload_complete_handler : uploadComplete,
// Button Settings
button_image_url : "../static/images/swfImage.png",
button_placeholder_id : "spanButtonPlaceholder",
button_width: 80,
button_height: 18,
button_text : '<span class="btn btn-default form-control">选择文件</span>',
//button_text_style : '.button { font-family: Helvetica, Arial, sans-serif; font-size: 12pt; }',
button_text_top_padding: 0,
button_text_left_padding: 18,
button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
button_cursor: SWFUpload.CURSOR.HAND,
// Flash Settings
flash_url : "${ctx}/static/swfupload/swfupload.swf",
custom_settings : {
upload_target : "divFileProgressContainer"
},
// Debug Settings
debug: false //是否显示调试窗口
});
};
</script>
<script type="text/javascript">
var xcdIds = "${xcdIds}";
$(document).ready(function(){
var xcdProvinceId = "${xcdProvinceId}";
//var xcdProviderId = "${xcdProviderId}";
if(xcdProvinceId!=""){
$("#province option[value="+xcdProvinceId+"]").attr("selected","selected");
//$("#province").attr("disabled",true);
$("#province").attr("onfocus","this.defOpt=this.selectedIndex");
$("#province").attr("onchange","this.selectedIndex=this.defOpt");
$("#province").attr("readonly",true);
}
//$("#provider option[value="+xcdProviderId+"]").attr("selected","selected");
if(xcdIds!="xcdIds"){
$("#dataSourceChanenel").empty();
$("#fileUpload").hide();
}
var startTime = "${startTime}";
var endTime = "${endTime}";
$("#happen_time").val(startTime);
$("#end_time").val(endTime);
});
</script>
<script type="text/javascript">
function back(){
location.href="${ctx}/MonitorOperation/FailureAnalysisXcd";
};
</script>
<script type="text/javascript">
$("#formSubmit").click(function(){
var infoTableRows = infoTable.rows;
if($.trim($("#failureTitle").val())==""){
$.alert("故障标题不能为空");
}else if($.trim($("#failureDescription").val())==""){
$.alert("故障描述不能为空");
}else if($("#happen_time").val()==""){
$.alert("故障发生时间不能为空");
}else{
$("#formSubmit").attr("disabled",true);
if(0==infoTableRows.length){
var createForm=$("#failureCreateForm");
createForm.attr("action","${ctx}/MonitorOperation/FailureCreate/saveForm");
createForm.submit();
createForm.attr("action","#");
}else{
if(!uploadFinish){
swfu.startUpload();
}else{
var createForm=$("#failureCreateForm");
createForm.attr("action","${ctx}/MonitorOperation/FailureCreate/saveForm");
createForm.submit();
createForm.attr("action","#");
}
}
}
});
</script>
</body>
</html>