ansel0926
2022-05-18 f0efddd9e32b9c5dc828401c4092be004b4826cf
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
function getCase_3D() {
    $.ajax({
        type : "post",
        url : "../../easyAPI/case/getCase.action",
        contentType : "charset=utf-8",
        success : function(data) {
            if (data !== undefined) {
                showCase_3D(data);
            }
        },
        error : function(XMLHttpRequest, textStatus, errorThrown) {
            // 请求失败时执行该函数
            console.log("获取案件实时信息失败!");
        },
    });
}
function getCaseById_3D(id) {
    var caseArgs = JSON.stringify({
        "caseId" : id
    });
    $.ajax({
        type : "post",
        url : "../../easyAPI/case/getCaseandNetById.action",
        data : caseArgs,
        contentType : "application/json;charset=utf-8",
        success : function(data) {
            if (data !== undefined) {
                showInfoCase_3D(data);
            };
        },
        error : function(XMLHttpRequest, textStatus, errorThrown) {
            console.log("根据案件ID获取案件信息失败!");
        }
    });
}
 
function countCase() {
    $.ajax({
        type : "post",
        url : "../../easyAPI/case/countCase.action",
        contentType : "charset=utf-8",
        success : function(data) {
            if (data !== undefined) {
                $('#caseCount').html(data);
            }
        },
        error : function(XMLHttpRequest, textStatus, errorThrown) {
            // 请求失败时执行该函数
            console.log("获取案件总数信息失败!");
        },
    });
}
function queryCase(queryData){
    var args = JSON.stringify(queryData);
    $.ajax({
        type : "post",
        url : "../../easyAPI/case/queryCase.action",
        data : args,
        contentType : "application/json;charset=utf-8",
        success : function(data) {
            if (data.length != 0) {
                showQueryCase_3D(data);
            }else{
                closesearchresult();
                swal("没有案件信息符合您的检索条件!","请重试!","error");
            }
        },
        error : function(XMLHttpRequest, textStatus, errorThrown) {
            console.log("条件查询案件信息请求失败!");
        }
    });
}
 
function openMaterial(id,type){
    var args = JSON.stringify({
        "caseId" : id,
        "materialType" : type,
    });
    $.ajax({
        type : "post",
        url : "../../easyAPI/case/getCaseMaterialById.action",
        data : args,
        contentType : "application/json;charset=utf-8",
        success : function(data) {
            if (data.length != 0) {
                showCaseMaterial(data,type);
            }else{
                swal("没有相应的图片资料或案件视频!","请重试!","error");
            }
        },
        error : function(XMLHttpRequest, textStatus, errorThrown) {
            console.log("查询案件素材信息请求失败!");
        }
    });
}