pull/63/head
parent
5edfe5088c
commit
542d2b79d4
|
@ -225,6 +225,11 @@
|
||||||
color: #00FFBA;
|
color: #00FFBA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table-title .title-text {
|
||||||
|
font-size: 16px;
|
||||||
|
margin-left: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
.index {
|
.index {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -245,6 +245,10 @@
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #00FFBA;
|
color: #00FFBA;
|
||||||
}
|
}
|
||||||
|
.title-text{
|
||||||
|
font-size: 16px;
|
||||||
|
margin-left: 15px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.index {
|
.index {
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
<div class="waterPump wufang">
|
<div class="waterPump wufang">
|
||||||
<div class="table-title">
|
<div class="table-title">
|
||||||
<img src="../../assets/img/rollByRoll.png" alt=""> 卷被
|
<img src="../../assets/img/rollByRoll.png" alt=""> 卷被
|
||||||
|
|
||||||
|
<div class="title-text">日出:{{ sunrise }}</div>
|
||||||
|
<div class="title-text">日落:{{ sunset }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="title-tips">卷被有效性设置</div>
|
<div class="title-tips">卷被有效性设置</div>
|
||||||
<div class="flex-view">
|
<div class="flex-view">
|
||||||
|
@ -24,56 +27,48 @@
|
||||||
|
|
||||||
<div class="flex-view">
|
<div class="flex-view">
|
||||||
<div class="flex-sel padding-none" v-if="openTrue.length" @click="changeOpenTrue(0)">
|
<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 v-else class="sel margin-none"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-main">
|
<div class="input-main">
|
||||||
<span>①室外光照大于</span>
|
<span>①室外光照大于</span>
|
||||||
<input @blur="blurChange10('21550', $event)"
|
<input @blur="blurChange10('21550', $event)" v-model="inputData['21550']"
|
||||||
v-model="inputData['21550']"
|
@input="changeCount10('21550', $event)" type="text" value="60" placeholder="60" />
|
||||||
@input="changeCount10('21550', $event)"
|
|
||||||
type="text" value="60" placeholder="60" />
|
|
||||||
<span>klx,收拢卷被</span>
|
<span>klx,收拢卷被</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-view">
|
<div class="flex-view">
|
||||||
<div class="flex-sel padding-none" v-if="openTrue.length" @click="changeOpenTrue(1)">
|
<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 v-else class="sel margin-none"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-main">
|
<div class="input-main">
|
||||||
<span>②日出</span>
|
<span>②日出</span>
|
||||||
<input @blur="blurChange('21551', $event)"
|
<input @blur="blurChange('21551', $event)" v-model="inputData['21551']" @input="change('21551', $event)"
|
||||||
v-model="inputData['21551']"
|
|
||||||
@input="change('21551', $event)"
|
|
||||||
type="text" value="60" placeholder="60" />
|
type="text" value="60" placeholder="60" />
|
||||||
<span>分钟,收拢卷被</span>
|
<span>分钟,收拢卷被</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-view">
|
<div class="flex-view">
|
||||||
<div class="flex-sel padding-none" v-if="openTrue.length" @click="changeOpenTrue(2)">
|
<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 v-else class="sel margin-none"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-main">
|
<div class="input-main">
|
||||||
<span>③室内1#平均温度低于</span>
|
<span>③室内1#平均温度低于</span>
|
||||||
<input @blur="blurChangeCount('21552', $event)"
|
<input @blur="blurChangeCount('21552', $event)" v-model="inputData['21552']"
|
||||||
v-model="inputData['21552']"
|
@input="changeCountData('21552', $event)" type="text" value="60" placeholder="60" />
|
||||||
@input="changeCountData('21552', $event)"
|
|
||||||
type="text" value="60" placeholder="60" />
|
|
||||||
<span>℃时,展开卷被</span>
|
<span>℃时,展开卷被</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-view">
|
<div class="flex-view">
|
||||||
<div class="flex-sel padding-none" v-if="openTrue.length" @click="changeOpenTrue(3)">
|
<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 v-else class="sel margin-none"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-main">
|
<div class="input-main">
|
||||||
<span>④日落前</span>
|
<span>④日落前</span>
|
||||||
<input @blur="blurChange('21553', $event)"
|
<input @blur="blurChange('21553', $event)" v-model="inputData['21553']" @input="change('21553', $event)"
|
||||||
v-model="inputData['21553']"
|
|
||||||
@input="change('21553', $event)"
|
|
||||||
type="text" value="60" placeholder="60" />
|
type="text" value="60" placeholder="60" />
|
||||||
<span>分钟,展开卷被</span>
|
<span>分钟,展开卷被</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -81,25 +76,19 @@
|
||||||
<div class="flex-view border-none">
|
<div class="flex-view border-none">
|
||||||
<div class="input-main">
|
<div class="input-main">
|
||||||
<div>卷被的行程时间</div>
|
<div>卷被的行程时间</div>
|
||||||
<input @blur="blurChange('21554', $event)"
|
<input @blur="blurChange('21554', $event)" v-model="inputData['21554']" @input="change('21554', $event)"
|
||||||
v-model="inputData['21554']"
|
|
||||||
@input="change('21554', $event)"
|
|
||||||
type="text" value="60" placeholder="60" />
|
type="text" value="60" placeholder="60" />
|
||||||
<span>秒</span>
|
<span>秒</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-main">
|
<div class="input-main">
|
||||||
<div>卷被开窗的行程时间</div>
|
<div>卷被开窗的行程时间</div>
|
||||||
<input @blur="blurChange('21555', $event)"
|
<input @blur="blurChange('21555', $event)" v-model="inputData['21555']" @input="change('21555', $event)"
|
||||||
v-model="inputData['21555']"
|
|
||||||
@input="change('21555', $event)"
|
|
||||||
type="text" value="60" placeholder="60" />
|
type="text" value="60" placeholder="60" />
|
||||||
<span>秒</span>
|
<span>秒</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-main">
|
<div class="input-main">
|
||||||
<div>展开的输出通道</div>
|
<div>展开的输出通道</div>
|
||||||
<input @blur="blurChange('21556', $event)"
|
<input @blur="blurChange('21556', $event)" v-model="inputData['21556']" @input="change('21556', $event)"
|
||||||
v-model="inputData['21556']"
|
|
||||||
@input="change('21556', $event)"
|
|
||||||
type="text" value="60" placeholder="60" />
|
type="text" value="60" placeholder="60" />
|
||||||
<span></span>
|
<span></span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -119,6 +108,8 @@ export default {
|
||||||
openIndex: 1,
|
openIndex: 1,
|
||||||
inputData: {},
|
inputData: {},
|
||||||
openTrue: [],
|
openTrue: [],
|
||||||
|
sunrise: '00:00',
|
||||||
|
sunset: '00:00'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -138,13 +129,13 @@ export default {
|
||||||
return str.padStart(length, '0');
|
return str.padStart(length, '0');
|
||||||
},
|
},
|
||||||
changeOpenTrue(index) {
|
changeOpenTrue(index) {
|
||||||
if( this.openTrue[index]==0){
|
if (this.openTrue[index] == 0) {
|
||||||
this.openTrue[index]=1
|
this.openTrue[index] = 1
|
||||||
}else{
|
} else {
|
||||||
this.openTrue[index]=0
|
this.openTrue[index] = 0
|
||||||
}
|
}
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
var num=this.myReverse(this.openTrue).join("")
|
var num = this.myReverse(this.openTrue).join("")
|
||||||
|
|
||||||
var dataNum = {
|
var dataNum = {
|
||||||
target: {
|
target: {
|
||||||
|
@ -227,12 +218,34 @@ export default {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
get21549(){
|
get21549() {
|
||||||
var num1 = this.inputData['21549']
|
var num1 = this.inputData['21549']
|
||||||
var num11 = this.padString(num1.toString(2), 4)
|
var num11 = this.padString(num1.toString(2), 4)
|
||||||
var openList1New
|
var openList1New
|
||||||
openList1New = num11.split("")
|
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() {
|
dataInit() {
|
||||||
var store = this.$store.state
|
var store = this.$store.state
|
||||||
|
@ -242,7 +255,7 @@ export default {
|
||||||
};
|
};
|
||||||
this.api.readControl_fiveControl(data).then(res => {
|
this.api.readControl_fiveControl(data).then(res => {
|
||||||
console.log(res, 111);
|
console.log(res, 111);
|
||||||
if(res.data.code==200){
|
if (res.data.code == 200) {
|
||||||
this.inputData = res.data.data
|
this.inputData = res.data.data
|
||||||
this.openIndex = this.inputData['21548']
|
this.openIndex = this.inputData['21548']
|
||||||
this.get21549()
|
this.get21549()
|
||||||
|
@ -253,6 +266,7 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
this.getStatus(data)
|
||||||
},
|
},
|
||||||
//全选文本
|
//全选文本
|
||||||
selectValue(e) {
|
selectValue(e) {
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="input-main border-right">
|
<div class="input-main border-right">
|
||||||
<span>最大开度</span>
|
<span>最大开度</span>
|
||||||
<span>{{ inputData['21535'] }}</span>
|
<span>{{ statusNum }}</span>
|
||||||
<span>%</span>
|
<span>%</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-main">
|
<div class="input-main">
|
||||||
|
@ -93,8 +93,13 @@ export default {
|
||||||
openIndex: 1,
|
openIndex: 1,
|
||||||
inputData: {},
|
inputData: {},
|
||||||
openTrue: false,
|
openTrue: false,
|
||||||
|
statusNum:0,
|
||||||
|
statusInterval:null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
beforeDestroy(){
|
||||||
|
clearInterval(this.statusInterval)&&this.statusInterval
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.dataInit();
|
this.dataInit();
|
||||||
//input获取焦点后全选
|
//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) {
|
selectValue(e) {
|
||||||
|
|
Loading…
Reference in New Issue