From 89ab2ec7f8790c5cc184de98682af032c69c2afc Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期三, 11 九月 2024 15:13:27 +0800 Subject: [PATCH] 2024.9.11 --- src/views/management/ManagementView.vue | 51 +++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 45 insertions(+), 6 deletions(-) diff --git a/src/views/management/ManagementView.vue b/src/views/management/ManagementView.vue index a9d296b..3fe6eac 100644 --- a/src/views/management/ManagementView.vue +++ b/src/views/management/ManagementView.vue @@ -1,11 +1,50 @@ <template> - <el-row> - <el-col :span="8">1</el-col> - <el-col :span="8">2</el-col> - <el-col :span="8">3</el-col> - </el-row> + <!-- <el-row> 缁熻绠$悊 </el-row> --> + <ProblemTrack ref="statusRef"></ProblemTrack> + <EvaluateSummary :height="height"></EvaluateSummary> </template> -<script setup></script> +<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> -- Gitblit v1.9.3