sumyangyang 10 kuukautta sitten
vanhempi
commit
9db14b7acd
1 muutettua tiedostoa jossa 95 lisäystä ja 4 poistoa
  1. 95 4
      zhsq_qk-ui/src/views/supermap/supermap.vue

+ 95 - 4
zhsq_qk-ui/src/views/supermap/supermap.vue

@@ -269,7 +269,7 @@ export default {
         icon: icon
       });
       //定义泡泡层
-      marker.on('mouseover', function () {
+      marker.on('click', function () {
         let html = "";
         html += "<p class='v-p-color'>摄像头名称:" + option.cameraName + "</p>";
         html += "<p class='v-p-color'>摄像头类型:" + option.buildTypeName + "</p>";
@@ -277,9 +277,9 @@ export default {
         this.bindPopup(html).openPopup(this.getLatLng());
       });
       // /**鼠标移开关闭popup**/
-      marker.on('mouseout', function () {
-        this.closePopup();
-      });
+      // marker.on('mouseout', function () {
+      //   this.closePopup();
+      // });
 
       return marker;
     },
@@ -673,5 +673,96 @@ td {
 		}
 		.el-table__body-wrapper::-webkit-scrollbar-track {
 		  background-color: #294f76;
+		}
+		/* popup */
+		
+		.leaflet-popup {
+		    position: absolute;
+		    text-align: center;
+		    margin-bottom: 20px;
+		}
+		.leaflet-popup-content-wrapper {
+		    padding: 1px;
+		    text-align: left;
+		    border-radius: 12px;
+		}
+		.leaflet-popup-content {
+		    margin: 13px 19px;
+		    line-height: 1.4;
+		}
+		.leaflet-popup-content p {
+		    margin: 18px 0;
+			color: #fff;
+		}
+		.leaflet-popup-tip-container {
+		    width: 40px;
+		    height: 20px;
+		    position: absolute;
+		    left: 50%;
+		    margin-left: -20px;
+		    overflow: hidden;
+		    pointer-events: none;
+		}
+		.leaflet-popup-tip {
+		    width: 17px;
+		    height: 17px;
+		    padding: 1px;
+		
+		    margin: -10px auto 0;
+		
+		    -webkit-transform: rotate(45deg);
+		    -moz-transform: rotate(45deg);
+		    -ms-transform: rotate(45deg);
+		    transform: rotate(45deg);
+		}
+		.leaflet-popup-content-wrapper,
+		.leaflet-popup-tip {
+		    background: rgba(4, 45, 106, 0.7);
+		    color: #333;
+		    box-shadow: 0 3px 14px rgba(0,0,0,0.4);
+		}
+		.leaflet-container a.leaflet-popup-close-button {
+		    position: absolute;
+		    top: 0;
+		    right: 0;
+		    padding: 4px 4px 0 0;
+		    border: none;
+		    text-align: center;
+		    width: 18px;
+		    height: 14px;
+		    font: 16px/14px Tahoma, Verdana, sans-serif;
+		    color: #c3c3c3;
+		    text-decoration: none;
+		    font-weight: bold;
+		    background: transparent;
+		}
+		.leaflet-container a.leaflet-popup-close-button:hover {
+		    color: #999;
+		}
+		.leaflet-popup-scrolled {
+		    overflow: auto;
+		    border-bottom: 1px solid #ddd;
+		    border-top: 1px solid #ddd;
+		}
+		
+		.leaflet-oldie .leaflet-popup-content-wrapper {
+		    -ms-zoom: 1;
+		}
+		.leaflet-oldie .leaflet-popup-tip {
+		    width: 24px;
+		    margin: 0 auto;
+		
+		    -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
+		    filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
+		}
+		.leaflet-oldie .leaflet-popup-tip-container {
+		    margin-top: -1px;
+		}
+		
+		.leaflet-oldie .leaflet-control-zoom,
+		.leaflet-oldie .leaflet-control-layers,
+		.leaflet-oldie .leaflet-popup-content-wrapper,
+		.leaflet-oldie .leaflet-popup-tip {
+		    border: 1px solid #999;
 		}
 </style>