pull/63/head
parent
5edfe5088c
commit
542d2b79d4
|
@ -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
|
@ -245,6 +245,10 @@
|
|||
font-weight: 400;
|
||||
color: #00FFBA;
|
||||
}
|
||||
.title-text{
|
||||
font-size: 16px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.index {
|
||||
|
|
|
@ -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">
|
||||
|
@ -24,56 +27,48 @@
|
|||
|
||||
<div class="flex-view">
|
||||
<div class="flex-sel padding-none" v-if="openTrue.length" @click="changeOpenTrue(0)">
|
||||
<div v-if="openTrue[0]==0" class="no-sel margin-none"></div>
|
||||
<div v-if="openTrue[0] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</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>
|
||||
<div class="flex-view">
|
||||
<div class="flex-sel padding-none" v-if="openTrue.length" @click="changeOpenTrue(1)">
|
||||
<div v-if="openTrue[1]==0" class="no-sel margin-none"></div>
|
||||
<div v-if="openTrue[1] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</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>
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="flex-sel padding-none" v-if="openTrue.length" @click="changeOpenTrue(2)">
|
||||
<div v-if="openTrue[2]==0" class="no-sel margin-none"></div>
|
||||
<div v-if="openTrue[2] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</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>
|
||||
<div class="flex-view">
|
||||
<div class="flex-sel padding-none" v-if="openTrue.length" @click="changeOpenTrue(3)">
|
||||
<div v-if="openTrue[3]==0" class="no-sel margin-none"></div>
|
||||
<div v-if="openTrue[3] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</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() {
|
||||
|
@ -138,13 +129,13 @@ export default {
|
|||
return str.padStart(length, '0');
|
||||
},
|
||||
changeOpenTrue(index) {
|
||||
if( this.openTrue[index]==0){
|
||||
this.openTrue[index]=1
|
||||
}else{
|
||||
this.openTrue[index]=0
|
||||
if (this.openTrue[index] == 0) {
|
||||
this.openTrue[index] = 1
|
||||
} else {
|
||||
this.openTrue[index] = 0
|
||||
}
|
||||
this.$forceUpdate();
|
||||
var num=this.myReverse(this.openTrue).join("")
|
||||
var num = this.myReverse(this.openTrue).join("")
|
||||
|
||||
var dataNum = {
|
||||
target: {
|
||||
|
@ -227,12 +218,34 @@ export default {
|
|||
return 0
|
||||
}
|
||||
},
|
||||
get21549(){
|
||||
get21549() {
|
||||
var num1 = this.inputData['21549']
|
||||
var num11 = this.padString(num1.toString(2), 4)
|
||||
var openList1New
|
||||
openList1New = num11.split("")
|
||||
this.openTrue= openList1New.reverse()
|
||||
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
|
||||
|
@ -242,7 +255,7 @@ export default {
|
|||
};
|
||||
this.api.readControl_fiveControl(data).then(res => {
|
||||
console.log(res, 111);
|
||||
if(res.data.code==200){
|
||||
if (res.data.code == 200) {
|
||||
this.inputData = res.data.data
|
||||
this.openIndex = this.inputData['21548']
|
||||
this.get21549()
|
||||
|
@ -253,6 +266,7 @@ export default {
|
|||
|
||||
|
||||
})
|
||||
this.getStatus(data)
|
||||
},
|
||||
//全选文本
|
||||
selectValue(e) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue