|
|
@ -130,6 +130,22 @@ |
|
|
|
<span class="goodData">{{ coldWaterControlObj.curValue }}℃</span> |
|
|
|
<span class="goodData">{{ coldWaterControlObj.curValue }}℃</span> |
|
|
|
<!-- <span class="badData" v-else>{{ coldWaterControlObj.curValue }}</span> --> |
|
|
|
<!-- <span class="badData" v-else>{{ coldWaterControlObj.curValue }}</span> --> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="hostStatus-li"> |
|
|
|
|
|
|
|
<span>冷水设定值偏移:</span> |
|
|
|
|
|
|
|
<!-- <span class="goodData">{{ offsetValuerControlObj.curValue }}℃</span> --> |
|
|
|
|
|
|
|
<span class="goodData"> |
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
|
|
v-model="offsetValuerControlObj.curValue" |
|
|
|
|
|
|
|
size="mini" |
|
|
|
|
|
|
|
@keyup.enter.native=" |
|
|
|
|
|
|
|
handleEnter(offsetValuerControlObj, $event) |
|
|
|
|
|
|
|
" |
|
|
|
|
|
|
|
@input="handleInput(offsetValuerControlObj.curValue)" |
|
|
|
|
|
|
|
@blur="handleBlur()" |
|
|
|
|
|
|
|
></el-input |
|
|
|
|
|
|
|
>℃</span |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- 负载 --> |
|
|
|
<!-- 负载 --> |
|
|
|
<LoadData class="loadData" :hostData="hostData"></LoadData> |
|
|
|
<LoadData class="loadData" :hostData="hostData"></LoadData> |
|
|
@ -217,7 +233,14 @@ |
|
|
|
<div class="rightDot"> |
|
|
|
<div class="rightDot"> |
|
|
|
<div class="leftDot"> |
|
|
|
<div class="leftDot"> |
|
|
|
<span>{{ subItem.otherName }}:</span> |
|
|
|
<span>{{ subItem.otherName }}:</span> |
|
|
|
<span class="dotData">{{ subItem.curValue }}</span> |
|
|
|
<span |
|
|
|
|
|
|
|
:class="{ |
|
|
|
|
|
|
|
dotData: !isSpecialValue(subItem.curValue), |
|
|
|
|
|
|
|
goodData: isSpecialValue(subItem.curValue), |
|
|
|
|
|
|
|
badData: subItem.curValue === '故障', |
|
|
|
|
|
|
|
}" |
|
|
|
|
|
|
|
>{{ subItem.curValue }}</span |
|
|
|
|
|
|
|
> |
|
|
|
<span>{{ subItem.unit }}</span> |
|
|
|
<span>{{ subItem.unit }}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -241,7 +264,14 @@ |
|
|
|
<div class="rightDot"> |
|
|
|
<div class="rightDot"> |
|
|
|
<div class="leftDot"> |
|
|
|
<div class="leftDot"> |
|
|
|
<span>{{ subItem.otherName }}:</span> |
|
|
|
<span>{{ subItem.otherName }}:</span> |
|
|
|
<span class="dotData">{{ subItem.curValue }}</span> |
|
|
|
<span |
|
|
|
|
|
|
|
:class="{ |
|
|
|
|
|
|
|
dotData: !isSpecialValue(subItem.curValue), |
|
|
|
|
|
|
|
goodData: isSpecialValue(subItem.curValue), |
|
|
|
|
|
|
|
badData: subItem.curValue === '故障', |
|
|
|
|
|
|
|
}" |
|
|
|
|
|
|
|
>{{ subItem.curValue }}</span |
|
|
|
|
|
|
|
> |
|
|
|
<span>{{ subItem.unit }}</span> |
|
|
|
<span>{{ subItem.unit }}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -258,6 +288,7 @@ import { |
|
|
|
hostDetailsData, |
|
|
|
hostDetailsData, |
|
|
|
hostTemData, |
|
|
|
hostTemData, |
|
|
|
runTime, |
|
|
|
runTime, |
|
|
|
|
|
|
|
operationConrol, |
|
|
|
} from "@/api/centerairC/sysMonitor"; |
|
|
|
} from "@/api/centerairC/sysMonitor"; |
|
|
|
import { alarmRecordList } from "@/api/alarm/alarmRecord"; |
|
|
|
import { alarmRecordList } from "@/api/alarm/alarmRecord"; |
|
|
|
import { cpmList } from "@/api/device/gather"; |
|
|
|
import { cpmList } from "@/api/device/gather"; |
|
|
@ -285,6 +316,7 @@ export default { |
|
|
|
timeObj: {}, //累计运行时间 |
|
|
|
timeObj: {}, //累计运行时间 |
|
|
|
coldWaterSetObj: {}, //本地出水温度设定值 |
|
|
|
coldWaterSetObj: {}, //本地出水温度设定值 |
|
|
|
coldWaterControlObj: {}, //远程出水温度设定值 |
|
|
|
coldWaterControlObj: {}, //远程出水温度设定值 |
|
|
|
|
|
|
|
offsetValuerControlObj: {}, //偏移值设定 |
|
|
|
compressorData1: [], //压缩机1参数 |
|
|
|
compressorData1: [], //压缩机1参数 |
|
|
|
compressorData2: [], |
|
|
|
compressorData2: [], |
|
|
|
compressorData3: [], |
|
|
|
compressorData3: [], |
|
|
@ -445,12 +477,16 @@ export default { |
|
|
|
const isCombinedCondition2 = |
|
|
|
const isCombinedCondition2 = |
|
|
|
Number(item.paramType) === 12 && |
|
|
|
Number(item.paramType) === 12 && |
|
|
|
item.otherName.includes("用户冷水设定值"); |
|
|
|
item.otherName.includes("用户冷水设定值"); |
|
|
|
|
|
|
|
const isCombinedCondition3 = |
|
|
|
|
|
|
|
Number(item.paramType) === 12 && |
|
|
|
|
|
|
|
item.otherName.includes("冷水设定值偏移"); |
|
|
|
// 返回 false 表示要排除该元素 |
|
|
|
// 返回 false 表示要排除该元素 |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
!isSpecificParamType && |
|
|
|
!isSpecificParamType && |
|
|
|
!isCombinedCondition0 && |
|
|
|
!isCombinedCondition0 && |
|
|
|
!isCombinedCondition1 && |
|
|
|
!isCombinedCondition1 && |
|
|
|
!isCombinedCondition2 |
|
|
|
!isCombinedCondition2 && |
|
|
|
|
|
|
|
!isCombinedCondition3 |
|
|
|
); |
|
|
|
); |
|
|
|
}); |
|
|
|
}); |
|
|
|
// 根据 ordernum 进行排序 |
|
|
|
// 根据 ordernum 进行排序 |
|
|
@ -482,6 +518,12 @@ export default { |
|
|
|
) { |
|
|
|
) { |
|
|
|
// 远程出水温度设定值 |
|
|
|
// 远程出水温度设定值 |
|
|
|
this.coldWaterControlObj = item; |
|
|
|
this.coldWaterControlObj = item; |
|
|
|
|
|
|
|
} else if ( |
|
|
|
|
|
|
|
item.paramType === "12" && |
|
|
|
|
|
|
|
item.otherName.includes("冷水设定值偏移") |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
// 远程出水温度设定值 |
|
|
|
|
|
|
|
this.offsetValuerControlObj = item; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
@ -658,6 +700,78 @@ export default { |
|
|
|
const specialValues = ["运行", "启动", "正常"]; |
|
|
|
const specialValues = ["运行", "启动", "正常"]; |
|
|
|
return specialValues.includes(value); |
|
|
|
return specialValues.includes(value); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 处理输入事件,过滤非数字字符 |
|
|
|
|
|
|
|
handleInput(item) { |
|
|
|
|
|
|
|
console.log("校验"); |
|
|
|
|
|
|
|
// 实时校验并过滤非数字和非小数点字符 |
|
|
|
|
|
|
|
let input = String(item).replace(/[^\d.]/g, ""); |
|
|
|
|
|
|
|
// 检查输入是否以小数点开头 |
|
|
|
|
|
|
|
if (input.startsWith(".")) { |
|
|
|
|
|
|
|
// 如果以小数点开头,去除小数点 |
|
|
|
|
|
|
|
input = input.slice(1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.offsetValuerControlObj.curValue = input; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 失去焦点 |
|
|
|
|
|
|
|
handleBlur() { |
|
|
|
|
|
|
|
// this.currentFocusIndex = ""; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
handleEnter(item, event) { |
|
|
|
|
|
|
|
console.log("请求后端", item); |
|
|
|
|
|
|
|
if (!item) { |
|
|
|
|
|
|
|
this.$modal.msgError("请输入偏移值"); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 失去焦点 |
|
|
|
|
|
|
|
event.target.blur(); |
|
|
|
|
|
|
|
this.$confirm( |
|
|
|
|
|
|
|
`确定要修改冷水设定值偏移10V的温度为:${item.curValue} ℃吗?`, |
|
|
|
|
|
|
|
"提示", |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
confirmButtonText: "确定", |
|
|
|
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
|
|
|
type: "warning", |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
.then(() => { |
|
|
|
|
|
|
|
this.hadleOperationConrol(item.id, item.curValue); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.catch(() => { |
|
|
|
|
|
|
|
// 用户取消操作,需要更新原来的频率 |
|
|
|
|
|
|
|
// this.$emit("upList"); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 操作 |
|
|
|
|
|
|
|
hadleOperationConrol(id, param) { |
|
|
|
|
|
|
|
let data = { |
|
|
|
|
|
|
|
id: id, |
|
|
|
|
|
|
|
param: param, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
console.log("操作参数", data); |
|
|
|
|
|
|
|
operationConrol([data]) |
|
|
|
|
|
|
|
.then((res) => { |
|
|
|
|
|
|
|
if (res.code == 200) { |
|
|
|
|
|
|
|
this.$modal.msgSuccess("指令下发成功!"); |
|
|
|
|
|
|
|
// 开启 loading 效果 |
|
|
|
|
|
|
|
this.loading = true; |
|
|
|
|
|
|
|
// 更新所有设备状态; |
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
|
|
this.getHostDetailsData(); |
|
|
|
|
|
|
|
this.loading = false; |
|
|
|
|
|
|
|
}, 5000); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
// this.$modal.msgError("操作失败"); |
|
|
|
|
|
|
|
console.log("应该更新状态的"); |
|
|
|
|
|
|
|
// 更新所有设备状态; |
|
|
|
|
|
|
|
this.getHostDetailsData(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.catch((error) => { |
|
|
|
|
|
|
|
console.log("请求发生错误,更新设备状态", error); |
|
|
|
|
|
|
|
// 更新所有设备状态; |
|
|
|
|
|
|
|
this.getHostDetailsData(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
</script> |
|
|
|
</script> |
|
|
@ -1230,3 +1344,23 @@ export default { |
|
|
|
color: #1df3e8; |
|
|
|
color: #1df3e8; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |
|
|
|
|
|
|
|
<style scoped> |
|
|
|
|
|
|
|
.goodData >>> .el-input--mini { |
|
|
|
|
|
|
|
font-size: 0.16rem !important; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.goodData >>> .el-input { |
|
|
|
|
|
|
|
width: 0.5rem !important; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.goodData >>> .el-input--mini .el-input__inner { |
|
|
|
|
|
|
|
height: 0.28rem !important; |
|
|
|
|
|
|
|
line-height: 20.28rem !important; |
|
|
|
|
|
|
|
padding: 0 !important; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.goodData >>> .el-input__inner { |
|
|
|
|
|
|
|
background: transparent !important; |
|
|
|
|
|
|
|
border: 1px solid transparent !important; |
|
|
|
|
|
|
|
color: #3df574 !important; |
|
|
|
|
|
|
|
font-weight: bold; |
|
|
|
|
|
|
|
box-shadow: none !important; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
</style> |
|
|
|