|
|
|
@ -291,14 +291,20 @@ |
|
|
|
@click="controlValve(valveOneArr, '二通阀门')" |
|
|
|
@click="controlValve(valveOneArr, '二通阀门')" |
|
|
|
></div> |
|
|
|
></div> |
|
|
|
<!-- 三通阀门 --> |
|
|
|
<!-- 三通阀门 --> |
|
|
|
<img :src="getThreeWaySrc" :class="['text', openPercent <= 0 ? 'three-way-less' : 'three-way']" alt="" /> |
|
|
|
<img |
|
|
|
<div :class="['text', openPercent <= 0 ? 'text11' : 'text18']">三通阀</div> |
|
|
|
:src="getThreeWaySrc" |
|
|
|
|
|
|
|
:class="['text', openPercent < 100 ? 'three-way' : 'three-way-less']" |
|
|
|
|
|
|
|
alt="" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<div :class="['text', openPercent < 100 ? 'text18' : 'text11']"> |
|
|
|
|
|
|
|
三通阀 |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="text valve2">{{ openPercent }}%</div> |
|
|
|
<div class="text valve2">{{ openPercent }}%</div> |
|
|
|
<div v-if="openPercent > 0 && openPercent < 100" class="text valve3"> |
|
|
|
<div :class="['text', openPercent < 100 ? 'valve3' : 'valve4']"> |
|
|
|
{{ 100 - openPercent }}% |
|
|
|
{{ 100 - openPercent }}% |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div |
|
|
|
<div |
|
|
|
:class="['text', openPercent <= 0 ? 'click3' : 'click4']" |
|
|
|
:class="['text', openPercent < 100 ? 'click4' : 'click3']" |
|
|
|
@click="controlValve(valveTwoArr, '三通阀门')" |
|
|
|
@click="controlValve(valveTwoArr, '三通阀门')" |
|
|
|
></div> |
|
|
|
></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -404,9 +410,13 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
openPercent() { |
|
|
|
openPercent() { |
|
|
|
// 三通阀百分比数值 |
|
|
|
// 三通阀百分比数值 |
|
|
|
// return 100; |
|
|
|
// return 10; |
|
|
|
return Number(this.getHotMeterTemp(this.valveTwoArr, "开度反馈", 4)); |
|
|
|
// 获取原始值并转成数字 |
|
|
|
|
|
|
|
const originVal = Number( |
|
|
|
|
|
|
|
this.getHotMeterTemp(this.valveTwoArr, "开度反馈", 4) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
// 小于0返回0,大于100返回100,否则返回原值 |
|
|
|
|
|
|
|
return Math.max(0, Math.min(100, originVal)); |
|
|
|
}, |
|
|
|
}, |
|
|
|
getThreeWaySrc() { |
|
|
|
getThreeWaySrc() { |
|
|
|
if (this.openPercent <= 0) { |
|
|
|
if (this.openPercent <= 0) { |
|
|
|
@ -1283,6 +1293,12 @@ export default { |
|
|
|
color: #ffffff; |
|
|
|
color: #ffffff; |
|
|
|
cursor: pointer; |
|
|
|
cursor: pointer; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.valve4 { |
|
|
|
|
|
|
|
top: 4.55rem; |
|
|
|
|
|
|
|
left: 11.9rem; |
|
|
|
|
|
|
|
color: #ffffff; |
|
|
|
|
|
|
|
cursor: pointer; |
|
|
|
|
|
|
|
} |
|
|
|
.three-way { |
|
|
|
.three-way { |
|
|
|
top: 4.4rem; |
|
|
|
top: 4.4rem; |
|
|
|
left: 9.2rem; |
|
|
|
left: 9.2rem; |
|
|
|
|