Browse Source

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

zpf 11 months ago
parent
commit
3ccd07fd5f
2 changed files with 16 additions and 20 deletions
  1. 1 4
      src/views/cockpitNew1/stxf.vue
  2. 15 16
      src/views/cockpitNew1/wpjg.vue

+ 1 - 4
src/views/cockpitNew1/stxf.vue

@@ -29,7 +29,7 @@
       </div>
     </div>
     <div class="time2" v-if="tab == 'ssxf'">截止2024年5月</div>
-    <Bar3d id="stxf_echart" :class="`${tab}_echart`" ref="echartRef"></Bar3d>
+    <Bar3d id="stxf_echart" ref="echartRef"></Bar3d>
   </borderTemplate>
 </template>
 
@@ -191,7 +191,4 @@ export default {
   color: #bcd3e5;
   margin-top: 10px;
 }
-.ssxf_echart {
-  height: calc(100% - 92px) !important;
-}
 </style>

+ 15 - 16
src/views/cockpitNew1/wpjg.vue

@@ -32,13 +32,13 @@ let rcolors = [
   "#62ECEC",
   "#FF7F48",
   "#1E803A",
-  "#D4E0FF"
+  "#D4E0FF",
 ];
 export default {
   components: { borderTemplate, sankey },
   data() {
     return {
-      sdata: {}
+      sdata: {},
     };
   },
   //监听属性 类似于data概念
@@ -54,41 +54,40 @@ export default {
     getQueryListyelx(datas) {
       let data = [];
       let links = [];
-
       let params = {
         ...datas,
-        jscType: "jsc_wpjc_yelx"
+        jscType: "jsc_wpjc_yelx",
       };
-      QueryList(params).then(res => {
-        res.data.forEach(edata => {
+      QueryList(params).then((res) => {
+        res.data.forEach((edata) => {
           if (edata.qlx_type_name && edata.hlx_type_name) {
             links.push({
               source: edata.qlx_type_name,
               target: edata.hlx_type_name,
-              value: edata.xzqdm_num
+              value: edata.xzqdm_num,
             });
-            if (data.findIndex(a => a.name == edata.qlx_type_name) < 0)
+            if (data.findIndex((a) => a.name == edata.qlx_type_name) < 0)
               data.push({ name: edata.qlx_type_name });
-            if (data.findIndex(a => a.name == edata.hlx_type_name) < 0)
+            if (data.findIndex((a) => a.name == edata.hlx_type_name) < 0)
               data.push({ name: edata.hlx_type_name });
+            this.$nextTick(() => {
+              this.$refs.echartRef.setOptions(data, links);
+            });
           }
         });
-        this.$nextTick(() => {
-          this.$refs.echartRef.setOptions(data, links);
-        });
       });
     },
     GetQueryListztsh(datas) {
       let params = {
         ...datas,
-        jscType: "jsc_wpjc_ztsh"
+        jscType: "jsc_wpjc_ztsh",
       };
-      QueryList(params).then(res => {
+      QueryList(params).then((res) => {
         this.sdata = res.data && res.data.length > 0 ? res.data[0] : {};
       });
-    }
+    },
   },
-  mounted() {}
+  mounted() {},
 };
 </script>
 <style lang="scss" scoped>