|
@@ -19,7 +19,11 @@ $(function() {
|
19
|
19
|
$("#jobId").find("option[value='" + $("#jobId").attr("paramVal") + "']").attr("selected",true);
|
20
|
20
|
}
|
21
|
21
|
} else {
|
22
|
|
- ComAlertTec.show(data.msg);
|
|
22
|
+ layer.open({
|
|
23
|
+ title: '系统提示',
|
|
24
|
+ content: (data.msg || "接口异常"),
|
|
25
|
+ icon: '2'
|
|
26
|
+ });
|
23
|
27
|
}
|
24
|
28
|
},
|
25
|
29
|
});
|
|
@@ -188,12 +192,6 @@ $(function() {
|
188
|
192
|
}
|
189
|
193
|
});
|
190
|
194
|
|
191
|
|
- // 任务数据
|
192
|
|
- $('#joblog_list').on('click', '.logMsg', function(){
|
193
|
|
- var msg = $(this).find('span').html();
|
194
|
|
- ComAlert.show(2, msg);
|
195
|
|
- });
|
196
|
|
-
|
197
|
195
|
// 日志弹框提示
|
198
|
196
|
$('#joblog_list').on('click', '.logTips', function(){
|
199
|
197
|
var msg = $(this).find('span').html();
|
|
@@ -211,22 +209,6 @@ $(function() {
|
211
|
209
|
|
212
|
210
|
window.open(base_url + '/joblog/logDetailPage?id=' + _id);
|
213
|
211
|
return;
|
214
|
|
-
|
215
|
|
- /*
|
216
|
|
- $.ajax({
|
217
|
|
- type : 'POST',
|
218
|
|
- url : base_url + '/joblog/logDetail',
|
219
|
|
- data : {"id":_id},
|
220
|
|
- dataType : "json",
|
221
|
|
- success : function(data){
|
222
|
|
- if (data.code == 200) {
|
223
|
|
- ComAlertTec.show('<pre style="color: white;background-color: black;width2:'+ $(window).width()*2/3 +'px;" >'+ data.content +'</pre>');
|
224
|
|
- } else {
|
225
|
|
- ComAlertTec.show(data.msg);
|
226
|
|
- }
|
227
|
|
- },
|
228
|
|
- });
|
229
|
|
- */
|
230
|
212
|
});
|
231
|
213
|
|
232
|
214
|
/**
|
|
@@ -234,22 +216,36 @@ $(function() {
|
234
|
216
|
*/
|
235
|
217
|
$('#joblog_list').on('click', '.logKill', function(){
|
236
|
218
|
var _id = $(this).attr('_id');
|
237
|
|
- ComConfirm.show("确认主动终止任务?", function(){
|
238
|
|
- $.ajax({
|
239
|
|
- type : 'POST',
|
240
|
|
- url : base_url + '/joblog/logKill',
|
241
|
|
- data : {"id":_id},
|
242
|
|
- dataType : "json",
|
243
|
|
- success : function(data){
|
244
|
|
- if (data.code == 200) {
|
245
|
|
- ComAlert.show(1, '操作成功');
|
246
|
|
- logTable.fnDraw();
|
247
|
|
- } else {
|
248
|
|
- ComAlert.show(2, data.msg);
|
249
|
|
- }
|
250
|
|
- },
|
251
|
|
- });
|
252
|
|
- });
|
|
219
|
+
|
|
220
|
+ layer.confirm('确认主动终止任务?', {icon: 3, title:'系统提示'}, function(index){
|
|
221
|
+ layer.close(index);
|
|
222
|
+
|
|
223
|
+ $.ajax({
|
|
224
|
+ type : 'POST',
|
|
225
|
+ url : base_url + '/joblog/logKill',
|
|
226
|
+ data : {"id":_id},
|
|
227
|
+ dataType : "json",
|
|
228
|
+ success : function(data){
|
|
229
|
+ if (data.code == 200) {
|
|
230
|
+ layer.open({
|
|
231
|
+ title: '系统提示',
|
|
232
|
+ content: '操作成功',
|
|
233
|
+ icon: '1',
|
|
234
|
+ end: function(layero, index){
|
|
235
|
+ logTable.fnDraw();
|
|
236
|
+ }
|
|
237
|
+ });
|
|
238
|
+ } else {
|
|
239
|
+ layer.open({
|
|
240
|
+ title: '系统提示',
|
|
241
|
+ content: (data.msg || "操作失败"),
|
|
242
|
+ icon: '2'
|
|
243
|
+ });
|
|
244
|
+ }
|
|
245
|
+ },
|
|
246
|
+ });
|
|
247
|
+ });
|
|
248
|
+
|
253
|
249
|
});
|
254
|
250
|
|
255
|
251
|
/**
|
|
@@ -298,3 +294,41 @@ $(function() {
|
298
|
294
|
});
|
299
|
295
|
|
300
|
296
|
});
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+// 提示-科技主题
|
|
300
|
+var ComAlertTec = {
|
|
301
|
+ html:function(){
|
|
302
|
+ var html =
|
|
303
|
+ '<div class="modal fade" id="ComAlertTec" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">' +
|
|
304
|
+ '<div class="modal-dialog">' +
|
|
305
|
+ '<div class="modal-content-tec">' +
|
|
306
|
+ '<div class="modal-body"><div class="alert" style="color:#fff;"></div></div>' +
|
|
307
|
+ '<div class="modal-footer">' +
|
|
308
|
+ '<div class="text-center" >' +
|
|
309
|
+ '<button type="button" class="btn btn-info ok" data-dismiss="modal" >确认</button>' +
|
|
310
|
+ '</div>' +
|
|
311
|
+ '</div>' +
|
|
312
|
+ '</div>' +
|
|
313
|
+ '</div>' +
|
|
314
|
+ '</div>';
|
|
315
|
+ return html;
|
|
316
|
+ },
|
|
317
|
+ show:function(msg, callback){
|
|
318
|
+ // dom init
|
|
319
|
+ if ($('#ComAlertTec').length == 0){
|
|
320
|
+ $('body').append(ComAlertTec.html());
|
|
321
|
+ }
|
|
322
|
+
|
|
323
|
+ // 弹框初始
|
|
324
|
+ $('#ComAlertTec .alert').html(msg);
|
|
325
|
+ $('#ComAlertTec').modal('show');
|
|
326
|
+
|
|
327
|
+ $('#ComAlertTec .ok').click(function(){
|
|
328
|
+ $('#ComAlertTec').modal('hide');
|
|
329
|
+ if(typeof callback == 'function') {
|
|
330
|
+ callback();
|
|
331
|
+ }
|
|
332
|
+ });
|
|
333
|
+ }
|
|
334
|
+};
|