From b6503508db24a2d01bdcab6d6cb112f1c5311500 Mon Sep 17 00:00:00 2001 From: zch Date: Wed, 4 Dec 2024 13:40:14 +0800 Subject: [PATCH] =?UTF-8?q?add(ems):=20=E6=B7=BB=E5=8A=A0=E7=9E=AC?= =?UTF-8?q?=E6=97=B6=E6=B5=81=E9=87=8F=E6=80=BB=E5=92=8C=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在表格下方添加瞬时流量总和的显示 - 在 data 中添加 totalFluxFlow 属性用于存储瞬时流量总和 - 在请求数据后计算瞬时流量总和并赋值给 totalFluxFlow - 在重置表单时添加 totalFluxFlow 的重置操作 --- .../ems/record/recordLatestSteamInstant/index.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/views/ems/record/recordLatestSteamInstant/index.vue b/src/views/ems/record/recordLatestSteamInstant/index.vue index 3b69b2a..6f27dca 100644 --- a/src/views/ems/record/recordLatestSteamInstant/index.vue +++ b/src/views/ems/record/recordLatestSteamInstant/index.vue @@ -162,6 +162,9 @@ + + + 瞬时流量的和:{{totalFluxFlow}} t/h @@ -252,6 +255,9 @@ export default { }, data() { return { + + totalFluxFlow: null, // 用于存储瞬时流量的总和 + //下拉树List baseMonitorInfoOptions: [], //左侧树结构List @@ -375,7 +381,9 @@ export default { this.queryParams.params['sensorId'] = this.queryParams.sensorId; } latestSteamInstantList(this.queryParams).then(response => { + this.recordSteamInstantList = response.data + this.totalFluxFlow = this.recordSteamInstantList.reduce((sum, item) => sum + (parseFloat(item.fluxFlow) || 0), 0); this.loading = false }) }, @@ -398,7 +406,8 @@ export default { press: null, density: null, differencePress: null, - recordTime: null + recordTime: null, + totalFluxFlow: null } this.resetForm('form') },