Răsfoiți Sursa

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

maxiaoxiao 1 an în urmă
părinte
comite
93e521370b

+ 0 - 8
src/store/store.js

@@ -114,14 +114,6 @@ var store2 = {
                 bcgd: {},
             }
         },
-        cockpit_bjxm: {
-            csbj: {
-                csbj_echart: {}
-            },
-            szbj: {
-                szbj_echart: {}
-            }
-        },
         cockpit_gkzb: {
             // 生态保护红线面积
             mj: 0,

+ 52 - 10
src/views/cockpit/bjxm.vue

@@ -31,8 +31,13 @@
           <span>{{ left_value == 'csbj' ? sdata.sj_mj : sdata_szbj.sj_mj }}</span>平方千米
         </div>
       </div>
+      <!-- <div id="" v-show="xzqh_flag">
+        三亚
+      </div>
+      <div id="bjxm_echart" v-show="!xzqh_flag"></div> -->
 
       <div id="bjxm_echart"></div>
+
     </div>
   </div>
 </template>
@@ -53,7 +58,11 @@ export default {
       icon_switch: false,
       szbj_echart: null,
       csbj_echart: null,
+      csbj_ps_echart: null,
+      szbj_ps_echart: null,
+
       left_value: 'csbj',
+      xzqh_flag: true,
       options: [
         { value: "csbj", label: "城市报建" },
         { value: "szbj", label: "私宅报建" },
@@ -104,8 +113,20 @@ export default {
       let res_szbj = await QueryOne(obj_szbj);
       this.sdata_szbj = res_szbj.data;
     },
+    async switch_xzqh(value) {
+      await this.init_bjxm_echart_info(value);
+      if (value.id == '4602') {
+        this.xzqh_flag = true
+        this.init_bjxm_cs_echart(this.csbj_ps_echart);
+      } else {
+        this.xzqh_flag = false
+        this.changeChartsLeft();
+      }
+
+    },
     async init_bjxm_echart_info(params) {
       const that = this;
+      // 城市报建,某个区
       let obj = {
         jscType: 'jsc_bjxm_csbj_yffl',
         beginTime: params ? params.beginTime : store.state.cockpit_date[0],
@@ -125,12 +146,7 @@ export default {
 
 
       });
-      store.state.cockpit_bjxm.csbj.csbj_echart = {
-        xAxis: xAxis,
-        bat_data: bat_data,
-        line_data: line_data,
-        legend_data: ["用地面积", "项目数量"],
-      }
+
       this.csbj_echart = {
         xAxis: xAxis,
         bat_data: bat_data,
@@ -138,7 +154,7 @@ export default {
 
       }
 
-      // 私宅报建
+      // 私宅报建,某个区
 
       let dateString_beginTime = store.state.cockpit_date[0];
       let formattedDate = dateString_beginTime.slice(0, 4) + '-' + dateString_beginTime.slice(4, 6) + '-' + dateString_beginTime.slice(6);
@@ -175,9 +191,35 @@ export default {
 
       }
 
+      // 城市报建,全市
+      let obj_cs_ps = {
+        jscType: 'jsc_bjxm_csbj_qxfl',
+        beginTime: params ? params.beginTime : store.state.cockpit_date[0],
+        endTime: params ? params.endTime : store.state.cockpit_date[1],
+        id: '460200'
+      };
+      let data_cs_ps = await QueryList(obj_cs_ps);
+      let xAxis_cs_ps = [];
+      let bat_data_cs_ps = [];
+      let line_data_cs_ps = [];
+
+      data_cs_ps.data.forEach(element => {
+        xAxis_cs_ps.push(element.name);
+        bat_data_cs_ps.push(element.sj_mj);
+        line_data_cs_ps.push(element.sj_number);
+
+      });
 
       // this.init_bjxm_cs_echart(this.szbj_echart);
-      this.changeChartsLeft();
+
+
+      this.csbj_ps_echart = {
+        xAxis: xAxis_cs_ps,
+        bat_data: bat_data_cs_ps,
+        line_data: line_data_cs_ps,
+
+      }
+
 
     },
     init_bjxm_cs_echart(data) {
@@ -210,8 +252,8 @@ export default {
         },
         grid: {
           top: '30%',
-          left: '3%',
-          right: '3%',
+          left: '6%',
+          right: '6%',
           bottom: '5%',
           containLabel: true,
         },

+ 3 - 2
src/views/cockpit/common/ThreeStackedBarAndLine.vue

@@ -157,9 +157,10 @@ export default {
                     },
                 }],
                 series: [
+                
                     {
 
-                        name: "正常使用",
+                        name: "临时用地面积",
                         type: 'line',
                         smooth: true,
                         itemStyle: {
@@ -187,7 +188,7 @@ export default {
                         data: [24, 12, 12, 0, 1, 2],
                     },
                     {
-                        name: '临时用地面积',
+                        name: '正常使用',
                         barWidth: 14,
 
                         type: 'bar',

+ 2 - 1
src/views/cockpit/common/XZQHPieChart.vue

@@ -179,8 +179,9 @@ export default {
                                     echartData.forEach(function (value, index, array) {
                                         total += value.value;
                                     });
+
                                     percent = ((params.value / total) * 100).toFixed(1);
-                                    return '{yellow|' + params.name + '}\n{blue|' + percent + '%}';
+                                    return '{yellow|' + params.name + '}\n{blue|' + '占比:' + percent + '%}' + '\n{blue|' + '面积:' + params.value + '公顷}';
                                 },
                                 rich: rich
                             },

+ 2 - 1
src/views/viewer.vue

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