Browse Source

粤政图 关闭取消选中

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

+ 18 - 0
src/components/Map/YztMap/index.vue

@@ -26,6 +26,7 @@ import { getPointInfoList } from '@/api/globalMap';
 import { getDictLabel } from '@/utils/dict';
 import { methodList, titleList } from '../data';
 import { pointDetailTemplate } from '@/views/globalMap/data/mapData';
+import useAppStore from '@/store/modules/app';
 
 interface Props {
   activeMap: string;
@@ -36,6 +37,7 @@ const containerScale = inject('containerScale');
 const props = withDefaults(defineProps<Props>(), {});
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 const { point_type } = toRefs<any>(proxy?.useDict('point_type'));
+const appStore = useAppStore();
 const emits = defineEmits(['update:drawing', 'update:showMask', 'selectGraphics', 'handleShowWarehouse', 'handleShowVideo', 'handleShowPeople']);
 
 const mapRef = ref(null);
@@ -64,6 +66,22 @@ watch(
     }
   }
 );
+watch(
+  () => appStore.showLeftSection,
+  () => {
+    nextTick(() => {
+      handleResize();
+    });
+  }
+);
+watch(
+  () => appStore.showRightSection,
+  () => {
+    nextTick(() => {
+      handleResize();
+    });
+  }
+);
 const mapList = reactive({
   satellite2: ['YZT1715739306532', 'YZT1695608158269'],
   satellite3: ['YZT1708679726700', 'YZT1695608158269'],

+ 1 - 1
src/utils/olMap/olMap.ts

@@ -434,7 +434,7 @@ export class olMap {
     this.map.removeOverlay(this.infoWindow);
     this.infoWindow = null;
     if (!!flag && this.select) {
-      this.select.clear();
+      this.select.getFeatures().clear();
     }
   }
   /**

+ 1 - 1
src/views/globalMap/index.vue

@@ -73,7 +73,7 @@ let map2Ref = ref(null);
 let leftMenuRef = ref(null);
 let showMask = ref(true);
 //  vectorgraph satellite imageMap imageMap3 logical satellite2 satellite3
-let activeMap = ref('imageMap');
+let activeMap = ref('satellite');
 // 附近视频菜单数据
 let tempMenu = ref({
   name: '',