Skip to content
therefloor.jsp 12.3 KiB
Newer Older
beilang's avatar
beilang committed
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../base.jsp" %>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>三号楼</title>
</head>
<style type="text/css">
    .content {
        background: url('${ctx}/static/images/bg.jpg') center center no-repeat;
        width: 100%;
        height: 100%;
        /*  background-position-x: center; */
        background-size: cover;
    }
</style>
<body>
<div class="content">
    <div class="content_top"></div>
    <div class=" padding_box2 clearfix">
        <div class="menu_box">
            <div class="menu_title_box"><a class="menu_name" href="${ctx}/nh">三号楼</a></div>
            <div class="tab_list">
                <ul>
                    <li class="current">
                        <div class="flex-box">
                            <p class="tabName">一楼</p>
                            <p class="monitor">监控点<span>50</span></p>
                        </div>
                    </li>
                    <li>
                        <div class="flex-box">
                            <p class="tabName">二楼</p>
                            <p class="monitor">监控点<span>46</span></p>
                        </div>
                    </li>
                    <li>
                        <div class="flex-box">
                            <p class="tabName">三楼</p>
                            <p class="monitor">监控点<span>10</span></p>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <div class="content_box">
            <div class="room_box">

            </div>
        </div>
    </div>
</div>

<script>

    let dataList = {
        'arr1': [
            // 左外墙1
            { top: '3.65%', left: '3.90%' , gbid: '31011500001320002431'},
            { top: '17.41%', left: '3.12%' , gbid: '31011500001320002425'},
            { top: '38.64%', left: '3.12%' , gbid: '31011500001320002432'},
            { top: '60.20%', left: '3.12%' , gbid: '31011500001320002426'},
            { top: '77.78%', left: '3.12%' , gbid: '31011500001320002433'},
            { top: '92.04%', left: '3.34%' , gbid: '31011500001320002429'},
            // 浴室左1
            { top: '19.73%', left: '9.70%' , gbid: '31011500001320002439'},
            { top: '34.83%', left: '9.70%' , gbid: '31011500001320002407'},
            { top: '61.69%', left: '9.70%' , gbid: '31011500001320002436'},
            // 中上后隔离门
            { top: '1.66%', left: '29.32%' , gbid: '31011500001320002405'},
            // 中上后楼梯口
            { top: '1.66%', left: '70.79%' , gbid: '31011500001320002401'},
            // 中左1卫
            { top: '16.42%', left: '15.94%' , gbid: '31011500001320002416'},
            { top: '29.19%', left: '15.94%' , gbid: '31011500001320002414'},
            { top: '43.38%', left: '15.94%' , gbid: '31011500001320002412'},
            { top: '57.88%', left: '15.94%' , gbid: '31011500001320002410'},
            { top: '72.31%', left: '15.94%' , gbid: '31011500001320002408'},
            // 中左1监舍
            { top: '18.08%', left:'28.87%' , gbid: '31011500001320002417'},
            { top: '32.34%', left: '28.87%' , gbid: '31011500001320002415'},
            { top: '46.60%', left: '28.87%' , gbid: '31011500001320002413'},
            { top: '60.70%', left: '28.87%' , gbid: '31011500001320002411'},
            { top: '73.80%', left: '28.87%' , gbid: '31011500001320002409'},
            // 左中下
            { top: '86.40%', left:'19.40%' , gbid: '31011500001320002403'},
            { top: '90.71%', left: '33.22%' , gbid: '31011500001320002387'},
            // 中
            { top: '17.74%', left: '46.38%' , gbid: '31011500001320002393'},
            { top: '78.44%', left: '46.49%' , gbid: '31011500001320002406'},
            { top: '94.03%', left: '47.05%' , gbid: '31011500001320002388'},
            // 右中1监舍
            { top: '18.08%', left: '63.43%' , gbid: '31011500001320002419'},
            { top: '30.51%', left: '63.43%' , gbid: '31011500001320002423'},
            { top: '45.27%', left: '63.43%' , gbid: '31011500001320002438'},
            // 右中1学习
            { top: '60.20%', left: '64.77%' , gbid: '31011500001320002391'},
            { top: '73.96%', left: '64.77%' , gbid: '31011500001320002389'},
            // 右中1卫
            { top: '16.75%', left: '69.68%' , gbid: '31011500001320002418'},
            { top: '29.19%', left: '69.68%' , gbid: '31011500001320002422'},
            { top: '43.78%', left: '69.68%' , gbid: '31011500001320002437'},
            // 右中2监舍
            { top: '18.08%', left: '77.03%' , gbid: '31011500001320002421'},
            { top: '45.27%', left: '77.03%' , gbid: '31011500001320002404'},
            // 右中2学习
            { top: '60.20%', left: '78.48%' , gbid: '31011500001320002392'},
            { top: '73.96%', left: '78.48%' , gbid: '31011500001320002390'},
            // 右中2卫
            { top: '16.75%', left: '82.94%' , gbid: '31011500001320002420'},
            { top: '29.19%', left: '82.94%' , gbid: '31011500001320002424'},
            // 右中下
            { top: '90.71%', left:'68.23%' , gbid: '31011500001320002386'},
            // 右边
            { top: '3.48%', left: '89.30%' , gbid: '31011500001320002430'},
            { top: '9.78%', left: '89.30%' , gbid: '31011500001320002441'},
            { top: '15.92%', left: '89.30%' , gbid: '31011500001320002442'},
            { top: '22.06%', left: '89.30%' , gbid: '31011500001320002443'},
            { top: '39.97%', left:'88.65%' , gbid: '31011500001320002435'},
            { top: '53.90%', left: '96.88%' , gbid: '31011500001320002434'},
            { top: '67.33%', left: '88.65%' , gbid: '31011500001320002440'},
            { top: '84.91%', left: '88.74%' , gbid: '31011500001320002428'},
            { top: '92.54%', left: '88.74%' , gbid: '31011500001320002427'}
        ],
        'arr2': [
            // 左外墙1
            // { top: '44.61%', left: '3.34%' },
            // 浴室左1
            { top: '19.73%', left: '9.70%' , gbid: '31011500001320002497'},
            { top: '34.83%', left: '9.70%' , gbid: '31011500001320002449'},
            // 中上后隔离门
            { top: '1.66%', left: '29.32%' , gbid: '31011500001320002463'},
            // 中上后封门
            // { top: '9.29%', left: '45.04%' },
            // 中上后楼梯口
            { top: '1.66%', left: '70.79%' , gbid: '31011500001320002462'},
            // 中左1卫
            { top: '16.42%', left: '15.94%' , gbid: '31011500001320002481'},
            { top: '29.19%', left: '15.94%' , gbid: '31011500001320002478'},
            { top: '57.88%', left: '15.94%' , gbid: '31011500001320002471'},
            { top: '72.31%', left: '15.94%' , gbid: '31011500001320002467'},
            // 中左1监舍
            { top: '18.08%', left: '22.30%' , gbid: '31011500001320002482'},
            { top: '30.51%', left: '22.30%' , gbid: '31011500001320002479'},
            { top: '45.11%', left: '22.30%' , gbid: '31011500001320002475'},
            { top: '59.37%', left: '22.30%' , gbid: '31011500001320002472'},
            { top: '73.96%', left: '22.30%' , gbid: '31011500001320002468'},
            // 中左2卫
            { top: '29.19%', left: '29.80%' , gbid: '31011500001320002476'},
            { top: '43.38%', left: '29.80%' , gbid: '31011500001320002473'},
            { top: '57.88%', left: '29.80%' , gbid: '31011500001320002469'},
            { top: '72.31%', left: '29.80%' , gbid: '31011500001320002465'},
            // 中左1监舍
            { top: '18.08%', left: '35.80%' , gbid: '31011500001320002480'},
            { top: '30.51%', left: '35.80%' , gbid: '31011500001320002477'},
            { top: '45.11%', left: '35.80%' , gbid: '31011500001320002474'},
            { top: '59.37%', left: '35.80%' , gbid: '31011500001320002470'},
            { top: '73.96%', left: '35.80%' , gbid: '31011500001320002466'},
            // 左中下室值岗
            { top: '93.86%', left: '25.31%' , gbid: '31011500001320002464'},
            // 中
            { top: '78.44%', left: '46.49%' , gbid: '31011500001320002446'},
            { top: '87.23%', left: '45.26%' , gbid: '31011500001320002447'},
            // 右中1监舍
            { top: '18.08%', left: '63.43%' , gbid: '31011500001320002484'},
            { top: '30.51%', left: '63.43%' , gbid: '31011500001320002490'},
            { top: '45.27%', left: '63.43%' , gbid: '31011500001320002494'},
            // 右中1学习
            { top: '60.20%', left: '64.77%' , gbid: '31011500001320002452'},
            { top: '73.96%', left: '64.77%' , gbid: '31011500001320002450'},
            // 右中1卫
            { top: '16.75%', left: '69.68%' , gbid: '31011500001320002483'},
            { top: '29.19%', left: '69.68%' , gbid: '31011500001320002489'},
            { top: '43.78%', left: '69.68%' , gbid: '31011500001320002493'},
            // 右中2监舍
            { top: '18.08%', left: '77.03%' , gbid: '31011500001320002487'},
            { top: '30.51%', left: '77.03%' , gbid: '31011500001320002492'},
            { top: '45.27%', left: '77.03%' , gbid: '31011500001320002496'},
            // 右中2学习
            { top: '60.20%', left: '78.48%' , gbid: '31011500001320002453'},
            { top: '73.96%', left: '78.48%' , gbid: '31011500001320002450'},
            // 右中2卫
            { top: '16.75%', left: '82.94%' , gbid: '31011500001320002486'},
            { top: '43.78%', left: '82.94%' , gbid: '31011500001320002495'},
            // 右中下
            { top: '90.88%', left: '66.56%' , gbid: '31011500001320002445'},
            // 右边
            { top: '2.49%', left: '89.41%' , gbid: '31011500001320002499'},
            { top: '8.62%', left: '89.41%' , gbid: '31011500001320002500'},
            { top: '14.93%', left: '89.41%' , gbid: '31011500001320002501'},
            { top: '21.06%', left: '89.41%' , gbid: '31011500001320002502'},
            { top: '74.63%', left: '88.70%' , gbid: '31011500001320002498'},
        ],
        'arr3': [
            { top: '33.83%', left: '9.10%' , gbid: '31011500001320002508'},
            // 中
            { top: '71.48%', left: '44.37%' , gbid: '31011500001320002512'},
            { top: '78.44%', left: '46.49%' , gbid: '31011500001320002509'},
            { top: '87.23%', left: '45.26%' , gbid: '31011500001320002506'},
            { top: '94.03%', left: '47.05%' , gbid: '31011500001320002510'},
            // 右中1学习
            { top: '60.20%', left: '64.77%' , gbid: '31011500001320002504'},
            { top: '73.96%', left: '64.77%' , gbid: '31011500001320002507'},
            // 右中2学习
            { top: '60.20%', left: '78.48%' , gbid: '31011500001320002511'},
            { top: '73.96%', left: '78.48%' , gbid: '31011500001320002505'},
            // 右中下
            { top: '90.88%', left: '66.56%' , gbid: '31011500001320002503'},
        ]
    }

    let thisIndex = 1;

    $(function () {
        // 1、点击上面的li,当前点击的li添加current类,其余兄弟移除类
        $(".tab_list li").click(function () {
            // 链式编程  当前li添加类,其余兄弟移除类
            $(this).addClass('current').siblings().removeClass('current');
            // 2、拿到当前点击的索引号
            var index = $(this).index();
            // 3、下面index对应的模块显示,其余的item隐藏
            $(".tab_con .item").eq(index).show().siblings().hide();
            updateData(index + 1);
        })
        updateData(1);
    });

    function updateData(index) {
        thisIndex = index;
        //循环数组 打摄像头位置
        var divElement = document.querySelector('.room_box');
        let htmlTxt = '<img class="bg_img" src="${ctx}/static/images/floor3_' + index + '.png" alt="">'
        for (let i = 0; i < dataList[`arr${"${index}"}`].length; i++) {
            htmlTxt = htmlTxt + '<img class="camera" src="${ctx}/static/images/camera.png" ' + ' style="top:' + dataList[`arr${"${index}"}`][i].top + ";left:" + dataList[`arr${"${index}"}`][i].left + '" onclick="handleClick(' + i + ')"></img>'
        }
        divElement.innerHTML = htmlTxt;
    }

    function handleClick(i) {
        let gbId = dataList['arr' + thisIndex][i].gbid;
        VideoPlayer.show(gbId);
    }
</script>
</body>
</html>