Ver código fonte

[Fix 0000] 首页可配置首页请求传参错误问题

houzekong 1 mês atrás
pai
commit
b1f88e020b

+ 5 - 2
src/layouts/default/feature/SimpleMap.vue

@@ -260,8 +260,11 @@
         const { features } = map.getSourceData(source);
         const element = find(features, (e) => e.id === id)?.properties;
 
-        if (!element) return;
-        historyStack.value.push(element);
+        if (!element) {
+          historyStack.value = [DEFAULT_NODE];
+        } else {
+          historyStack.value.push(element);
+        }
         markerClickHandler();
       }
     }

+ 3 - 2
src/layouts/default/header/index.vue

@@ -173,8 +173,8 @@
       function setGlobDept(deptId: string) {
         mineStore.setDepartById(deptId);
         appStore.setSimpleMapParams({
-          deptId: mineStore.getDepartId,
-          isLeaf: mineStore.getDepart?.isLeaf,
+          deptId: mineStore.getDepartId || mineStore.getRootId,
+          isLeaf: mineStore.getDepart?.isLeaf || mineStore.getRoot?.isLeaf,
         });
       }
 
@@ -216,6 +216,7 @@
     align-items: center;
     position: relative;
     z-index: @layout-basic-z-index;
+    pointer-events: all;
 
     .headerIntroductionClass {
       margin-right: 4px;