add(ems): 添加瞬时流量总和显示

- 在表格下方添加瞬时流量总和的显示
- 在 data 中添加 totalFluxFlow 属性用于存储瞬时流量总和
- 在请求数据后计算瞬时流量总和并赋值给 totalFluxFlow
- 在重置表单时添加 totalFluxFlow 的重置操作
master
zch 9 months ago
parent 15bbafd7dd
commit b6503508db

@ -162,6 +162,9 @@
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<span v-if="totalFluxFlow!==null">{{totalFluxFlow}} t/h</span>
</el-col>
</el-row>
@ -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')
},

Loading…
Cancel
Save