From eb4111e0fd7110e5aa6a00608da2da9af21a3035 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期一, 20 十月 2025 10:13:32 +0800
Subject: [PATCH] 2025.10.18 修改嫉妒报告生成逻辑
---
src/components/monitor/FactorTrend.vue | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/src/components/monitor/FactorTrend.vue b/src/components/monitor/FactorTrend.vue
index eddadbb..babe6f1 100644
--- a/src/components/monitor/FactorTrend.vue
+++ b/src/components/monitor/FactorTrend.vue
@@ -1,14 +1,15 @@
<template>
<BaseCard size="medium" direction="left">
<template #content>
- <el-scrollbar height="calc(98vh - var(--bevel-length-2))">
+ <DashBoard ref="dashBoardRef" :factor-datas="factorDatas"></DashBoard>
+ <el-scrollbar :height="height" always>
<div v-for="item in seriesList" :key="item.key">
<el-row
v-show="selectFactorType.includes(item.series.key)"
justify="space-between"
class="wrap"
>
- <div class="flex-col">
+ <div class="flex-col m-r-4">
<div class="factor-name">{{ item.series.name }}</div>
<div class="factor-value">
{{ item.series.currentData }}
@@ -34,8 +35,10 @@
import { checkboxOptions } from '@/constant/checkbox-options';
import { factorName } from '@/constant/factor-name';
import { factorUnit } from '@/constant/factor-unit';
+import DashBoard from '@/views/realtimemode/component/DashBoard.vue';
export default {
+ components: { DashBoard },
props: {
loading: Boolean,
factorDatas: FactorDatas,
@@ -56,16 +59,13 @@
},
data() {
return {
+ height: 'calc(99vh - var(--bevel-length-2))',
xAxis: [],
allSeries: new Map(),
seriesList: []
};
},
- computed: {
- // factorTypes() {
- // return checkboxOptions(this.deviceType);
- // }
- },
+ computed: {},
watch: {
factorDatas: {
handler() {
@@ -165,7 +165,16 @@
getUnit(label) {
// fixeme 2024.5.15 淇CO灞曠ず鍗曚綅鍜屽師濮嬫暟鎹笉涓�鑷撮棶棰�
return label == 'CO' ? '渭g/m鲁' : factorUnit[label].unit;
+ },
+ calcHeight() {
+ const h1 = this.$refs.dashBoardRef
+ ? this.$refs.dashBoardRef.$el.offsetHeight
+ : 0;
+ this.height = `calc(98vh - var(--bevel-length-2) - ${h1}px)`;
}
+ },
+ mounted() {
+ this.calcHeight();
}
};
</script>
--
Gitblit v1.9.3