Browse Source

视频监控、地图调整

Hwf 6 tháng trước cách đây
mục cha
commit
6d8d762ef8

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

@@ -93,6 +93,8 @@ export function useAMap(options) {
       context.marker.setOffset(new AMap.Pixel(-size / 2, -size / 2));
       context.marker.setContent(div);
       context.marker.on('click', (e) => {
+        const bounds = e.target.getBounds();
+        map.setZoomAndCenter(map.getZoom() + 1, bounds.getCenter());
       });
     };
     const _renderMarker = function (context) {
@@ -239,12 +241,12 @@ export function useAMap(options) {
       ];
       options.forEach((option) => {
         const holes = result.districtList[0].boundaries;
-        if (option.offset) {
-
-          holes.forEach((items) => {
-
-          })
-        }
+        // if (option.offset) {
+        //
+        //   holes.forEach((items) => {
+        //
+        //   })
+        // }
         let pathArray = [outer];
         pathArray.push.apply(pathArray, holes);
         const polygon = new AMap.Polygon({

+ 1 - 1
src/views/emergencyCommandMap/LeftSection/VideoMonitor.vue

@@ -50,7 +50,7 @@
           <div v-for="(item, index) in editData" :key="index" class="box-item">
             <div class="edit-img">
               <span class="edit-title">{{ item.name }}</span>
-              <div class="close-btn" @click="deleteItem(index)">x</div>
+              <div class="close-btn" @click="deleteItem(index)"></div>
             </div>
           </div>
           <div class="flex" style="flex-direction: column; align-items: center">