pull/83/head
home孙 2023-12-28 14:35:11 +08:00
parent 29cbeaaff3
commit da2fbbce7e
1 changed files with 11 additions and 11 deletions

View File

@ -309,7 +309,16 @@ export default {
this.$message('当前设备为离线状态');
} else if (item.router == 'formula' && this.$route.query.index != item.index) {
if (this.routerNow == 'realTime') {
if (item.router == 'formula') {
this.$store.state.equipmentIndex = item.index
this.routerIndex = item.index
if (item.deviceName == 10) {
this.$router.push({ path: `/skylight?change=${item.index}` })
} else if (item.deviceName == 1 && this.routerNow != 'irrigateSet') {
this.$router.push({ path: `/irrigateSet?change=${item.index}` })
}
} else if (this.routerNow == 'realTime') {
this.$store.state.equipmentIndex = item.index
this.$router.push({ path: `/realTime?index=${item.index ? item.index : 1}&name=${item.deviceName}` })
} else if (this.routerNow == 'formula') {
@ -321,16 +330,7 @@ export default {
} else if (this.routerNow == 'dataAnalysis') {
this.$store.state.equipmentIndex = item.index
this.$router.push({ path: `/dataAnalysis?index=${item.index ? item.index : 1}` })
} else if (item.router == 'formula') {
this.$store.state.equipmentIndex = item.index
this.routerIndex = item.index
if (item.deviceName == 10) {
this.$router.push({ path: `/skylight?change=${item.index}` })
} else if (item.deviceName == 1 && this.routerNow != 'irrigateSet') {
this.$router.push({ path: `/irrigateSet?change=${item.index}` })
}
}
}
} else if (item.router == 'formula' && this.$route.query.index == item.index) {
return
} else if (item.router != this.routerNow && !item.http) {