...
|
...
|
@@ -115,6 +115,14 @@ |
|
|
<button id="addInfoBtn" class="btn btn-info" style="margin-top: 12px;margin-left: 100px;">
|
|
|
新增
|
|
|
</button>
|
|
|
|
|
|
<button id="taskEnableOrDisable_open" class="btn btn-warning" style="margin-top: 12px;margin-left: 5px;">
|
|
|
开启任务
|
|
|
</button>
|
|
|
|
|
|
<button id="taskEnableOrDisable_close" class="btn btn-warning" style="margin-top: 12px;margin-left: 5px;">
|
|
|
关闭任务
|
|
|
</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div id="infoTable">
|
...
|
...
|
@@ -326,6 +334,12 @@ |
|
|
getJavaApp();
|
|
|
|
|
|
|
|
|
$("#taskEnableOrDisable_open").click(function () {
|
|
|
taskEnableOrDisable(1);
|
|
|
});
|
|
|
$("#taskEnableOrDisable_close").click(function () {
|
|
|
taskEnableOrDisable(0);
|
|
|
});
|
|
|
|
|
|
$("#addInfoBtn").click(function () {
|
|
|
editJavaInfo(null);
|
...
|
...
|
@@ -345,6 +359,31 @@ |
|
|
});
|
|
|
});
|
|
|
|
|
|
//flag 1开启,0关闭
|
|
|
function taskEnableOrDisable(flag) {
|
|
|
var ids=getSelectedServiceIds();
|
|
|
if(ids.length<=0){
|
|
|
localAlert("提示","请至少选择一个任务!");
|
|
|
return ;
|
|
|
}
|
|
|
$.ajax({
|
|
|
url: contextPath + "/javaApi/taskEnableOrDisable",
|
|
|
type: 'post',
|
|
|
dataType: "json",
|
|
|
sync: false,
|
|
|
data: {
|
|
|
'serviceIds': ids,
|
|
|
'apiToggle':flag
|
|
|
},
|
|
|
success: function (data) {
|
|
|
$("#infoTable").table("load");
|
|
|
},
|
|
|
error: function (data) {
|
|
|
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function getTableParam() {
|
|
|
|
|
|
var tableParam = {
|
...
|
...
|
@@ -367,6 +406,12 @@ |
|
|
//refreshJavaAppStatus();
|
|
|
},
|
|
|
columns: [{
|
|
|
title : " <input type='checkbox' onclick='selectAll(this)' > 全选 " ,
|
|
|
width : "3%",
|
|
|
formatter : function(value, rowData, rowIndex) {
|
|
|
return "<input type='checkbox' name ='checkboxServiceId' data-sign='"+rowData.serviceId+"' >";
|
|
|
}
|
|
|
},{
|
|
|
title: "ID",
|
|
|
field: "serviceId",
|
|
|
width: "4%"
|
...
|
...
|
@@ -695,5 +740,36 @@ |
|
|
}]
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
//点击表头 的checkbox事件
|
|
|
function selectAll(that){
|
|
|
var isChecked = $(that).is(':checked');
|
|
|
if( isChecked ) {
|
|
|
$("#infoTable tbody").find("input[name='checkboxServiceId']").each(function (index,val) {
|
|
|
$(this).prop("checked",true);
|
|
|
});
|
|
|
}else{
|
|
|
$("#infoTable tbody").find("input[name='checkboxServiceId']").each(function (index,val) {
|
|
|
$(this).prop("checked",false);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
function getSelectedServiceIds(){
|
|
|
var ids="";
|
|
|
$("#infoTable tbody").find("input[name='checkboxServiceId']:checked").each(function (index,val) {
|
|
|
var srvId=$(this).attr("data-sign");
|
|
|
if(srvId!=null&&srvId.length>0){
|
|
|
if(ids.length>0){
|
|
|
ids += ",";
|
|
|
}
|
|
|
ids += srvId;
|
|
|
}
|
|
|
});
|
|
|
return ids;
|
|
|
}
|
|
|
|
|
|
</script> |
|
|
|
|
|
\ No newline at end of file |
...
|
...
|
|