pull/114/head
孙萌 2024-02-22 14:22:24 +08:00
parent 1397aa586a
commit 74a7f50b61
2 changed files with 42 additions and 13 deletions

View File

@ -174,6 +174,9 @@ export default {
regAddress: code, regAddress: code,
num: el.target.value, num: el.target.value,
}; // }; //
if (store.nowInput != el.target.value) {
this.changeData(data);
}
// if(this.timer){ // if(this.timer){
// this.timer && clearInterval(this.timer); // this.timer && clearInterval(this.timer);
// this.changeData(data); // this.changeData(data);

View File

@ -237,8 +237,34 @@ export default {
value: parseInt(num, 2), value: parseInt(num, 2),
}, },
}; };
this.change(store.formulaNum[this.indexs - 1] + 3, dataNum); this.changeBtn(store.formulaNum[this.indexs - 1] + 3, dataNum);
}, },
//
changeBtn(code, el) {
var store = this.$store.state
var data = {
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
regAddress: code,
num: el.target.value,
};
this.delayTimerBtn(0, data);
},
//btn j*100
delayTimerBtn(i, data) {
const that = this;
//
let j = this.$store.state.lateSendBtn;
//
this.timer && clearInterval(this.timer);
this.timer = setInterval(() => {
++i;
if (i == j) {
that.changeData(data);
clearInterval(this.timer);
}
}, 100);
},
getSeldata3(num) { getSeldata3(num) {
var number = this.padString(num.toString(2), 9) var number = this.padString(num.toString(2), 9)
this.numlist = number.split('') this.numlist = number.split('')
@ -378,19 +404,19 @@ export default {
}, },
// j*100 // j*100
delayTimer(i, data) { delayTimer(i, data) {
// const that = this; const that = this;
// // //
// let j = this.$store.state.lateSend; let j = this.$store.state.lateSend;
// // //
// this.timer && clearInterval(this.timer); this.timer && clearInterval(this.timer);
// this.timer = setInterval(() => { this.timer = setInterval(() => {
// ++i; ++i;
// if (i == j) { if (i == j) {
// that.changeData(data); that.changeData(data);
// clearInterval(this.timer); clearInterval(this.timer);
// } }
// }, 100); }, 100);
}, },
changeData(data) { changeData(data) {
var store = this.$store.state var store = this.$store.state