调整综合监控默认进入第一个界面

This commit is contained in:
zyy 2020-07-09 18:52:13 +08:00
parent df3b8eebd7
commit 7b6148919c
2 changed files with 10 additions and 2 deletions

View File

@ -306,6 +306,9 @@ export default {
}
});
}
if (!this.$route.params.mode) {
this.selectChildren(this.navList[0].children[0], 0);
}
},
mounted() {
window.onbeforeunload = this.clearSubscribe;
@ -362,7 +365,7 @@ export default {
}
}
},
selectChildren(item, index) { //
selectChildren(item, index) { //
this.selectChildIndex = index;
this.type = item.type;
const query = {currentSystem: this.currentSystem, stationName: this.stationList[this.selectStationIndex].name, stationId: this.stationList[this.selectStationIndex].id, group: this.group };

View File

@ -303,6 +303,11 @@ export default {
};
},
watch: {},
created() {
if (!this.$route.params.mode) {
this.selectChildren(this.navList[0].children[0], 0);
}
},
mounted() {
this.navList.forEach((nav, navIndex)=>{
if (nav.children && nav.children.length > 0) {
@ -333,7 +338,7 @@ export default {
}
}
},
selectChildren(item, index) { //
selectChildren(item, index) { //
this.selectChildIndex = index;
this.type = item.type;
this.$router.push({ path: `/iscs/system/config/${item.type}`, query: {currentSystem:this.currentSystem, stationName: this.stationList[this.selectStationIndex].name, stationId: this.stationList[this.selectStationIndex].id } });