Merge pull request '1' (#114) from pc-master into portal

Reviewed-on: #114
portal
xiaomeng 2024-02-22 06:51:02 +00:00
commit 2ffa3385db
2 changed files with 42 additions and 13 deletions

View File

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

View File

@ -237,8 +237,34 @@ export default {
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) {
var number = this.padString(num.toString(2), 9)
this.numlist = number.split('')
@ -378,19 +404,19 @@ export default {
},
// j*100
delayTimer(i, data) {
// const that = this;
// //
// let j = this.$store.state.lateSend;
// //
// this.timer && clearInterval(this.timer);
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);
this.timer = setInterval(() => {
++i;
if (i == j) {
that.changeData(data);
clearInterval(this.timer);
}
}, 100);
},
changeData(data) {
var store = this.$store.state