|
|
|
@ -596,91 +596,85 @@ export default { |
|
|
|
let data = res.rows; |
|
|
|
let data = res.rows; |
|
|
|
data.forEach((item) => { |
|
|
|
data.forEach((item) => { |
|
|
|
if (item.mtType === "0") { |
|
|
|
if (item.mtType === "0") { |
|
|
|
// 主机参数 |
|
|
|
/** 所有主机参数(不过滤) */ |
|
|
|
this.hostData = item.list; |
|
|
|
this.hostData = item.list; |
|
|
|
// 主机参数分开两列 |
|
|
|
|
|
|
|
this.leftHostData = []; |
|
|
|
/** 先处理左边面板需要提取的特定数据项 */ |
|
|
|
this.rightHostData = []; |
|
|
|
|
|
|
|
// 筛选去掉特定 paramType 的数据 |
|
|
|
|
|
|
|
// this.rightHostData = this.hostData.filter((item) => { |
|
|
|
|
|
|
|
// return !["2", "21", "20", "6", "5", "22", "26"].includes( |
|
|
|
|
|
|
|
// Number(item.paramType) |
|
|
|
|
|
|
|
// ); |
|
|
|
|
|
|
|
// }); |
|
|
|
|
|
|
|
this.rightHostData = this.hostData.filter((item) => { |
|
|
|
|
|
|
|
const specificParamTypes = [26]; |
|
|
|
|
|
|
|
// 检查是否属于需要排除的特定 paramType |
|
|
|
|
|
|
|
const isSpecificParamType = specificParamTypes.includes( |
|
|
|
|
|
|
|
Number(item.paramType) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
const isCombinedCondition0 = |
|
|
|
|
|
|
|
Number(item.paramType) === 2 && |
|
|
|
|
|
|
|
item.otherName.includes("手动启停"); |
|
|
|
|
|
|
|
// 检查是否满足 item.paramType 为 12 且 otherName 包含 "冷水控制设定值" |
|
|
|
|
|
|
|
const isCombinedCondition1 = |
|
|
|
|
|
|
|
Number(item.paramType) === 12 && |
|
|
|
|
|
|
|
item.otherName.includes("冷水控制设定值"); |
|
|
|
|
|
|
|
const isCombinedCondition2 = |
|
|
|
|
|
|
|
Number(item.paramType) === 12 && |
|
|
|
|
|
|
|
item.otherName.includes("用户冷水设定值"); |
|
|
|
|
|
|
|
const isCombinedCondition3 = |
|
|
|
|
|
|
|
Number(item.paramType) === 12 && |
|
|
|
|
|
|
|
item.otherName.includes("冷冻水偏移值设置"); |
|
|
|
|
|
|
|
// 返回 false 表示要排除该元素 |
|
|
|
|
|
|
|
return ( |
|
|
|
|
|
|
|
!isSpecificParamType && |
|
|
|
|
|
|
|
!isCombinedCondition0 && |
|
|
|
|
|
|
|
!isCombinedCondition1 && |
|
|
|
|
|
|
|
!isCombinedCondition2 && |
|
|
|
|
|
|
|
!isCombinedCondition3 |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
// 根据 ordernum 进行排序 |
|
|
|
|
|
|
|
this.rightHostData.sort((a, b) => { |
|
|
|
|
|
|
|
return Number(a.orderNum) - Number(b.orderNum); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.hostData.forEach((item) => { |
|
|
|
this.hostData.forEach((item) => { |
|
|
|
//左边主机参数 根据不同的 paramType 处理 showValue |
|
|
|
|
|
|
|
if ( |
|
|
|
if ( |
|
|
|
item.paramType === "22" && |
|
|
|
item.paramType === "22" && |
|
|
|
item.otherName.includes("远程启动信号") |
|
|
|
item.otherName.includes("远程启动信号") |
|
|
|
) { |
|
|
|
) { |
|
|
|
// 远程开关机-手动启停 |
|
|
|
/** 远程开关机-手动启停 */ |
|
|
|
// item.showValue = |
|
|
|
|
|
|
|
// Number(item.curValue) === 0 ? "自动" : "手动"; |
|
|
|
|
|
|
|
this.onOffObj = item; |
|
|
|
this.onOffObj = item; |
|
|
|
} else if (item.paramType === "26") { |
|
|
|
} else if (item.paramType === "26") { |
|
|
|
// 累计运行时间 |
|
|
|
/** 累计运行时间 */ |
|
|
|
this.timeObj = item; |
|
|
|
this.timeObj = item; |
|
|
|
} else if ( |
|
|
|
} else if ( |
|
|
|
item.paramType === "12" && |
|
|
|
item.paramType === "12" && |
|
|
|
item.otherName.includes("冷水控制设定值") |
|
|
|
item.otherName.includes("冷水控制设定值") |
|
|
|
) { |
|
|
|
) { |
|
|
|
// 本地出水温度设定值 |
|
|
|
/** 本地出水温度设定值 */ |
|
|
|
this.coldWaterSetObj = item; |
|
|
|
this.coldWaterSetObj = item; |
|
|
|
} else if ( |
|
|
|
} else if ( |
|
|
|
item.paramType === "12" && |
|
|
|
item.paramType === "12" && |
|
|
|
item.otherName.includes("用户冷水设定值") |
|
|
|
item.otherName.includes("用户冷水设定值") |
|
|
|
) { |
|
|
|
) { |
|
|
|
// 远程出水温度设定值 |
|
|
|
/** 远程出水温度设定值 */ |
|
|
|
this.coldWaterControlObj = item; |
|
|
|
this.coldWaterControlObj = item; |
|
|
|
} else if ( |
|
|
|
} else if ( |
|
|
|
item.paramType === "12" && |
|
|
|
item.paramType === "12" && |
|
|
|
item.otherName.includes("冷冻水偏移值设置") |
|
|
|
item.otherName.includes("冷冻水偏移值设置") |
|
|
|
) { |
|
|
|
) { |
|
|
|
// 远程出水温度设定值 |
|
|
|
/** 偏移值设定 */ |
|
|
|
this.offsetValuerControlObj = item; |
|
|
|
this.offsetValuerControlObj = item; |
|
|
|
// 检查 curValue 属性是否存在且为有效的数字 |
|
|
|
|
|
|
|
if ( |
|
|
|
if ( |
|
|
|
this.offsetValuerControlObj.curValue !== undefined && |
|
|
|
this.offsetValuerControlObj.curValue !== undefined && |
|
|
|
!isNaN(parseFloat(this.offsetValuerControlObj.curValue)) |
|
|
|
!isNaN(parseFloat(this.offsetValuerControlObj.curValue)) |
|
|
|
) { |
|
|
|
) { |
|
|
|
// 将 curValue 转换为整数并除以 10 |
|
|
|
/** 将 curValue 转换为整数并除以 10 */ |
|
|
|
this.offsetValuerControlObj.curValue = |
|
|
|
this.offsetValuerControlObj.curValue = |
|
|
|
parseInt(this.offsetValuerControlObj.curValue, 10) / 10; |
|
|
|
parseInt(this.offsetValuerControlObj.curValue, 10) / 10; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 右侧主机参数需要排除的项配置 |
|
|
|
|
|
|
|
* 每一项格式:{ paramType: number, otherName?: string } |
|
|
|
|
|
|
|
* - 只配置 paramType:排除该 paramType 的所有项 |
|
|
|
|
|
|
|
* - 同时配置 otherName:排除 paramType 匹配且 otherName 包含该字符串的项 |
|
|
|
|
|
|
|
* 如需新增过滤项,只需在数组中追加即可 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
const excludeList = [ |
|
|
|
|
|
|
|
{ paramType: 22, otherName: "远程启动信号" }, |
|
|
|
|
|
|
|
{ paramType: 26 }, //运行累计时间 |
|
|
|
|
|
|
|
{ paramType: 12, otherName: "冷水控制设定值" }, |
|
|
|
|
|
|
|
{ paramType: 12, otherName: "用户冷水设定值" }, |
|
|
|
|
|
|
|
{ paramType: 12, otherName: "冷冻水偏移值设置" }, |
|
|
|
|
|
|
|
{ paramType: 2, otherName: "冷水机组运行" }, |
|
|
|
|
|
|
|
{ paramType: 1, otherName: "运行" }, |
|
|
|
|
|
|
|
{ paramType: 5, otherName: "故障" }, |
|
|
|
|
|
|
|
{ paramType: 20, }, //冷冻水流 |
|
|
|
|
|
|
|
{ paramType: 21, },//冷却水流 |
|
|
|
|
|
|
|
{ paramType: 28, },//负载 |
|
|
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 生成右侧主机参数:过滤掉排除项,再按 orderNum 排序 */ |
|
|
|
|
|
|
|
this.rightHostData = this.hostData |
|
|
|
|
|
|
|
.filter((dataItem) => { |
|
|
|
|
|
|
|
return !excludeList.some((rule) => { |
|
|
|
|
|
|
|
const typeMatch = |
|
|
|
|
|
|
|
Number(dataItem.paramType) === rule.paramType; |
|
|
|
|
|
|
|
if (rule.otherName !== undefined) { |
|
|
|
|
|
|
|
return ( |
|
|
|
|
|
|
|
typeMatch && dataItem.otherName.includes(rule.otherName) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return typeMatch; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.sort((a, b) => Number(a.orderNum) - Number(b.orderNum)); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
// 使用 filter 方法过滤掉 item 为 '0' 的对象 |
|
|
|
// 使用 filter 方法过滤掉 item 为 '0' 的对象 |
|
|
|
@ -807,21 +801,22 @@ export default { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "6": // 手自动切换 |
|
|
|
// case "6": // 手自动切换 |
|
|
|
if (item.curValue === "自动") { |
|
|
|
// if (item.curValue === "自动") { |
|
|
|
return true; |
|
|
|
// return true; |
|
|
|
} |
|
|
|
// } |
|
|
|
break; |
|
|
|
// break; |
|
|
|
case "22": // 本地远程切换 |
|
|
|
// case "22": // 本地远程切换 |
|
|
|
if (item.curValue === "远程") { |
|
|
|
// if (item.curValue === "远程") { |
|
|
|
return true; |
|
|
|
// return true; |
|
|
|
} |
|
|
|
// } |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
// 冷冻水流20,冷却水流21,如果curValue不为0,则返回true |
|
|
|
if (item.paramType === paramType && Number(item.curValue) !== 0) { |
|
|
|
if (item.paramType === paramType && Number(item.curValue) !== 0) { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -1671,7 +1666,7 @@ export default { |
|
|
|
rotateY(40deg); |
|
|
|
rotateY(40deg); |
|
|
|
} |
|
|
|
} |
|
|
|
.rightFan2 { |
|
|
|
.rightFan2 { |
|
|
|
z-index: 10; |
|
|
|
z-index: 10; |
|
|
|
position: absolute; |
|
|
|
position: absolute; |
|
|
|
top: 2.4rem; |
|
|
|
top: 2.4rem; |
|
|
|
left: 4.2rem; |
|
|
|
left: 4.2rem; |
|
|
|
|