riku
2025-06-09 38ff09bd2a638bc43a365efe0390cc3510d62e68
src/views/management/ManagementView.vue
@@ -1,12 +1,50 @@
<template>
  <el-row> 统计管理 </el-row>
  <TaskStats></TaskStats>
  <TaskSummary></TaskSummary>
  <!-- <el-row> 统计管理 </el-row> -->
  <ProblemTrack ref="statusRef"></ProblemTrack>
  <!-- <EvaluateSummary :height="height"></EvaluateSummary> -->
</template>
<script setup>
import TaskStats from '@/views/management/TaskStats.vue'
import TaskSummary from '@/views/management/TaskSummary.vue'
<script>
import EvaluateSummary from '@/views/management/evaluate/EvaluateSummary.vue'
import ProblemTrack from '@/views/inspection/problem/ProblemTrack.vue'
import { vResize } from '@/utils/resize-observer'
export default {
  components: { EvaluateSummary, 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>