浏览代码

打点调整

Hwf 1 月之前
父节点
当前提交
9786c48b83
共有 2 个文件被更改,包括 9 次插入11 次删除
  1. 8 10
      src/hooks/AMap/useAMap.ts
  2. 1 1
      src/views/globalMap/RightMenu/RoadNetworkVideo.vue

+ 8 - 10
src/hooks/AMap/useAMap.ts

@@ -15,7 +15,7 @@ export function useAMap(options) {
   let layers = [];
   let defaultLayer;
   // 标绘图层
-  let plotLayers = [];
+  const plotLayers = [];
   // 标绘层级
   let activeLayerkey;
   // 初始化事件
@@ -325,21 +325,19 @@ export function useAMap(options) {
     });
   };
   const getContent = (icon: string, size: number[], name?: string, color?: string = '#000') => {
-    const content =
-      '<div style="display: flex;flex-direction: column;align-items: center;justify-content: center">' +
+    let content =
+      '<div style="display: flex;flex-direction: column;align-items: center;justify-content: center;cursor: pointer">' +
       '<div style="background: url(' +
       icon +
       ') no-repeat; width: ' +
       size[0] +
       'px;height: ' +
       size[1] +
-      'px;cursor: pointer; background-size: cover"></div>' +
-      '<div style="font-size: 16px;white-space: nowrap; font-weight: bold;color:' +
-      color +
-      '">' +
-      name +
-      '</div>' +
-      '</div>';
+      'px;cursor: pointer; background-size: cover"></div>';
+    if (!!name) {
+      content += '<div style="font-size: 16px;white-space: nowrap; font-weight: bold;color:' + color + '">' + name + '</div>';
+    }
+    content += '</div>';
     return content;
   };
   // 清除所有标加

+ 1 - 1
src/views/globalMap/RightMenu/RoadNetworkVideo.vue

@@ -27,7 +27,7 @@
         <div class="td">
           <div style="width: 240px">
             <el-select
-              v-model="queryParams.area"
+              v-model="queryParams.query.area"
               placeholder="所有区县"
               size="large"
               class="custom-select2"