zpf пре 1 година
родитељ
комит
bebda877ec
3 измењених фајлова са 113 додато и 118 уклоњено
  1. 0 5
      src/router/index.js
  2. 27 86
      src/views/viewer.vue
  3. 86 27
      src/views/viewer旧版驾驶舱.vue

+ 0 - 5
src/router/index.js

@@ -47,11 +47,6 @@ export const constantRoutes = [{
         component: () =>
             import('@/views/viewer.vue'),
         hidden: true
-    }, {
-        path: '/viewer1',
-        component: () =>
-            import('@/views/viewer1.vue'),
-        hidden: true
     },
     {
         path: '/checkmodel',

+ 27 - 86
src/views/viewer.vue

@@ -10,12 +10,13 @@
                 <div class="bg_bottom"></div>
             </div>
             <datePicker @dateChange="dateChange"></datePicker>
-            <ser-center></ser-center>
-            <GKZB ref="gkzb_ref" />
+            <!-- <ser-center></ser-center> -->
+            <JSYD ref="gkzb_ref" />
+            <JCBD />
             <BJXM />
-            <TDSC />
+            <TDSC ref="tdsc_ref" />
             <HYSY ref="hysy_ref" />
-            <TDSY />
+            <TDSY ref="tdgy_ref"/>
             <GDBH ref="gdbh_ref" />
             <STXF ref="stxf_ref" />
             <WPJG ref="wpjg_ref" />
@@ -25,25 +26,25 @@
 
 <script>
 //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
-import serCenter from './cockpitNew1/serCenter';
-import GKZB from './cockpitNew1/gkzb';
-import TDSC from './cockpitNew1/tdsc';
-import HYSY from './cockpitNew1/hysy';
-import TDSY from './cockpitNew1/tdsy';
-import BJXM from './cockpitNew1/bjxm';
-import GDBH from './cockpitNew1/gdbh';
-import STXF from './cockpitNew1/stxf';
-import WPJG from './cockpitNew1/wpjg';
-import datePicker from './cockpitNew1/datePicker.vue';
+import JSYD from './cockpit/jsyd';
+import TDSC from './cockpit/tdsc';
+import HYSY from './cockpit/hysy';
+import TDSY from './cockpit/tdsy';
+import BJXM from './cockpit/bjxm';
+import GDBH from './cockpit/gdbh';
+import STXF from './cockpit/stxf';
+import WPJG from './cockpit/wpjg';
+import JCBD from './cockpit/jcbd';
+
+import datePicker from './cockpit/datePicker.vue';
 import xzqh from "../../static/data/460200_full.json";
 import hyqy from "../../static/data/460200_hyqy.json";
 
-import SerCenter from './cockpitNew1/serCenter.vue';
 
 import { cockpitInfo } from '@/api/cockpit'
 let manager = {};
 export default {
-    components: { serCenter, GKZB, BJXM, TDSC, HYSY, TDSY, GDBH, STXF, WPJG, datePicker, SerCenter },
+    components: { JSYD, BJXM, TDSC, HYSY, TDSY, GDBH, STXF, WPJG, datePicker, JCBD },
     data() {
         return {
             params: {
@@ -92,66 +93,20 @@ export default {
         },
         setDatas() {
             this.$refs.gdbh_ref.setData({ id: this.params.id });
-            this.$refs.stxf_ref.setData({ id: this.params.id });
+            // this.$refs.stxf_ref.setData({ id: this.params.id });
             this.$refs.wpjg_ref.setData(this.params);
+            this.$refs.tdsc_ref.init_scjd(this.params);
+            this.$refs.tdgy_ref.init_tdgy_gy_jd(this.params);
+            this.$refs.hysy_ref.init_info(this.params);
+
+            
+            
         },
         dateChange(date) {
             this.params.beginTime = date[0]
             this.params.endTime = date[1]
             this.setDatas()
         },
-        async hysyq(address) {
-            // 选中xzqh查询
-            let obj = {
-                beginTime: store.state.cockpit_date[0],
-                endTime: store.state.cockpit_date[1],
-                jscType: 'jsc_hysyq_ztsh',
-                id: address
-            };
-            let data = await cockpitInfo(obj);
-            console.log('data: ', data);
-
-            let obg_text = {
-                xzqhdm_number: data.data[0].xzqhdm_number,
-                zhmj: data.data[0].zhmj == undefined ? 0 : data.data[0].zhmj,
-
-            }
-            obg_text.zhmj == null ? 0 : obg_text.zhmj;
-            store.setCockpitHysyText(obg_text);
-
-            // 图表数据
-            let obj_echart = {
-                beginTime: store.state.cockpit_date[0],
-                endTime: store.state.cockpit_date[1],
-                jscType: 'jsc_hysyq_yelx',
-                id: address
-            };
-            let data_echart = await cockpitInfo(obj_echart);
-
-            let obg_echart = {
-                x: data_echart.data.map(item => item.yhlx_name),
-                bar: data_echart.data.map(item => item.zhmj)
-
-            }
-
-            obg_echart.x.length == 0 ? obg_echart.x = ['渔业基础设施用海', '开放式养殖用海', '旅游基础设施用海', '浴场用海',
-                '游乐场用海'] : obg_echart.x = obg_echart.x;
-
-            obg_echart.bar.length == 0 ? obg_echart.bar = [0, 0, 0, 0, 0,] : obg_echart.bar = obg_echart.bar;
-
-            store.setCockpitHysyEchart(obg_echart);
-
-
-            this.$refs.hysy_ref["getRenKou"]();
-
-            // getRenKou();
-
-        },
-        hysyq_xzqh() {
-            const that = this;
-            that.$refs.hysy_ref["label_data"]();
-            that.$refs.hysy_ref["echart_data"]();
-        },
         async gkzb_xzqh(address) {
             let obj = {
                 // beginTime: store.state.cockpit_date[0],
@@ -231,10 +186,6 @@ export default {
                         let adcode = obj.adcode
                         that.params.id = adcode
                         that.setDatas()
-                        // 驾驶舱海域使用权
-                        that.hysyq(adcode);
-                        // 驾驶舱土地收储
-                        that.tdsc_xzqh(adcode);
                         // 管控指标
                         that.gkzb_xzqh(adcode);
                         viewer.entities.values.forEach((res) => {
@@ -261,27 +212,17 @@ export default {
                         if (res.billboard != undefined)
                             res.billboard.show._value = false
                     })
-                    // 海域使用
-                    that.hysyq_xzqh();
-                    // 土地收储
-                    that.tdsc();
+               
                     // 管控指标
                     that.gkzb();
 
+                    that.params.id = '4602'
+                    that.setDatas()
 
                 }
 
             }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
         },
-        tdsc() {
-            const that = this;
-            that.store.setCockpitTdsc(true);
-
-        },
-        tdsc_xzqh() {
-            const that = this;
-            that.store.setCockpitTdsc(false);
-        },
         colorFun(color) {
 
 

+ 86 - 27
src/views/viewer1.vue → src/views/viewer旧版驾驶舱.vue

@@ -10,13 +10,12 @@
                 <div class="bg_bottom"></div>
             </div>
             <datePicker @dateChange="dateChange"></datePicker>
-            <!-- <ser-center></ser-center> -->
-            <JSYD ref="gkzb_ref" />
-            <JCBD />
+            <ser-center></ser-center>
+            <GKZB ref="gkzb_ref" />
             <BJXM />
-            <TDSC ref="tdsc_ref" />
+            <TDSC />
             <HYSY ref="hysy_ref" />
-            <TDSY ref="tdgy_ref"/>
+            <TDSY />
             <GDBH ref="gdbh_ref" />
             <STXF ref="stxf_ref" />
             <WPJG ref="wpjg_ref" />
@@ -26,25 +25,25 @@
 
 <script>
 //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
-import JSYD from './cockpit/jsyd';
-import TDSC from './cockpit/tdsc';
-import HYSY from './cockpit/hysy';
-import TDSY from './cockpit/tdsy';
-import BJXM from './cockpit/bjxm';
-import GDBH from './cockpit/gdbh';
-import STXF from './cockpit/stxf';
-import WPJG from './cockpit/wpjg';
-import JCBD from './cockpit/jcbd';
-
-import datePicker from './cockpit/datePicker.vue';
+import serCenter from './cockpitNew1/serCenter';
+import GKZB from './cockpitNew1/gkzb';
+import TDSC from './cockpitNew1/tdsc';
+import HYSY from './cockpitNew1/hysy';
+import TDSY from './cockpitNew1/tdsy';
+import BJXM from './cockpitNew1/bjxm';
+import GDBH from './cockpitNew1/gdbh';
+import STXF from './cockpitNew1/stxf';
+import WPJG from './cockpitNew1/wpjg';
+import datePicker from './cockpitNew1/datePicker.vue';
 import xzqh from "../../static/data/460200_full.json";
 import hyqy from "../../static/data/460200_hyqy.json";
 
+import SerCenter from './cockpitNew1/serCenter.vue';
 
 import { cockpitInfo } from '@/api/cockpit'
 let manager = {};
 export default {
-    components: { JSYD, BJXM, TDSC, HYSY, TDSY, GDBH, STXF, WPJG, datePicker, JCBD },
+    components: { serCenter, GKZB, BJXM, TDSC, HYSY, TDSY, GDBH, STXF, WPJG, datePicker, SerCenter },
     data() {
         return {
             params: {
@@ -93,20 +92,66 @@ export default {
         },
         setDatas() {
             this.$refs.gdbh_ref.setData({ id: this.params.id });
-            // this.$refs.stxf_ref.setData({ id: this.params.id });
+            this.$refs.stxf_ref.setData({ id: this.params.id });
             this.$refs.wpjg_ref.setData(this.params);
-            this.$refs.tdsc_ref.init_scjd(this.params);
-            this.$refs.tdgy_ref.init_tdgy_gy_jd(this.params);
-            this.$refs.hysy_ref.init_info(this.params);
-
-            
-            
         },
         dateChange(date) {
             this.params.beginTime = date[0]
             this.params.endTime = date[1]
             this.setDatas()
         },
+        async hysyq(address) {
+            // 选中xzqh查询
+            let obj = {
+                beginTime: store.state.cockpit_date[0],
+                endTime: store.state.cockpit_date[1],
+                jscType: 'jsc_hysyq_ztsh',
+                id: address
+            };
+            let data = await cockpitInfo(obj);
+            console.log('data: ', data);
+
+            let obg_text = {
+                xzqhdm_number: data.data[0].xzqhdm_number,
+                zhmj: data.data[0].zhmj == undefined ? 0 : data.data[0].zhmj,
+
+            }
+            obg_text.zhmj == null ? 0 : obg_text.zhmj;
+            store.setCockpitHysyText(obg_text);
+
+            // 图表数据
+            let obj_echart = {
+                beginTime: store.state.cockpit_date[0],
+                endTime: store.state.cockpit_date[1],
+                jscType: 'jsc_hysyq_yelx',
+                id: address
+            };
+            let data_echart = await cockpitInfo(obj_echart);
+
+            let obg_echart = {
+                x: data_echart.data.map(item => item.yhlx_name),
+                bar: data_echart.data.map(item => item.zhmj)
+
+            }
+
+            obg_echart.x.length == 0 ? obg_echart.x = ['渔业基础设施用海', '开放式养殖用海', '旅游基础设施用海', '浴场用海',
+                '游乐场用海'] : obg_echart.x = obg_echart.x;
+
+            obg_echart.bar.length == 0 ? obg_echart.bar = [0, 0, 0, 0, 0,] : obg_echart.bar = obg_echart.bar;
+
+            store.setCockpitHysyEchart(obg_echart);
+
+
+            this.$refs.hysy_ref["getRenKou"]();
+
+            // getRenKou();
+
+        },
+        hysyq_xzqh() {
+            const that = this;
+            that.$refs.hysy_ref["label_data"]();
+            that.$refs.hysy_ref["echart_data"]();
+        },
         async gkzb_xzqh(address) {
             let obj = {
                 // beginTime: store.state.cockpit_date[0],
@@ -186,6 +231,10 @@ export default {
                         let adcode = obj.adcode
                         that.params.id = adcode
                         that.setDatas()
+                        // 驾驶舱海域使用权
+                        that.hysyq(adcode);
+                        // 驾驶舱土地收储
+                        that.tdsc_xzqh(adcode);
                         // 管控指标
                         that.gkzb_xzqh(adcode);
                         viewer.entities.values.forEach((res) => {
@@ -212,17 +261,27 @@ export default {
                         if (res.billboard != undefined)
                             res.billboard.show._value = false
                     })
-               
+                    // 海域使用
+                    that.hysyq_xzqh();
+                    // 土地收储
+                    that.tdsc();
                     // 管控指标
                     that.gkzb();
 
-                    that.params.id = '4602'
-                    that.setDatas()
 
                 }
 
             }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
         },
+        tdsc() {
+            const that = this;
+            that.store.setCockpitTdsc(true);
+
+        },
+        tdsc_xzqh() {
+            const that = this;
+            that.store.setCockpitTdsc(false);
+        },
         colorFun(color) {