Compare commits
No commits in common. "1d5ab85ee0e4ccca0f2374b023c7ead094342ce8" and "36a225344565ca76ade27e44397002f8145c50af" have entirely different histories.
1d5ab85ee0
...
36a2253445
@ -187,13 +187,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//反向计算 计算公式 x/10
|
||||
@ -230,13 +227,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: (el.target.value * 10) + 400,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
},
|
||||
changeCountData(code, el) {
|
||||
var data = (el.target.value * 10) + 400
|
||||
@ -372,13 +366,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//修改数据的函数
|
||||
@ -418,19 +409,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
|
||||
|
@ -174,10 +174,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
// if(this.timer){
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
if(this.timer){
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
|
||||
},
|
||||
change(code, el) {
|
||||
@ -191,19 +191,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
|
||||
|
@ -19,7 +19,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view border-none">
|
||||
<div class="flex-sel padding-none" @click="changeOpenTrue(0, 20081)">
|
||||
<div class="flex-sel padding-none" v-if="inputDataNew[20081].length" @click="changeOpenTrue(0, 20081)">
|
||||
<div v-if="inputDataNew[20081][0] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</div>
|
||||
@ -31,7 +31,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view border-none">
|
||||
<div class="flex-sel padding-none" @click="changeOpenTrue(1, 20081)">
|
||||
<div class="flex-sel padding-none" v-if="inputDataNew[20081].length" @click="changeOpenTrue(1, 20081)">
|
||||
<div v-if="inputDataNew[20081][1] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</div>
|
||||
@ -43,28 +43,28 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view border-none">
|
||||
<div class="flex-sel padding-none" @click="changeOpenTrue(2, 20081)">
|
||||
<div class="flex-sel padding-none" v-if="inputDataNew[20081].length" @click="changeOpenTrue(2, 20081)">
|
||||
<div v-if="inputDataNew[20081][2] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</div>
|
||||
<div class="input-main input-main-w80">
|
||||
<span>选项三:温度高于</span>
|
||||
<input @blur="blurChangeCount('20084', $event)" v-model="inputData['20084']"
|
||||
@input="changeCountData('20084', $event)" type="text" value="60" placeholder="60" />
|
||||
<input @blur="blurChangeCount('20083', $event)" v-model="inputData['20083']"
|
||||
@input="changeCountData('20083', $event)" type="text" value="60" placeholder="60" />
|
||||
<span>℃,高温报警。报警通道</span>
|
||||
<input @blur="blurChange(20104, $event)" v-model="inputData[20104]" @input="change(20104, $event)"
|
||||
type="text" placeholder="0">
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="flex-sel padding-none" @click="changeOpenTrue(3, 20081)">
|
||||
<div class="flex-sel padding-none" v-if="inputDataNew[20081].length" @click="changeOpenTrue(3, 20081)">
|
||||
<div v-if="inputDataNew[20081][3] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</div>
|
||||
<div class="input-main input-main-w80">
|
||||
<span>选项四:温度低于</span>
|
||||
<input @blur="blurChangeCount('20085', $event)" v-model="inputData['20085']"
|
||||
@input="changeCountData('20085', $event)" type="text" value="60" placeholder="60" />
|
||||
<input @blur="blurChangeCount('20084', $event)" v-model="inputData['20084']"
|
||||
@input="changeCountData('20084', $event)" type="text" value="60" placeholder="60" />
|
||||
<span>℃,低温报警。报警通道</span>
|
||||
<input @blur="blurChange(20105, $event)" v-model="inputData[20105]" @input="change(20105, $event)"
|
||||
type="text" placeholder="0">
|
||||
@ -86,7 +86,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view border-none">
|
||||
<div class="flex-sel padding-none" @click="changeOpenTrue(0, 20087)">
|
||||
<div class="flex-sel padding-none" v-if="inputDataNew[20087].length" @click="changeOpenTrue(0, 20087)">
|
||||
<div v-if="inputDataNew[20087][0] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</div>
|
||||
@ -98,7 +98,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view border-none">
|
||||
<div class="flex-sel padding-none" @click="changeOpenTrue(1, 20087)">
|
||||
<div class="flex-sel padding-none" v-if="inputDataNew[20087].length" @click="changeOpenTrue(1, 20087)">
|
||||
<div v-if="inputDataNew[20087][1] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</div>
|
||||
@ -110,7 +110,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view border-none">
|
||||
<div class="flex-sel padding-none" @click="changeOpenTrue(2, 20087)">
|
||||
<div class="flex-sel padding-none" v-if="inputDataNew[20087].length" @click="changeOpenTrue(2, 20087)">
|
||||
<div v-if="inputDataNew[20087][2] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</div>
|
||||
@ -124,7 +124,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="flex-sel padding-none" @click="changeOpenTrue(3, 20087)">
|
||||
<div class="flex-sel padding-none" v-if="inputDataNew[20087].length" @click="changeOpenTrue(3, 20087)">
|
||||
<div v-if="inputDataNew[20087][3] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</div>
|
||||
@ -154,7 +154,7 @@
|
||||
</div>
|
||||
|
||||
<div class="flex-view border-none">
|
||||
<div class="flex-sel padding-none" @click="changeOpenTrue(0, 20093)">
|
||||
<div class="flex-sel padding-none" v-if="inputDataNew[20093].length" @click="changeOpenTrue(0, 20093)">
|
||||
<div v-if="inputDataNew[20093][0] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</div>
|
||||
@ -166,7 +166,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view border-none">
|
||||
<div class="flex-sel padding-none" @click="changeOpenTrue(1, 20093)">
|
||||
<div class="flex-sel padding-none" v-if="inputDataNew[20093].length" @click="changeOpenTrue(1, 20093)">
|
||||
<div v-if="inputDataNew[20093][1] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</div>
|
||||
@ -178,7 +178,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view border-none">
|
||||
<div class="flex-sel padding-none" @click="changeOpenTrue(2, 20093)">
|
||||
<div class="flex-sel padding-none" v-if="inputDataNew[20093].length" @click="changeOpenTrue(2, 20093)">
|
||||
<div v-if="inputDataNew[20093][2] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</div>
|
||||
@ -192,7 +192,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="flex-sel padding-none" @click="changeOpenTrue(3, 20093)">
|
||||
<div class="flex-sel padding-none" v-if="inputDataNew[20093].length" @click="changeOpenTrue(3, 20093)">
|
||||
<div v-if="inputDataNew[20093][3] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</div>
|
||||
@ -221,7 +221,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view border-none">
|
||||
<div class="flex-sel padding-none" @click="changeOpenTrue(0, 20099)">
|
||||
<div class="flex-sel padding-none" v-if="inputDataNew[20099].length" @click="changeOpenTrue(0, 20099)">
|
||||
<div v-if="inputDataNew[20099][0] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</div>
|
||||
@ -233,7 +233,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view border-none">
|
||||
<div class="flex-sel padding-none" @click="changeOpenTrue(1, 20099)">
|
||||
<div class="flex-sel padding-none" v-if="inputDataNew[20099].length" @click="changeOpenTrue(1, 20099)">
|
||||
<div v-if="inputDataNew[20099][1] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</div>
|
||||
@ -245,7 +245,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view border-none">
|
||||
<div class="flex-sel padding-none" @click="changeOpenTrue(2, 20099)">
|
||||
<div class="flex-sel padding-none" v-if="inputDataNew[20099].length" @click="changeOpenTrue(2, 20099)">
|
||||
<div v-if="inputDataNew[20099][2] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</div>
|
||||
@ -259,7 +259,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view border-none">
|
||||
<div class="flex-sel padding-none" @click="changeOpenTrue(3, 20099)">
|
||||
<div class="flex-sel padding-none" v-if="inputDataNew[20099].length" @click="changeOpenTrue(3, 20099)">
|
||||
<div v-if="inputDataNew[20099][3] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</div>
|
||||
@ -278,7 +278,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
inputDataNew: {20099:[],20093:[],20087:[],20081:[],},
|
||||
inputDataNew: [],
|
||||
inputData: [],
|
||||
typeList1: [
|
||||
{ label: '1#平均温度', value: 0 },
|
||||
@ -319,12 +319,9 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const that = this;
|
||||
setTimeout(() => {
|
||||
that.dataInit();
|
||||
}, 0);
|
||||
//input获取焦点后全选
|
||||
let inputList = document.querySelectorAll('input');
|
||||
this.dataInit()
|
||||
//input获取焦点后全选
|
||||
let inputList = document.querySelectorAll('input');
|
||||
for (let index = 0; index < inputList.length; index++) {
|
||||
inputList[index].onfocus = this.selectValue;//input放入焦点,全选文本
|
||||
}
|
||||
@ -384,14 +381,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
console.log(store.nowInput, el.target.value, 111);
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//反向计算 计算公式 x/10
|
||||
@ -419,20 +412,6 @@ export default {
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
//失去焦点
|
||||
blurChange(code, el) {
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
|
||||
},
|
||||
//失去焦点
|
||||
blurChangeCount(code, el) {
|
||||
@ -442,13 +421,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: (el.target.value * 10) + 400,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
},
|
||||
changeCountData(code, el) {
|
||||
var data = (el.target.value * 10) + 400
|
||||
@ -460,8 +436,8 @@ export default {
|
||||
this.change(code, sendData)
|
||||
},
|
||||
padString(str, length) {
|
||||
return str.padStart(length, '0');
|
||||
},
|
||||
return str.padStart(length, '0');
|
||||
},
|
||||
//反转数组 不影响原数组
|
||||
myReverse(arr) {
|
||||
return [...arr].reverse()
|
||||
@ -524,13 +500,12 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
getOpenData(code) {
|
||||
var num1 = this.inputData[code] ? this.inputData[code] : 0
|
||||
var num11 = this.padString(num1.toString(2), 4)
|
||||
var openList1New
|
||||
openList1New = num11.split("")
|
||||
this.inputDataNew[code] = openList1New.reverse()
|
||||
console.log(this.inputDataNew[code],code);
|
||||
getOpenData(code){
|
||||
var num1 = this.inputData[code]?this.inputData[code]:0
|
||||
var num11 = this.padString(num1.toString(2), 4)
|
||||
var openList1New
|
||||
openList1New = num11.split("")
|
||||
this.inputDataNew[code] = openList1New.reverse()
|
||||
},
|
||||
//全选文本
|
||||
selectValue(e) {
|
||||
@ -539,30 +514,30 @@ export default {
|
||||
e.currentTarget.select();
|
||||
},
|
||||
change(code, el) {
|
||||
var store = this.$store.state;
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
};
|
||||
this.delayTimer(0, data);
|
||||
},
|
||||
//限制 写入停止后j*100毫秒调取函数
|
||||
delayTimer(i, data) {
|
||||
// const that = this;
|
||||
// //整体接口
|
||||
// let j = this.$store.state.lateSend;
|
||||
// //避免开启多个计时器
|
||||
// this.timer && clearInterval(this.timer);
|
||||
var store = this.$store.state;
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
};
|
||||
this.delayTimer(0, data);
|
||||
},
|
||||
//限制 写入停止后j*100毫秒调取函数
|
||||
delayTimer(i, data) {
|
||||
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);
|
||||
},
|
||||
//修改数据的函数
|
||||
changeBtn(code, el) {
|
||||
var store = this.$store.state
|
||||
|
@ -175,13 +175,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//反向计算 计算公式 x/10
|
||||
@ -218,13 +215,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: (el.target.value * 10) + 400,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
},
|
||||
changeCountData(code, el) {
|
||||
var data = (el.target.value * 10) + 400
|
||||
@ -310,13 +304,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//修改数据的函数
|
||||
@ -356,19 +347,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
|
||||
|
@ -114,13 +114,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//反向计算 计算公式 x/10
|
||||
@ -157,13 +154,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: (el.target.value * 10) + 400,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
},
|
||||
changeCountData(code, el) {
|
||||
var data = (el.target.value * 10) + 400
|
||||
@ -249,13 +243,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//修改数据的函数
|
||||
@ -295,19 +286,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
|
||||
|
@ -214,13 +214,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//反向计算 计算公式 x/10
|
||||
@ -334,13 +331,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//修改数据的函数
|
||||
@ -380,19 +374,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
|
||||
|
@ -96,13 +96,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//反向计算 计算公式 x/10
|
||||
@ -139,13 +136,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: (el.target.value * 10) + 400,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
},
|
||||
changeCountData(code, el) {
|
||||
var data = (el.target.value * 10) + 400
|
||||
@ -182,13 +176,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//修改数据的函数
|
||||
@ -228,19 +219,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
|
||||
|
@ -197,13 +197,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//反向计算 计算公式 x/10
|
||||
@ -232,13 +229,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: (el.target.value * 10) + 400,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//反向计算 计算公式 (x-400) / 10
|
||||
@ -306,13 +300,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
changeBtn(code, el) {
|
||||
@ -351,19 +342,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
|
||||
|
@ -308,13 +308,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
if(this.timer){
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
|
||||
},
|
||||
//计算数据 /10
|
||||
@ -358,13 +355,10 @@ 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);
|
||||
// }
|
||||
if(this.timer){
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
|
||||
},
|
||||
change(code, el) {
|
||||
@ -378,19 +372,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
|
||||
|
@ -194,13 +194,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//反向计算 计算公式 x/10
|
||||
@ -237,13 +234,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: (el.target.value * 10) + 400,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
},
|
||||
changeCountData(code, el) {
|
||||
var data = (el.target.value * 10) + 400
|
||||
@ -329,13 +323,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//修改数据的函数
|
||||
@ -375,19 +366,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
|
||||
|
@ -141,13 +141,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//反向计算 计算公式 x/10
|
||||
@ -184,13 +181,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: (el.target.value * 10) + 400,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
},
|
||||
changeCountData(code, el) {
|
||||
var data = (el.target.value * 10) + 400
|
||||
@ -276,13 +270,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//修改数据的函数
|
||||
@ -322,19 +313,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
|
||||
|
@ -533,13 +533,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//反向计算 计算公式 x/10
|
||||
@ -632,13 +629,11 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//修改数据的函数
|
||||
changeBtn(code, el) {
|
||||
@ -721,19 +716,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
|
||||
|
@ -987,13 +987,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value*10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
if(this.timer){
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
|
||||
},
|
||||
//失去焦点
|
||||
@ -1004,13 +1001,10 @@ 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);
|
||||
// }
|
||||
if(this.timer){
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
|
||||
},
|
||||
changeBtn(code,el){
|
||||
@ -1050,19 +1044,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
|
||||
|
@ -164,13 +164,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//反向计算 计算公式 x/10
|
||||
@ -207,13 +204,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: (el.target.value * 10) + 400,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
},
|
||||
changeCountData(code, el) {
|
||||
var data = (el.target.value * 10) + 400
|
||||
@ -302,13 +296,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//修改数据的函数
|
||||
@ -348,19 +339,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
|
||||
|
@ -417,7 +417,6 @@ return num
|
||||
},
|
||||
//全选文本
|
||||
selectValue(e) {
|
||||
|
||||
var store = this.$store.state
|
||||
store.nowInput=e.target.value
|
||||
e.currentTarget.select();
|
||||
@ -443,28 +442,26 @@ return num
|
||||
},
|
||||
//需要反向计算提交
|
||||
change1(code, el) {
|
||||
// var store = this.$store.state
|
||||
// var data = {
|
||||
// equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
// regAddress: code,
|
||||
// num: this.getSendData(el.target.value),
|
||||
// };
|
||||
// this.delayTimer(0, data);
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
regAddress: code,
|
||||
num: this.getSendData(el.target.value),
|
||||
};
|
||||
this.delayTimer(0, data);
|
||||
},
|
||||
//需要反向计算提交
|
||||
blurChange1(code, el) {
|
||||
console.log(el.target.value,1);
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
regAddress: code,
|
||||
num: this.getSendData(el.target.value),
|
||||
}; //避免开启多个计时器
|
||||
console.log(data.num,this.inputData[code],1.5);
|
||||
if(data.num!=this.inputData[code]){
|
||||
// this.timer && clearInterval(this.timer);
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
//失去焦点
|
||||
@ -475,10 +472,11 @@ return num
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if(data.num!=this.inputData[code]){
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
// this.timer && clearInterval(this.timer);
|
||||
}
|
||||
|
||||
},
|
||||
changeBtn(code, el) {
|
||||
var store = this.$store.state
|
||||
@ -506,13 +504,13 @@ return num
|
||||
}, 100);
|
||||
},
|
||||
change(code, el) {
|
||||
// var store = this.$store.state
|
||||
// var data = {
|
||||
// equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
// regAddress: code,
|
||||
// num: el.target.value,
|
||||
// };
|
||||
// this.delayTimer(0, data);
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
};
|
||||
this.delayTimer(0, data);
|
||||
},
|
||||
//限制 写入停止后j*100毫秒调取函数
|
||||
delayTimer(i, data) {
|
||||
@ -531,11 +529,8 @@ return num
|
||||
}, 100);
|
||||
},
|
||||
changeData(data) {
|
||||
console.log(data.num,2);
|
||||
// this.timer && clearInterval(this.timer);
|
||||
var store = this.$store.state
|
||||
this.api.postControlWrite(data).then((res) => {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
if (res.data.code == 200) {
|
||||
this.$message({
|
||||
message: res.data.msg,
|
||||
@ -547,14 +542,12 @@ return num
|
||||
for (var i = 0; i < 48; i++) {
|
||||
if((20904 + (i * 5))==data.regAddress){
|
||||
this.inputData[20904 + (i * 5)]=data.num
|
||||
console.log( this.inputData[20904 + (i * 5)],20904 + (i * 5),777);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
this.getCountData()
|
||||
// this.inputData[data.regAddress]==data.num
|
||||
}, 0);
|
||||
this.getCountData()
|
||||
} else {
|
||||
this.inputData[data.regAddress]=store.nowInput
|
||||
this.$message.error(res.data.msg);
|
||||
|
@ -321,13 +321,13 @@ getSendData(number){
|
||||
},
|
||||
//需要反向计算提交
|
||||
change1(code, el) {
|
||||
// var store = this.$store.state
|
||||
// var data = {
|
||||
// equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
// regAddress: code,
|
||||
// num: this.getSendData(el.target.value),
|
||||
// };
|
||||
// this.delayTimer(0, data);
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
regAddress: code,
|
||||
num: this.getSendData(el.target.value),
|
||||
};
|
||||
this.delayTimer(0, data);
|
||||
},
|
||||
//需要反向计算提交
|
||||
blurChange1(code, el) {
|
||||
@ -337,14 +337,10 @@ getSendData(number){
|
||||
regAddress: code,
|
||||
num:this.getSendData(el.target.value) ,
|
||||
}; //避免开启多个计时器
|
||||
if(data.num!=this.inputData[code]){
|
||||
// this.timer && clearInterval(this.timer);
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
}
|
||||
|
||||
},
|
||||
//失去焦点
|
||||
@ -355,14 +351,10 @@ getSendData(number){
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if(data.num!=this.inputData[code]){
|
||||
// this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if(this.timer){
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
if(this.timer){
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
|
||||
},
|
||||
changeBtn(code,el){
|
||||
@ -391,13 +383,13 @@ getSendData(number){
|
||||
}, 100);
|
||||
},
|
||||
change(code, el) {
|
||||
// var store = this.$store.state
|
||||
// var data = {
|
||||
// equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
// regAddress: code,
|
||||
// num: el.target.value,
|
||||
// };
|
||||
// this.delayTimer(0, data);
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
};
|
||||
this.delayTimer(0, data);
|
||||
},
|
||||
//限制 写入停止后j*100毫秒调取函数
|
||||
delayTimer(i, data) {
|
||||
|
@ -252,13 +252,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
|
||||
},
|
||||
//反向计算 计算公式 x/10
|
||||
@ -279,13 +276,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: (el.target.value * 10) + 400,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
|
||||
},
|
||||
changeCountData(code, el) {
|
||||
@ -382,13 +376,10 @@ 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);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
|
||||
},
|
||||
changeBtn(code, el) {
|
||||
@ -427,19 +418,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
|
||||
|
@ -228,13 +228,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//反向计算 计算公式 x/10
|
||||
@ -271,13 +268,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: (el.target.value * 10) + 400,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
},
|
||||
changeCountData(code, el) {
|
||||
var data = (el.target.value * 10) + 400
|
||||
@ -367,13 +361,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//修改数据的函数
|
||||
@ -413,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
|
||||
|
@ -130,13 +130,10 @@ 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);
|
||||
// }
|
||||
if(this.timer){
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
|
||||
},
|
||||
change(code, el) {
|
||||
@ -150,19 +147,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
|
||||
|
@ -126,13 +126,10 @@
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
|
||||
},
|
||||
//反向计算 计算公式 x/10
|
||||
@ -169,13 +166,10 @@
|
||||
regAddress: code,
|
||||
num: (el.target.value * 10) + 400,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
},
|
||||
changeCountData(code, el) {
|
||||
var data = (el.target.value * 10) + 400
|
||||
@ -212,13 +206,10 @@
|
||||
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);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
|
||||
},
|
||||
//修改数据的函数
|
||||
@ -258,19 +249,19 @@
|
||||
},
|
||||
//限制 写入停止后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
|
||||
|
@ -224,13 +224,10 @@
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
|
||||
},
|
||||
//反向计算 计算公式 x/10
|
||||
@ -267,13 +264,10 @@
|
||||
regAddress: code,
|
||||
num: (el.target.value * 10) + 400,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
},
|
||||
changeCountData(code, el) {
|
||||
var data = (el.target.value * 10) + 400
|
||||
@ -317,13 +311,10 @@
|
||||
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);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
|
||||
},
|
||||
//修改数据的函数
|
||||
@ -363,19 +354,19 @@
|
||||
},
|
||||
//限制 写入停止后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
|
||||
|
@ -224,13 +224,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
|
||||
},
|
||||
//反向计算 计算公式 x/10
|
||||
@ -267,13 +264,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: (el.target.value * 10) + 400,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
},
|
||||
changeCountData(code, el) {
|
||||
var data = (el.target.value * 10) + 400
|
||||
@ -317,13 +311,10 @@ 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);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
|
||||
},
|
||||
//修改数据的函数
|
||||
@ -363,19 +354,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
|
||||
|
@ -315,13 +315,10 @@ 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);
|
||||
// }
|
||||
if(this.timer){
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
|
||||
},
|
||||
changeBtn(code,el){
|
||||
@ -360,19 +357,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
|
||||
|
@ -161,13 +161,10 @@ 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);
|
||||
// }
|
||||
if(this.timer){
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
|
||||
},
|
||||
changeBtn(code,el){
|
||||
@ -206,19 +203,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
|
||||
|
@ -414,13 +414,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//反向计算 计算公式 x/10
|
||||
@ -457,13 +454,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: (el.target.value * 10) + 400,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
},
|
||||
changeCountData(code, el) {
|
||||
var data = (el.target.value * 10) + 400
|
||||
@ -670,13 +664,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//修改数据的函数
|
||||
@ -716,19 +707,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
|
||||
|
@ -178,13 +178,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
},
|
||||
//反向计算 计算公式 x/10
|
||||
changeCount10(code, el) {
|
||||
@ -204,13 +201,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10 + 400,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
},
|
||||
changeCountData(code, el) {
|
||||
var data = el.target.value * 10 + 400;
|
||||
@ -266,13 +260,10 @@ 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);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
},
|
||||
changeBtn(code, el) {
|
||||
var store = this.$store.state;
|
||||
@ -310,19 +301,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;
|
||||
|
@ -108,13 +108,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//反向计算 计算公式 x/10
|
||||
@ -135,13 +132,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: (el.target.value * 10) + 400,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
changeCountData(code, el) {
|
||||
@ -199,13 +193,11 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
changeBtn(code, el) {
|
||||
var store = this.$store.state
|
||||
@ -243,19 +235,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
|
||||
|
@ -266,13 +266,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
},
|
||||
//反向计算 计算公式 x/10
|
||||
changeCount10(code, el) {
|
||||
@ -292,13 +289,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10 + 400,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
},
|
||||
changeCountData(code, el) {
|
||||
var data = el.target.value * 10 + 400;
|
||||
@ -396,13 +390,10 @@ 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);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
},
|
||||
changeBtn(code, el) {
|
||||
var store = this.$store.state;
|
||||
@ -440,19 +431,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;
|
||||
|
@ -152,13 +152,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
},
|
||||
//反向计算 计算公式 x/10
|
||||
changeCount10(code, el) {
|
||||
@ -178,13 +175,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10 + 400,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
},
|
||||
changeCountData(code, el) {
|
||||
var data = el.target.value * 10 + 400;
|
||||
@ -239,13 +233,10 @@ 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);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
},
|
||||
changeBtn(code, el) {
|
||||
var store = this.$store.state;
|
||||
@ -283,19 +274,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;
|
||||
|
@ -296,13 +296,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
},
|
||||
//反向计算 计算公式 x/10
|
||||
changeCount10(code, el) {
|
||||
@ -322,13 +319,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10 + 400,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
},
|
||||
changeCountData(code, el) {
|
||||
var data = el.target.value * 10 + 400;
|
||||
@ -399,13 +393,10 @@ 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);
|
||||
// }
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
},
|
||||
changeBtn(code, el) {
|
||||
var store = this.$store.state;
|
||||
@ -443,19 +434,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;
|
||||
|
@ -117,13 +117,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value * 10,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//反向计算 计算公式 x/10
|
||||
@ -144,13 +141,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: (el.target.value * 10) + 400,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
changeCountData(code, el) {
|
||||
@ -210,13 +204,10 @@ export default {
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
if (this.timer) {
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
changeBtn(code, el) {
|
||||
@ -255,19 +246,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
|
||||
|
Loading…
x
Reference in New Issue
Block a user