zpf 1 год назад
Родитель
Сommit
1895ae3e15

+ 2 - 3
src/components/Combinations/toolBar/toolBar.vue

@@ -250,13 +250,12 @@ export default {
       this.show = !this.show;
     },
     choose(i) {
-      console.log('i: ', i);
       if (i == 11) {
         store.state.xzqh_flag = !store.state.xzqh_flag
         // 隐藏行政区划console.log();
-        cockpit.hidden_xzqh(!store.state.xzqh_flag);
+        cockpit.hidden_xzqh(store.state.xzqh_flag);
         // 隐藏墙体
-        cockpit.hidden_wall(!store.state.xzqh_flag);
+        cockpit.hidden_wall(store.state.xzqh_flag);
       } else {
         store.setToolBarAction(i);
 

+ 1 - 1
src/store/store.js

@@ -41,7 +41,7 @@ var store2 = {
         flattenNames: [],//存储压平的名称数组
         cockpit_date: null,
         viewer_flag: true,
-        xzqh_flag: false,
+        xzqh_flag: true,
         cockpit_wpjg: {
             title: {},
             echart: {}

+ 0 - 1
src/views/cockpit/tdsy.vue

@@ -870,7 +870,6 @@ export default {
 
     },
     switch_vector_tdgy_gy_jd(flag) {
-      console.log('flag: ', flag);
       this.gy_jd_entity.show = flag
     },
     async init_vector(params) {

+ 1 - 1
src/views/viewer.vue

@@ -196,7 +196,7 @@ export default {
                 if (!position) {
                     position = Cesium.Cartesian3.fromDegrees(0, 0, 0);
                 }
-                if (Cesium.defined(pickObj)) {
+                if (Cesium.defined(pickObj) && store.state.xzqh_flag) {
 
                     if (pickObj.primitive instanceof Cesium.Primitive && store.state.viewer_flag == true) {//点击primitive
                         //primitive相关操作