From d9c657aa78cf0ebe31933a87e63ca92edd8a8da3 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期四, 11 六月 2026 09:57:50 +0800
Subject: [PATCH] 数据采集站
---
admin/src/main.js | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/admin/src/main.js b/admin/src/main.js
index a0eb2fd..5cfd23a 100644
--- a/admin/src/main.js
+++ b/admin/src/main.js
@@ -51,11 +51,15 @@
if (this.topMenuCurrent == null) {
return
}
+ if (this.$store.state.skipTopMenuNavigation) {
+ this.$store.state.skipTopMenuNavigation = false
+ return
+ }
await this.chagneRoutes()
}
},
methods: {
- ...mapMutations(['switchCollapseMenu', 'setHomePage', 'setTopMenuCurrent', 'setTopMenuCurrent','cleartagsview']),
+ ...mapMutations(['switchCollapseMenu', 'setCurrentIndex', 'setHomePage', 'setTopMenuCurrent', 'setTopMenuCurrent','cleartagsview']),
// 鍒濆鍖栨湰鍦伴厤缃�
initLocalConfig () {
// 鑿滃崟鐘舵�侀厤缃�
@@ -95,7 +99,14 @@
tlist.push(...item.children)
}
})
- this.setTopMenuCurrent(topCurrent)
+ if (this.$route.query && this.$route.query.menuparams) {
+ let menu = topList.filter(item => item.params === this.$route.query.menuparams)
+ this.setTopMenuCurrent(menu[0])
+ this.setCurrentIndex(topList.findIndex(obj => obj.params === this.$route.query.menuparams))
+ } else {
+ this.setTopMenuCurrent(topCurrent)
+ this.setCurrentIndex(0)
+ }
// console.log(topList)
// var menus = []
// topList.forEach(item => {
@@ -120,7 +131,9 @@
redirect: this.homePage.url
})
// 璺敱鍔犺浇瀹屾垚鍚庯紝濡傛灉璁块棶鐨勬槸/锛岃烦杞嚦鍔ㄦ�佽瘑鍒殑棣栭〉
- if (this.$route.path === '/') {
+ if (this.$route.query && this.$route.query.menuparams) {
+ this.$router.push(topList.filter(item => item.params === this.$route.query.menuparams)[0].homeUrl)
+ } else if (this.$route.path === '/') {
this.$router.push(this.homePage.url)
}
})
--
Gitblit v1.9.3