|
|
|
@ -293,7 +293,7 @@ |
|
|
|
<!-- 水箱 --> |
|
|
|
<!-- 水箱 --> |
|
|
|
<div class="monitor-flex-left" v-if="activeName.includes('水箱')"> |
|
|
|
<div class="monitor-flex-left" v-if="activeName.includes('水箱')"> |
|
|
|
<div class="control-top"> |
|
|
|
<div class="control-top"> |
|
|
|
<water-tank :waterLevel="item.waterLevel"></water-tank> |
|
|
|
<water-tank :waterLevel="getWaterLevelPercentage(item)"></water-tank> |
|
|
|
<div class="monitor-words"> |
|
|
|
<div class="monitor-words"> |
|
|
|
<!-- <div class="words-li"> |
|
|
|
<!-- <div class="words-li"> |
|
|
|
<div class="ash">补水阀启停:</div> |
|
|
|
<div class="ash">补水阀启停:</div> |
|
|
|
@ -333,7 +333,7 @@ |
|
|
|
<div class="control-bottom"> |
|
|
|
<div class="control-bottom"> |
|
|
|
<div class="words-li words-li5"> |
|
|
|
<div class="words-li words-li5"> |
|
|
|
<div class="ash">实际液位:</div> |
|
|
|
<div class="ash">实际液位:</div> |
|
|
|
<div class="white">{{ item.waterLevel }} %</div> |
|
|
|
<div class="white">{{ item.waterLevel }} 米</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="words-li words-li5"> |
|
|
|
<div class="words-li words-li5"> |
|
|
|
<div class="ash">实际温度:</div> |
|
|
|
<div class="ash">实际温度:</div> |
|
|
|
@ -609,12 +609,12 @@ |
|
|
|
item.engineeringMaxValue, |
|
|
|
item.engineeringMaxValue, |
|
|
|
item.engineeringMaxValueId, |
|
|
|
item.engineeringMaxValueId, |
|
|
|
'上限', |
|
|
|
'上限', |
|
|
|
item.name.includes('温度') ? '℃' : item.name.includes('压力') ? 'bar' : item.name.includes('液位') ? 'm' : '' |
|
|
|
item.name.includes('温度') ? '℃' : item.name.includes('压力') ? 'bar' : item.name.includes('液位') ? '米' : '' |
|
|
|
) |
|
|
|
) |
|
|
|
" @input="handleInput(item)" @blur="handleBlur()"></el-input> |
|
|
|
" @input="handleInput(item)" @blur="handleBlur()"></el-input> |
|
|
|
<div class="white" v-if="item.name.includes('温度')">℃</div> |
|
|
|
<div class="white" v-if="item.name.includes('温度')">℃</div> |
|
|
|
<div class="white" v-else-if="item.name.includes('压力')">bar</div> |
|
|
|
<div class="white" v-else-if="item.name.includes('压力')">bar</div> |
|
|
|
<div class="white" v-else-if="item.name.includes('液位')">m</div> |
|
|
|
<div class="white" v-else-if="item.name.includes('液位')">米</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="words-li words-li4"> |
|
|
|
<div class="words-li words-li4"> |
|
|
|
<div class="ash">下限:</div> |
|
|
|
<div class="ash">下限:</div> |
|
|
|
@ -624,12 +624,12 @@ |
|
|
|
item.engineeringMinValue, |
|
|
|
item.engineeringMinValue, |
|
|
|
item.engineeringMinValueId, |
|
|
|
item.engineeringMinValueId, |
|
|
|
'下限', |
|
|
|
'下限', |
|
|
|
item.name.includes('温度') ? '℃' : item.name.includes('压力') ? 'bar' : item.name.includes('液位') ? 'm' : '' |
|
|
|
item.name.includes('温度') ? '℃' : item.name.includes('压力') ? 'bar' : item.name.includes('液位') ? '米' : '' |
|
|
|
) |
|
|
|
) |
|
|
|
" @input="handleInput(item)" @blur="handleBlur()"></el-input> |
|
|
|
" @input="handleInput(item)" @blur="handleBlur()"></el-input> |
|
|
|
<div class="white" v-if="item.name.includes('温度')">℃</div> |
|
|
|
<div class="white" v-if="item.name.includes('温度')">℃</div> |
|
|
|
<div class="white" v-else-if="item.name.includes('压力')">bar</div> |
|
|
|
<div class="white" v-else-if="item.name.includes('压力')">bar</div> |
|
|
|
<div class="white" v-else-if="item.name.includes('液位')">m</div> |
|
|
|
<div class="white" v-else-if="item.name.includes('液位')">米</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="words-li words-li4"> |
|
|
|
<div class="words-li words-li4"> |
|
|
|
<div class="ash">数字上限:</div> |
|
|
|
<div class="ash">数字上限:</div> |
|
|
|
@ -655,6 +655,60 @@ |
|
|
|
) |
|
|
|
) |
|
|
|
" @input="handleInput(item)" @blur="handleBlur()"></el-input> |
|
|
|
" @input="handleInput(item)" @blur="handleBlur()"></el-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="words-li words-li4"> |
|
|
|
|
|
|
|
<div class="ash">设定上限值:</div> |
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
|
|
v-if="item.maxValueSet !== null" |
|
|
|
|
|
|
|
v-model="item.maxValueSet" |
|
|
|
|
|
|
|
size="mini" |
|
|
|
|
|
|
|
placeholder="请输入" |
|
|
|
|
|
|
|
@keyup.enter.native=" |
|
|
|
|
|
|
|
handleEnter( |
|
|
|
|
|
|
|
item, |
|
|
|
|
|
|
|
item.maxValueSet, |
|
|
|
|
|
|
|
item.maxValueSetId, |
|
|
|
|
|
|
|
'设定上限值', |
|
|
|
|
|
|
|
item.name.includes('温度') ? '℃' : item.name.includes('压力') ? 'bar' : item.name.includes('液位') ? '米' : '' |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
" |
|
|
|
|
|
|
|
@input="handleInput(item)" |
|
|
|
|
|
|
|
@blur="handleBlur()"> |
|
|
|
|
|
|
|
</el-input> |
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
|
|
v-else |
|
|
|
|
|
|
|
value="--" |
|
|
|
|
|
|
|
readonly |
|
|
|
|
|
|
|
size="mini" |
|
|
|
|
|
|
|
class="disabled-input"> |
|
|
|
|
|
|
|
</el-input> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="words-li words-li4"> |
|
|
|
|
|
|
|
<div class="ash">设定下限值:</div> |
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
|
|
v-if="item.minValueSet !== null" |
|
|
|
|
|
|
|
v-model="item.minValueSet" |
|
|
|
|
|
|
|
size="mini" |
|
|
|
|
|
|
|
placeholder="请输入" |
|
|
|
|
|
|
|
@keyup.enter.native=" |
|
|
|
|
|
|
|
handleEnter( |
|
|
|
|
|
|
|
item, |
|
|
|
|
|
|
|
item.minValueSet, |
|
|
|
|
|
|
|
item.minValueSetId, |
|
|
|
|
|
|
|
'设定下限值', |
|
|
|
|
|
|
|
item.name.includes('温度') ? '℃' : item.name.includes('压力') ? 'bar' : item.name.includes('液位') ? '米' : '' |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
" |
|
|
|
|
|
|
|
@input="handleInput(item)" |
|
|
|
|
|
|
|
@blur="handleBlur()"> |
|
|
|
|
|
|
|
</el-input> |
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
|
|
v-else |
|
|
|
|
|
|
|
value="--" |
|
|
|
|
|
|
|
readonly |
|
|
|
|
|
|
|
size="mini" |
|
|
|
|
|
|
|
class="disabled-input"> |
|
|
|
|
|
|
|
</el-input> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="words-li words-li4"> |
|
|
|
<div class="words-li words-li4"> |
|
|
|
<div class="ash">校准值:</div> |
|
|
|
<div class="ash">校准值:</div> |
|
|
|
<el-input v-model="item.calibrationValue" size="mini" placeholder="请输入" @keyup.enter.native=" |
|
|
|
<el-input v-model="item.calibrationValue" size="mini" placeholder="请输入" @keyup.enter.native=" |
|
|
|
@ -663,22 +717,57 @@ |
|
|
|
item.calibrationValue, |
|
|
|
item.calibrationValue, |
|
|
|
item.calibrationValueId, |
|
|
|
item.calibrationValueId, |
|
|
|
'校准值', |
|
|
|
'校准值', |
|
|
|
item.name.includes('温度') ? '℃' : item.name.includes('压力') ? 'bar' : item.name.includes('液位') ? 'm' : '' |
|
|
|
item.name.includes('温度') ? '℃' : item.name.includes('压力') ? 'bar' : item.name.includes('液位') ? '米' : '' |
|
|
|
) |
|
|
|
) |
|
|
|
" @input="handleInput(item)" @blur="handleBlur()"></el-input> |
|
|
|
" @input="handleInput(item)" @blur="handleBlur()"></el-input> |
|
|
|
<div class="white" v-if="item.name.includes('温度')">℃</div> |
|
|
|
<div class="white" v-if="item.name.includes('温度')">℃</div> |
|
|
|
<div class="white" v-else-if="item.name.includes('压力')">bar</div> |
|
|
|
<div class="white" v-else-if="item.name.includes('压力')">bar</div> |
|
|
|
<div class="white" v-else-if="item.name.includes('液位')">m</div> |
|
|
|
<div class="white" v-else-if="item.name.includes('液位')">米</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="words-li words-li4"> |
|
|
|
<div class="words-li words-li4"> |
|
|
|
<div class="ash">当前值:</div> |
|
|
|
<div class="ash">当前值:</div> |
|
|
|
<div class="white"> |
|
|
|
<div class="white"> |
|
|
|
<span v-if="item.name.includes('温度')">{{ item.temp }}℃</span> |
|
|
|
<span v-if="item.name.includes('温度')">{{ item.temp }}℃</span> |
|
|
|
<span v-else-if="item.name.includes('压力')">{{ item.pressure }}bar</span> |
|
|
|
<span v-else-if="item.name.includes('压力')">{{ item.pressure }}bar</span> |
|
|
|
<span v-else-if="item.name.includes('液位')">{{ item.waterLevel }}%</span> |
|
|
|
<span v-else-if="item.name.includes('液位')">{{ item.waterLevel }}米</span> |
|
|
|
<span v-else>{{ item.temp }}</span> |
|
|
|
<span v-else>{{ item.temp }}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="words-li words-li4"> |
|
|
|
|
|
|
|
<div class="ash">最低设定值:</div> |
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
|
|
v-if="item.minSet !== null" |
|
|
|
|
|
|
|
v-model="item.minSet" |
|
|
|
|
|
|
|
size="mini" |
|
|
|
|
|
|
|
placeholder="请输入" |
|
|
|
|
|
|
|
@keyup.enter.native=" |
|
|
|
|
|
|
|
handleEnter( |
|
|
|
|
|
|
|
item, |
|
|
|
|
|
|
|
item.minSet, |
|
|
|
|
|
|
|
item.minSetId, |
|
|
|
|
|
|
|
'设定下限值', |
|
|
|
|
|
|
|
item.name.includes('温度') ? '℃' : item.name.includes('压力') ? 'bar' : item.name.includes('液位') ? '米' : '' |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
" |
|
|
|
|
|
|
|
@input="handleInput(item)" |
|
|
|
|
|
|
|
@blur="handleBlur()"> |
|
|
|
|
|
|
|
</el-input> |
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
|
|
v-else |
|
|
|
|
|
|
|
value="--" |
|
|
|
|
|
|
|
readonly |
|
|
|
|
|
|
|
size="mini" |
|
|
|
|
|
|
|
class="disabled-input"> |
|
|
|
|
|
|
|
</el-input> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="words-li words-li4"> |
|
|
|
|
|
|
|
<div class="ash">异常复位:</div> |
|
|
|
|
|
|
|
<div class="white"> |
|
|
|
|
|
|
|
<el-switch style="display: block" v-model="item.exceptionReset" active-color="#13ce66" |
|
|
|
|
|
|
|
active-text="开" inactive-text="关" @change="handleReset(item)"> |
|
|
|
|
|
|
|
</el-switch> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -877,7 +966,7 @@ export default { |
|
|
|
let deviceItem = { |
|
|
|
let deviceItem = { |
|
|
|
...item, |
|
|
|
...item, |
|
|
|
waterLevel: Number(item.waterLevel), |
|
|
|
waterLevel: Number(item.waterLevel), |
|
|
|
runningStatus: Number(item.runningStatus) == 0 ? "停止" : "运行", //运行状态 |
|
|
|
runningStatus: Number(item.runningStatus) === 0 ? "停止" : "运行", //运行状态 |
|
|
|
hotPumpStatus: |
|
|
|
hotPumpStatus: |
|
|
|
Number(item.switchStatus) === 0 |
|
|
|
Number(item.switchStatus) === 0 |
|
|
|
? false |
|
|
|
? false |
|
|
|
@ -887,9 +976,10 @@ export default { |
|
|
|
switchStatus: Number(item.switchStatus) == 0 ? false : true, //启停控制 |
|
|
|
switchStatus: Number(item.switchStatus) == 0 ? false : true, //启停控制 |
|
|
|
alarmStatus: Number(item.alarmStatus) == 0 ? "无故障" : "故障", //故障状态 |
|
|
|
alarmStatus: Number(item.alarmStatus) == 0 ? "无故障" : "故障", //故障状态 |
|
|
|
handAutomaticSwitch: |
|
|
|
handAutomaticSwitch: |
|
|
|
Number(item.handAutomaticSwitch) == 0 ? false : true, //手自动状态 |
|
|
|
Number(item.handAutomaticSwitch) == 1 ? false : true, //手自动状态 |
|
|
|
openSwitch: Number(item.openSwitch) == 0 ? false : true, //一键启动 |
|
|
|
openSwitch: Number(item.openSwitch) == 0 ? false : true, //一键启动 |
|
|
|
closeSwitch: Number(item.closeSwitch) == 0 ? false : true, //一键停止 |
|
|
|
closeSwitch: Number(item.closeSwitch) == 0 ? false : true, //一键停止 |
|
|
|
|
|
|
|
exceptionReset: Number(item.exceptionReset) == 0 ? false : true, //异常复位 |
|
|
|
// 传感器参数设置相关字段,确保初始化 |
|
|
|
// 传感器参数设置相关字段,确保初始化 |
|
|
|
engineeringMaxValue: item.engineeringMaxValue || '', |
|
|
|
engineeringMaxValue: item.engineeringMaxValue || '', |
|
|
|
engineeringMaxValueId: item.engineeringMaxValueId || '', |
|
|
|
engineeringMaxValueId: item.engineeringMaxValueId || '', |
|
|
|
@ -955,22 +1045,20 @@ export default { |
|
|
|
let deviceItem = { |
|
|
|
let deviceItem = { |
|
|
|
...item, |
|
|
|
...item, |
|
|
|
waterLevel: Number(item.waterLevel), |
|
|
|
waterLevel: Number(item.waterLevel), |
|
|
|
runningStatus: |
|
|
|
runningStatus: Number(item.runningStatus) === 0 ? "停止" : "运行", //运行状态 |
|
|
|
Number(item.runningStatus) == 0 ? "运行" : "停止", //运行状态 |
|
|
|
|
|
|
|
hotPumpStatus: |
|
|
|
hotPumpStatus: |
|
|
|
Number(item.switchStatus) === 0 |
|
|
|
Number(item.switchStatus) === 0 |
|
|
|
? false |
|
|
|
? false |
|
|
|
: Number(item.switchStatus) === 4 |
|
|
|
: Number(item.switchStatus) === 4 |
|
|
|
? true |
|
|
|
? true |
|
|
|
: "未知状态", // 热泵开关状态 |
|
|
|
: "", // 热泵开关状态 |
|
|
|
switchStatus: |
|
|
|
switchStatus: Number(item.switchStatus) == 0 ? false : true, //启停控制 |
|
|
|
Number(item.switchStatus) == 0 ? false : true, //启停控制 |
|
|
|
alarmStatus: Number(item.alarmStatus) == 0 ? "无故障" : "故障", //故障状态 |
|
|
|
alarmStatus: |
|
|
|
|
|
|
|
Number(item.alarmStatus) == 0 ? "无故障" : "故障", //故障状态 |
|
|
|
|
|
|
|
handAutomaticSwitch: |
|
|
|
handAutomaticSwitch: |
|
|
|
Number(item.handAutomaticSwitch) == 0 ? false : true, //手自动状态 |
|
|
|
Number(item.handAutomaticSwitch) == 1 ? false : true, //手自动状态 |
|
|
|
openSwitch: Number(item.openSwitch) == 0 ? false : true, //一键启动 |
|
|
|
openSwitch: Number(item.openSwitch) == 0 ? false : true, //一键启动 |
|
|
|
closeSwitch: Number(item.closeSwitch) == 0 ? false : true, //一键停止 |
|
|
|
closeSwitch: Number(item.closeSwitch) == 0 ? false : true, //一键停止 |
|
|
|
|
|
|
|
exceptionReset: Number(item.exceptionReset) == 0 ? false : true, //异常复位 |
|
|
|
// 传感器参数设置相关字段,确保初始化 |
|
|
|
// 传感器参数设置相关字段,确保初始化 |
|
|
|
engineeringMaxValue: item.engineeringMaxValue || '', |
|
|
|
engineeringMaxValue: item.engineeringMaxValue || '', |
|
|
|
engineeringMaxValueId: item.engineeringMaxValueId || '', |
|
|
|
engineeringMaxValueId: item.engineeringMaxValueId || '', |
|
|
|
@ -1160,6 +1248,34 @@ export default { |
|
|
|
item.switchStatus = !item.switchStatus; |
|
|
|
item.switchStatus = !item.switchStatus; |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 异常复位 |
|
|
|
|
|
|
|
handleReset(item) { |
|
|
|
|
|
|
|
this.$confirm( |
|
|
|
|
|
|
|
`确定要切换设备"${item.name}"的异常复位为:${item.exceptionReset ? "开" : "关 吗?" |
|
|
|
|
|
|
|
}`, |
|
|
|
|
|
|
|
"提示", |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
confirmButtonText: "确定", |
|
|
|
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
|
|
|
type: "warning", |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
.then(() => { |
|
|
|
|
|
|
|
// 这里调用请求函数,示例中只是简单打印信息 |
|
|
|
|
|
|
|
console.log("请求后台", exceptionReset); |
|
|
|
|
|
|
|
let param = null; |
|
|
|
|
|
|
|
if (item.exceptionReset) { |
|
|
|
|
|
|
|
param = 1; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
param = 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.hadleOperationConrol(item.exceptionResetId, param); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.catch(() => { |
|
|
|
|
|
|
|
// 用户取消操作,恢复开关状态 |
|
|
|
|
|
|
|
item.exceptionReset = !item.exceptionReset; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
// 处理输入事件,过滤非数字字符 |
|
|
|
// 处理输入事件,过滤非数字字符 |
|
|
|
handleInput(item) { |
|
|
|
handleInput(item) { |
|
|
|
console.log("校验"); |
|
|
|
console.log("校验"); |
|
|
|
@ -1212,15 +1328,36 @@ export default { |
|
|
|
// this.$modal.msgError("操作失败"); |
|
|
|
// this.$modal.msgError("操作失败"); |
|
|
|
console.log("应该更新状态的"); |
|
|
|
console.log("应该更新状态的"); |
|
|
|
// 更新所有设备状态; |
|
|
|
// 更新所有设备状态; |
|
|
|
this.getWaterList(); |
|
|
|
this.getWaterList().finally(() => { |
|
|
|
|
|
|
|
// 关闭 loading 效果 |
|
|
|
|
|
|
|
this.loading = false; |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch((error) => { |
|
|
|
.catch((error) => { |
|
|
|
console.log("请求发生错误,更新设备状态", error); |
|
|
|
console.log("请求发生错误,更新设备状态", error); |
|
|
|
// 更新所有设备状态; |
|
|
|
// 更新所有设备状态; |
|
|
|
this.getWaterList(); |
|
|
|
this.getWaterList().finally(() => { |
|
|
|
|
|
|
|
// 关闭 loading 效果 |
|
|
|
|
|
|
|
this.loading = false; |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 计算水箱百分比 |
|
|
|
|
|
|
|
getWaterLevelPercentage(item) { |
|
|
|
|
|
|
|
let maxValue = 2.5; // 默认最大值 |
|
|
|
|
|
|
|
// 根据水箱名称判断最大值 |
|
|
|
|
|
|
|
if (item.name) { |
|
|
|
|
|
|
|
if (item.name.includes('水箱1')) { |
|
|
|
|
|
|
|
maxValue = 2.5; |
|
|
|
|
|
|
|
} else if (item.name.includes('水箱2')) { |
|
|
|
|
|
|
|
maxValue = 2.5; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
let percentage = Number((item.waterLevel / maxValue * 100).toFixed(2)); |
|
|
|
|
|
|
|
// 如果计算的值大于100,则返回100 |
|
|
|
|
|
|
|
return percentage > 100 ? 100 : percentage; |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
@ -1443,6 +1580,7 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
.white { |
|
|
|
.white { |
|
|
|
color: #ffffff; |
|
|
|
color: #ffffff; |
|
|
|
|
|
|
|
white-space: nowrap; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.words-li { |
|
|
|
.words-li { |
|
|
|
|