Эх сурвалжийг харах

Merge branch 'master' of http://114.244.114.158:8802/siwei/real3d-portalsite

maxiaoxiao 11 сар өмнө
parent
commit
4bf7cc2c97

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

@@ -1,7 +1,7 @@
 <template>
   <!-- 暂时隐藏工具栏 -->
   <!-- <div v-show="ToolBarShow"> -->
-    <div v-if="true">
+  <div v-if="true">
 
     <!-- <div class="resourceTree" @click="choose(0)"></div> -->
     <div class="toolBar">
@@ -46,6 +46,9 @@
       <li class="sm-btn sm-tool-btn" :title="Resource.sceneOptions" @click="choose(3)">
         <i class="el-icon-setting"></i>
       </li>
+      <li class="sm-btn sm-tool-btn" title="行政区划开关" @click="choose(11)">
+        <i class="el-icon-map-location"></i>
+      </li>
       <!-- </ul> -->
       <div style="display: none" class="sm-tool-btn" @click="toggleVisibility" :class="{ 'sm-tool-btn-only': !show }">
         <span class="iconfont" :class="!show
@@ -82,6 +85,8 @@
 import clickQuery from "../../Query/clickQuery/clickQuery.vue";
 import { GetXzqhTree, GetXzqhGeom } from "@/api/map";
 import Bookmark from "../../Bookmark/Bookmark.vue";
+import * as cockpit from "@/common/js/cockpit.js";
+
 export default {
   components: { clickQuery, Bookmark },
   name: "ToolBar",
@@ -245,7 +250,16 @@ export default {
       this.show = !this.show;
     },
     choose(i) {
-      store.setToolBarAction(i);
+      if (i == 11) {
+        store.state.xzqh_flag = !store.state.xzqh_flag
+        // 隐藏行政区划console.log();
+        cockpit.hidden_xzqh(store.state.xzqh_flag);
+        // 隐藏墙体
+        cockpit.hidden_wall(store.state.xzqh_flag);
+      } else {
+        store.setToolBarAction(i);
+
+      }
     },
   },
   watch: {

+ 1 - 0
src/store/store.js

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

+ 3 - 1
src/views/cockpit/common/DialWatch.vue

@@ -39,6 +39,7 @@
 
 <script>
 //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+import * as cockpit from "@/common/js/cockpit.js";
 
 export default {
     components: {},
@@ -84,7 +85,8 @@ export default {
     methods: {
         draw_vector() {
             this.icon_switch = !this.icon_switch
-            this.$emit('draw_vector',this.icon_switch)
+            this.$emit('draw_vector', this.icon_switch)
+
         },
         init_dial_watch(echart_data) {
             var myChart = echarts.init(this.$refs.dial_watch_scjg);

+ 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) {

+ 5 - 5
src/views/viewer.vue

@@ -82,10 +82,10 @@ export default {
             store.setToolBarShow(!store.state.viewer_flag);
             // store.setToolBarShow(true);
 
-            // 隐藏行政区划
-            cockpit.hidden_xzqh(store.state.viewer_flag);
-            // 隐藏墙体
-            cockpit.hidden_wall(store.state.viewer_flag);
+            // // 隐藏行政区划
+            // cockpit.hidden_xzqh(store.state.viewer_flag);
+            // // 隐藏墙体
+            // cockpit.hidden_wall(store.state.viewer_flag);
         },
         switch() {
             this.flag = !this.flag;
@@ -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相关操作