Przeglądaj źródła

合规性分析结果数据

maxiaoxiao 11 miesięcy temu
rodzic
commit
dea1c549c0
1 zmienionych plików z 25 dodań i 22 usunięć
  1. 25 22
      src/views/complianceAnalysis/components/scjg.vue

+ 25 - 22
src/views/complianceAnalysis/components/scjg.vue

@@ -32,7 +32,7 @@
         v-show="eitem.isshow"
         class="echart"
         :class="`echart${i}`"
-        @echartClick="(name, iseyes)=>echartClick(name, iseyes,i)"
+        @echartClick="(name, iseyes) => echartClick(name, iseyes, i)"
         :ref="`echartRef`"
       ></pie>
     </div>
@@ -46,7 +46,7 @@
 <script>
 import pie from "@/components/echartsTemplate/pie.vue";
 import hgxfx from "../../../../static/data/ghss/data.js";
-let colors = [  
+let colors = [
   "#62ADED",
   "#DFE15A",
   "#6EDC8D",
@@ -77,29 +77,32 @@ export default {
       fileid: 1,
     };
   },
-  mounted() {
-  },
+  mounted() {},
   methods: {
-    initData(){
-    this.fileid = this.$props.scjgObj.xmmc.indexOf("东岸卓越城项目") >= 0 ? 'hgxfx1' : 'hgxfx2'
-    hgxfx.jgtreeData.forEach((e) => {
-      // if (e.label == "控制性详细规划") e.label = "详细规划分析";
-      this.echarts.push({ ...e, iseyes: false, isshow: false });
-    });
-    this.setEchart1();
-    this.setEchart2();
-    // this.setEchart3();
-    this.setEchart4();
+    initData() {
+      this.fileid =
+        this.$props.scjgObj.xmmc.indexOf("东岸卓越城项目") >= 0
+          ? "hgxfx1"
+          : "hgxfx2";
+      this.echarts = [];
+      hgxfx.jgtreeData.forEach((e) => {
+        // if (e.label == "控制性详细规划") e.label = "详细规划分析";
+        this.echarts.push({ ...e, iseyes: false, isshow: false });
+      });
+      this.setEchart1();
+      this.setEchart2();
+      // this.setEchart3();
+      this.setEchart4();
     },
     eyesChaneg(i) {
       this.echarts[i].iseyes = !this.echarts[i].iseyes;
       // if (i == 0 || i == 2) {
       //   this.changeDataSources(this.echarts[i]);
       // } else {
-        let iseyes = this.echarts[i].iseyes;
-        this.echarts[i].children.forEach((child, ci) => {
-          this.changeDataSources({ ...child, iseyes }, colors[ci]);
-        });
+      let iseyes = this.echarts[i].iseyes;
+      this.echarts[i].children.forEach((child, ci) => {
+        this.changeDataSources({ ...child, iseyes }, colors[ci]);
+      });
       // }
       // emit("eyesChaneg");
     },
@@ -108,7 +111,7 @@ export default {
         this.dataSources[id].show = iseyes;
       } else this.addPolygon(label, id, color);
     },
-    echartClick(name, iseyes,index) {
+    echartClick(name, iseyes, index) {
       if (this.echarts[index].iseyes) {
         let click = this.echarts[index].children.filter((c) => c.label == name);
         if (click.length > 0)
@@ -206,9 +209,9 @@ export default {
   //     }
   //   );
   watch: {
-    scjgObj(newValue){
-      this.initData()
-    }
+    scjgObj(newValue) {
+      this.initData();
+    },
   },
 };
 </script>