|
@@ -1,5 +1,5 @@
|
|
|
{{include "head.html"}}
|
|
|
-`<div class="modal fade" id="modal-assigntask" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
|
|
+<div class="modal fade" id="modal-assigntask" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
|
|
<div class="modal-dialog">
|
|
|
<div class="modal-content">
|
|
|
<div class="modal-header">
|
|
@@ -93,14 +93,6 @@
|
|
|
var assigncode = "";
|
|
|
var assignid = "";
|
|
|
$(function(){
|
|
|
- // window.setInterval(function(){
|
|
|
- // $.post("/center/task/getJumpMark",function(r){
|
|
|
- // if(r){
|
|
|
- // ttabletask.ajax.reload();
|
|
|
- // }
|
|
|
- // })
|
|
|
- // }, 3000);
|
|
|
-
|
|
|
taskConst = true;
|
|
|
setCookie("task","");
|
|
|
ttabletask = $('#task').DataTable({
|
|
@@ -114,35 +106,7 @@
|
|
|
},
|
|
|
"columnDefs": [
|
|
|
{ "targets": 0 ,"bVisible": false}, //隐藏列
|
|
|
- { "orderable": false, "targets": [0,1,2,3,4,5,6,7,8,13] }, //设置列不可排序
|
|
|
- //爬虫挂起
|
|
|
- // {"targets":[15], createdCell: function (cell, cellData, rowData, rowIndex, colIndex) {
|
|
|
- // var aInput;
|
|
|
- // $(cell).click(function () {
|
|
|
- // if( rowData.i_state == "关闭"||rowData.i_pendstate ==1 ){//任务不能由挂起转为非挂起状态;关闭任务不能挂起操作
|
|
|
- // return
|
|
|
- // }
|
|
|
- // $(this).html(createComboxPendState(rowData.s_code,rowData._id));
|
|
|
- // var aInput = $(this).find(":input");
|
|
|
- // aInput.focus().val(cellData);
|
|
|
- // });
|
|
|
- // $(cell).on("click", ":input", function (e) {
|
|
|
- // e.stopPropagation();
|
|
|
- // });
|
|
|
- // $(cell).on("change", ":input", function () {
|
|
|
- // $(this).blur();
|
|
|
- // });
|
|
|
- // $(cell).on("blur", ":input", function () {
|
|
|
- // var text = $(this).find("option:selected").text();
|
|
|
- // if(text == "否"){
|
|
|
- // text = 0
|
|
|
- // }else if(text == "是"){
|
|
|
- // text = 1
|
|
|
- // }
|
|
|
- // ttabletask.cell(cell).data(text);
|
|
|
- // cellData = text;
|
|
|
- // });
|
|
|
- // }}
|
|
|
+ { "orderable": false, "targets": [0,1,2,3,4,5,6,7,8,13] } //设置列不可排序
|
|
|
],
|
|
|
"order": [[12,"desc"]], //默认排序列
|
|
|
"lengthChange":false,
|
|
@@ -366,13 +330,13 @@
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
- function createComboxPendState(code,id){
|
|
|
+ function createComboxPendState(code,id){
|
|
|
return "<select onchange='changeCodePendState(this.value,\""+code+"\",\""+id+"\")' class='form-control input-sm'>"+
|
|
|
"<option value=1>是</option>"+
|
|
|
"<option value=0>否</option>"+
|
|
|
"</select>"
|
|
|
};
|
|
|
- function changeCodePendState(pendstate,code,id){
|
|
|
+ function changeCodePendState(pendstate,code,id){
|
|
|
$.ajax({
|
|
|
url:"/center/spider/updatePendState",
|
|
|
type:"post",
|
|
@@ -428,7 +392,7 @@
|
|
|
$("#modal-assigntask").modal("hide");
|
|
|
}
|
|
|
|
|
|
- function comfirm_disables(){
|
|
|
+ function comfirm_disables(){
|
|
|
if(assigncode== "" || assignid == ""){
|
|
|
showTip("分发失败", 1000);
|
|
|
return
|