+
@@ -278,7 +278,7 @@
export default {
data() {
return {
- inputDataNew: [],
+ inputDataNew: {20099:[],20093:[],20087:[],20081:[],},
inputData: [],
typeList1: [
{ label: '1#平均温度', value: 0 },
@@ -319,9 +319,12 @@ export default {
}
},
mounted() {
- this.dataInit()
- //input获取焦点后全选
- let inputList = document.querySelectorAll('input');
+ const that = this;
+ setTimeout(() => {
+ that.dataInit();
+ }, 0);
+ //input获取焦点后全选
+ let inputList = document.querySelectorAll('input');
for (let index = 0; index < inputList.length; index++) {
inputList[index].onfocus = this.selectValue;//input放入焦点,全选文本
}
@@ -381,10 +384,14 @@ export default {
regAddress: code,
num: el.target.value * 10,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ console.log(store.nowInput, el.target.value, 111);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//反向计算 计算公式 x/10
@@ -412,6 +419,20 @@ 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) {
@@ -421,10 +442,13 @@ export default {
regAddress: code,
num: (el.target.value * 10) + 400,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeCountData(code, el) {
var data = (el.target.value * 10) + 400
@@ -436,8 +460,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()
@@ -479,10 +503,10 @@ export default {
this.inputData[20089] = this.countData10(this.inputData[20089])
this.inputData[20090] = this.countData(this.inputData[20090])
this.inputData[20091] = this.countData(this.inputData[20091])
-
+
this.inputDataNew[20092] = this.getData2(this.inputData[20092])
this.inputDataNew[20098] = this.getData2(this.inputData[20098])
-
+
this.inputData[20094] = this.countData10(this.inputData[20094])
this.inputData[20095] = this.countData10(this.inputData[20095])
this.inputData[20096] = this.countData10(this.inputData[20096])
@@ -500,12 +524,13 @@ 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()
+ 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);
},
//全选文本
selectValue(e) {
@@ -514,30 +539,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
diff --git a/src/views/page/circulationCan.vue b/src/views/page/circulationCan.vue
index 7c9d677..ccde628 100644
--- a/src/views/page/circulationCan.vue
+++ b/src/views/page/circulationCan.vue
@@ -175,10 +175,13 @@ export default {
regAddress: code,
num: el.target.value * 10,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//反向计算 计算公式 x/10
@@ -215,10 +218,13 @@ export default {
regAddress: code,
num: (el.target.value * 10) + 400,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeCountData(code, el) {
var data = (el.target.value * 10) + 400
@@ -304,10 +310,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//修改数据的函数
@@ -347,19 +356,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
diff --git a/src/views/page/coercionMist.vue b/src/views/page/coercionMist.vue
index e6c341b..4ed4b0a 100644
--- a/src/views/page/coercionMist.vue
+++ b/src/views/page/coercionMist.vue
@@ -114,10 +114,13 @@ export default {
regAddress: code,
num: el.target.value * 10,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//反向计算 计算公式 x/10
@@ -154,10 +157,13 @@ export default {
regAddress: code,
num: (el.target.value * 10) + 400,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeCountData(code, el) {
var data = (el.target.value * 10) + 400
@@ -243,10 +249,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//修改数据的函数
@@ -286,19 +295,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
diff --git a/src/views/page/electromagneticControl.vue b/src/views/page/electromagneticControl.vue
index 62c271d..73aebe8 100644
--- a/src/views/page/electromagneticControl.vue
+++ b/src/views/page/electromagneticControl.vue
@@ -214,10 +214,13 @@ export default {
regAddress: code,
num: el.target.value * 10,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//反向计算 计算公式 x/10
@@ -331,10 +334,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//修改数据的函数
@@ -374,19 +380,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
diff --git a/src/views/page/exitSettings.vue b/src/views/page/exitSettings.vue
index fa3a29c..731e696 100644
--- a/src/views/page/exitSettings.vue
+++ b/src/views/page/exitSettings.vue
@@ -96,10 +96,13 @@ export default {
regAddress: code,
num: el.target.value * 10,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//反向计算 计算公式 x/10
@@ -136,10 +139,13 @@ export default {
regAddress: code,
num: (el.target.value * 10) + 400,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeCountData(code, el) {
var data = (el.target.value * 10) + 400
@@ -176,10 +182,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//修改数据的函数
@@ -219,19 +228,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
diff --git a/src/views/page/fan.vue b/src/views/page/fan.vue
index 82e8598..4d68c1d 100644
--- a/src/views/page/fan.vue
+++ b/src/views/page/fan.vue
@@ -197,10 +197,13 @@ export default {
regAddress: code,
num: el.target.value * 10,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//反向计算 计算公式 x/10
@@ -229,10 +232,13 @@ export default {
regAddress: code,
num: (el.target.value * 10) + 400,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//反向计算 计算公式 (x-400) / 10
@@ -300,10 +306,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeBtn(code, el) {
@@ -342,19 +351,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
diff --git a/src/views/page/formula.vue b/src/views/page/formula.vue
index ec1c3af..4a8358e 100644
--- a/src/views/page/formula.vue
+++ b/src/views/page/formula.vue
@@ -308,10 +308,13 @@ export default {
regAddress: code,
num: el.target.value * 10,
}; //避免开启多个计时器
- if(this.timer){
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//计算数据 /10
@@ -355,10 +358,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if(this.timer){
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
change(code, el) {
@@ -372,19 +378,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
diff --git a/src/views/page/insizeSunshade.vue b/src/views/page/insizeSunshade.vue
index a2e8631..01507dd 100644
--- a/src/views/page/insizeSunshade.vue
+++ b/src/views/page/insizeSunshade.vue
@@ -194,10 +194,13 @@ export default {
regAddress: code,
num: el.target.value * 10,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//反向计算 计算公式 x/10
@@ -234,10 +237,13 @@ export default {
regAddress: code,
num: (el.target.value * 10) + 400,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeCountData(code, el) {
var data = (el.target.value * 10) + 400
@@ -323,10 +329,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//修改数据的函数
@@ -366,19 +375,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
diff --git a/src/views/page/internalInsulation.vue b/src/views/page/internalInsulation.vue
index a55430a..3e2f852 100644
--- a/src/views/page/internalInsulation.vue
+++ b/src/views/page/internalInsulation.vue
@@ -141,10 +141,13 @@ export default {
regAddress: code,
num: el.target.value * 10,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//反向计算 计算公式 x/10
@@ -181,10 +184,13 @@ export default {
regAddress: code,
num: (el.target.value * 10) + 400,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeCountData(code, el) {
var data = (el.target.value * 10) + 400
@@ -270,10 +276,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//修改数据的函数
@@ -313,19 +322,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
diff --git a/src/views/page/intrinsicParameter.vue b/src/views/page/intrinsicParameter.vue
index 7b94aa9..8d29c66 100644
--- a/src/views/page/intrinsicParameter.vue
+++ b/src/views/page/intrinsicParameter.vue
@@ -533,10 +533,13 @@ export default {
regAddress: code,
num: el.target.value * 10,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//反向计算 计算公式 x/10
@@ -629,11 +632,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
-
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//修改数据的函数
changeBtn(code, el) {
@@ -716,19 +721,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
diff --git a/src/views/page/irrigateSet.vue b/src/views/page/irrigateSet.vue
index 5a8ced9..f2ae8d4 100644
--- a/src/views/page/irrigateSet.vue
+++ b/src/views/page/irrigateSet.vue
@@ -987,10 +987,13 @@ export default {
regAddress: code,
num: el.target.value*10,
}; //避免开启多个计时器
- if(this.timer){
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//失去焦点
@@ -1001,10 +1004,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if(this.timer){
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeBtn(code,el){
@@ -1044,19 +1050,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
diff --git a/src/views/page/outsizeSunshade.vue b/src/views/page/outsizeSunshade.vue
index c60cb9e..ac35e20 100644
--- a/src/views/page/outsizeSunshade.vue
+++ b/src/views/page/outsizeSunshade.vue
@@ -164,10 +164,13 @@ export default {
regAddress: code,
num: el.target.value * 10,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//反向计算 计算公式 x/10
@@ -204,10 +207,13 @@ export default {
regAddress: code,
num: (el.target.value * 10) + 400,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeCountData(code, el) {
var data = (el.target.value * 10) + 400
@@ -296,10 +302,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//修改数据的函数
@@ -339,19 +348,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
diff --git a/src/views/page/sensorSet-con.vue b/src/views/page/sensorSet-con.vue
index 6b7cdea..ab868a1 100644
--- a/src/views/page/sensorSet-con.vue
+++ b/src/views/page/sensorSet-con.vue
@@ -417,6 +417,7 @@ return num
},
//全选文本
selectValue(e) {
+
var store = this.$store.state
store.nowInput=e.target.value
e.currentTarget.select();
@@ -442,27 +443,29 @@ 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),
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ console.log(data.num,this.inputData[code],1.5);
+ if(data.num!=this.inputData[code]){
+ // this.timer && clearInterval(this.timer);
this.changeData(data);
- }
-
+ }
+
},
//失去焦点
blurChange(code, el) {
@@ -472,11 +475,10 @@ return num
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if(data.num!=this.inputData[code]){
this.changeData(data);
+ // this.timer && clearInterval(this.timer);
}
-
},
changeBtn(code, el) {
var store = this.$store.state
@@ -504,13 +506,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) {
@@ -529,8 +531,11 @@ 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,
@@ -542,12 +547,14 @@ 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);
}
}
-
+
- this.getCountData()
+ setTimeout(() => {
+ this.getCountData()
+ // this.inputData[data.regAddress]==data.num
+ }, 0);
} else {
this.inputData[data.regAddress]=store.nowInput
this.$message.error(res.data.msg);
diff --git a/src/views/page/sensorSet.vue b/src/views/page/sensorSet.vue
index 8a740bb..c982da1 100644
--- a/src/views/page/sensorSet.vue
+++ b/src/views/page/sensorSet.vue
@@ -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,10 +337,14 @@ getSendData(number){
regAddress: code,
num:this.getSendData(el.target.value) ,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ 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);
+ // }
},
//失去焦点
@@ -351,10 +355,14 @@ getSendData(number){
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if(this.timer){
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ 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);
+ // }
},
changeBtn(code,el){
@@ -383,13 +391,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) {
diff --git a/src/views/page/skylight.vue b/src/views/page/skylight.vue
index b0efe8b..161af81 100644
--- a/src/views/page/skylight.vue
+++ b/src/views/page/skylight.vue
@@ -252,10 +252,13 @@ export default {
regAddress: code,
num: el.target.value * 10,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//反向计算 计算公式 x/10
@@ -276,10 +279,13 @@ export default {
regAddress: code,
num: (el.target.value * 10) + 400,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeCountData(code, el) {
@@ -376,10 +382,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeBtn(code, el) {
@@ -418,19 +427,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
diff --git a/src/views/page/sunroofControl.vue b/src/views/page/sunroofControl.vue
index 1741f7e..49e1403 100644
--- a/src/views/page/sunroofControl.vue
+++ b/src/views/page/sunroofControl.vue
@@ -228,10 +228,13 @@ export default {
regAddress: code,
num: el.target.value * 10,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//反向计算 计算公式 x/10
@@ -268,10 +271,13 @@ export default {
regAddress: code,
num: (el.target.value * 10) + 400,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeCountData(code, el) {
var data = (el.target.value * 10) + 400
@@ -361,10 +367,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//修改数据的函数
@@ -404,19 +413,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
diff --git a/src/views/page/systemSet.vue b/src/views/page/systemSet.vue
index 9a130c2..f1bcbdf 100644
--- a/src/views/page/systemSet.vue
+++ b/src/views/page/systemSet.vue
@@ -130,10 +130,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if(this.timer){
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
change(code, el) {
@@ -147,19 +150,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
diff --git a/src/views/page/targetCo2.vue b/src/views/page/targetCo2.vue
index 7d3920b..8b578b5 100644
--- a/src/views/page/targetCo2.vue
+++ b/src/views/page/targetCo2.vue
@@ -126,10 +126,13 @@
regAddress: code,
num: el.target.value * 10,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//反向计算 计算公式 x/10
@@ -166,10 +169,13 @@
regAddress: code,
num: (el.target.value * 10) + 400,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeCountData(code, el) {
var data = (el.target.value * 10) + 400
@@ -206,10 +212,13 @@
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//修改数据的函数
@@ -249,19 +258,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
diff --git a/src/views/page/targetHumidity.vue b/src/views/page/targetHumidity.vue
index 3277287..a7ce287 100644
--- a/src/views/page/targetHumidity.vue
+++ b/src/views/page/targetHumidity.vue
@@ -224,10 +224,13 @@
regAddress: code,
num: el.target.value * 10,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//反向计算 计算公式 x/10
@@ -264,10 +267,13 @@
regAddress: code,
num: (el.target.value * 10) + 400,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeCountData(code, el) {
var data = (el.target.value * 10) + 400
@@ -311,10 +317,13 @@
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//修改数据的函数
@@ -354,19 +363,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
diff --git a/src/views/page/targetTemperature.vue b/src/views/page/targetTemperature.vue
index 9771fd7..37ac395 100644
--- a/src/views/page/targetTemperature.vue
+++ b/src/views/page/targetTemperature.vue
@@ -224,10 +224,13 @@ export default {
regAddress: code,
num: el.target.value * 10,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//反向计算 计算公式 x/10
@@ -264,10 +267,13 @@ export default {
regAddress: code,
num: (el.target.value * 10) + 400,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeCountData(code, el) {
var data = (el.target.value * 10) + 400
@@ -311,10 +317,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//修改数据的函数
@@ -354,19 +363,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
diff --git a/src/views/page/upload-con.vue b/src/views/page/upload-con.vue
index 35594dd..5459640 100644
--- a/src/views/page/upload-con.vue
+++ b/src/views/page/upload-con.vue
@@ -315,10 +315,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if(this.timer){
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeBtn(code,el){
@@ -357,19 +360,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
diff --git a/src/views/page/upload.vue b/src/views/page/upload.vue
index 8e2aadc..9e1ed04 100644
--- a/src/views/page/upload.vue
+++ b/src/views/page/upload.vue
@@ -161,10 +161,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if(this.timer){
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeBtn(code,el){
@@ -203,19 +206,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
diff --git a/src/views/page/wetFan.vue b/src/views/page/wetFan.vue
index dc83878..c4581ed 100644
--- a/src/views/page/wetFan.vue
+++ b/src/views/page/wetFan.vue
@@ -414,10 +414,13 @@ export default {
regAddress: code,
num: el.target.value * 10,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//反向计算 计算公式 x/10
@@ -454,10 +457,13 @@ export default {
regAddress: code,
num: (el.target.value * 10) + 400,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeCountData(code, el) {
var data = (el.target.value * 10) + 400
@@ -664,10 +670,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//修改数据的函数
@@ -707,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
diff --git a/src/views/wufang/downtake.vue b/src/views/wufang/downtake.vue
index 8bd2481..341e67c 100644
--- a/src/views/wufang/downtake.vue
+++ b/src/views/wufang/downtake.vue
@@ -178,10 +178,13 @@ export default {
regAddress: code,
num: el.target.value * 10,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//反向计算 计算公式 x/10
changeCount10(code, el) {
@@ -201,10 +204,13 @@ export default {
regAddress: code,
num: el.target.value * 10 + 400,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeCountData(code, el) {
var data = el.target.value * 10 + 400;
@@ -260,10 +266,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeBtn(code, el) {
var store = this.$store.state;
@@ -301,19 +310,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;
diff --git a/src/views/wufang/geothermalFan.vue b/src/views/wufang/geothermalFan.vue
index 85d80ca..47124f6 100644
--- a/src/views/wufang/geothermalFan.vue
+++ b/src/views/wufang/geothermalFan.vue
@@ -108,10 +108,13 @@ export default {
regAddress: code,
num: el.target.value * 10,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//反向计算 计算公式 x/10
@@ -132,10 +135,13 @@ export default {
regAddress: code,
num: (el.target.value * 10) + 400,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeCountData(code, el) {
@@ -193,11 +199,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
-
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeBtn(code, el) {
var store = this.$store.state
@@ -235,19 +243,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
diff --git a/src/views/wufang/rollByRoll.vue b/src/views/wufang/rollByRoll.vue
index 19cad9c..9bdcb66 100644
--- a/src/views/wufang/rollByRoll.vue
+++ b/src/views/wufang/rollByRoll.vue
@@ -266,10 +266,13 @@ export default {
regAddress: code,
num: el.target.value * 10,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//反向计算 计算公式 x/10
changeCount10(code, el) {
@@ -289,10 +292,13 @@ export default {
regAddress: code,
num: el.target.value * 10 + 400,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeCountData(code, el) {
var data = el.target.value * 10 + 400;
@@ -390,10 +396,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeBtn(code, el) {
var store = this.$store.state;
@@ -431,19 +440,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;
diff --git a/src/views/wufang/snowRemoval.vue b/src/views/wufang/snowRemoval.vue
index 25cb70e..0815090 100644
--- a/src/views/wufang/snowRemoval.vue
+++ b/src/views/wufang/snowRemoval.vue
@@ -152,10 +152,13 @@ export default {
regAddress: code,
num: el.target.value * 10,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//反向计算 计算公式 x/10
changeCount10(code, el) {
@@ -175,10 +178,13 @@ export default {
regAddress: code,
num: el.target.value * 10 + 400,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeCountData(code, el) {
var data = el.target.value * 10 + 400;
@@ -233,10 +239,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeBtn(code, el) {
var store = this.$store.state;
@@ -274,19 +283,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;
diff --git a/src/views/wufang/uptake.vue b/src/views/wufang/uptake.vue
index 68b3ce9..c98fe30 100644
--- a/src/views/wufang/uptake.vue
+++ b/src/views/wufang/uptake.vue
@@ -296,10 +296,13 @@ export default {
regAddress: code,
num: el.target.value * 10,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//反向计算 计算公式 x/10
changeCount10(code, el) {
@@ -319,10 +322,13 @@ export default {
regAddress: code,
num: el.target.value * 10 + 400,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeCountData(code, el) {
var data = el.target.value * 10 + 400;
@@ -393,10 +399,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
- this.changeData(data);
- }
+ if (store.nowInput != el.target.value) {
+ this.changeData(data);
+ }
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeBtn(code, el) {
var store = this.$store.state;
@@ -434,19 +443,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;
diff --git a/src/views/wufang/waterPump.vue b/src/views/wufang/waterPump.vue
index d5e2ccb..c7a521d 100644
--- a/src/views/wufang/waterPump.vue
+++ b/src/views/wufang/waterPump.vue
@@ -117,10 +117,13 @@ export default {
regAddress: code,
num: el.target.value * 10,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
//反向计算 计算公式 x/10
@@ -141,10 +144,13 @@ export default {
regAddress: code,
num: (el.target.value * 10) + 400,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeCountData(code, el) {
@@ -204,10 +210,13 @@ export default {
regAddress: code,
num: el.target.value,
}; //避免开启多个计时器
- if (this.timer) {
- this.timer && clearInterval(this.timer);
+ if (store.nowInput != el.target.value) {
this.changeData(data);
}
+ // if (this.timer) {
+ // this.timer && clearInterval(this.timer);
+ // this.changeData(data);
+ // }
},
changeBtn(code, el) {
@@ -246,19 +255,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