Compare commits

...

2 Commits

Author SHA1 Message Date
b6937ed840 1 2023-11-09 11:33:44 +08:00
0aeb0251c5 修改控制器数据上传 2023-11-09 11:29:41 +08:00
2 changed files with 15 additions and 16 deletions

View File

@ -233,20 +233,22 @@ export default {
} }
}, },
toRouter1(item) { toRouter1(item) {
console.log(item, 11, this.routerNow);
if (item.router) { if (item.router) {
if (item.http) { if (item.http) {
window.location.href = item.http; window.location.href = item.http;
} else if (item.router == 'formula' && this.$route.query.index != item.index) { } else if (item.router == 'formula' && this.$route.query.index != item.index) {
if (this.routerNow == 'realTime') { if (this.routerNow == 'realTime') {
this.$store.state.equipmentIndex = item.index
this.$router.push({ path: `/realTime?index=${item.index ? item.index : 1}&name=${item.deviceName}` }) this.$router.push({ path: `/realTime?index=${item.index ? item.index : 1}&name=${item.deviceName}` })
} else if (this.routerNow == 'formula') { } else if (this.routerNow == 'formula') {
this.$store.state.equipmentIndex = item.index this.$store.state.equipmentIndex = item.index
this.$router.push({ path: `/formula?index=${item.index ? item.index : 1}` }) this.$router.push({ path: `/formula?index=${item.index ? item.index : 1}` })
} else if (this.routerNow == 'history') { } else if (this.routerNow == 'history') {
this.$store.state.equipmentIndex = item.index
this.$router.push({ path: `/history?index=${item.index ? item.index : 1}` }) this.$router.push({ path: `/history?index=${item.index ? item.index : 1}` })
} else if (this.routerNow == 'dataAnalysis') { } else if (this.routerNow == 'dataAnalysis') {
this.$store.state.equipmentIndex = item.index
this.$router.push({ path: `/dataAnalysis?index=${item.index ? item.index : 1}` }) this.$router.push({ path: `/dataAnalysis?index=${item.index ? item.index : 1}` })
} else if (item.router == 'formula') { } else if (item.router == 'formula') {
this.$store.state.equipmentIndex = item.index this.$store.state.equipmentIndex = item.index

View File

@ -112,20 +112,17 @@ export default {
// //
actList2: [], actList2: [],
actList2New: [], actList2New: [],
list2: ['目标水肥PH数据', list2: ['1#平均温度传感器',
'目标水肥EC数据', '2#平均温度传感器',
'平均水肥PH数据', '1#平均湿度传感器',
'平均水肥EC数据', '2#平均湿度传感器',
'1#水肥PH数据', '1#平均光照传感器',
'1#水肥EC数据', '1#平均CO2传感器',
'2#水肥PH数据', '1#平均土温传感器',
'2#水肥EC数据', '1#平均土湿传感器',
'1#通道传感器数据', '1#平均PH传感器',
'2#通道传感器数据', '1#平均EC传感器',
'3#通道传感器数据', '1#水温传感器',],
'4#通道传感器数据',
'5#通道传感器数据',
'6#通道传感器数据'],
// //
actList3: [], actList3: [],
actList3New: [], actList3New: [],
@ -222,7 +219,7 @@ export default {
getAct2() { getAct2() {
this.actList2=[] this.actList2=[]
var num = this.inputData['21503'] var num = this.inputData['21503']
var num2 = this.padString(num.toString(2), 14) var num2 = this.padString(num.toString(2), 11)
this.actList2New=num2.split("") this.actList2New=num2.split("")
this.actList2New.forEach((el,index)=>{ this.actList2New.forEach((el,index)=>{
if(el=='1'){ if(el=='1'){