Xxxu
2020-07-07 4f953ffc89fc95f83b152e914c5e65938b440f17
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<template>
  <div style="margin-top:10px">
    <el-row :gutter="10" id="downPart">
      <el-col :span="8">
        <air-chart></air-chart>
      </el-col>
      <el-col :span="8">
        <tvoc-chart></tvoc-chart>
      </el-col>
      <el-col :span="8">
        <wind-chart></wind-chart>
      </el-col>
    </el-row>
  </div>
</template>
 
<script>
import AirChart from './air-chart'
import TvocChart from './tvoc-chart'
import WindChart from './wind-chart'
export default {
  data () {
    return {}
  },
  components: {
    AirChart,
    TvocChart,
    WindChart
  },
 
  activated () {
    this.init()
  },
  methods: {
    init () {
      var h = window.innerHeight || document.body.clientHeight
      var downPart = document.getElementById('downPart')
      var num = h / 3 - 15
      downPart.style.height = num + 'px'
      this.$store.commit('updateChartHeight', num)
    }
  }
}
</script>
 
<style>
 
</style>