pull/24/head
home孙 2023-11-09 11:33:44 +08:00
parent 0aeb0251c5
commit b6937ed840
1 changed files with 3 additions and 1 deletions

View File

@ -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