From 2cd372514154f6e1f5ae67b93fe0b7d1d22fd2c1 Mon Sep 17 00:00:00 2001 From: sunmeng <1162067978@qq.com> Date: Mon, 26 Aug 2024 16:47:07 +0800 Subject: [PATCH] 1 --- src/views/page/intrinsicParameter-soil.vue | 34 +++--- src/views/page/irrigateSet-soil.vue | 2 +- src/views/page/realTime.vue | 4 +- src/views/page/sensorSet-soil.vue | 10 +- src/views/page/upload-soil.vue | 117 ++++++++++++++++++++- 5 files changed, 144 insertions(+), 23 deletions(-) diff --git a/src/views/page/intrinsicParameter-soil.vue b/src/views/page/intrinsicParameter-soil.vue index 8b7d862..d72d2ae 100644 --- a/src/views/page/intrinsicParameter-soil.vue +++ b/src/views/page/intrinsicParameter-soil.vue @@ -74,23 +74,6 @@ export default { sensorType: '', typeList1: [ // { label: '平均1#土壤湿度', value: 0 }, - { label: '1#土壤湿度', value: 1 }, - { label: '2#土壤湿度', value: 2 }, - { label: '3#土壤湿度', value: 3 }, - { label: '4#土壤湿度', value: 4 }, - { label: '5#土壤湿度', value: 5 }, - { label: '6#土壤湿度', value: 6 }, - { label: '7#土壤湿度', value: 7 }, - { label: '8#土壤湿度', value: 8 }, - { label: '9#土壤湿度', value: 9 }, - { label: '10#土壤湿度', value: 10 }, - { label: '11#土壤湿度', value: 11 }, - { label: '12#土壤湿度', value: 12 }, - { label: '13#土壤湿度', value: 13 }, - { label: '14#土壤湿度', value: 14 },], - list1:40, - typeList2: [ - // { label: '平均1#土壤湿度', value: 0 }, { label: '1#土壤温度', value: 1 }, { label: '2#土壤温度', value: 2 }, { label: '3#土壤温度', value: 3 }, @@ -105,6 +88,23 @@ export default { { label: '12#土壤温度', value: 12 }, { label: '13#土壤温度', value: 13 }, { label: '14#土壤温度', value: 14 },], + list1:40, + typeList2: [ + // { label: '平均1#土壤湿度', value: 0 }, + { label: '1#土壤湿度', value: 1 }, + { label: '2#土壤湿度', value: 2 }, + { label: '3#土壤湿度', value: 3 }, + { label: '4#土壤湿度', value: 4 }, + { label: '5#土壤湿度', value: 5 }, + { label: '6#土壤湿度', value: 6 }, + { label: '7#土壤湿度', value: 7 }, + { label: '8#土壤湿度', value: 8 }, + { label: '9#土壤湿度', value: 9 }, + { label: '10#土壤湿度', value: 10 }, + { label: '11#土壤湿度', value: 11 }, + { label: '12#土壤湿度', value: 12 }, + { label: '13#土壤湿度', value: 13 }, + { label: '14#土壤湿度', value: 14 },], list2:40, typeList3: [ { label: '加热模式', value: 1 }, diff --git a/src/views/page/irrigateSet-soil.vue b/src/views/page/irrigateSet-soil.vue index b43eab8..964291f 100644 --- a/src/views/page/irrigateSet-soil.vue +++ b/src/views/page/irrigateSet-soil.vue @@ -825,7 +825,7 @@ export default { this.inputData = res.data.data; // this.getType(); // this.getType00(); - this.get53data(this.inputData['1' + (10 + (this.indexs - 1)) + "53"]); + this.get53data(this.inputData['1' + (10 + (this.indexs - 1)) + "51"]); this.inputData['1' + (10 + (indexs - 1)) + '01'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '01']) this.inputData['1' + (10 + (indexs - 1)) + '06'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '06']) this.inputData['1' + (10 + (indexs - 1)) + '17'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '17']) diff --git a/src/views/page/realTime.vue b/src/views/page/realTime.vue index 0f714a0..3404ed9 100644 --- a/src/views/page/realTime.vue +++ b/src/views/page/realTime.vue @@ -27,9 +27,9 @@ -
+
-
+
气象站:
diff --git a/src/views/page/sensorSet-soil.vue b/src/views/page/sensorSet-soil.vue index 5c00673..35cc3c3 100644 --- a/src/views/page/sensorSet-soil.vue +++ b/src/views/page/sensorSet-soil.vue @@ -174,6 +174,8 @@ export default { }, watch: { 'active'(newVal, oldVal) { + console.log(newVal,'active'); + this.getSensorType() // this.getCountData() }, @@ -307,11 +309,17 @@ export default { } }, getSensorType() { + + var text='无意义的传感器' this.typeList.forEach((el, index) => { if (el.value == this.inputData[this.numberList[this.active]]) { - this.sensorType = el.label + console.log(el.label,this.numberList[this.active],this.inputData[this.numberList[this.active]],111); + text = el.label } }) + setTimeout(() => { + this.sensorType = text + }, 10); }, toIndex(index) { this.active = index diff --git a/src/views/page/upload-soil.vue b/src/views/page/upload-soil.vue index 5da2084..6b11d90 100644 --- a/src/views/page/upload-soil.vue +++ b/src/views/page/upload-soil.vue @@ -507,7 +507,7 @@ export default { value: parseInt(num, 2), }, }; - this.changeBtn('500', dataNum); + this.changeBtn('10001', dataNum); }, selList2(index) { if (this.actList2.indexOf(index) == -1) { @@ -526,7 +526,120 @@ export default { value: parseInt(num, 2), }, }; - this.changeBtn('501', dataNum); + this.changeBtn('10002', dataNum); + }, + selList3(index) { + if (this.actList3.indexOf(index) == -1) { + this.actList3.push(index) + } else { + this.actList3.splice(this.actList3.indexOf(index), 1) + } + this.actList3New=['0','0','0','0','0'] + this.actList3.forEach((el, index) => { + this.actList3New[this.actList3New.length-el-1] = '1' + }) + + var num = this.actList3New.join(""); + var dataNum = { + target: { + value: parseInt(num, 2), + }, + }; + this.changeBtn('10003', dataNum); + }, + selList4(index) { + if (this.actList4.indexOf(index) == -1) { + this.actList4.push(index) + } else { + this.actList4.splice(this.actList4.indexOf(index), 1) + } + this.actList4New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'] + this.actList4.forEach((el, index) => { + this.actList4New[this.actList4New.length-el-1] = '1' + }) + var num = this.actList4New.join(""); + var dataNum = { + target: { + value: parseInt(num, 2), + }, + }; + this.changeBtn('10004', dataNum); + }, + selList5(index) { + if (this.actList5.indexOf(index) == -1) { + this.actList5.push(index) + } else { + this.actList5.splice(this.actList5.indexOf(index), 1) + } + this.actList5New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'] + this.actList5.forEach((el, index) => { + this.actList5New[this.actList5New.length-el-1] = '1' + }) + + var num = this.actList5New.join(""); + var dataNum = { + target: { + value: parseInt(num, 2), + }, + }; + this.changeBtn('10005', dataNum); + }, + selList6(index) { + if (this.actList6.indexOf(index) == -1) { + this.actList6.push(index) + } else { + this.actList6.splice(this.actList6.indexOf(index), 1) + } + this.actList6New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'] + this.actList6.forEach((el, index) => { + this.actList6New[this.actList6New.length-el-1] = '1' + }) + + var num = this.actList6New.join(""); + var dataNum = { + target: { + value: parseInt(num, 2), + }, + }; + this.changeBtn('10006', dataNum); + }, + selList7(index) { + if (this.actList7.indexOf(index) == -1) { + this.actList7.push(index) + } else { + this.actList7.splice(this.actList7.indexOf(index), 1) + } + this.actList7New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'] + this.actList7.forEach((el, index) => { + this.actList7New[this.actList7New.length-el-1] = '1' + }) + + var num = this.actList7New.join(""); + var dataNum = { + target: { + value: parseInt(num, 2), + }, + }; + this.changeBtn('10007', dataNum); + }, + selList8(index) { + if (this.actList8.indexOf(index) == -1) { + this.actList8.push(index) + } else { + this.actList8.splice(this.actList8.indexOf(index), 1) + } + this.actList8New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'] + this.actList8.forEach((el, index) => { + this.actList6New[this.actList8New.length-el-1] = '1' + }) + + var num = this.actList8New.join(""); + var dataNum = { + target: { + value: parseInt(num, 2), + }, + }; + this.changeBtn('10008', dataNum); }, },