riku
2024-07-15 b292a0a81869547e94fd85e783f9597db241a87e
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
49
50
51
52
53
54
55
56
<template>
  <!-- <el-row> 统计管理 </el-row> -->
  <!-- <SelfInspection></SelfInspection> -->
  <!-- <JointEnforcement></JointEnforcement> -->
  <TaskStats></TaskStats>
  <TaskSummary></TaskSummary>
  <DustMonitor></DustMonitor>
</template>
 
<script>
import SelfInspection from '@/views/inspection/SelfInspection.vue'
import JointEnforcement from '@/views/inspection/JointEnforcement.vue'
import TaskSummary from '@/views/management/TaskSummary.vue'
import TaskStats from '@/views/management/TaskStats.vue'
import DustMonitor from '@/views/monitor/DustMonitor.vue'
import { vResize } from '@/utils/resize-observer'
 
export default {
  components: { SelfInspection, JointEnforcement, TaskSummary, TaskStats, DustMonitor },
  data() {
    return {
      // height: '500px',
      statusHeight: 200,
      summaryHeight: 200
    }
  },
  computed: {
    height() {
      const h = this.statusHeight + this.summaryHeight
      return `calc(var(--fy-body-height) - ${h}px)`
    }
  },
  methods: {
    calcHeight() {
      const h1 = this.$refs.statusRef.$el.offsetHeight
      const h2 = this.$refs.summaryRef.$el.offsetHeight
      const h = h1 + h2
      return `calc(var(--fy-body-height) - ${h}px)`
    }
  },
  mounted() {
    // vResize.mounted(this.$refs.statusRef.$el, ({ height }) => {
    //   this.statusHeight = height
    // })
    // vResize.mounted(this.$refs.summaryRef.$el, ({ height }) => {
    //   this.summaryHeight = height
    // })
  },
  unmounted() {
    // vResize.unmounted(this.$refs.statusRef.$el)
    // vResize.unmounted(this.$refs.summaryRef.$el)
  }
}
</script>
 
<style scoped></style>