Browse Source

报建项目分区联动展示,报建数量同步更新,

maxiaoxiao 11 months ago
parent
commit
4c46c1b8c8
2 changed files with 19 additions and 4 deletions
  1. 18 3
      src/views/cockpit/bjxm.vue
  2. 1 1
      src/views/viewer.vue

+ 18 - 3
src/views/cockpit/bjxm.vue

@@ -11,7 +11,7 @@
         </div>
         <div class="text">
           <p>报建数量</p>
-          <span>66</span>个
+          <span>{{sdata.sj_number}}</span>个
         </div>
       </div>
       <div class="item">
@@ -20,7 +20,7 @@
         </div>
         <div class="text">
           <p>用地面积</p>
-          <span>6666</span>平方千米
+          <span>0</span>平方千米
         </div>
       </div>
 
@@ -36,7 +36,9 @@ import { QueryOne, QueryList } from "../../api/cockpitNew";
 export default {
   components: {},
   data() {
-    return {};
+    return {
+      sdata:{}
+    };
   },
   //监听属性 类似于data概念
   computed: {},
@@ -44,6 +46,17 @@ export default {
   watch: {},
   //方法集合
   methods: {
+    async init_info(params) {
+      const that = this;
+      let obj = {
+        jscType: 'jsc_bjxm_csbj_hz',
+        beginTime: params ? params.beginTime : store.state.cockpit_date[0],
+        endTime: params ? params.endTime : store.state.cockpit_date[1],
+        id: params ? params.id : '4602'
+      };
+      let res = await QueryOne(obj);
+      this.sdata= res.data;
+    }, 
     async init_bjxm_echart_info(params) {
       const that = this;
       let obj = {
@@ -343,12 +356,14 @@ export default {
       };
       myChart.setOption(option);
     },
+    
   },
   beforeCreate() { }, //生命周期 - 创建之前
   created() { }, //生命周期 - 创建完成(可以访问当前this实例)
   beforeMount() { }, //生命周期 - 挂载之前
   mounted() {
     this.$nextTick((res) => {
+      this.init_info()
       this.init_bjxm_echart_info();
     })
   }, //生命周期 - 挂在完成

+ 1 - 1
src/views/viewer.vue

@@ -117,7 +117,7 @@ export default {
             this.$refs.hysy_ref.init_echart_data(this.params);
 
             // 报建项目
-
+            this.$refs.bjxm_ref.init_info(this.params);
             this.$refs.bjxm_ref.init_bjxm_echart_info(this.params);
             // 生态修复
             this.$refs.stxf_ref.getInfo(this.params);