王通 1 год назад
Родитель
Сommit
305549407c
2 измененных файлов с 246 добавлено и 950 удалено
  1. 67 63
      src/views/eventdetailsdialog.vue
  2. 179 887
      src/views/firespread.vue

+ 67 - 63
src/views/eventdetailsdialog.vue

@@ -3657,37 +3657,39 @@ export default {
         markersMapList.push(markersMap);
         if (res.data.centermonitorTCamera != null) {
           that.cameraCode = res.data.centermonitorTCamera.id;
-          let markersMap = {
-            lng: 124.59,
-            lat: 43.02,
-            icon: "camera",
-            bindPopupHtml: "",
-            click: "preview",
-            parameter: {
-              code: res.data.centermonitorTCamera.cameraCode,
-              type: res.data.centermonitorTCamera.cameraFactory,
-              name: res.data.centermonitorTCamera.cameraName,
-            },
-            keepBindPopup: false,
-            isAggregation: true,
-            radius: 0,
-          };
-          markersMap.bindPopupHtml =
-            '<div class="map-tip">' +
-            "<span>" +
-            '                  <div class="d-l-con">' +
-            '                  <div class="d-l-l-text">' +
-            "                  <h4>摄像头名称:" +
-            res.data.centermonitorTCamera.cameraName +
-            "</h4>" +
-            "                </div>" +
-            "                </div>" +
-            "                </span>" +
-            "<span>" +
-            "</div>";
-          markersMap.lng = res.data.centermonitorTCamera.longitude;
-          markersMap.lat = res.data.centermonitorTCamera.latitude;
-          markersMapList.push(markersMap);
+          if(res.data.centermonitorTCamera.longitude != null && res.data.centermonitorTCamera.latitude != null){
+            let markersMap = {
+              lng: 124.59,
+              lat: 43.02,
+              icon: "camera",
+              bindPopupHtml: "",
+              click: "preview",
+              parameter: {
+                code: res.data.centermonitorTCamera.cameraCode,
+                type: res.data.centermonitorTCamera.cameraFactory,
+                name: res.data.centermonitorTCamera.cameraName,
+              },
+              keepBindPopup: false,
+              isAggregation: true,
+              radius: 0,
+            };
+            markersMap.bindPopupHtml =
+              '<div class="map-tip">' +
+              "<span>" +
+              '                  <div class="d-l-con">' +
+              '                  <div class="d-l-l-text">' +
+              "                  <h4>摄像头名称:" +
+              res.data.centermonitorTCamera.cameraName +
+              "</h4>" +
+              "                </div>" +
+              "                </div>" +
+              "                </span>" +
+              "<span>" +
+              "</div>";
+            markersMap.lng = res.data.centermonitorTCamera.longitude;
+            markersMap.lat = res.data.centermonitorTCamera.latitude;
+            markersMapList.push(markersMap);
+          }
         }
         setTimeout(() => {
           that.$refs.supermapDialog.dynamicPlotting(); //弹出动态绘制窗口,防止截图位置改变
@@ -3778,38 +3780,40 @@ export default {
 
         markersMapList.push(markersMap);
         if (res.data.centermonitorTCamera != null) {
-          let markersMap = {
-            lng: 124.59,
-            lat: 43.02,
-            icon: "camera",
-            bindPopupHtml: "",
-            click: "preview",
-            parameter: {
-              code: res.data.centermonitorTCamera.cameraCode,
-              type: res.data.centermonitorTCamera.cameraFactory,
-              name: res.data.centermonitorTCamera.cameraName,
-            },
-            keepBindPopup: false,
-            isAggregation: true,
-            radius: 0,
-          };
-          markersMap.bindPopupHtml =
-            '<div class="map-tip">' +
-            "<span>" +
-            '                  <div class="d-l-con">' +
-            '                  <div class="d-l-l-text">' +
-            "                  <h4>摄像头名称:" +
-            res.data.centermonitorTCamera.cameraName +
-            "</h4>" +
-            "                </div>" +
-            "                </div>" +
-            "                </span>" +
-            "<span>" +
-            "</div>";
-          markersMap.lng = res.data.centermonitorTCamera.longitude;
-          markersMap.lat = res.data.centermonitorTCamera.latitude;
-
-          markersMapList.push(markersMap);
+          that.cameraCode = res.data.centermonitorTCamera.id;
+          if(res.data.centermonitorTCamera.longitude != null && res.data.centermonitorTCamera.latitude != null){
+            let markersMap = {
+              lng: 124.59,
+              lat: 43.02,
+              icon: "camera",
+              bindPopupHtml: "",
+              click: "preview",
+              parameter: {
+                code: res.data.centermonitorTCamera.cameraCode,
+                type: res.data.centermonitorTCamera.cameraFactory,
+                name: res.data.centermonitorTCamera.cameraName,
+              },
+              keepBindPopup: false,
+              isAggregation: true,
+              radius: 0,
+            };
+            markersMap.bindPopupHtml =
+              '<div class="map-tip">' +
+              "<span>" +
+              '                  <div class="d-l-con">' +
+              '                  <div class="d-l-l-text">' +
+              "                  <h4>摄像头名称:" +
+              res.data.centermonitorTCamera.cameraName +
+              "</h4>" +
+              "                </div>" +
+              "                </div>" +
+              "                </span>" +
+              "<span>" +
+              "</div>";
+            markersMap.lng = res.data.centermonitorTCamera.longitude;
+            markersMap.lat = res.data.centermonitorTCamera.latitude;
+            markersMapList.push(markersMap);
+          }
         }
         setTimeout(() => {
           that.$refs.supermapDialog.clearM(false);

Разница между файлами не показана из-за своего большого размера
+ 179 - 887
src/views/firespread.vue