tml 6 luni în urmă
părinte
comite
e2991fd742
1 a modificat fișierele cu 42 adăugiri și 39 ștergeri
  1. 42 39
      nngkxxdp/src/main/resources/static/naxsb/ztcrdetail.html

+ 42 - 39
nngkxxdp/src/main/resources/static/naxsb/ztcrdetail.html

@@ -173,7 +173,7 @@
         }
 
         .iconzbxq {
-            width: auto;
+            width: 145px;
             height: 37px;
             line-height: 37px;
             background: transparent;
@@ -189,6 +189,7 @@
             word-break: break-all;
             white-space: nowrap;
             text-overflow: ellipsis;
+            margin-top: 10px;
         }
 
 
@@ -295,7 +296,7 @@
                                 {{item}}</div>
                         </div>
                     </div>
-                    <div>
+                    <div style="flex-wrap: wrap;">
                         <div class="iconzbxq" v-for="(item,index) in zbptlist"
                             @click="showPoint(item.complementPoint.split(',')[0],item.complementPoint.split(',')[1],item.complementName)"
                             v-if="item.complementPoint" :title="item.complementName">
@@ -384,44 +385,46 @@
                 var that = this;
                 if (!that.allZbList.length) return
                 that.allZbList.forEach(function (item) {
-                    let arr = item.complementPoint.split(',');
-                    let p = new BMap.Point(arr[0], arr[1]);
-                    var myIcon = new BMap.Icon("images/addrzb.png", new BMap.Size(23, 25), {
-                        offset: new BMap.Size(10, 25), // 指定定位位置
-                    });
-                    let marker = new BMap.Marker(p, { icon: myIcon });
-                    marker.id = "zbId";
-                    that.map.addOverlay(marker);
-                    var opts = {
-                        position: new BMap.Point(arr[0], arr[1]), // 指定文本标签所在的地理位置
-                        offset: new BMap.Size(10, 10) // 设置文本偏移量
-                    };
-                    // 创建文本标签对象,并添加到地图
-                    var label = new BMap.Label(item.complementName, opts);
-                    // 自定义文本标签样式
-                    label.setStyle({
-                        color: "#186FF0",
-                        fontSize: "16px",
-                        height: "auto",
-                        lineHeight: "20px",
-                        fontFamily: "微软雅黑",
-                        fontWeight: 'bold',
-                        backgroundColor: 'transparent',
-                        border: 'none',
-                        // textShadow: '0 0 4px #4B97F5',
-                        // textStrokeColor: "#4B97F5", // 文本描边颜色
-                        // textStrokeWidth: "4px", // 文本描边宽度
-                    });
-                    marker.setLabel(label);
-                    label.setStyle({ display: "none" });
-                    marker.addEventListener("mouseover", function (e) {
-                        var label = this.getLabel()
-                        label.setStyle({ display: "block" });
-                    });
-                    marker.addEventListener("mouseout", function (e) {
-                        var label = this.getLabel()
+                    if (item.complementPoint) {
+                        let arr = item.complementPoint.split(',');
+                        let p = new BMap.Point(arr[0], arr[1]);
+                        var myIcon = new BMap.Icon("images/addrzb.png", new BMap.Size(23, 25), {
+                            offset: new BMap.Size(10, 25), // 指定定位位置
+                        });
+                        let marker = new BMap.Marker(p, { icon: myIcon });
+                        marker.id = "zbId";
+                        that.map.addOverlay(marker);
+                        var opts = {
+                            position: new BMap.Point(arr[0], arr[1]), // 指定文本标签所在的地理位置
+                            offset: new BMap.Size(10, 10) // 设置文本偏移量
+                        };
+                        // 创建文本标签对象,并添加到地图
+                        var label = new BMap.Label(item.complementName, opts);
+                        // 自定义文本标签样式
+                        label.setStyle({
+                            color: "#186FF0",
+                            fontSize: "16px",
+                            height: "auto",
+                            lineHeight: "20px",
+                            fontFamily: "微软雅黑",
+                            fontWeight: 'bold',
+                            backgroundColor: 'transparent',
+                            border: 'none',
+                            // textShadow: '0 0 4px #4B97F5',
+                            // textStrokeColor: "#4B97F5", // 文本描边颜色
+                            // textStrokeWidth: "4px", // 文本描边宽度
+                        });
+                        marker.setLabel(label);
                         label.setStyle({ display: "none" });
-                    });
+                        marker.addEventListener("mouseover", function (e) {
+                            var label = this.getLabel()
+                            label.setStyle({ display: "block" });
+                        });
+                        marker.addEventListener("mouseout", function (e) {
+                            var label = this.getLabel()
+                            label.setStyle({ display: "none" });
+                        });
+                    }
                 });
             },
             showZblist(name) {