maxiaoxiao 1 год назад
Родитель
Сommit
93bcb377da

+ 1 - 0
src/views/complianceAnalysis/components/collRecursiveTree.vue

@@ -25,6 +25,7 @@
           </span>
         </div>
       </div>
+      <div v-else>图表</div>
       <recursive-tree
         v-if="litem.children"
         :data="litem.children"

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

@@ -29,7 +29,7 @@
         ></div>
       </div>
       <pie
-        v-if="eitem.children.length > 0"
+        v-if="eitem.scxstyle == 0"
         v-show="eitem.isshow"
         class="echart"
         :class="`echart${eitem.children.length <= 6 ? '' : '_vertical'}`"
@@ -37,7 +37,11 @@
         @echartClick="(name, iseyes) => echartClick(name, iseyes, i)"
         :ref="`echartRef`"
       ></pie>
-      <el-collapse v-if="eitem.lchildren.length" v-show="eitem.isshow">
+      <el-collapse
+        v-if="eitem.lchildren.length"
+        v-show="eitem.isshow"
+        class="collapse"
+      >
         <collRecursiveTree
           :data="eitem.lchildren"
           :piseyes="eitem.iseyes"
@@ -69,14 +73,14 @@ let colors = [
   "#FF6969",
   "#27CED9",
   "#DF56F5",
-  "#DCFFAF"
+  "#DCFFAF",
 ];
 export default {
   components: { pie, collRecursiveTree },
   props: {
     scjgObj: {
-      type: Object
-    }
+      type: Object,
+    },
   },
   data() {
     return {
@@ -84,9 +88,9 @@ export default {
       ruleForm: {
         name: "",
         xzmj: "",
-        fileList: []
+        fileList: [],
       },
-      fileid: 1
+      fileid: 1,
     };
   },
   mounted() {
@@ -99,11 +103,11 @@ export default {
     initData() {
       this.echarts = [];
       this.$emit("updateParent", "loading", true);
-      GetFxjg({ bsm: this.$props.scjgObj.bsm }).then(res => {
+      GetFxjg({ bsm: this.$props.scjgObj.bsm }).then((res) => {
         if (res.success) {
           res.data.forEach((e, ei) => {
             let c = e.dataList || [];
-            c.map(ci => {
+            c.map((ci) => {
               ci.name = ci.yslx_name || ci.scxname;
               // ci.value = this.compute(ci.mj);
               ci.value = ci.mj;
@@ -117,7 +121,8 @@ export default {
               children: c,
               lchildren: e.children || [],
               iseyes: false,
-              isshow: false
+              isshow: false,
+              scxstyle: e.scxstyle,
             });
             if (c.length > 0) this.setEchart(c, ei);
             // if (e.children) console.log(e.children)
@@ -160,16 +165,17 @@ export default {
     },
     echartClick(name, iseyes, index) {
       if (this.echarts[index].iseyes) {
-        let click = this.echarts[index].children.filter(c => c.name == name);
+        let click = this.echarts[index].children.filter((c) => c.name == name);
         if (click.length > 0)
           this.changeDataSources({
             geom: click[0].geom,
             id: click[0].id,
-            iseyes
+            iseyes,
           });
       }
     },
     setEchart(data, i) {
+      console.log("-----", data, i, this.$refs.echartRef);
       this.$nextTick(() => {
         let type = data.length <= 6 ? "horizontal" : "vertical";
         this.$refs.echartRef[i].setOptions({ data, type });
@@ -191,9 +197,9 @@ export default {
         clampToGround: true,
         stroke: scolor,
         fill: fcolor.withAlpha(0.3), //注意:颜色必须大写,即不能为blue
-        strokeWidth: 3
+        strokeWidth: 3,
       });
-      polygon.then(function(dataSource) {
+      polygon.then(function (dataSource) {
         // dataSource.id = id;
         // 将数据源添加到Cesium Viewer
         viewer.dataSources.add(dataSource);
@@ -216,7 +222,7 @@ export default {
     reset() {
       if (Object.keys(dataSourceList).length) viewer.dataSources.removeAll();
       dataSourceList = {};
-    }
+    },
   },
 
   // watch(
@@ -232,7 +238,7 @@ export default {
     // scjgObj(newValue) {
     //   this.initData();
     // },
-  }
+  },
 };
 </script>
 

+ 1 - 1
src/views/complianceAnalysis/ghzc.scss

@@ -227,7 +227,7 @@
 }
 
 .el-collapse-item__header {
-    border-bottom: 1px solid #d3dce6;
+    border-bottom: 1px solid transparent;
     background-color: transparent !important;
     /* 修改下边框 */
 }