浏览代码

2021-12-17 生态监测的布局

East 3 年之前
父节点
当前提交
df554d3eb0
共有 2 个文件被更改,包括 230 次插入181 次删除
  1. 168 119
      src/views/Zoology/Zoology.vue
  2. 62 62
      src/views/Zoology/charts/ChartLine.vue

+ 168 - 119
src/views/Zoology/Zoology.vue

@@ -1,7 +1,7 @@
 <!--
 <!--
  * @Author: your name
  * @Author: your name
  * @Date: 2021-10-21 17:51:22
  * @Date: 2021-10-21 17:51:22
- * @LastEditTime: 2021-11-22 10:25:05
+ * @LastEditTime: 2021-12-17 08:48:08
  * @LastEditors: Please set LastEditors
  * @LastEditors: Please set LastEditors
  * @Description: 生态监测页面
  * @Description: 生态监测页面
  * @FilePath: \hyyfScreen\src\views\Zoology\Zoology.vue
  * @FilePath: \hyyfScreen\src\views\Zoology\Zoology.vue
@@ -31,33 +31,51 @@
           <div class="left-top-title-right"></div>
           <div class="left-top-title-right"></div>
         </div>
         </div>
         <!-- 左上循环滑动 -->
         <!-- 左上循环滑动 -->
-        <div class="left-top-content" v-loading="loading"
-             element-loading-text="拼命加载中"
-             element-loading-spinner="el-icon-loading"
-             element-loading-background="rgba(0, 0, 0, 0.8)">
-          <swiper style="height: 600px;  margin-top: auto; margin-bottom: auto;" ref="mySwiper" class="swiper" :options="swiperOption">
+        <div
+          class="left-top-content"
+          v-loading="loading"
+          element-loading-text="拼命加载中"
+          element-loading-spinner="el-icon-loading"
+          element-loading-background="rgba(0, 0, 0, 0.8)"
+        >
+          <swiper
+            style="height: 600px;  margin-top: auto; margin-bottom: auto;"
+            ref="mySwiper"
+            class="swiper"
+            :options="swiperOption"
+          >
             <swiper-slide v-for="item in swiperData" :key="item.roomId">
             <swiper-slide v-for="item in swiperData" :key="item.roomId">
-              <swiper-content @getRoomId="getRoomId" :list="item" @onLeave="onLeave" @onEnter="onEnter"></swiper-content>
+              <swiper-content
+                @getRoomId="getRoomId"
+                :list="item"
+                @onLeave="onLeave"
+                @onEnter="onEnter"
+              ></swiper-content>
             </swiper-slide>
             </swiper-slide>
           </swiper>
           </swiper>
         </div>
         </div>
       </div>
       </div>
-      <div class="left-middle" v-loading="weatherLoading"
-           element-loading-text="拼命加载中"
-           element-loading-spinner="el-icon-loading"
-           element-loading-background="rgba(0, 0, 0, 0.8)">
+      <div
+        class="left-middle"
+        v-loading="weatherLoading"
+        element-loading-text="拼命加载中"
+        element-loading-spinner="el-icon-loading"
+        element-loading-background="rgba(0, 0, 0, 0.8)"
+      >
         <chart-board
         <chart-board
-          :title=" roomName + '用水量'"
+          :title="roomName + '用水量'"
           :ifDate="true"
           :ifDate="true"
-          @emitDates="getWaterDates">
+          @emitDates="getWaterDates"
+        >
           <chart-line :data="waterData" :id="1"></chart-line>
           <chart-line :data="waterData" :id="1"></chart-line>
         </chart-board>
         </chart-board>
       </div>
       </div>
       <div class="left-bottom">
       <div class="left-bottom">
         <chart-board
         <chart-board
-          :title=" roomName + '整栋用电量'"
+          :title="roomName + '整栋用电量'"
           :ifDate="true"
           :ifDate="true"
-          @emitDates="getElecDates">
+          @emitDates="getElecDates"
+        >
           <chart-line-and :data="waterData" :id="2"></chart-line-and>
           <chart-line-and :data="waterData" :id="2"></chart-line-and>
         </chart-board>
         </chart-board>
       </div>
       </div>
@@ -66,27 +84,45 @@
     <div class="right">
     <div class="right">
       <div class="right-top">
       <div class="right-top">
         <div class="kuang">
         <div class="kuang">
-          <iframe  :src="'static/jinm/index.html?'+'1'+','+ cameraOne +','+ cameraTwo + ',' +'100%' + ',' + '0'" style="width: 100%; height: 100%;" frameborder="0"  allowfullscreen="true"></iframe>
+          <iframe
+            :src="
+              'static/jinm/index.html?' +
+                '1' +
+                ',' +
+                cameraOne +
+                ',' +
+                cameraTwo +
+                ',' +
+                '100%' +
+                ',' +
+                '0'
+            "
+            style="width: 100%; height: 100%;"
+            frameborder="0"
+            allowfullscreen="true"
+          ></iframe>
         </div>
         </div>
       </div>
       </div>
       <div class="right-bottom">
       <div class="right-bottom">
-        <div class="right-bottom-left" v-loading="chartLoading"
-             element-loading-text="拼命加载中"
-             element-loading-spinner="el-icon-loading"
-             element-loading-background="rgba(0, 0, 0, 0.8)">
-          <chart-board
-            :title=" roomName + '温度'"
-            @emitDates="getWaterDates">
+        <div
+          class="right-bottom-left"
+          v-loading="chartLoading"
+          element-loading-text="拼命加载中"
+          element-loading-spinner="el-icon-loading"
+          element-loading-background="rgba(0, 0, 0, 0.8)"
+        >
+          <chart-board :title="roomName + '温度'" @emitDates="getWaterDates">
             <chart-line :data="tempData" :id="4"></chart-line>
             <chart-line :data="tempData" :id="4"></chart-line>
           </chart-board>
           </chart-board>
         </div>
         </div>
-        <div class="right-bottom-right" v-loading="chartLoading"
-             element-loading-text="拼命加载中"
-             element-loading-spinner="el-icon-loading"
-             element-loading-background="rgba(0, 0, 0, 0.8)">
-          <chart-board
-            :title=" roomName +'湿度'"
-            @emitDates="getWaterDates">
+        <div
+          class="right-bottom-right"
+          v-loading="chartLoading"
+          element-loading-text="拼命加载中"
+          element-loading-spinner="el-icon-loading"
+          element-loading-background="rgba(0, 0, 0, 0.8)"
+        >
+          <chart-board :title="roomName + '湿度'" @emitDates="getWaterDates">
             <chart-line :data="rhData" :id="5"></chart-line>
             <chart-line :data="rhData" :id="5"></chart-line>
           </chart-board>
           </chart-board>
         </div>
         </div>
@@ -96,15 +132,15 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import SelectBlock from './leftTop/SelectBlock.vue'
-import SelectColumn from './leftTop/SelectColumn.vue'
-import { swiper, swiperSlide } from 'vue-awesome-swiper'
-import 'swiper/css/swiper.css'
-import SwiperContent from './leftTop/SwiperContent.vue'
-import ChartBoard from './charts/ChartBoard.vue'
-import ChartLine from './charts/ChartLine.vue'
-import ChartLineAnd from './charts/ChartLineAnd.vue'
-import {getEnv, getByRoom, getListWater, getRoomVideo} from "@/utils/api";
+import SelectBlock from "./leftTop/SelectBlock.vue";
+import SelectColumn from "./leftTop/SelectColumn.vue";
+import { swiper, swiperSlide } from "vue-awesome-swiper";
+import "swiper/css/swiper.css";
+import SwiperContent from "./leftTop/SwiperContent.vue";
+import ChartBoard from "./charts/ChartBoard.vue";
+import ChartLine from "./charts/ChartLine.vue";
+import ChartLineAnd from "./charts/ChartLineAnd.vue";
+import { getEnv, getByRoom, getListWater, getRoomVideo } from "@/utils/api";
 import { timeDate, Debounce } from "@/utils";
 import { timeDate, Debounce } from "@/utils";
 
 
 export default {
 export default {
@@ -117,111 +153,119 @@ export default {
     SwiperContent,
     SwiperContent,
     ChartBoard,
     ChartBoard,
     ChartLine,
     ChartLine,
-    ChartLineAnd
+    ChartLineAnd,
   },
   },
   data() {
   data() {
     return {
     return {
       leftTopSelected: false, // 左上是否点击了要选择
       leftTopSelected: false, // 左上是否点击了要选择
-      simulatedData: [ // 左上 —— 模拟的数据
-        { id: 1, name: '1' },
-        { id: 2, name: '11' },
-        { id: 3, name: '111' },
-        { id: 4, name: '1111' },
-        { id: 5, name: '1111' },
-        { id: 6, name: '11111' },
-        { id: 7, name: '111111' },
-        { id: 8, name: '1111111' },
+      simulatedData: [
+        // 左上 —— 模拟的数据
+        { id: 1, name: "1" },
+        { id: 2, name: "11" },
+        { id: 3, name: "111" },
+        { id: 4, name: "1111" },
+        { id: 5, name: "1111" },
+        { id: 6, name: "11111" },
+        { id: 7, name: "111111" },
+        { id: 8, name: "1111111" },
       ],
       ],
-      swiperOption: { // 左上 —— 循环滑动
+      swiperOption: {
+        // 左上 —— 循环滑动
         slidesPerView: 4,
         slidesPerView: 4,
         autoplay: {
         autoplay: {
           delay: 3000,
           delay: 3000,
           stopOnLastSlide: true,
           stopOnLastSlide: true,
-          disableOnInteraction: true
+          disableOnInteraction: true,
         },
         },
         loop: true,
         loop: true,
       },
       },
       swiperData: [],
       swiperData: [],
       waterDates: [], // 用水量模拟
       waterDates: [], // 用水量模拟
-      waterData: { // 左中 —— 模拟数据
-        xAxisName: '水量',
-        xAxisData: ['07-01', '07-02', '07-03', '07-04', '07-05'],
-        yAxisName: '吨',
-        yAxisData: [37.1, 37.4, 36.8, 37.9, 34.2]
+      waterData: {
+        // 左中 —— 模拟数据
+        xAxisName: "水量",
+        xAxisData: ["07-01", "07-02", "07-03", "07-04", "07-05"],
+        yAxisName: "吨",
+        yAxisData: [37.1, 37.4, 36.8, 37.9, 34.2],
       },
       },
       tempData: {
       tempData: {
-        xAxisName: '温度',
+        xAxisName: "温度",
         xAxisData: [],
         xAxisData: [],
-        yAxisName: '℃',
+        yAxisName: "℃",
         yAxisData: [],
         yAxisData: [],
       },
       },
       rhData: {
       rhData: {
-        xAxisName: '湿度',
+        xAxisName: "湿度",
         xAxisData: [],
         xAxisData: [],
-        yAxisName: 'RH',
+        yAxisName: "RH",
         yAxisData: [],
         yAxisData: [],
       },
       },
-      roomName: '',
+      roomName: "",
       elecDates: [], // 用电量时间
       elecDates: [], // 用电量时间
       isVideo: false,
       isVideo: false,
-      cameraOne: 'ws://36.26.62.70:9080/camera_relay?tcpaddr=admin%3Ahmkj6688%40172.16.3.62',
-      cameraTwo: 'rtsp://admin:hmkj6688@172.16.3.62/cam/realmonitor?channel=1&subtype=0',
+      cameraOne:
+        "ws://36.26.62.70:9080/camera_relay?tcpaddr=admin%3Ahmkj6688%40172.16.3.62",
+      cameraTwo:
+        "rtsp://admin:hmkj6688@172.16.3.62/cam/realmonitor?channel=1&subtype=0",
       loading: true,
       loading: true,
       weatherLoading: true,
       weatherLoading: true,
-      chartLoading: true
-    }
+      chartLoading: true,
+    };
   },
   },
   computed: {
   computed: {
     swipers() {
     swipers() {
       return this.$refs.mySwiper.swiper;
       return this.$refs.mySwiper.swiper;
-    }
+    },
   },
   },
   methods: {
   methods: {
     init() {
     init() {
-      getEnv({}).then(res => {
-        if(res.code === 10000) {
+      getEnv({}).then((res) => {
+        if (res.code === 10000) {
           this.swiperData = res.data;
           this.swiperData = res.data;
           this.loading = false;
           this.loading = false;
         }
         }
-      })
+      });
     },
     },
-    leftTopSelect() { // 左上角的选择是否显示
-      this.leftTopSelected = !this.leftTopSelected
+    leftTopSelect() {
+      // 左上角的选择是否显示
+      this.leftTopSelected = !this.leftTopSelected;
     },
     },
-    getWaterDates(value) { // 左中 获取时间
-      this.waterDates = value
+    getWaterDates(value) {
+      // 左中 获取时间
+      this.waterDates = value;
     },
     },
-    getElecDates(value) { // 左下 获取时间
-      this.elecDates = value
+    getElecDates(value) {
+      // 左下 获取时间
+      this.elecDates = value;
     },
     },
     getRoomId: Debounce(function(id) {
     getRoomId: Debounce(function(id) {
       let params = {
       let params = {
         roomId: id,
         roomId: id,
         endDate: timeDate(new Date().getTime()),
         endDate: timeDate(new Date().getTime()),
-        type: 1
-      }
-      getByRoom(params).then(res => {
-        if(res.code === 10000) {
+        type: 1,
+      };
+      getByRoom(params).then((res) => {
+        if (res.code === 10000) {
           this.setTempAndRh(res.data);
           this.setTempAndRh(res.data);
         }
         }
-      })
+      });
       let params1 = {
       let params1 = {
         roomId: id,
         roomId: id,
         endDate: timeDate(new Date().getTime()),
         endDate: timeDate(new Date().getTime()),
-        type: 2
-      }
-      getListWater(params1).then(res => {
-        if(res.code === 10000) {
+        type: 2,
+      };
+      getListWater(params1).then((res) => {
+        if (res.code === 10000) {
           this.setWeather(res.data);
           this.setWeather(res.data);
         }
         }
-      })
-      getRoomVideo({roomId: id}).then(res => {
-        if(res.code === 10000) {
+      });
+      getRoomVideo({ roomId: id }).then((res) => {
+        if (res.code === 10000) {
           this.isVideo = true;
           this.isVideo = true;
           this.cameraOne = res.data.wsUrl;
           this.cameraOne = res.data.wsUrl;
           this.cameraTwo = res.data.rtspUrl;
           this.cameraTwo = res.data.rtspUrl;
         }
         }
-      })
+      });
     }),
     }),
 
 
     setTempAndRh(data) {
     setTempAndRh(data) {
@@ -230,40 +274,40 @@ export default {
       this.rhData.xAxisData = [];
       this.rhData.xAxisData = [];
       this.rhData.yAxisData = [];
       this.rhData.yAxisData = [];
       this.roomName = data.roomName;
       this.roomName = data.roomName;
-      data.semperatures.forEach(item => {
+      data.semperatures.forEach((item) => {
         this.tempData.xAxisData.push(item.createTime);
         this.tempData.xAxisData.push(item.createTime);
         this.tempData.yAxisData.push(item.value);
         this.tempData.yAxisData.push(item.value);
-      })
-      data.humidities.forEach(item => {
+      });
+      data.humidities.forEach((item) => {
         this.rhData.xAxisData.push(item.createTime);
         this.rhData.xAxisData.push(item.createTime);
         this.rhData.yAxisData.push(item.value);
         this.rhData.yAxisData.push(item.value);
-      })
+      });
       this.chartLoading = false;
       this.chartLoading = false;
     },
     },
     setWeather(data) {
     setWeather(data) {
       this.waterData.xAxisData = [];
       this.waterData.xAxisData = [];
       this.waterData.yAxisData = [];
       this.waterData.yAxisData = [];
-      data.data.forEach(item => {
+      data.data.forEach((item) => {
         this.waterData.xAxisData.push(item.createTime);
         this.waterData.xAxisData.push(item.createTime);
-        this.waterData.yAxisData.push(item.value)
-      })
+        this.waterData.yAxisData.push(item.value);
+      });
       this.weatherLoading = false;
       this.weatherLoading = false;
     },
     },
     initData() {
     initData() {
-      getByRoom({}).then(res => {
-        if(res.code === 10000) {
+      getByRoom({}).then((res) => {
+        if (res.code === 10000) {
           this.setTempAndRh(res.data);
           this.setTempAndRh(res.data);
         }
         }
-      })
+      });
       let params1 = {
       let params1 = {
         endDate: timeDate(new Date().getTime()),
         endDate: timeDate(new Date().getTime()),
-        type: 2
-      }
-      getListWater(params1).then(res => {
-        if(res.code === 10000) {
+        type: 2,
+      };
+      getListWater(params1).then((res) => {
+        if (res.code === 10000) {
           this.setWeather(res.data);
           this.setWeather(res.data);
         }
         }
-      })
+      });
     },
     },
     onEnter() {
     onEnter() {
       this.swipers.autoplay.stop();
       this.swipers.autoplay.stop();
@@ -273,10 +317,10 @@ export default {
     },
     },
   },
   },
   mounted() {
   mounted() {
-    this.init()
+    this.init();
     this.initData();
     this.initData();
-  }
-}
+  },
+};
 </script>
 </script>
 
 
 <style scoped>
 <style scoped>
@@ -292,16 +336,20 @@ export default {
 .left {
 .left {
   /* background-color: #fff; */
   /* background-color: #fff; */
   width: 40%;
   width: 40%;
-  height: 100%;
+  height: 95%;
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
-  justify-content: space-around;
+  justify-content: space-between;
 }
 }
 /* 左上 */
 /* 左上 */
 .left-top {
 .left-top {
   width: 100%;
   width: 100%;
   height: 30%;
   height: 30%;
-  background: linear-gradient(156deg, rgba(15, 21, 43, 1) 0%, rgba(0, 0, 0, 1) 100%);
+  background: linear-gradient(
+    156deg,
+    rgba(15, 21, 43, 1) 0%,
+    rgba(0, 0, 0, 1) 100%
+  );
 }
 }
 /* 左上 - title */
 /* 左上 - title */
 .left-top-title {
 .left-top-title {
@@ -317,9 +365,9 @@ export default {
   position: relative;
   position: relative;
 }
 }
 .left-top-title-left::before {
 .left-top-title-left::before {
-  content: '';
+  content: "";
   height: 85%;
   height: 85%;
-  border: 2px solid #66FFFF;
+  border: 2px solid #66ffff;
   position: absolute;
   position: absolute;
   top: 0;
   top: 0;
   left: 0;
   left: 0;
@@ -352,10 +400,10 @@ export default {
   background-size: 100% 100%;
   background-size: 100% 100%;
   position: relative;
   position: relative;
 }
 }
-.left-top-title-right::after{
-  content: '';
+.left-top-title-right::after {
+  content: "";
   height: 85%;
   height: 85%;
-  border: 2px solid #66FFFF;
+  border: 2px solid #66ffff;
   position: absolute;
   position: absolute;
   top: 0;
   top: 0;
   right: 0;
   right: 0;
@@ -365,12 +413,12 @@ export default {
   position: absolute;
   position: absolute;
   top: 35px;
   top: 35px;
   left: -340px;
   left: -340px;
-  border: 2px solid #66FFFF;
+  border: 2px solid #66ffff;
   border-radius: 5px;
   border-radius: 5px;
   padding: 15px 10px;
   padding: 15px 10px;
   display: flex;
   display: flex;
   z-index: 100;
   z-index: 100;
-  background-color: rgba(15,21,43, 0.6);
+  background-color: rgba(15, 21, 43, 0.6);
 }
 }
 /* 左上 - 滑动 */
 /* 左上 - 滑动 */
 .left-top-content {
 .left-top-content {
@@ -387,7 +435,7 @@ export default {
 .left-bottom {
 .left-bottom {
   background-color: rgb(228, 32, 32);
   background-color: rgb(228, 32, 32);
   width: 100%;
   width: 100%;
-  height: 30%;
+  height: 26.3%;
 }
 }
 
 
 /** 右边 */
 /** 右边 */
@@ -414,11 +462,12 @@ export default {
 /* 右下 */
 /* 右下 */
 .right-bottom {
 .right-bottom {
   display: flex;
   display: flex;
-  background: rgb(3,16,50);
+  background: rgb(3, 16, 50);
+  height: 25%;
 }
 }
 .right-bottom-left {
 .right-bottom-left {
   width: 50%;
   width: 50%;
-  border-right: 2px solid #66FFFF;
+  border-right: 2px solid #66ffff;
 }
 }
 .right-bottom-right {
 .right-bottom-right {
   margin-left: 10px;
   margin-left: 10px;

+ 62 - 62
src/views/Zoology/charts/ChartLine.vue

@@ -1,31 +1,29 @@
 <!--
 <!--
  * @Author: your name
  * @Author: your name
  * @Date: 2021-10-25 16:13:34
  * @Date: 2021-10-25 16:13:34
- * @LastEditTime: 2021-10-25 16:55:38
+ * @LastEditTime: 2021-12-17 08:46:16
  * @LastEditors: Please set LastEditors
  * @LastEditors: Please set LastEditors
  * @Description: 折线图
  * @Description: 折线图
  * @FilePath: \hyyfScreen\src\views\Zoology\charts\ChartLine.vue
  * @FilePath: \hyyfScreen\src\views\Zoology\charts\ChartLine.vue
 -->
 -->
 <template>
 <template>
-  <div :id="'chartLine' + id" class="chart-line">
-
-  </div>
+  <div :id="'chartLine' + id" class="chart-line"></div>
 </template>
 </template>
 <script>
 <script>
 export default {
 export default {
   props: {
   props: {
     id: {
     id: {
-      type: Number
+      type: Number,
     },
     },
     data: {
     data: {
       type: Object,
       type: Object,
-      required: true
-    }
+      required: true,
+    },
   },
   },
   data() {
   data() {
     return {
     return {
-      myChart: null
-    }
+      myChart: null,
+    };
   },
   },
   methods: {
   methods: {
     init() {
     init() {
@@ -36,109 +34,111 @@ export default {
         //   y: 0
         //   y: 0
         // },
         // },
         tooltip: {
         tooltip: {
-          trigger: 'axis',
+          trigger: "axis",
         },
         },
         // legend: {
         // legend: {
         //   data: ['头']
         //   data: ['头']
         // },
         // },
         // color: ['#3aa0ff', '#4dcb73', '#fad337', '#f2637b', '#975fe4'],
         // color: ['#3aa0ff', '#4dcb73', '#fad337', '#f2637b', '#975fe4'],
         grid: {
         grid: {
-          top: '10%',
-          left: '10%',
-          bottom: '20%',
-          right: '10%'
+          top: "10%",
+          left: "10%",
+          bottom: "20%",
+          right: "10%",
         },
         },
         xAxis: [
         xAxis: [
           {
           {
-            type: 'category',
+            type: "category",
             // name: this.data.xAxisName,
             // name: this.data.xAxisName,
             data: this.data.xAxisData,
             data: this.data.xAxisData,
             axisPointer: {
             axisPointer: {
-              type: 'shadow'
+              type: "shadow",
             },
             },
             axisLabel: {
             axisLabel: {
               textStyle: {
               textStyle: {
-                color: '#fff'
-              }
+                color: "#fff",
+              },
             },
             },
             axisLine: {
             axisLine: {
               show: true,
               show: true,
               lineStyle: {
               lineStyle: {
-                color: 'rgb(0, 255, 255)',
-              }
+                color: "rgb(0, 255, 255)",
+              },
             },
             },
-            axisTick:{
-              show: false
+            axisTick: {
+              show: false,
             },
             },
-          }
+          },
         ],
         ],
-        yAxis: //[
-          {
-            type: 'value',
-            name: this.data.yAxisName,
-            nameTextStyle: {
-              color: 'red'
-            },
-            axisLabel: {
-              textStyle: {
-                color: '#fff'
-              },
-              formatter: '{value}' + this.data.yAxisName
-            },
-            axisLine: {
-              show: true,
-              lineStyle: {
-                color: 'rgb(0, 255, 255)',
-              }
+        //[
+        yAxis: {
+          type: "value",
+          name: this.data.yAxisName,
+          nameTextStyle: {
+            color: "red",
+          },
+          axisLabel: {
+            textStyle: {
+              color: "#fff",
             },
             },
-            axisTick:{
-              show:false
+            formatter: "{value}" + this.data.yAxisName,
+          },
+          axisLine: {
+            show: true,
+            lineStyle: {
+              color: "rgb(0, 255, 255)",
             },
             },
-            splitLine:{
-              show:false
-            }
           },
           },
+          axisTick: {
+            show: false,
+          },
+          splitLine: {
+            show: false,
+          },
+        },
         //],
         //],
         series: [
         series: [
           {
           {
             name: this.data.xAxisName,
             name: this.data.xAxisName,
-            type: 'line',
+            type: "line",
             smooth: false,
             smooth: false,
             data: this.data.yAxisData,
             data: this.data.yAxisData,
             itemStyle: {
             itemStyle: {
               normal: {
               normal: {
-                color: '#3aa0ff',
+                color: "#3aa0ff",
                 lineStyle: {
                 lineStyle: {
-                  color: '#3aa0ff'
-                }
-              }
-            }
-          }
-        ]
-      }
+                  color: "#3aa0ff",
+                },
+              },
+            },
+          },
+        ],
+      };
       this.myChart.setOption(options);
       this.myChart.setOption(options);
-    }
+    },
   },
   },
   mounted() {
   mounted() {
-    this.myChart = this.$echarts.init(document.getElementById('chartLine' + this.id));
+    this.myChart = this.$echarts.init(
+      document.getElementById("chartLine" + this.id)
+    );
     this.init();
     this.init();
   },
   },
   watch: {
   watch: {
     data: {
     data: {
       handler(newVal) {
       handler(newVal) {
-        if(newVal) {
+        if (newVal) {
           this.myChart.clear();
           this.myChart.clear();
           this.init();
           this.init();
         }
         }
       },
       },
       deep: true,
       deep: true,
-    }
-  }
-}
+    },
+  },
+};
 </script>
 </script>
 <style scoped>
 <style scoped>
 .chart-line {
 .chart-line {
   width: 100%;
   width: 100%;
-  height: 160px;
+  height: 100%;
 }
 }
 </style>
 </style>