From 6828419a10a46682d89e124057ef4e0c15d69d6a Mon Sep 17 00:00:00 2001
From: wangqi <magical1908@outlook.com>
Date: 星期三, 07 四月 2021 18:35:55 +0800
Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop

---
 src/components/BaseNav/PublicBounced/GasComponents/ECharts.vue |  140 ++++++++++++++++++++++++++--------------------
 1 files changed, 80 insertions(+), 60 deletions(-)

diff --git a/src/components/BaseNav/PublicBounced/GasComponents/ECharts.vue b/src/components/BaseNav/PublicBounced/GasComponents/ECharts.vue
index 7fd8e4a..d9f23bd 100644
--- a/src/components/BaseNav/PublicBounced/GasComponents/ECharts.vue
+++ b/src/components/BaseNav/PublicBounced/GasComponents/ECharts.vue
@@ -1,34 +1,35 @@
 <template>
-    <div id="Tab">
-        <div class="Infomation">
-            <el-tag>姘哀鍖栫墿 : 29.93 鏍囧噯 : 100</el-tag>
-            <el-tag>浜屾哀鍖栫~ : 17.34 鏍囧噯 : 50</el-tag>
-            <el-tag>鐑熷皹 : 6.93 鏍囧噯 : 30</el-tag>
-            <el-tag>搴熸皵娴侀噺 : 120343.18</el-tag>
-        </div>
-      <div class="form-echrts">
-        <div>
-          <el-button size="mini" round @click="dialogVisible = true">鏄庣粏琛�</el-button>
-            <el-dialog  :visible.sync="dialogVisible"
-                        :append-to-body="true"
-                        :title="this.$attrs.value==='feiqi'?this.$attrs.getWasteGasDetails[0].OnLineMonEmissPointName:this.$attrs.getWasteWaterMonitoringDetails[0].OnLineMonEmissPointName"
-                        width="68%"
-                        center
-                        v-dialogDrag
-            >
-              <div class="el-dialog-div">
-                <public-detailed-list v-bind="$attrs"></public-detailed-list>
-              </div>
-            </el-dialog>
-        </div>
-        <div style="width:750px;height:260px;" id="echarts" ref="main">
-        </div>
+  <div id="Tab">
+    <div class="Infomation">
+      <el-tag>姘哀鍖栫墿 : 29.93 鏍囧噯 : 100</el-tag>
+      <el-tag>浜屾哀鍖栫~ : 17.34 鏍囧噯 : 50</el-tag>
+      <el-tag>鐑熷皹 : 6.93 鏍囧噯 : 30</el-tag>
+      <el-tag>搴熸皵娴侀噺 : 120343.18</el-tag>
+    </div>
+    <div class="form-echrts">
+      <div>
+        <el-button size="mini" round @click="dialogVisible = true">鏄庣粏琛�</el-button>
+        <el-dialog :visible.sync="dialogVisible"
+                   :append-to-body="true"
+                   :title="this.$attrs.value==='feiqi'?this.$attrs.getWasteGasDetails[0].OnLineMonEmissPointName:this.$attrs.getWasteWaterMonitoringDetails[0].OnLineMonEmissPointName"
+                   width="68%"
+                   center
+                   v-dialogDrag
+        >
+          <div class="el-dialog-div" style="height: 500px">
+            <public-detailed-list v-bind="$attrs"></public-detailed-list>
+          </div>
+        </el-dialog>
+      </div>
+      <div style="width:100%;height:1.2rem;margin-top:-0.3rem;position:absolute;" id="echarts" ref="main">
       </div>
     </div>
+  </div>
 </template>
 
 <script>
 import PublicDetailedList from '@components/BaseNav/PublicBounced/GasComponents/PublicDetailedList'
+
 export default {
   name: 'ECharts',
   components: {
@@ -201,50 +202,69 @@
     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;
-    }
+#Tab {
+  height: 3rem;
+}
+.Infomation {
+  margin-left: 10px;
+}
 
-    .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;
-    }
-    .form-echrts{
-      width: 100%;
-      height: 100%;
-      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;
-        //border: 1px solid #396d83;
-        //margin: 10px 10px 10px 10px;
-    }
+.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;
+}
+
+.form-echrts {
+  width: 100%;
+  height: 100%;
+  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