pull/86/head
孙萌 2024-01-08 11:26:07 +08:00
parent 9b6ec23136
commit 5d66d1c927
7 changed files with 76 additions and 23 deletions

View File

@ -105,7 +105,7 @@
</div>
</div>
<div class="input-main-80">
<span>窗除湿时内遮阳开启角度</span>
<span>通风窗除湿时内遮阳开启角度</span>
<input @blur="blurChange(startList[indexs-1]+13, $event)" v-model="inputData[startList[indexs-1]+13]" @input="change(startList[indexs-1]+13, $event)"
type="text" placeholder="0">
</div>

View File

@ -73,7 +73,7 @@
</div>
</div>
<div class="input-main-80">
<span>窗除湿时内保温开启角度</span>
<span>通风窗除湿时内保温开启角度</span>
<input @blur="blurChange(startList[indexs-1]+7, $event)" v-model="inputData[startList[indexs-1]+7]" @input="change(startList[indexs-1]+7, $event)"
type="text" placeholder="0">
</div>

View File

@ -255,7 +255,7 @@
<div class="flex-view border-none shrink-none padding-none">
<div class="input-main-80">
<span>1#窗全程运行时间</span>
<span>1#通风窗全程运行时间</span>
<input @blur="blurChange(20667, $event)" v-model="inputData[20667]" @input="change(20667, $event)"
type="text" placeholder="0">
<span>打开输出通道</span>
@ -266,7 +266,7 @@
type="text" placeholder="0">
</div>
<div class="input-sel input-sel-w180">
<span>窗朝向</span>
<span>通风窗朝向</span>
<el-dropdown @command="handleCommand2($event,20668)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[20668]" type="text" class="input-input" placeholder="无">
@ -281,7 +281,7 @@
</div>
<div class="flex-view border-none shrink-none padding-none">
<div class="input-main-80">
<span>2#窗全程运行时间</span>
<span>2#通风窗全程运行时间</span>
<input @blur="blurChange(20671, $event)" v-model="inputData[20671]" @input="change(20671, $event)"
type="text" placeholder="0">
<span>打开输出通道</span>
@ -292,7 +292,7 @@
type="text" placeholder="0">
</div>
<div class="input-sel input-sel-w180">
<span>窗朝向</span>
<span>通风窗朝向</span>
<el-dropdown @command="handleCommand2($event,20672)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[20672]" type="text" class="input-input" placeholder="无">
@ -307,7 +307,7 @@
</div>
<div class="flex-view border-none shrink-none padding-none">
<div class="input-main-80">
<span>3#窗全程运行时间</span>
<span>3#通风窗全程运行时间</span>
<input @blur="blurChange(20675, $event)" v-model="inputData[20675]" @input="change(20675, $event)"
type="text" placeholder="0">
<span>打开输出通道</span>
@ -318,7 +318,7 @@
type="text" placeholder="0">
</div>
<div class="input-sel input-sel-w180">
<span>窗朝向</span>
<span>通风窗朝向</span>
<el-dropdown @command="handleCommand2($event,20676)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[20676]" type="text" class="input-input" placeholder="无">
@ -333,7 +333,7 @@
</div>
<div class="flex-view shrink-none padding-none">
<div class="input-main-80">
<span>4#窗全程运行时间</span>
<span>4#通风窗全程运行时间</span>
<input @blur="blurChange(20679, $event)" v-model="inputData[20679]" @input="change(20679, $event)"
type="text" placeholder="0">
<span>打开输出通道</span>
@ -344,7 +344,7 @@
type="text" placeholder="0">
</div>
<div class="input-sel input-sel-w180">
<span>窗朝向</span>
<span>通风窗朝向</span>
<el-dropdown @command="handleCommand2($event,20680)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[20680]" type="text" class="input-input" placeholder="无">
@ -606,6 +606,34 @@ export default {
}
})
},
//
padString(str, length) {
return str.padStart(length, '0');
},
//
myReverse(arr) {
return [...arr].reverse()
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput = e.target.value
e.currentTarget.select();
},
//
blurChange(code, el) {
var store = this.$store.state
var data = {
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
regAddress: code,
num: el.target.value,
}; //
if (this.timer) {
this.timer && clearInterval(this.timer);
this.changeData(data);
}
},
//
changeBtn(code, el) {
@ -677,6 +705,31 @@ export default {
};
this.changeBtn(code, dataNum);
},
change(code, el) {
var store = this.$store.state
var data = {
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
regAddress: code,
num: el.target.value,
};
this.delayTimer(0, data);
},
// j*100
delayTimer(i, data) {
const that = this;
//
let j = this.$store.state.lateSend;
//
this.timer && clearInterval(this.timer);
this.timer = setInterval(() => {
++i;
if (i == j) {
that.changeData(data);
clearInterval(this.timer);
}
}, 100);
},
changeData(data) {
var store = this.$store.state
this.api.postControlWrite(data).then((res) => {

View File

@ -172,7 +172,7 @@
<div class="flex-view shrink-none border-none">
<div class="input-sel input-sel-w180">
<span>1#: 目标温度选择</span>
<span>1#通风: 目标温度选择</span>
<el-dropdown @command="handleCommand1($event,21757)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21757]" type="text" class="input-input" placeholder="无">
@ -227,7 +227,7 @@
<div class="flex-view shrink-none border-none">
<div class="input-sel input-sel-w180">
<span>2#: 目标温度选择</span>
<span>2#通风: 目标温度选择</span>
<el-dropdown @command="handleCommand3($event,21761)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21761]" type="text" class="input-input" placeholder="无">
@ -282,7 +282,7 @@
<div class="flex-view shrink-none border-none">
<div class="input-sel input-sel-w180">
<span>3#: 目标温度选择</span>
<span>3#通风: 目标温度选择</span>
<el-dropdown @command="handleCommand3($event,21765)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21765]" type="text" class="input-input" placeholder="无">
@ -337,7 +337,7 @@
<div class="flex-view shrink-none">
<div class="input-sel input-sel-w180">
<span>4#: 目标温度选择</span>
<span>4#通风: 目标温度选择</span>
<el-dropdown @command="handleCommand3($event,21769)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21769]" type="text" class="input-input" placeholder="无">

View File

@ -1223,7 +1223,7 @@ export default {
var statusData = { name: el.name, type:14, id: el.id, open: res.data.data[(1096 + ((el.id - 24)*2))], progress: res.data.data[(1098 + ((el.id - 24)*2))], index: res.data.data[(1097 + ((el.id - 24)*2))] }
statusList.push(statusData)
}else if (el.id == 26||el.id == 27||el.id == 28||el.id == 29) {
//
//
var statusData = { name: el.name, type:15, id: el.id, open: res.data.data[(1102 + ((el.id - 26)*2))], progress: res.data.data[(1104 + ((el.id - 26)*2))], index: res.data.data[(1103 + ((el.id - 26)*2))] }
statusList.push(statusData)
}

View File

@ -1,7 +1,7 @@
<template>
<div class="sunroofControl">
<div class="table-title">
<img src="../../assets/img/sunroofControl.png" alt="">{{indexs}}&nbsp;&nbsp;&nbsp;&nbsp;
<img src="../../assets/img/sunroofControl.png" alt="">通风{{indexs}}&nbsp;&nbsp;&nbsp;&nbsp;
<div @click="changeOpen(0)" class="flex-view border-none">
<div :class="inputData[startList[indexs-1]] == 0 ? 'sel' : 'no-sel'"></div>
有效性
@ -63,7 +63,7 @@
<div>3</div>
</div>
<div class="input-main input-main-w260">
<div>窗分阶段全部打开次数</div>
<div>通风窗分阶段全部打开次数</div>
<input @blur="blurChange(startList[indexs-1]+4, $event)" v-model="inputData[startList[indexs-1]+4]" @input="change(startList[indexs-1]+4, $event)"
type="text" placeholder="0">
</div>
@ -73,7 +73,7 @@
<div>4</div>
</div>
<div class="input-main input-main-w260">
<div>风机运行时窗打开角度</div>
<div>风机运行时通风窗打开角度</div>
<input @blur="blurChange(startList[indexs-1]+2, $event)" v-model="inputData[startList[indexs-1]+2]" @input="change(startList[indexs-1]+2, $event)"
type="text" placeholder="0">
</div>
@ -88,7 +88,7 @@
<span>室外温度低于</span>
<input @blur="blurChangeCount(startList[indexs-1]+8, $event)" v-model="inputData[startList[indexs-1]+8]" @input="changeCountData(startList[indexs-1]+8, $event)"
type="text" placeholder="0">
<span>度禁止开启</span>
<span>度禁止开启通风</span>
</div>
</div>
<div class="flex-view padding-none">
@ -101,7 +101,7 @@
<span>风速大于</span>
<input @blur="blurChange10(startList[indexs-1]+13, $event)" v-model="inputData[startList[indexs-1]+13]" @input="changeCount10(startList[indexs-1]+13, $event)"
type="text" placeholder="0">
<span>关闭大风保护解除时间</span>
<span>关闭通风大风保护解除时间</span>
</div>
<div class="input-main input-main-w80">
<input @blur="blurChange(startList[indexs-1]+14, $event)" v-model="inputData[startList[indexs-1]+14]" @input="change(startList[indexs-1]+14, $event)"
@ -116,7 +116,7 @@
</div>
</div>
<div class="input-main input-main-w120">
<span>开启窗除湿功能;</span>
<span>开启通风窗除湿功能;</span>
</div>
</div>
<div class="flex-view border-none ">
@ -144,7 +144,7 @@
<span>湿度控制精度</span>
<input @blur="blurChange10(startList[indexs-1]+9, $event)" v-model="inputData[startList[indexs-1]+9]" @input="changeCount10(startList[indexs-1]+9, $event)"
type="text" placeholder="0">
<span>窗除湿时开启角度</span>
<span>通风窗除湿时开启角度</span>
<input @blur="blurChange(startList[indexs-1]+12, $event)" v-model="inputData[startList[indexs-1]+12]" @input="change(startList[indexs-1]+12, $event)"
type="text" placeholder="0">
</div>

View File

@ -113,7 +113,7 @@
<span>实测温度大于目标温度</span>
<input @blur="blurChange10(21960, $event)" v-model="inputData[21960]" @input="changeCount10(21960, $event)"
type="text" placeholder="0">
<span>跳过窗直接启动风机</span>
<span>跳过通风窗直接启动风机</span>
</div>
</div>
<div class="flex-view border-none shrink-none padding-none">