7.8
15832144755
2021-07-08 2080267e3245f0df9efc621c279922dc5ebb7c8e
src/main/webapp/hxzk/mapshow/mapShow.jsp
@@ -84,10 +84,34 @@
                  background: #009a8f;
                  color: #fff;
               }
               .popup {
                  width: 100vw;
                  height: 100vh;
                  background-color: rgba(0, 0, 0, .5);
                  position: fixed;
                  left: 0;
                  top: 0;
                  bottom: 0;
                  right: 0;
                  display: none;
                  justify-content: center;
                  align-items: center;
                  z-index: 9999;
               }
               .popup-content {
                  width: 640px;
                  height: 360px;
                  background-color: #fff;
                  box-sizing: border-box;
                  /*padding: 10px 30px;*/
                  color: black;
               }
            </style>
         </head>
         <body class="alt-menu sidebar-noneoverflow">
         <body class="alt-menu sidebar-noneoverflow" style="position: relative;">
            <!-- BEGIN LOADER -->
            <div id="load_screen">
@@ -111,13 +135,12 @@
               <button style="width: 80px;position: fixed;top: 50px;right: 130px;z-index: 9999;" type="button"
                  class="btn btn-secondary" id="stop">取消</button>
            </div> -->
            <div style="width: 300px;display:flex;justify-content: space-between; position: absolute;top: 50px;right: 130px;z-index: 9999;">
               <input style="width: 200px;" type="text"
                  id="tagidaaa" class="form-control" placeholder="请输入标签ID">
               <button style="width: 80px;" type="button"
                  class="btn btn-secondary" id="search">搜索</button>
               <button style="width: 80px;" type="button"
                  class="btn btn-secondary" id="stop">取消</button>
            <div
               style="width: 300px;display:flex;justify-content: space-between; position: absolute;top: 50px;right: 28px;z-index: 9999;">
               <input style="width: 200px;" type="text" id="tagidaaa" class="form-control" placeholder="请输入标签ID">
               <button style="width: 80px;" type="button" class="btn btn-secondary" id="search">搜索</button>
               <button style="width: 80px;" type="button" class="btn btn-secondary" id="stop">取消</button>
               <!-- <button type="button" onclick="showPopup()">弹窗</button> -->
            </div>
            <!--  BEGIN NAVBAR  -->
            <div class="login-page"></div>
@@ -173,6 +196,11 @@
                  </div>
               </div>
            </div>
            <div class="popup" id="popup" onclick="hidePopup(false)">
               <div class="popup-content" id="tanchuang">
                  <!-- <iframe src="http://192.168.1.100:10000/play.html?serial=34020000001320000003&code=34020000001310000002&aspect=fullscreen" width="640" height="360" allowfullscreen allow="autoplay; fullscreen"></iframe> -->
               </div>
            </div>
            <!--  END CONTENT PART  -->
            <!-- END MAIN CONTAINER -->
@@ -477,7 +505,7 @@
                     success: function (data) {
                        for (var i = 0; i < data.length; i++) {
                           //playMark[id,name,power,life,x,y,time]
                           realposition.push([data[i].tagid, data[i].name, data[i].power, data[i].life, data[i].posx, data[i].posy, data[i].time, data[i].fence == 1 || data[i].sos == 1, data[i].sousuo])
                           realposition.push([data[i].tagid, data[i].name, data[i].power, data[i].life, data[i].posx, data[i].posy, data[i].time, data[i].fence == 1 || data[i].sos == 1, data[i].sousuo, data[i].shipin])
                        }
                     },
                  });
@@ -686,6 +714,10 @@
                  new MarkPoints(index, fr, imgList, tml, ydl, fzbl, fcl, fnl, ftl, ail_on, ail_off, sysSetting, ttm);
               };
               var serial;
               var code;
               var isDelete = false;
               var shipinka = true;
               var tuodong = false;
               var sosType = [];
               var sousuoType = true;
@@ -947,6 +979,37 @@
                           for (var i = 0; i < _this.playMark.length; i++) {
                              //_this.trackNow = [];
                              var tagzhuangtai = _this.playMark[i][3]; //在线状态
                              var shipinzhuangtai = _this.playMark[i][9];
                              if (shipinka) {
                                 if (shipinzhuangtai == "1") {
                                    $.ajax({
                                       async: false,
                                       url: "/hxzkoa/shipinzhuangtai.do",
                                       type: 'POST',
                                       dataType: 'JSON',
                                       data: {
                                          tagid: _this.playMark[i][0],
                                       },
                                       success: function(data){
                                          // console.log(data[0].shebeiid)
                                          serial = data[0].shebeiid;
                                          // console.log(data[0].tongdaoid)
                                          code = data[0].tongdaoid;
                                       }
                                    });
                                    document.getElementById("popup").style.display = "flex";
                                    // serial = "34020000001320000003";
                                    // code = "34020000001310000002";
                                    var tanchuang = document.getElementById("tanchuang")
                                    var rr = document.createElement("iframe")
                                    rr.src = "http://192.168.1.100:10000/play.html?serial=" + serial + "&code=" + code + "&aspect=fullscreen";
                                    rr.width = "640";
                                    rr.height = "360";
                                    rr.allowFullscreen = "true";
                                    var object = tanchuang.appendChild(rr);
                                    shipinka = false;
                                 }
                              }
                              //var playMarkInKaoQin = true;
                              if (((_this.offView == '1' && tagzhuangtai == '1') || (_this.offView == '0')) && ((_this.diskaoqin == "1" && _this.playMarkInKaoQin[i]) || (_this.diskaoqin == "0"))) {
                                 //是否开启离线消失,并判断状态(在线1/离线0);当开启离线消失时(仅显示在线标签),当未开启离线消失时(全部显示)
@@ -1006,8 +1069,8 @@
                                 } else {
                                    _this.trackNow = [];
                                 }
                                 var isSos = _this.playMark[i][_this.playMark[i].length - 2];
                                 if (_this.playMark[i][_this.playMark[i].length - 1] == "1") {
                                 var isSos = _this.playMark[i][7];
                                 if (_this.playMark[i][8] == "1") {
                                    if (sousuoType) {
                                       can.drawImage(images[key], 0, 0, images[key].naturalWidth, images[key].naturalHeight, x_cor_now - (images[key].naturalWidth * _this.imgScaleList[key] * _this.rateNumList[key]) / 2, y_cor_now - (images[key].naturalHeight * _this.imgScaleList[key] * _this.rateNumList[key]), images[key].naturalWidth * _this.imgScaleList[key] * _this.rateNumList[key], images[key].naturalHeight * _this.imgScaleList[key] * _this.rateNumList[key]);
                                    } else {
@@ -1077,16 +1140,16 @@
                                 var cor_y = new Number(_this.onlineAnchorList[i][2]);
                                 var x_cor = new Number(_this.imgXList['map'] + _this.imgScaleList['map'] * _this.rateNumList['map'] * _this.x_ratio * (cor_x - _this.x_x0));
                                 var y_cor = new Number(_this.imgYList['map'] + _this.imgScaleList['map'] * _this.rateNumList['map'] * _this.y_ratio * (cor_y - _this.y_y0));
                                 can.drawImage(images[key], 0, 0, images[key].naturalWidth, images[key].naturalHeight, x_cor - (images[key].naturalWidth * _this.imgScaleList[key] * _this.rateNumList[key]) / 2, y_cor - (images[key].naturalHeight * _this.imgScaleList[key] * _this.rateNumList[key]), images[key].naturalWidth * _this.imgScaleList[key] * _this.rateNumList[key] + 10, images[key].naturalHeight * _this.imgScaleList[key] * _this.rateNumList[key] + 10);
                                 can.drawImage(images[key], 0, 0, images[key].naturalWidth, images[key].naturalHeight, x_cor - (images[key].naturalWidth * _this.imgScaleList[key] * _this.rateNumList[key]) / 2, y_cor - (images[key].naturalHeight * _this.imgScaleList[key] * _this.rateNumList[key]), images[key].naturalWidth, images[key].naturalHeight);
                                 if (_this.viewAnckzb == '1') { //是否显示基站坐标
                                    can.fillStyle = 'red'
                                    var anchorzuobiao = _this.onlineAnchorList[i][1] + ',' + _this.onlineAnchorList[i][2] + ',' + _this.onlineAnchorList[i][3];
                                    can.fillText(anchorzuobiao, x_cor - 20, y_cor + 20);
                                    can.fillText(anchorzuobiao, x_cor - 15, y_cor + 30);
                                 };
                                 if (_this.viewAnckid == '1') { //是否显示基站id
                                    can.fillStyle = 'red';
                                    var tigidd = _this.onlineAnchorList[i][0];
                                    can.fillText(tigidd, x_cor - 7, y_cor - (images[key].naturalHeight * _this.imgScaleList[key] * _this.rateNumList[key] + 10) / 2);
                                    can.fillText(tigidd, x_cor - 2, y_cor - (images[key].naturalHeight * _this.imgScaleList[key] * _this.rateNumList[key] + 10) / 2);
                                 };
                              };
                           };
@@ -1099,15 +1162,15 @@
                                 var cor_y = new Number(_this.offlineAnchorList[i][2]);
                                 var x_cor = new Number(_this.imgXList['map'] + _this.imgScaleList['map'] * _this.rateNumList['map'] * _this.x_ratio * (cor_x - _this.x_x0));
                                 var y_cor = new Number(_this.imgYList['map'] + _this.imgScaleList['map'] * _this.rateNumList['map'] * _this.y_ratio * (cor_y - _this.y_y0));
                                 can.drawImage(images[key], 0, 0, images[key].naturalWidth, images[key].naturalHeight, x_cor - (images[key].naturalWidth * _this.imgScaleList[key] * _this.rateNumList[key]) / 2, y_cor - (images[key].naturalHeight * _this.imgScaleList[key] * _this.rateNumList[key]), images[key].naturalWidth * _this.imgScaleList[key] * _this.rateNumList[key] + 10, images[key].naturalHeight * _this.imgScaleList[key] * _this.rateNumList[key] + 10);
                                 can.drawImage(images[key], 0, 0, images[key].naturalWidth, images[key].naturalHeight, x_cor - (images[key].naturalWidth * _this.imgScaleList[key] * _this.rateNumList[key]) / 2, y_cor - (images[key].naturalHeight * _this.imgScaleList[key] * _this.rateNumList[key]), images[key].naturalWidth, images[key].naturalHeight);
                                 if (_this.viewAnckzb == '1') { //是否显示基站坐标
                                    can.fillStyle = 'red'
                                    var anchorzuobiao = _this.offlineAnchorList[i][1] + ',' + _this.offlineAnchorList[i][2] + ',' + _this.offlineAnchorList[i][3];
                                    can.fillText(anchorzuobiao, x_cor - 20, y_cor + 20);
                                    can.fillText(anchorzuobiao, x_cor - 15, y_cor + 30);
                                 };
                                 if (_this.viewAnckid == '1') { //是否显示基站id
                                    can.fillStyle = 'red';
                                    can.fillText(_this.offlineAnchorList[i][0], x_cor - 7, y_cor - (images[key].naturalHeight * _this.imgScaleList[key] * _this.rateNumList[key] + 10) / 2);
                                    can.fillText(_this.offlineAnchorList[i][0], x_cor - 2, y_cor - (images[key].naturalHeight * _this.imgScaleList[key] * _this.rateNumList[key] + 10) / 2);
                                 };
                              };
                           };
@@ -1567,6 +1630,15 @@
                  document.getElementById("search").style.display = '';
                  document.getElementById("stop").style.display = 'none';
               });
               function hidePopup(x, e) {
                  if (e != undefined) {
                     e.cancelBubble = true;
                  }
                  document.getElementById("popup").style.display = "none";
                  isDelete = x;
                  shipinka = true;
                  document.getElementById("tanchuang").innerHTML = "";
               }
            </script>
            <!-- 结束调用室内定位地图功能 -->
            <!-- > END PAGE FUNCTION SCRIPTS -->