yzt
2023-09-27 726603df43447f8cfedfeaae4267209adbd01699
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
96
97
98
99
100
101
102
103
104
105
106
107
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023/8/28
  Time: 17:34
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <link href="/hxzkoa/hxzk/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="/hxzkoa/hxzk/assets/myfont/stylesheet.css" rel="stylesheet" type="text/css" />
    <title>Title</title>
    <style>
        body{
            background-color: rgb(68,71,92,1);
        }
        .ss{
            background-color: rgb(0,0,0,0.3);
            height: 110px;
        }
    </style>
</head>
<body>
<div class="container-fluid">
<div class="col-xs-12 col-sm-12 col-md-12">
    <%--    右侧数据--%>
        <div class="ss" style="width: 100%;text-align: center;position: fixed;left: -5px">
            <a href="/hxzkoa/show.do"><img src="/hxzkoa/hxzk/image/image/主页.png" width="100"/></a>
        </div>
    <div class="vh-100 w-100 zxry" style="padding-top: 120px">
            <table style="width: 100%">
                <tr style="color: white;text-align: center;font-family: 微软雅黑;font-size: 28px">
                    <td style="width: 98px">名称</td>
                    <td style="width: 98px">部门</td>
                    <td style="width: 98px">编号</td>
                    <td style="width: 98px">电量</td>
                    <td style="width: 98px">状态</td>
                </tr>
                <table id="gxrsj" style="width: 100%">
                    <c:forEach items="${personListRight}" var="list">
                        <tr style="height: 80px;color: white;text-align: center;font-size: 36px" onclick="xsXinXi(${list.p_tagid})">
                            <td  style="width: 90px;cursor: pointer">${list.p_name}</td>
                            <td style="width: 88px;cursor: pointer">${list.p_department}</td>
                            <td style="width: 88px;cursor: pointer">${list.p_tagid}</td>
                            <td style="width: 85px;cursor: pointer">${list.p_power}%</td>
                            <td style="width: 88px;cursor: pointer">${list.p_online == 0 ? "<img src='/hxzkoa/hxzk/image/icon/tagoff.png'/>" : "<img src='/hxzkoa/hxzk/image/icon/tagon.png'/>"} </td>
                        </tr>
                    </c:forEach>
                </table>
            </table>
    </div>
 
</div>
</div>
</body>
<script src="/hxzkoa/hxzk/assets/js/libs/jquery-3.1.1.min.js"></script>
<script src="/hxzkoa/hxzk/bootstrap/js/bootstrap.min.js"></script>
<script>
    tongjishujugengxin()
 
    setInterval(tongjishujugengxin, 10000)
 
    function tongjishujugengxin() {
 
        $.ajax({
            url:"/hxzkoa/gxRightShuJu.do",
            type:"POST",
            dataType:"JSON",
            success(data){
                var str=[];
                var num=0;
                for (var i=0;i<data.length;i++){
                    if(data[i].p_online == 0){
                        data[i].p_online = "离线"
                    }else{
                        data[i].p_online = "在线"
                    }
                    num++
                    if(data[i].p_department.length > 4){
                        str += '<tr  style="color: #AEC0D0;text-align: center;font-family: 微软雅黑;font-size: 24px;height: 80px;cursor: pointer" onclick="xsXinXi('+data[i].p_tagid+')" onmousemove="blues('+i+')" onmouseleave="blues1('+i+')">',
                            str +=  '<td  class="ttdd'+i+'" style="width: 90px;color: white">'+data[i].p_name+'</td>',
                            str +=  '<td  class="ttdd'+i+'" style="width: 90px;color: white" title="'+data[i].p_department+'">'+data[i].p_department.slice(0,4)+'</td>',
                            str +=  '<td  class="ttdd'+i+'" style="width: 90px;color: white">'+data[i].p_tagid+'</td>',
                            str +=  '<td  class="ttdd'+i+'" style="width: 90px;color: white">'+data[i].p_power+'</td>',
                            str +=  '<td  class="ttdd'+i+'" style="width: 90px;color: white">'+data[i].p_online+'</td>',
                            str += '</tr>'
                    }else{
                        str += '<tr  style="color: #AEC0D0;text-align: center;font-family: 微软雅黑;font-size: 24px;height: 80px;cursor: pointer" onclick="xsXinXi('+data[i].p_tagid+')" onmousemove="blues('+i+')" onmouseleave="blues1('+i+')">',
                            str +=  '<td class="ttdd'+i+'" style="width: 90px;color: white">'+data[i].p_name+'</td>',
                            str +=  '<td class="ttdd'+i+'" style="width: 90px;color: white">'+data[i].p_department+'</td>',
                            str +=  '<td class="ttdd'+i+'" style="width: 90px;color: white">'+data[i].p_tagid+'</td>',
                            str +=  '<td class="ttdd'+i+'" style="width: 90px;color: white">'+data[i].p_power+'</td>',
                            str +=  '<td class="ttdd'+i+'" style="width: 90px;color: white">'+data[i].p_online+'</td>',
                            str += '</tr>'
                    }
 
                }
                $("#gxrsj").empty();
                $("#gxrsj").append(str)
 
            }
        })
 
    }
</script>
</html>