فهرست منبع

增加主机供水温度、新风送风露点、换热站供水温度筛选条件

kukuasir@vip.qq.com 1 سال پیش
والد
کامیت
1f30dbf7f0
1فایلهای تغییر یافته به همراه46 افزوده شده و 4 حذف شده
  1. 46 4
      src/views/equip-management/report/list.vue

+ 46 - 4
src/views/equip-management/report/list.vue

@@ -717,7 +717,6 @@ export default {
 				this.total = result.count;
 				this.filterDataSource(result.data || []);
 				this.genTableData();
-				console.log('>>> tableData: ', this.tableData);
 				loading.close();
 			}).catch(err => {
 				console.log('[reportList]请求错误: ', err);
@@ -734,15 +733,58 @@ export default {
 		},
 		/** 本地过滤数据 */
 		filterDataSource(data) {
-			/*
+			const hpSuTempMin = this.extraParams.hpSuTempMin;
+			const hpSuTempMax = this.extraParams.hpSuTempMax;
+			const dhDewPointMin = this.extraParams.dhDewPointMin;
+			const dhDewPointMax = this.extraParams.dhDewPointMax;
+			const hexSuTempMin = this.extraParams.hexSuTempMin;
+			const hexSuTempMax = this.extraParams.hexSuTempMax;
 			const filterHpSuTemp = (this.extraParams.hpSuTempMax > this.extraParams.hpSuTempMin);
 			const filterDhDewPoint = (this.extraParams.dhDewPointMax > this.extraParams.dhDewPointMin);
 			const filterHexSuTemp = (this.extraParams.hexSuTempMax > this.extraParams.hexSuTempMin);
 			for (let i = 0; i < data.length; i++) {
 				const element = data[i];
-				// if (filterHpSuTemp && this.hpSuTempIsInRange())
+				const boxList = element.boxList || [];
+				for (let j = 0; j < boxList.length; j++) {
+					const box = boxList[j];
+					// 过滤主机
+					if (filterHpSuTemp) {
+						const hostCtrl = box.hostCtrl || [];
+						let newHpCtrl = [];
+						for (let x = 0; x < hostCtrl.length; x++) {
+							const hp = hostCtrl[x];
+							if (hp.host_su_temp >= hpSuTempMin && hp.host_su_temp <= hpSuTempMax) {
+								newHpCtrl.push(hp);
+							}
+						}
+						box.hostCtrl = newHpCtrl;
+					}
+					// 过滤新风机
+					if (filterDhDewPoint) {
+						const newTrendCtrl = box.newTrendCtrl || [];
+						let newDhCtrl = [];
+						for (let x = 0; x < newTrendCtrl.length; x++) {
+							const dh = newTrendCtrl[x];
+							if (dh.nt_dew_point >= dhDewPointMin && dh.nt_dew_point <= dhDewPointMax) {
+								newDhCtrl.push(dh);
+							}
+						}
+						box.newTrendCtrl = newDhCtrl;
+					}
+					// 过滤换热站
+					if (filterHexSuTemp) {
+						const heatExchangeCtrl = box.hex || [];
+						let newHexCtrl = [];
+						for (let x = 0; x < heatExchangeCtrl.length; x++) {
+							const hex = heatExchangeCtrl[x];
+							if (hex.hex_su_temp >= hexSuTempMin && hex.hex_su_temp <= hexSuTempMax) {
+								newHexCtrl.push(hex);
+							}
+						}
+						box.hex = newHexCtrl;
+					}
+				}
 			}
-			*/
 			this.dataSource = data;
 		},
 		/** 计算主机供水温度属性值是否在范围内 */