From 6f52267465d2ce8e08ae0fd61bbe7f69b366a2c4 Mon Sep 17 00:00:00 2001
From: 徐旺旺 <11530253@qq.com>
Date: 星期四, 08 四月 2021 14:51:11 +0800
Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop

---
 src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue |  115 ++++++++++++++++++++++++++++-----------------------------
 1 files changed, 56 insertions(+), 59 deletions(-)

diff --git a/src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue b/src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue
index d7f9953..3c40d37 100644
--- a/src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue
+++ b/src/components/BaseNav/PublicBounced/GasComponents/EChartsHour.vue
@@ -50,7 +50,7 @@
 <!--                    </div>-->
 <!--                </el-dialog>-->
 <!--            </div>-->
-            <div style="width:750px;height:260px;" id="echarts" ref="main">
+            <div style="width:100%;height:1rem;margin-top:-0.1rem;position:absolute;" id="echarts" ref="main">
             </div>
         </div>
     </div>
@@ -58,6 +58,7 @@
 
 <script>
 // import PublicDetailedList from '@components/BaseNav/PublicBounced/GasComponents/PublicDetailedList'
+
 export default {
   name: 'ECharts',
   components: {
@@ -231,72 +232,68 @@
     drawChart: function () {
       const myChart = this.$echarts.init(this.$refs.main)
       myChart.setOption(this.options)
+      window.onresize = function () {
+        var h1 = document.documentElement.clientHeight// 鑾峰彇灞忓箷鐨勯珮搴�
+        if (h1 > 700) {
+          myChart.getDom().style.height = 3 + 'rem'
+          myChart.getDom().style.width = 6 + 'rem'
+        } else {
+          myChart.getDom().style.height = 3 + 'rem'
+          myChart.getDom().style.width = 6 + 'rem'
+        }
+        myChart.resize()
+      }
     }
   },
   mounted () {
-    this.drawChart()
-    const dataWatch = JSON.parse(JSON.stringify(this.$attrs.getWasteWaterMonitoring))
-    console.log(dataWatch)
-    for (var i = 0; i < dataWatch.length; i++) {
-      this.dataDate.push(dataWatch[i].MonTimeStr.substring(10, 17))
-    }
-    console.log(this.dataDate)
+    this.$nextTick(() => {
+      this.drawChart()
+      const dataWatch = JSON.parse(JSON.stringify(this.$attrs.getWasteWaterMonitoring))
+      // console.log(dataWatch)
+      for (var i = 0; i < dataWatch.length; i++) {
+        this.dataDate.push(dataWatch[i].MonTimeStr.substring(10, 17))
+      }
+      // console.log(this.dataDate)
+    })
   }
 }
 </script>
 
 <style scoped lang="less">
-    .infomation {
-        margin-left: 10px;
-    }
+.Infomation {
+  margin-left: 10px;
+  height: 0.2rem;
+}
 
-    .el-tag {
-        height: 25px;
-        line-height: 25px;
-        margin-right: 10px;
-        font-size: 10px;
-        background-color: rgba(0, 255, 246, 0.14);
-        color: #00d0f9;
-        border: none;
-        padding: 0 15px;
-    }
+.el-tag {
+  height: 25px;
+    width: 140px;
+  line-height: 25px;
+  margin-right: 10px;
+  font-size: 10px;
+  background-color: rgba(0, 255, 246, 0.14);
+  color: #00d0f9;
+  border: none;
+  padding: 0 15px;
+}
 
-    .form-echrts {
-        width: 100%;
-        height: 100%;
-        border: 1px solid #396d83;
-        //margin: 10px 10px 10px 10px;
-        .el-dialog-div {
-            //height: 50vh!important;
-            overflow: auto;
-            //overflow: hidden;
-        }
-        .block{
-            .date{
-                width: 300px;
-                height: 30px;
-            }
-        }
-        .text-size{
-            display: flex;
-            justify-content: space-around;
-        }
-        .from-search{
-            display: flex;
-            justify-content: space-around;
-            .demo-form-inline{
-                display: flex;
-                justify-content: space-around;
-            }
-            .el-button--mini, .el-button--mini.is-round{
-                height: 30px;
-            }
-        }
-        #echarts {
-            margin: 0;
-            padding: 0;
-            //border: 1px solid #396d83;
-            //margin: 10px 10px 10px 10px;
-        }
-    }
+.form-echrts {
+  width: 100%;
+  height: 1rem;
+  border-top: 1px solid #396d83;
+  //margin: 10px 10px 10px 10px;
+  .el-dialog-div {
+    //height: 50vh!important;
+    overflow: auto;
+    //overflow: hidden;
+  }
+
+  #echarts {
+    margin: 0;
+    padding: 0;
+    //height: 3rem;
+    //border: 1px solid #396d83;
+    //margin: 10px 10px 10px 10px;
+  }
+}
 </style>

--
Gitblit v1.8.0