Explorar el Código

合规性分析展示顺序图表显示错误问题修改

maxiaoxiao hace 11 meses
padre
commit
78a09c16ad
Se han modificado 1 ficheros con 6 adiciones y 6 borrados
  1. 6 6
      src/views/complianceAnalysis/components/scjg.vue

+ 6 - 6
src/views/complianceAnalysis/components/scjg.vue

@@ -16,7 +16,7 @@
 
     <div v-for="(eitem, i) in echarts" :key="i" class="echars">
       <div class="echartTitle">
-        <div class="block-title">{{ eitem.label }}{{ eitem.one }}</div>
+        <div class="block-title">{{ eitem.label }}</div>
         <div
           class="eicon"
           :class="eitem.iseyes ? 'eyes' : 'close_eyes'"
@@ -35,7 +35,7 @@
         :class="`echart${eitem.children.length <= 6 ? '' : '_vertical'}`"
         unit="亩"
         @echartClick="(name, iseyes) => echartClick(name, iseyes, i)"
-        :ref="`echartRef`"
+        :ref="`echartRef${eitem.id}`"
       ></pie>
       <el-collapse v-if="eitem.lchildren.length" v-show="eitem.isshow">
         <collRecursiveTree
@@ -101,7 +101,7 @@ export default {
       this.$emit("updateParent", "loading", true);
       GetFxjg({ bsm: this.$props.scjgObj.bsm }).then((res) => {
         if (res.success) {
-          res.data.forEach((e, ei) => {
+          res.data.forEach((e) => {
             let c = e.dataList || [];
             c.map((ci) => {
               ci.name = ci.yslx_name || ci.scxname;
@@ -119,7 +119,7 @@ export default {
               isshow: false,
               scxstyle: e.scxstyle,
             });
-            if (c.length > 0) this.setEchart(c, ei);
+            if (e.scxstyle == 0) this.setEchart(c, e.scxbsm);
             // if (e.children) console.log(e.children)
           });
           this.$emit("updateParent", "loading", false);
@@ -169,10 +169,10 @@ export default {
           });
       }
     },
-    setEchart(data, i) {
+    setEchart(data, id) {
       this.$nextTick(() => {
         let type = data.length <= 6 ? "horizontal" : "vertical";
-        this.$refs.echartRef[i].setOptions({ data, type });
+        this.$refs[`echartRef${id}`][0].setOptions({ data, type });
       });
     },
     // 加载GeoJSON数据