pull/63/head
孙萌 2023-12-05 11:44:18 +08:00
parent 5edfe5088c
commit 542d2b79d4
5 changed files with 86 additions and 46 deletions

View File

@ -225,6 +225,11 @@
color: #00FFBA;
}
.table-title .title-text {
font-size: 16px;
margin-left: 15px;
}
.index {
width: 100%;
height: 100%;

File diff suppressed because one or more lines are too long

View File

@ -245,6 +245,10 @@
font-weight: 400;
color: #00FFBA;
}
.title-text{
font-size: 16px;
margin-left: 15px;
}
}
.index {

View File

@ -2,6 +2,9 @@
<div class="waterPump wufang">
<div class="table-title">
<img src="../../assets/img/rollByRoll.png" alt=""> 卷被
<div class="title-text">日出:{{ sunrise }}</div>
<div class="title-text">日落:{{ sunset }}</div>
</div>
<div class="title-tips">卷被有效性设置</div>
<div class="flex-view">
@ -29,10 +32,8 @@
</div>
<div class="input-main">
<span>①室外光照大于</span>
<input @blur="blurChange10('21550', $event)"
v-model="inputData['21550']"
@input="changeCount10('21550', $event)"
type="text" value="60" placeholder="60" />
<input @blur="blurChange10('21550', $event)" v-model="inputData['21550']"
@input="changeCount10('21550', $event)" type="text" value="60" placeholder="60" />
<span>klx收拢卷被</span>
</div>
</div>
@ -43,9 +44,7 @@
</div>
<div class="input-main">
<span>②日出</span>
<input @blur="blurChange('21551', $event)"
v-model="inputData['21551']"
@input="change('21551', $event)"
<input @blur="blurChange('21551', $event)" v-model="inputData['21551']" @input="change('21551', $event)"
type="text" value="60" placeholder="60" />
<span>分钟收拢卷被</span>
</div>
@ -57,10 +56,8 @@
</div>
<div class="input-main">
<span>③室内1#平均温度低于</span>
<input @blur="blurChangeCount('21552', $event)"
v-model="inputData['21552']"
@input="changeCountData('21552', $event)"
type="text" value="60" placeholder="60" />
<input @blur="blurChangeCount('21552', $event)" v-model="inputData['21552']"
@input="changeCountData('21552', $event)" type="text" value="60" placeholder="60" />
<span>展开卷被</span>
</div>
</div>
@ -71,9 +68,7 @@
</div>
<div class="input-main">
<span>④日落前</span>
<input @blur="blurChange('21553', $event)"
v-model="inputData['21553']"
@input="change('21553', $event)"
<input @blur="blurChange('21553', $event)" v-model="inputData['21553']" @input="change('21553', $event)"
type="text" value="60" placeholder="60" />
<span>分钟展开卷被</span>
</div>
@ -81,25 +76,19 @@
<div class="flex-view border-none">
<div class="input-main">
<div>卷被的行程时间</div>
<input @blur="blurChange('21554', $event)"
v-model="inputData['21554']"
@input="change('21554', $event)"
<input @blur="blurChange('21554', $event)" v-model="inputData['21554']" @input="change('21554', $event)"
type="text" value="60" placeholder="60" />
<span></span>
</div>
<div class="input-main">
<div>卷被开窗的行程时间</div>
<input @blur="blurChange('21555', $event)"
v-model="inputData['21555']"
@input="change('21555', $event)"
<input @blur="blurChange('21555', $event)" v-model="inputData['21555']" @input="change('21555', $event)"
type="text" value="60" placeholder="60" />
<span></span>
</div>
<div class="input-main">
<div>展开的输出通道</div>
<input @blur="blurChange('21556', $event)"
v-model="inputData['21556']"
@input="change('21556', $event)"
<input @blur="blurChange('21556', $event)" v-model="inputData['21556']" @input="change('21556', $event)"
type="text" value="60" placeholder="60" />
<span></span>
</div>
@ -119,6 +108,8 @@ export default {
openIndex: 1,
inputData: {},
openTrue: [],
sunrise: '00:00',
sunset: '00:00'
}
},
mounted() {
@ -234,6 +225,28 @@ export default {
openList1New = num11.split("")
this.openTrue = openList1New.reverse()
},
getStatus(data) {
this.api.getControlGetState(data).then(res => {
if (res.data.code == 200) {
this.sunrise = this.convertToTimeMinutes(res.data.data['1021'])
this.sunset = this.convertToTimeMinutes(res.data.data['1022'])
}
})
},
//16 16
convertToTimeMinutes(hexValue) {
// 16 16
const intValue = hexValue
//
const hours = (intValue >> 8) & 0xFF;
const minutes = intValue & 0xFF;
// :
const formattedTime = `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}`;
return formattedTime;
},
dataInit() {
var store = this.$store.state
var data = {
@ -253,6 +266,7 @@ export default {
})
this.getStatus(data)
},
//
selectValue(e) {

View File

@ -55,7 +55,7 @@
</div>
<div class="input-main border-right">
<span>最大开度</span>
<span>{{ inputData['21535'] }}</span>
<span>{{ statusNum }}</span>
<span>%</span>
</div>
<div class="input-main">
@ -93,8 +93,13 @@ export default {
openIndex: 1,
inputData: {},
openTrue: false,
statusNum:0,
statusInterval:null,
}
},
beforeDestroy(){
clearInterval(this.statusInterval)&&this.statusInterval
},
mounted() {
this.dataInit();
//input
@ -203,6 +208,18 @@ export default {
}
})
this.getStatus(data)
clearInterval(this.statusInterval)&&this.statusInterval
this.statusInterval=setInterval(() => {
this.getStatus(data)
}, 3000);
},
getStatus(data){
this.api.getControlGetState(data).then(res=>{
if(res.data.code==200){
this.statusNum=res.data.data['1015']
}
})
},
//
selectValue(e) {