彭宇 пре 2 година
родитељ
комит
f089ce0540
1 измењених фајлова са 43 додато и 6 уклоњено
  1. 43 6
      src/views/monitor.vue

+ 43 - 6
src/views/monitor.vue

@@ -35,7 +35,7 @@
                   <div class="icon icon-dot"></div>
                   <div class="icon-text">
                     <h6>{{ loudspeakerNum }}</h6>
-                    <h5>大喇叭</h5>
+                    <h5>云广播</h5>
                   </div>
                 </div>
               </div>
@@ -288,7 +288,7 @@
       }
     },
     methods: {
-      jump() { // 跳转大喇叭页面
+      jump() { // 跳转云广播页面
         window.open("https://sts.sty1818.com");
       },
       chuanSet() {
@@ -711,7 +711,7 @@
         this.onShe = false
         this.onChuan = false
         this.localMark = 'la'
-        this.placeholderMsg = "请输入大喇叭名称"
+        this.placeholderMsg = "请输入云广播名称"
         this.deptId = Cookies.get("deptId")
         this.getDlblistBydeptId()
       },
@@ -733,7 +733,7 @@
           that.sensorNum = res.data.length
         })
       },
-      // 大喇叭
+      // 云广播
       getDlblistBydeptId() {
         let that = this;
         let markersList = [];
@@ -754,7 +754,44 @@
                   lng: 124.59,
                   lat: 43.02,
                   icon: "marker",
-                  bindPopupHtml: "",
+                  bindPopupHtml: '<div class="map-tip">' +
+                    "<span>" +
+                    '                  <div class="d-l-con">' +
+                    '                  <div class="d-l-l-text">' +
+                    "                  <h4>名称:" +
+                    (res.data[i].name ? res.data[i].name : "") +
+                    "</h4>" +
+                    "                </div>" +
+                    "                </div>" +
+                    "                </span>" +
+                    "<span>" +
+                    '                  <div class="d-l-con">' +
+                    '                  <div class="d-l-l-text">' +
+                    "                  <h4>位置:" +
+                    (res.data[i].position ? res.data[i].position : "") +
+                    "</h4>" +
+                    "                </div>" +
+                    "                </div>" +
+                    "                </span>" +
+                    "<span>" +
+                    '                  <div class="d-l-con">' +
+                    '                  <div class="d-l-l-text">' +
+                    "                  <h4>备注:" +
+                    (res.data[i].remark ? res.data[i].remark : "") +
+                    "</h4>" +
+                    "                </div>" +
+                    "                </div>" +
+                    "                </span>" +
+                    "<span>" +
+                    '                  <div class="d-l-con">' +
+                    '                  <div class="d-l-l-text">' +
+                    "                  <h4>经纬度:" +
+                    res.data[i].longitude + "," + res.data[i].latitude +
+                    "</h4>" +
+                    "                </div>" +
+                    "                </div>" +
+                    "                </span>" +
+                    "</div>",
                   click: 'jump',
                   parameter: "",
                   name: "",
@@ -1439,4 +1476,4 @@
     height: 600px;
     border: 1px solid red;
   }
-</style>
+</style>