diff --git a/src/views/index.vue b/src/views/index.vue index a8d0919..652c365 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -233,20 +233,22 @@ export default { } }, toRouter1(item) { - console.log(item, 11, this.routerNow); if (item.router) { if (item.http) { window.location.href = item.http; } else if (item.router == 'formula' && this.$route.query.index != item.index) { 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') { this.$store.state.equipmentIndex = item.index this.$router.push({ path: `/formula?index=${item.index ? item.index : 1}` }) } else if (this.routerNow == 'history') { + this.$store.state.equipmentIndex = item.index this.$router.push({ path: `/history?index=${item.index ? item.index : 1}` }) } 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