pull/64/head
孙萌 2023-12-06 14:57:38 +08:00
parent b49faf0d47
commit b59b193b7f
6 changed files with 181 additions and 36 deletions

View File

@ -1957,6 +1957,7 @@
display: flex;
align-items: center;
padding-right: 10px;
margin-right: 10px;
}
.wufang .no-sel {
@ -2173,6 +2174,32 @@
margin: 0;
}
.skylight .flex-sel {
display: flex;
align-items: center;
padding-right: 10px;
margin-right: 10px;
}
.skylight .no-sel {
width: 35px;
height: 35px;
box-shadow: 0 0 15px rgba(53, 187, 247, 0.5) inset;
border: 1px solid rgba(0, 204, 255, 0.7);
border-radius: 50%;
cursor: pointer;
margin-right: 9px;
}
.skylight .sel {
width: 35px;
height: 35px;
margin-right: 9px;
background: url(../image/radio.png) no-repeat center;
background-size: 100% 100%;
cursor: pointer;
}
.skylight .input-sel {
margin-right: 20px;
}
@ -2181,12 +2208,8 @@
border: none;
}
.skylight .input-main {
margin-right: 20px;
}
.skylight .input-main > input {
width: 260px;
.skylight .border-bottom {
border-bottom: 1px solid rgba(2, 148, 226, 0.5);
}
.fan .bold-title {

File diff suppressed because one or more lines are too long

View File

@ -2066,6 +2066,7 @@ margin-top: 20px;
display: flex;
align-items: center;
padding-right: 10px;
margin-right: 10px;
}
.no-sel {
width: 35px;
@ -2299,6 +2300,30 @@ margin-top: 20px;
}
.skylight {
.flex-sel{
display: flex;
align-items: center;
padding-right: 10px;
margin-right: 10px;
}
.no-sel {
width: 35px;
height: 35px;
box-shadow: 0 0 15px rgba(53, 187, 247, 0.50) inset;
border: 1px solid rgba(0, 204, 255, 0.70);
border-radius: 50%;
cursor: pointer;
margin-right: 9px;
}
.sel {
width: 35px;
height: 35px;
margin-right: 9px;
background: url(../image/radio.png) no-repeat center;
background-size: 100% 100%;
cursor: pointer;
}
.input-sel {
margin-right: 20px;
@ -2310,12 +2335,13 @@ margin-top: 20px;
.flex-view {
border: none;
}
.border-bottom{
border-bottom: 1px solid rgba(2, 148, 226, 0.5);
}
.input-main {
margin-right: 20px;
>input {
width: 260px;
// width: 260px;
}
}
}

View File

@ -3,7 +3,7 @@
<div class="table-title">
<img src="../../assets/image/skylight.png" alt=""> 顶卷膜{{ indexs }}
</div>
<div class="flex-view">
<div class="flex-view border-bottom">
<div class="input-btn">
<div class="btn" @click="changeOpen(1)" :class="openIndex == 1 ? 'blue' : 'green'">
<img src="../../assets/image/irrigateSet2.png" alt="" />自动运行
@ -20,6 +20,43 @@
</div>
</div>
<div class="flex-view border-bottom">
<div class="flex-sel border-right" @click="changeOpenTrue(0)">
<div v-if="openTrue[0] == 0" class="no-sel"></div>
<div v-else class="sel"></div>
大风保护有效
</div>
<div class="flex-sel border-right" @click="changeOpenTrue(1)">
<div v-if="openTrue[1] == 0" class="no-sel"></div>
<div v-else class="sel"></div>
下雨保护
</div>
<div class="flex-sel" @click="changeOpenTrue(2)">
<div v-if="openTrue[2] == 0" class="no-sel"></div>
<div v-else class="sel"></div>
有雨量桶检测
</div>
</div>
<div class="flex-view border-bottom">
<div class="input-main border-right">
<span>风速大于多少</span>
<input @blur="blurChange10('21662', $event)" v-model="inputData['21662']" @input="changeCount10('21662', $event)"
type="text" value="60" placeholder="60" />
<span>m/s,禁止开窗</span>
</div>
<div class="input-main border-right">
<span>大风保护时间</span>
<input @blur="blurChange('21663', $event)" v-model="inputData['21663']" @input="change('21663', $event)"
type="text" value="60" placeholder="60" />
<span></span>
</div>
<div class="input-main">
<span>下雨检测时间</span>
<input @blur="blurChange('21664', $event)" v-model="inputData['21664']" @input="change('21664', $event)"
type="text" value="60" placeholder="60" />
<span></span>
</div>
</div>
<div class="flex-view">
<div class="input-sel">
<div class="title">温度选择</div>
@ -80,23 +117,19 @@
<div>全程运行时间</div>
<input @blur="blurChange(21621 + ((indexs - 1) * 11), $event)" v-model="inputData[21621 + ((indexs - 1) * 11)]"
@input="change(21621 + ((indexs - 1) * 11), $event)" type="number" placeholder="0.0">
<span></span>
</div>
</div>
<div class="flex-view padding-none">
<div class="input-main">
<div>打开通道</div>
<input @blur="blurChange(21622 + ((indexs - 1) * 11), $event)" v-model="inputData[21622 + ((indexs - 1) * 11)]"
@input="change(21622 + ((indexs - 1) * 11), $event)" type="number" placeholder="0.0">
<span></span>
</div>
</div>
<div class="flex-view padding-none">
<div class="input-main">
<div>关闭通道</div>
<input @blur="blurChange(21623 + ((indexs - 1) * 11), $event)" v-model="inputData[21623 + ((indexs - 1) * 11)]"
@input="change(21623 + ((indexs - 1) * 11), $event)" type="number" placeholder="0.0">
<span></span>
</div>
</div>
</div>
@ -124,6 +157,8 @@ export default {
{ name: '8#空气温度', value: 10, },],
//
openIndex: 0,
openTrue: [],
}
},
watch: {
@ -134,9 +169,9 @@ export default {
that.getNowData();
}, 0);
},
'$route.query.change'(newVal, oldVal){
'$route.query.change'(newVal, oldVal) {
this.dataInit();
},
},
},
mounted() {
@ -164,6 +199,33 @@ export default {
};
this.changeBtn(21613 + ((this.indexs - 1) * 11), dataNum);
},
//
myReverse(arr) {
return [...arr].reverse()
},
changeOpenTrue(index) {
if (this.openTrue[index] == 0) {
this.openTrue[index] = 1
} else {
this.openTrue[index] = 0
}
this.$forceUpdate();
var num = this.myReverse(this.openTrue).join("")
var dataNum = {
target: {
value: parseInt(num, 2),
},
};
this.changeBtn('21661', dataNum);
},
get21661() {
var num1 = this.inputData['21661']?this.inputData['21661']:0
var num11 = this.padString(num1.toString(2), 3)
var openList1New
openList1New = num11.split("")
this.openTrue = openList1New.reverse()
},
//
handleCommand(index) {
this.TypeSel = this.typeSelList[index].name
@ -229,14 +291,14 @@ export default {
return 0
}
},
// x/10
countData10(data) {
if (data) {
return data / 10
} else {
return 0
}
},
// x/10
countData10(data) {
if (data) {
return data / 10
} else {
return 0
}
},
dataInit() {
var store = this.$store.state
var data = {
@ -247,6 +309,7 @@ export default {
if (res.data.code == 200) {
this.inputData = res.data.data;
this.getNowData()
this.get21661()
this.inputData[21614] = this.countData10(this.inputData[21614])
this.inputData[21615] = this.countData(this.inputData[21615])
this.inputData[21617] = this.countData(this.inputData[21617])

View File

@ -48,11 +48,26 @@
</div>
</div>
<div class="flex-view">
<div class="flex-sel border-right" @click="changeOpenTrue()">
<div v-if="!openTrue" class="no-sel"></div>
<div class="flex-sel border-right" @click="changeOpenTrue(0)">
<div v-if="openTrue[0] == 0" class="no-sel"></div>
<div v-else class="sel"></div>
计算的最大开度
</div>
<div class="flex-sel border-right" @click="changeOpenTrue(1)">
<div v-if="openTrue[1] == 0" class="no-sel"></div>
<div v-else class="sel"></div>
大风保护
</div>
<div class="flex-sel border-right" @click="changeOpenTrue(2)">
<div v-if="openTrue[2] == 0" class="no-sel"></div>
<div v-else class="sel"></div>
下雨保护
</div>
<div class="flex-sel border-right" @click="changeOpenTrue(3)">
<div v-if="openTrue[3] == 0" class="no-sel"></div>
<div v-else class="sel"></div>
有雨量桶检测
</div>
<div class="input-main border-right">
<span>最大开度</span>
<span>{{ statusNum }}</span>
@ -114,7 +129,7 @@ export default {
return {
openIndex: 1,
inputData: {},
openTrue: false,
openTrue: [],
statusNum:0,
statusInterval:null,
}
@ -131,15 +146,33 @@ export default {
}
},
methods: {
changeOpenTrue() {
this.openTrue = !this.openTrue
//
myReverse(arr) {
return [...arr].reverse()
},
changeOpenTrue(index) {
if (this.openTrue[index] == 0) {
this.openTrue[index] = 1
} else {
this.openTrue[index] = 0
}
this.$forceUpdate();
var num = this.myReverse(this.openTrue).join("")
var dataNum = {
target: {
value: this.openTrue ? 1 : 0,
value: parseInt(num, 2),
},
};
this.changeBtn('21531', dataNum);
},
get21531() {
var num1 = this.inputData['21531']
var num11 = this.padString(num1.toString(2), 4)
var openList1New
openList1New = num11.split("")
this.openTrue = openList1New.reverse()
},
padString(str, length) {
return str.padStart(length, '0');
},
@ -224,7 +257,7 @@ export default {
if(res.data.code==200){
this.inputData = res.data.data
this.openIndex = this.inputData['21530']
this.openTrue = this.inputData['21531']==0?false:true
this.get21531()
this.inputData['21532'] = this.countData(this.inputData['21532'])
this.inputData['21533'] = this.countData10(this.inputData['21533'])
}

View File

@ -41,7 +41,7 @@
</div>
<div class="flex-view border-none">
<div class="input-main">
<span>室内1#平均温度夜间时段</span>
<span>室内1#平均温度夜间时段</span>
<input @blur="blurChangeCount('21524', $event)" v-model="inputData['21524']"
@input="changeCountData('21524', $event)" type="text" value="60" placeholder="60" />
<span>启动</span>