项目

一般

简介

B2-t.html

黄 虹琳, 2017-11-22 15:20

 
1
<!DOCTYPE html>
2
<html>
3
<head lang="en">
4
    <meta charset="GB2312">
5
    <title></title>
6
    <link href="css/style.css" title="style" rel="stylesheet" type="text/css" />
7
    <link rel="stylesheet" type="text/css" href="css/jquery-ui.css" />
8
    <script src="js/jquery-1.6.3.min.js"></script>
9

    
10
</head>
11
<body style="background: #F3F3F3">
12
<div >
13
    <span class="lond hide" style="text-align: center;margin-left: 200px;" ><img  src="img/loding.gif" ><span>???ڲ?ѯ???ݿ?....</span></span>
14
    <div id="container3" style="width:100%;min-height: 500px;overflow: auto"></div>
15
    <div style="position: fixed;left: 30px;top: 50px;" class="Almimg hide">
16
        <img src="img/ico_guanbi.png" class="btn_img_guanbi" style="position: absolute;right: 5px;top: 5px;cursor:pointer">
17
        <img id="aimg" src="img/loginBG.jpg" width="640" height="480" style="box-shadow: 8px 5px 5px #888888;">
18
    </div>
19
</div>
20
<a href='javascript:history.back()' class='back' style='color: #fff'>????</a>
21
<script>
22
$(".almbtn").live("click",function(){
23
  var src=$(this).attr("op");
24
  $("#aimg").attr("src", src);
25
  $(".Almimg").fadeToggle();
26
});
27
$(".btn_img_guanbi").click(function(){
28
    $(".Almimg").fadeOut()
29
});
30

31
function getDateStr() {
32
    var date = new Date();
33
    var seperator1 = "-";
34
    var seperator2 = ":";
35
    var year = date.getFullYear();
36
    var month = date.getMonth() + 1;
37
    var strDate = date.getDate();
38
    if (month >= 1 && month <= 9) {
39
        month = "0" + month;
40
    }
41
    if (strDate >= 0 && strDate <= 9) {
42
        strDate = "0" + strDate;
43
    }
44
    var currentdate = year + seperator1 + month + seperator1 + strDate;
45
    return currentdate;
46
}
47

48
function qryList(sDate, eDate){
49
    $.ajax({
50
        type: "POST",
51
        url: "../omdev/smalarm-t.asp",
52
        data: "starttime="+sDate+"&endtime="+eDate+"",
53
        dataType: "json",
54
        beforeSend: function() {
55
            $(".dateBtn").attr('disabled', 'disabled');
56
            $(".lond").show();
57
        },
58
        complete: function() {
59
            $(".lond").hide();
60
            $(".dateBtn").removeAttr("disabled");
61
        },
62
        success: function(msg){
63
            var data=msg;
64
            var q='';
65
            q+="<div style='overflow: auto;height: 500px;'>";
66
            q+="<table width='100%' style='border: #B0B7BF 1px solid'>";
67
            q+="<tr><td style='width: 170px;'>????ʱ??</td><td>????ԭ??</td><td>??????ʽ</td><td>????????</td><td style='width: 100px;'>???</td><td style='width: 200px;'>????????</td><td style='width: 35px;'>SID</td><td style='width: 35px;'>AID</td><td style='width: 40px;'>??ͼ</td></tr>";
68
            $.each(data.recs,function(i,n){
69
                var name='δ֪';var note='?澯';var mask='';var recv='';
70
                var kind=(n.Type>>8);
71
                if(kind==0x01) name="?е?";
72
                else if(kind==0x02) name="???";
73
                else if(kind==0x03) name="UPS";
74
                else if(kind==0x04) name="????";
75
                else if(kind==0x05) name="??ʪ??";
76
                else if(kind==0x06) name="©ˮ";
77
                else if(kind==0x07) name="?յ?";
78
                else if(kind==0x08) name="???ܿյ?";
79
                else if(kind==0x09) name="??????";
80
                else if(kind==0x0a) name="??????";
81
                else if(kind==0x0b) name="??ʾ??";
82
                else if(kind==0x0c) name="?????Ƶ";
83
                else if(kind==0x0d) name="IC?Ž?";
84
                else if(n.Type<16){
85
                    if(n.Type==6) name="©ˮ???";
86
                    else if(n.Type==5) name="??ʪ??";
87
                    else if(n.Type==9) name="?̸?";
88
                    else if(n.Type==10) name="????";
89
                }
90
                if(n.Alm&4){note+=" ???"}
91
                if(n.Alm&8){note+=" ?ط?"}
92
                if(n.Alm&16){note+=" ????"}
93
                if(n.Alm&0xf00){note+=" δ????"}
94
                if(n.AlmMask&1){mask+=" ????"}
95
                if(n.AlmMask&2){mask+=" ????"}
96
                if(n.AlmMask&4){mask+=" ????"}
97
                if(n.AlmMask&8){mask+=" ????"}
98
                if(n.AlmMask&0x10){mask+=" ?绰"}
99
                if(n.AlmMask&0x20){mask+=" ?ʼ?"}
100
                if(n.AlmMask&0x40){mask+=" POST"}
101
                if(n.AlmMask&0x100){mask+=" ????1"}
102
                if(n.AlmMask&0x200){mask+=" ????2"}
103
                for (var x=0; x<16; x++)
104
                    if ((n.AlmRecv & (1 << x))>0) recv+=" #"+(x+1);
105
                if(n.AlmMask&0x40){mask+=" POST"}
106
                if(i==0){
107
                }
108
                q+="<tr><td>"+n.LastUpd+"</td><td>"+note+"</td><td>"+mask+"</td><td>"+recv+"</td><td>"+name+"</td><td>"+n.AlmBrief+"</td><td>"+n.SID+"</td><td>"+n.AID+"</td><td>";
109
                if( n.AlmImg!=undefined && n.AlmImg.length>2 ){
110
                    var istart=n.AlmImg.indexOf('wwwpub');
111
                    if (istart>=0) n.AlmImg=n.AlmImg.substring(istart+7);
112
                    q+="<span><img src='img/ico_img.png' op='"+ n.AlmImg+"' class='almbtn'></span>";
113
                }
114
                q+="</td></tr>";
115
            });
116
            if (data.reccnt==0)
117
            {
118
                q+="<tr><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr>";
119
              q+="</div>";
120
            }
121
            $("#container3").html(q);
122
        }
123
    });
124
}
125

126
var sdate = getDateStr();
127
qryList(sdate, sdate);
128

    
129
</script>
130
</body>
131
</html>