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> -->
  <ProblemTrack ref="statusRef"></ProblemTrack>
  <!-- <TaskStats ref="statusRef"></TaskStats> -->
  <EvaluateSummary :height="height"></EvaluateSummary>
  <!-- <TaskSummary ref="summaryRef"></TaskSummary> -->
  <!-- <ReInspectionView ref="summaryRef"></ReInspectionView> -->
</template>
 
<script>
import TaskStats from '@/views/management/TaskStats.vue'
import TaskSummary from '@/views/management/TaskSummary.vue'
import EvaluateSummary from '@/views/management/evaluate/EvaluateSummary.vue'
import ReInspectionView from '@/views/inspection/ReInspectionView.vue'
import ProblemTrack from '@/views/inspection/problem/ProblemTrack.vue'
import { vResize } from '@/utils/resize-observer'
 
export default {
  components: { TaskStats, TaskSummary, EvaluateSummary, ReInspectionView, ProblemTrack },
  data() {
    return {
      // height: '500px',
      statusHeight: 200,
      summaryHeight: 200
    }
  },
  computed: {
    height() {
      const h = this.statusHeight + this.summaryHeight + 5
      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
      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>