ソースを参照

行政区划状态

zpf 1 年間 前
コミット
0b9a8e8c35
3 ファイル変更54 行追加14 行削除
  1. 14 0
      src/store/store.js
  2. 5 4
      src/views/cockpitNew1/tdsc.vue
  3. 35 10
      src/views/viewer.vue

+ 14 - 0
src/store/store.js

@@ -44,6 +44,17 @@ var store2 = {
                 x: [],
                 bar: [],
             }
+        },
+        cockpit_tdsc: {
+            flag: true,
+            text: {
+                xzqhdm_number: 0,
+                zhmj: 0,
+            },
+            echart: {
+                x: [],
+                bar: [],
+            }
         }
     },
     setisInitViewer(newValue) {
@@ -157,6 +168,9 @@ var store2 = {
     setCockpitHysyText(newValue) {
         this.state.cockpit_hysy.text = newValue;
     },
+    setCockpitTdsc(newValue) {
+        this.state.cockpit_tdsc.flag = newValue;
+    },
 }
 
 

+ 5 - 4
src/views/cockpitNew1/tdsc.vue

@@ -4,8 +4,9 @@
       <div class="icon"></div>
       <span>土地收储</span>
     </div>
+    {{ !store.state.cockpit_tdsc.flag + "asdasdas" }}
     <!-- <div v-if="is_xzqh"> -->
-    <div v-if="false">
+    <div v-show="store.state.cockpit_tdsc.flag">
 
       <div class="content">
         <div class="icon_info">
@@ -32,7 +33,7 @@
       </div>
     </div>
 
-    <div>
+    <div v-show="!store.state.cockpit_tdsc.flag">
       <div class="content">
         <div class="icon_info">
 
@@ -69,7 +70,7 @@ export default {
   data() {
     return {
       is_xzqh: false,
-      
+
     };
   },
   //监听属性 类似于data概念
@@ -567,7 +568,7 @@ export default {
   },
   mounted() {
     this.$nextTick((res) => {
-      // this.initEchart();
+      this.initEchart();
       this.initEchartXzqh();
     })
 

+ 35 - 10
src/views/viewer.vue

@@ -44,10 +44,7 @@ export default {
     //方法集合
     methods: {
         switch() {
-            console.log("switch", "asdasd");
-
             this.flag = !this.flag;
-
         },
         deteChange(date) {
 
@@ -95,6 +92,11 @@ export default {
 
             console.log(address, "address");
         },
+        hysyq_xzqh() {
+            const that = this;
+            that.$refs.hysy_ref["label_data"]();
+            that.$refs.hysy_ref["echart_data"]();
+        },
         async pick_xzqh() {
             const that = this;
             const handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
@@ -112,18 +114,14 @@ export default {
                 let height = cartographic.height;
                 let heading = viewer.scene.camera.heading;
                 let pitch = viewer.scene.camera.pitch;
-                if (!pickObj)//未获取实体
-                    return false;
-                // console.log(longitude, latitude, height);
-                if (!pickObj) {
-                    return false;
-                }
+                // if (!pickObj)//未获取实体
+                //     return false;
+
 
                 if (!position) {
                     position = Cesium.Cartesian3.fromDegrees(0, 0, 0);
                 }
 
-
                 if (Cesium.defined(pickObj)) {
 
 
@@ -152,6 +150,9 @@ export default {
                             })
                             // 驾驶舱海域使用权
                             that.hysyq(address);
+                            // 驾驶舱土地收储
+                            that.tdsc_xzqh(address);
+
 
                         } else {
 
@@ -163,10 +164,34 @@ export default {
 
 
                 } else {
+                    // 暂时点击周围数据显示三亚市
+                    // 清除所有xzqh状态
+                    viewer.entities.values.forEach((res) => {
+
+                        // console.log(res.properties.name._value, "其他的");
+                        // console.log(res);
+                        res.polygon._material.color = Cesium.Color.fromCssColorString(that.xzqh_color)
+                        res.polygon.extrudedHeight = 450;
+
+                    })
+                    // 海域使用
+                    that.hysyq_xzqh();
+                    // 土地收储
+                    that.tdsc();
+
                 }
 
             }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
         },
+        tdsc() {
+            const that = this;
+            that.store.setCockpitTdsc(true);
+
+        },
+        tdsc_xzqh() {
+            const that = this;
+            that.store.setCockpitTdsc(false);
+        },
         init_xzqh() {
             const that = this;
             xzqh.features.forEach((res) => {