付延余
2022-12-16 f0f8ee8c4a945adbc742d9bab69382b28ad311fb
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
function searchByOnline(state){
    window.location.href = "/tssw/shellInfo/list?state="+state;
}
 
function searchByAccount() {
    window.location.href = "/tssw/shellInfo/list?account="+$("#account").val();
}
 
function add() {
    window.location.href = "/tssw/shellInfo/edit";
}
 
 
function view(id) {
    window.location.href = "/tssw/shellInfo/view?id="+id;
}
 
function edit(id){
    window.location.href = "/tssw/appInfo/edit?id="+id;
}
 
function del(id) {
    if(confirm('你确定要删除吗,删除同时会取消该指令下发?')) {
        window.location.href = "/tssw/shellInfo/del?id=" + id;
    }
}
 
function restartShell(id) {
    if(confirm('你确定要重新下发指令吗?')) {
        $.ajax({
            url: "/tssw/shellInfo/restart?id=" + id,
            //data: {},
            type: "GET",
            //dataType: "json",
            success: function(data) {
                toastr.success("【成功】已重新下发指令");
                $("#"+id).html('<span class="badge bg-primary">已重新下发</span>');
            }
        });
    }
}
 
function cancelShell(id) {
    if(confirm('你确定要取消指令下发吗?')) {
        $.ajax({
            url: "/tssw/shellInfo/cancel?id=" + id,
            //data: {},
            type: "GET",
            //dataType: "json",
            success: function(data) {
                toastr.success("【成功】已取消尚未下发的指令,已下发成功的指令将会继续执行");
                $("#"+id).html('<span class="badge bg-warning">已取消</span>');
            }
        });
    }
}
function viewDate(id,searchTime){
    var searchDate = $("#searchDate").val();
    window.location.href = "/tssw/appInfo/view?id="+id+"&date="+searchDate+"&am="+searchTime;
}
 
function cancel(){
    history.back();
}