From d9c657aa78cf0ebe31933a87e63ca92edd8a8da3 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期四, 11 六月 2026 09:57:50 +0800
Subject: [PATCH] 数据采集站
---
admin/src/components/common/tagsview.vue | 36 +++++++++++++++++++++---------------
1 files changed, 21 insertions(+), 15 deletions(-)
diff --git a/admin/src/components/common/tagsview.vue b/admin/src/components/common/tagsview.vue
index 5fbfe86..fe29551 100644
--- a/admin/src/components/common/tagsview.vue
+++ b/admin/src/components/common/tagsview.vue
@@ -12,7 +12,7 @@
:key="index"
:id="'tags-box-' + index"
@contextmenu.prevent="openMenu(item, $event)"
- :class="isActive(item.url, item.index,index) ? 'active' : ''"
+ :class="isActive(item.url, item.index) ? 'active' : ''"
class="tagsview"
@click="tagsmenu(item, index)"
>
@@ -134,27 +134,34 @@
}
} else {
// 閭d箞锛屽鏋滀笂闈㈢殑鏉′欢閮戒笉鎴愮珛锛屾病鏈塴ength=0.涔熷氨鏄浣犺繕鏈夊ソ鍑犱釜鏍囩锛屽苟涓斾綘鍒犻櫎鐨勬槸鏈�鍚庝竴浣嶆爣绛撅紝閭d箞灏卞線宸﹁竟鎸竴浣嶈烦杞矾鐢�
- this.$router.push({ path: this.tags[index - 1].url, query: { param: this.tags[index - 1].params } })
+ this.$router.push({
+ path: this.tags[index - 1].url,
+ query: { index: this.tags[index - 1].index, param: this.tags[index - 1].params }
+ })
}
} else {
- // 濡傛灉浣犵偣鍑讳笉鏄渶鍚庝竴浣嶆爣绛撅紝鐐圭殑鍓嶉潰鐨勶紝閭e氨寰�鍙宠竟璺宠浆
- this.$router.push({ path: this.tags[index].url, query: { param: this.tags[index].params } })
+ this.$router.push({
+ path: this.tags[index].url,
+ query: { index: this.tags[index].index, param: this.tags[index].params }
+ })
}
},
// 鐐瑰嚮璺宠浆璺敱
tagsmenu (item, index) {
- console.log('tagsmenu')
- // 鍒ゆ柇锛氬綋鍓嶈矾鐢变笉绛変簬褰撳墠閫変腑椤圭殑url锛屼篃灏变唬琛ㄤ綘鐐瑰嚮鐨勪笉鏄幇鍦ㄩ�変腑鐨勬爣绛撅紝鏄彟涓�涓爣绛惧氨璺宠浆杩囧幓锛屽鏋滀綘鐐瑰嚮鐨勬槸鐜板湪宸茬粡閫変腑鐨勬爣绛惧氨涓嶇敤璺宠浆浜嗭紝鍥犱负浣犲凡缁忓湪杩欎釜璺敱浜嗚繕璺充粈涔堝憿銆�
- if (this.$route.path !== item.url) {
- // 鐢╬ath鐨勮烦杞柟娉曟妸褰撳墠椤圭殑url褰撲綔鍦板潃璺宠浆銆�
- this.$router.push({ path: item.url, query: { index: this.tags[index].index, param: this.tags[index].params, time: (Math.random().toString())} })
- // this.$router.push( item.url)
+ if (this.$route.path !== item.url || this.$route.query.index !== item.index) {
+ this.$router.push({
+ path: item.url,
+ query: {
+ index: item.index,
+ param: item.params,
+ time: (Math.random().toString())
+ }
+ })
const tagsDiv = document.getElementById('tags-box')
- if (index) {
+ if (tagsDiv && index) {
tagsDiv.scrollTo(index * 110, 0)
}
}
- // this.computeTableHeight()
},
computeTableHeight () {
this.$nextTick(() => {
@@ -201,9 +208,8 @@
return dv || 0
},
// 閫氳繃鍒ゆ柇璺敱涓�鑷磋繑鍥炲竷灏斿�兼坊鍔燾lass锛屾坊鍔犻珮浜晥鏋�
- isActive (route, params, index) {
- const res = (route === this.$route.path && params == this.$route.query.index)
- return res
+ isActive (route, index) {
+ return route === this.$route.path && index === this.$route.query.index
},
scrollToStart () {
const tagsDiv = document.getElementById('tags-box')
--
Gitblit v1.9.3