|
|
|
@ -67,23 +67,22 @@
|
|
|
|
|
/> |
|
|
|
|
<div class="monitor-words"> |
|
|
|
|
<div class="words-li"> |
|
|
|
|
<div class="ash">运行状态模式:</div> |
|
|
|
|
<div class="ash">开关控制:</div> |
|
|
|
|
<div class="white"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="item.hotPumpStatus" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
<el-switch |
|
|
|
|
style="display: block" |
|
|
|
|
v-model="item.switchStatus" |
|
|
|
|
active-color="#13ce66" |
|
|
|
|
active-text="开机" |
|
|
|
|
inactive-text="关机" |
|
|
|
|
@change="handleHotPump(item)" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in hotPumpOptions" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-switch> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="control-bottom"> |
|
|
|
|
<div class="words-li"> |
|
|
|
|
<div class="ash">故障信息:</div> |
|
|
|
|
<el-tag |
|
|
|
@ -96,6 +95,22 @@
|
|
|
|
|
item.alarmStatus |
|
|
|
|
}}</el-tag> |
|
|
|
|
</div> |
|
|
|
|
<div class="words-li"> |
|
|
|
|
<div class="ash">运行状态:</div> |
|
|
|
|
<el-tag |
|
|
|
|
size="mini" |
|
|
|
|
v-if="item.hotPumpStatus === 0" |
|
|
|
|
type="danger" |
|
|
|
|
>关机</el-tag |
|
|
|
|
> |
|
|
|
|
<el-tag |
|
|
|
|
size="mini" |
|
|
|
|
v-if="item.hotPumpStatus === 4" |
|
|
|
|
type="success" |
|
|
|
|
> |
|
|
|
|
开机 |
|
|
|
|
</el-tag> |
|
|
|
|
</div> |
|
|
|
|
<div class="words-li"> |
|
|
|
|
<div class="ash">实际温度:</div> |
|
|
|
|
<div class="white">{{ item.temp }}℃</div> |
|
|
|
@ -123,7 +138,6 @@
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<!-- 裙楼供水泵、高区供水泵、中厨供水泵 --> |
|
|
|
|
<div class="monitor-flex-left" v-if="activeName.includes('供水泵')"> |
|
|
|
|
<div class="control-top"> |
|
|
|
@ -593,15 +607,7 @@ export default {
|
|
|
|
|
value: 0, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "制冷", |
|
|
|
|
value: 2, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "制热", |
|
|
|
|
value: 3, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "热水", |
|
|
|
|
label: "开机", |
|
|
|
|
value: 4, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
@ -933,26 +939,10 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
// 设置热泵开关状态 |
|
|
|
|
handleHotPump(item) { |
|
|
|
|
// 记录原始状态 |
|
|
|
|
const originalStatus = item.hotPumpStatus; |
|
|
|
|
// 根据 value 值获取对应的 label |
|
|
|
|
let statusLabel = ""; |
|
|
|
|
switch (item.hotPumpStatus) { |
|
|
|
|
case 0: |
|
|
|
|
statusLabel = "关机"; |
|
|
|
|
break; |
|
|
|
|
case 2: |
|
|
|
|
statusLabel = "制冷"; |
|
|
|
|
break; |
|
|
|
|
case 3: |
|
|
|
|
statusLabel = "制热"; |
|
|
|
|
break; |
|
|
|
|
case 4: |
|
|
|
|
statusLabel = "热水"; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
this.$confirm( |
|
|
|
|
`确定要切换设备"${item.name}"的状态为:${statusLabel} 吗?"`, |
|
|
|
|
`确定要切换设备"${item.name}"的状态为:${ |
|
|
|
|
item.switchStatus ? "开机" : "关机 吗?" |
|
|
|
|
}`, |
|
|
|
|
"提示", |
|
|
|
|
{ |
|
|
|
|
confirmButtonText: "确定", |
|
|
|
@ -961,11 +951,19 @@ export default {
|
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
.then(() => { |
|
|
|
|
this.hadleOperationConrol(item.switchStatusId, item.hotPumpStatus); |
|
|
|
|
// 这里调用请求函数,示例中只是简单打印信息 |
|
|
|
|
console.log("请求后台", item.switchStatus); |
|
|
|
|
let param = null; |
|
|
|
|
if (item.switchStatus) { |
|
|
|
|
param = 1; |
|
|
|
|
} else { |
|
|
|
|
param = 0; |
|
|
|
|
} |
|
|
|
|
this.hadleOperationConrol(item.switchStatusId, param); |
|
|
|
|
}) |
|
|
|
|
.catch(() => { |
|
|
|
|
// 用户取消操作,恢复状态 |
|
|
|
|
item.hotPumpStatus = originalStatus; |
|
|
|
|
// 用户取消操作,恢复开关状态 |
|
|
|
|
item.switchStatus = !item.switchStatus; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 设置供水泵手自动状态 |
|
|
|
|