pull/25/head
孙萌 2023-11-09 16:05:04 +08:00
parent 98600b8b57
commit 331eae5982
2 changed files with 42 additions and 39 deletions

View File

@ -119,7 +119,6 @@ export default {
watch: {
'active'(newVal, oldVal) {
this.getSensorType()
this.getCountData()
},
},
mounted() {
@ -180,23 +179,26 @@ export default {
},
//
getCountData() {
for (var i = 0; i < 48; i++) {
this.typeList.forEach((el, index) => {
if (el.value == this.inputData[20904 + (this.active * 5)]) {
if (el.value == this.inputData[20904 + (i * 5)]) {
if (el.countType == 0) {
} else if (el.countType == 1) {
this.inputData[20904 + (this.active * 5 + 2)]=this.countType1(this.inputData[20904 + (this.active * 5 + 2)])
this.inputData[20904 + (this.active * 5 + 4)]=this.countType1(this.inputData[20904 + (this.active * 5 + 4)])
this.inputData[20904 + (i * 5 + 2)] = this.countType1(this.inputData[20904 + (i * 5 + 2)])
this.inputData[20904 + (i * 5 + 4)] = this.countType1(this.inputData[20904 + (i * 5 + 4)])
} else if (el.countType == 2) {
this.inputData[20904 + (this.active * 5 + 2)]=this.countType2(this.inputData[20904 + (this.active * 5 + 2)])
this.inputData[20904 + (this.active * 5 + 4)]=this.countType2(this.inputData[20904 + (this.active * 5 + 4)])
this.inputData[20904 + (i * 5 + 2)] = this.countType2(this.inputData[20904 + (i * 5 + 2)])
this.inputData[20904 + (i * 5 + 4)] = this.countType2(this.inputData[20904 + (i * 5 + 4)])
} else if (el.countType == 3) {
this.inputData[20904 + (this.active * 5 + 2)]=this.countType3(this.inputData[20904 + (this.active * 5 + 2)])
this.inputData[20904 + (this.active * 5 + 4)]=this.countType3(this.inputData[20904 + (this.active * 5 + 4)])
this.inputData[20904 + (i * 5 + 2)] = this.countType3(this.inputData[20904 + (i * 5 + 2)])
this.inputData[20904 + (i * 5 + 4)] = this.countType3(this.inputData[20904 + (i * 5 + 4)])
}
}
})
}
},
getSensorType() {
this.typeList.forEach((el, index) => {

View File

@ -400,7 +400,7 @@ selectValue(e) {
value: parseInt(num, 2),
},
};
this.changeBtn('500', dataNum);
this.changeBtn('21500', dataNum);
},
selList2(index) {
if (this.actList2.indexOf(index) == -1) {
@ -408,7 +408,7 @@ selectValue(e) {
} else {
this.actList2.splice(this.actList2.indexOf(index), 1)
}
this.actList2New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0',]
this.actList2New=['0','0','0','0','0','0','0','0','0','0','0']
this.actList2.forEach((el, index) => {
this.actList2New[this.actList2New.length-el-1] = '1'
})
@ -419,7 +419,7 @@ selectValue(e) {
value: parseInt(num, 2),
},
};
this.changeBtn('501', dataNum);
this.changeBtn('21501', dataNum);
},
selList3(index) {
if (this.actList3.indexOf(index) == -1) {
@ -450,13 +450,14 @@ selectValue(e) {
this.actList4.forEach((el, index) => {
this.actList4New[this.actList4New.length-el-1] = '1'
})
console.log(this.actList4New,11);
var num = this.actList4New.join("");
var dataNum = {
target: {
value: parseInt(num, 2),
},
};
console.log(num,parseInt(num, 2),22);
this.changeBtn('21504', dataNum);
},
selList5(index) {