From 9a79e8028a57447df5f25d7a7a5f4e4478212bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E8=90=8C?= <525441437@qq.com> Date: Thu, 12 Oct 2023 15:44:13 +0800 Subject: [PATCH] 1 --- src/views/page/formula.vue | 25 ++++++++++++++++++++----- src/views/page/upload.vue | 5 ++++- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/views/page/formula.vue b/src/views/page/formula.vue index fa457de..ff8acbe 100644 --- a/src/views/page/formula.vue +++ b/src/views/page/formula.vue @@ -3,7 +3,7 @@
- 施肥配方参数{{indexs}}
{{ titleName }}
+ {{ titleName }}参数
种植作物配方1
@@ -21,13 +21,13 @@
目标PH值 -
目标EC值 -
@@ -65,7 +65,7 @@
{{ scope.row.data3 }} - @@ -74,7 +74,7 @@
{{ scope.row.data3 }} - @@ -294,7 +294,22 @@ export default { value: el.target.value * 10 } }; + console.log(data,11); this.change(code, data) + }, + //失去焦点 + blurChangeCount(code, el) { + var store=this.$store.state + var data = { + equipmentId: store.equipmentList[store.equipmentIndex-1].deviceId, + regAddress: code, + num: el.target.value * 10, + }; //避免开启多个计时器 + if(this.timer){ + this.timer && clearInterval(this.timer); + this.changeData(data); + } + }, //计算数据 /10 countData1(data) { diff --git a/src/views/page/upload.vue b/src/views/page/upload.vue index 5268551..302d74e 100644 --- a/src/views/page/upload.vue +++ b/src/views/page/upload.vue @@ -120,6 +120,7 @@ export default { this.actList2.push(this.actList2New.length-index-1) } }) + console.log(this.actList2); }, dataInit() { this.actList1New = [] @@ -235,6 +236,7 @@ selectValue(e) { } else { this.actList1.splice(this.actList1.indexOf(index), 1) } + this.actList1New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0',] this.actList1.forEach((el, index) => { this.actList1New[this.actList1New.length-el-1] = '1' }) @@ -253,10 +255,11 @@ selectValue(e) { } else { this.actList2.splice(this.actList2.indexOf(index), 1) } + this.actList2New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0',] this.actList2.forEach((el, index) => { this.actList2New[this.actList2New.length-el-1] = '1' }) - + console.log(this.actList2,this.actList2New,this.actList2New.join("")); var num = this.actList2New.join(""); var dataNum = { target: {