wx-program
parent
d2876095d6
commit
5cf5770214
|
@ -222,7 +222,7 @@
|
|||
|
||||
<view class="irrigate_time2">
|
||||
轮灌模式开关
|
||||
<view class="btn" @click="changeIndexOpen(2)" :class="actList1[2]=='1'?'btn-on':'btn-off'">
|
||||
<view class="btn" @click="changeIndexOpen()" :class="actList1=='1'?'btn-on':'btn-off'">
|
||||
<span>轮灌模式</span>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -510,21 +510,19 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
changeIndexOpen(active) {
|
||||
if (this.actList1[active] == '1') {
|
||||
this.actList1[active] = '0'
|
||||
changeIndexOpen() {
|
||||
if (this.actList1 == '1') {
|
||||
this.actList1 = '0'
|
||||
} else {
|
||||
this.actList1[active] = '1'
|
||||
this.actList1 = '1'
|
||||
}
|
||||
var revList = this.actList1.slice().reverse()
|
||||
var num = revList.join("");
|
||||
var dataNum = {
|
||||
target: {
|
||||
value: parseInt(num, 2),
|
||||
value: this.actList1,
|
||||
},
|
||||
};
|
||||
this.$forceUpdate()
|
||||
this.changeBtn('1'+(10 + (this.indexs - 1)) + "59", dataNum);
|
||||
this.changeBtn('1'+(10 + (this.indexs - 1)) + "62", dataNum);
|
||||
// this.change((10 + (this.indexs - 1)) + "59", dataNum);
|
||||
},
|
||||
changeBtn(code, el) {
|
||||
|
@ -552,15 +550,9 @@
|
|||
}
|
||||
}, 100);
|
||||
},
|
||||
get59(){
|
||||
this.actList1 = []
|
||||
var num = this.inputData1['1'+(10 + (this.indexs - 1)) + "59"]
|
||||
var num1 = this.padString(num.toString(2), 4)
|
||||
var openListNew = []
|
||||
openListNew = num1.split("")
|
||||
openListNew.forEach((el, index) => {
|
||||
this.actList1.push(openListNew[openListNew.length - index - 1])
|
||||
})
|
||||
get62(){
|
||||
this.actList1 = this.inputData1['1'+(10 + (this.indexs - 1)) + "62"]
|
||||
|
||||
},
|
||||
getReg() {
|
||||
uni.showLoading({
|
||||
|
@ -584,7 +576,7 @@
|
|||
// uni.stopPullDownRefresh();
|
||||
this.inputData1 = res.data;
|
||||
// this.getType00();
|
||||
this.get59()
|
||||
this.get62()
|
||||
|
||||
this.inputData1['1'+(10 + (this.indexs - 1)) + '01'] = this.countData10(this.inputData1['1'+(10 + (this.indexs - 1)) + '01'])
|
||||
|
||||
|
|
Loading…
Reference in New Issue