ming 1 年之前
父节点
当前提交
627afd0091

+ 9 - 7
src/components/bar/index2.vue

@@ -89,7 +89,7 @@ export default {
         },
         series: [
           {
-            name: '环',
+            name: '环',
             type: 'gauge',
             splitNumber: 32,
             radius: '92%',
@@ -107,7 +107,7 @@ export default {
                 shadowBlur: 1,
                 shadowColor: '#15E1FD',
               },
-              length: 15,
+              length: '13px',
               splitNumber: 3
             },
             splitLine: {
@@ -128,7 +128,6 @@ export default {
             z: 1,
             coordinateSystem: 'polar',
             barMaxWidth: 5,
-            name: '出租率',
             roundCap: 1,
             color: {
               colorStops: [{
@@ -165,7 +164,7 @@ export default {
           {
             type: 'pie',
             // 饼图大小跟外层极坐标系相同,需手动调试
-            radius: '94%',
+            radius: '92%',
             center: ['50%', '50%'],
             hoverAnimation: false,
             startAngle: 180,
@@ -217,10 +216,13 @@ export default {
         ],
       });
 
+      setTimeout(function () {
+          window.onresize = function () {
+            echartsMap.resize();
+          };
+        }, 200);
     },
-    resize() {
-      echarts.init(this.$refs.bar).resize();
-    },
+    
   },
 };
 </script>

+ 9 - 66
src/components/category/index2.vue

@@ -131,73 +131,16 @@ export default {
                 },
 
                 series:series
-            });
-            // let echartsMap = this.$echarts.getInstanceByDom(this.$refs.echartD);
-            // if (echartsMap == null) {
-            //     echartsMap = this.$echarts.init(this.$refs.echartD);
-            // }
-            // echartsMap.option = {
-            //     tooltip: {
-            //         trigger: 'axis',
-            //         axisPointer: {
-            //         type: 'shadow'
-            //         }
-            //     },
-            //     grid: {
-            //         left: '3%',
-            //         right: '4%',
-            //         bottom: '3%',
-            //         containLabel: true
-            //     },
-               
-            //     xAxis: [
-            //         {
-            //         type: 'category',
-            //         data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
-            //         }
-            //     ],
-            //     yAxis: [
-            //         {
-            //         type: 'value'
-            //         }
-            //     ],
-            //     series: [
-                
-            //         {
-            //         name: 'Email',
-            //         type: 'bar',
-            //         stack: 'Ad',
-            //         emphasis: {
-            //             focus: 'series'
-            //         },
-            //         data: [120, 132, 101, 134, 90, 230, 210]
-            //         },
-            //         {
-            //         name: 'Union Ads',
-            //         type: 'bar',
-            //         stack: 'Ad',
-            //         emphasis: {
-            //             focus: 'series'
-            //         },
-            //         data: [220, 182, 191, 234, 290, 330, 310]
-            //         },
-            //         {
-            //         name: 'Video Ads',
-            //         type: 'bar',
-            //         stack: 'Ad',
-            //         emphasis: {
-            //             focus: 'series'
-            //         },
-            //         data: [150, 232, 201, 154, 190, 330, 410]
-            //         },
-
-                    
-            //     ]
-            // };
-        },
-        resize() {
-            echarts.init(this.$refs.echartD).resize();
+            },true);
+            // setTimeout(function () {
+            //     window.onresize = function () {
+            //         echartsMap.resize();
+            //     };
+            // }, 200);
+            
         },
+        
+     
     },
 };
 </script>

+ 15 - 9
src/components/category/index3.vue

@@ -1,5 +1,5 @@
 <template>
-    <div ref="echartD" style="width: 100%; height: 100%"></div>
+    <div ref="echartD1" style="width: 100%; height: 100%"></div>
 </template>
 
 <script>
@@ -54,11 +54,11 @@ export default {
                         )
                         zData.push(val[i].value2)
                 }       
-            let echartsMap = this.$echarts.getInstanceByDom(this.$refs.echartD);
-            if (echartsMap == null) {
-                echartsMap = this.$echarts.init(this.$refs.echartD);
+            let echartsMap1 = this.$echarts.getInstanceByDom(this.$refs.echartD1);
+            if (echartsMap1 == null) {
+                echartsMap1 = this.$echarts.init(this.$refs.echartD1);
             }
-            echartsMap.setOption({
+            echartsMap1.setOption({
                 grid: {
                     top: 30,
                     left: 50,
@@ -144,11 +144,17 @@ export default {
                         
                     }
                 ],
-            });
-        },
-        resize() {
-            echarts.init(this.$refs.echartD).resize();
+            },true);
+      
+                // window.onresize = function () {
+                //     echartsMap1.resize();
+                // };
+         
+            
         },
+        // resize() {
+        //     echarts.init(this.$refs.echartD1).resize();
+        // },
     },
 };
 </script>

+ 12 - 9
src/components/radar/index2.vue

@@ -73,11 +73,11 @@ export default {
         //         };
         //     });
 
-            let echartsMap = this.$echarts.getInstanceByDom(this.$refs.echartD);
-            if (echartsMap == null) {
-                echartsMap = this.$echarts.init(this.$refs.echartD);
+            let myChart = this.$echarts.getInstanceByDom(this.$refs.echartD);
+            if (myChart == null) {
+                myChart = this.$echarts.init(this.$refs.echartD);
             }
-            echartsMap.setOption({
+            myChart.setOption({
                 color: ["rgba(0, 255, 252, 1)"],
                 legend: {
                     show: false,
@@ -372,15 +372,18 @@ export default {
                                 
                 //                 },
                 ],
-            });
-            echartsMap.on("click", function (params) {
+            },true);
+          
+            window.onresize = function () {
+                myChart.resize();
+            };
+         
+            myChart.on("click", function (params) {
                 if (params?.event?.topTarget?.__dimIdx > -1) {
                     that.$emit("echartsClick", params.event.topTarget.__dimIdx);
                 }
             });
-        },
-        resize() {
-            echarts.init(this.$refs.echartD).resize();
+            
         },
     },
 };

+ 4 - 4
src/components/water-gauge/index.vue

@@ -279,11 +279,11 @@ export default {
           },
         ],
       });
+      window.onresize = function () {
+        echartsMap.resize();
+            };
     },
-    resize() {
-      echarts.init(this.$refs.echartD).resize();
-      this.getData();
-    },
+   
   },
 };
 </script>

+ 1 - 1
src/views/fire-data-analysis.vue

@@ -7,7 +7,7 @@
                     <div class="threeBox">
                         <div class="flexBoxE11">
                                 <el-row>
-                                        <el-col :span="7" style="border: 1px solid rgba(48, 207, 255, 0.6); margin: 10px; box-shadow: inset 0 0 0.07rem 0.04rem rgb(115 251 253 / 40%);box-sizing: border-box;" v-for="(item,index) in hzxxtj" :key="index">
+                                        <el-col :span="7" style="border: 1px solid rgba(48, 207, 255, 0.6); margin: .125rem; box-shadow: inset 0 0 0.07rem 0.04rem rgb(115 251 253 / 40%);box-sizing: border-box;" v-for="(item,index) in hzxxtj" :key="index">
                                                 <div style="padding: 0.1475rem 0;text-align: center;">
                                                         <span  style="display: block">
                                                                 <Strong :style="{

+ 1 - 1
src/views/fire-signs.vue

@@ -2211,7 +2211,7 @@ export default {
         background: transparent !important;
 }
 .basicItem{
-    border: 1px solid rgba(48, 207, 255, 0.6); margin: 4px 10px!important; box-shadow: inset 0 0 0.07rem 0.04rem rgba(115, 251, 253 , .4); box-sizing: border-box
+    border: 1px solid rgba(48, 207, 255, 0.6); margin: 4px .125rem!important; box-shadow: inset 0 0 0.07rem 0.04rem rgba(115, 251, 253 , .4); box-sizing: border-box
     ;
     text-align:center;
     >div{