From c1adad71a3823c95c782a298ef30cf23e6abc8a6 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Mon, 15 Sep 2025 15:03:12 +0800
Subject: [PATCH] feat:事件工单跳转
---
src/views/tickets/ticket.vue | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/src/views/tickets/ticket.vue b/src/views/tickets/ticket.vue
index fdc0710..18a2437 100644
--- a/src/views/tickets/ticket.vue
+++ b/src/views/tickets/ticket.vue
@@ -1191,7 +1191,7 @@
}
let curQueryParams = {};
-
+ let isTabProcessed = false;
if (href.indexOf('?') != -1 && href.split('?').length > 0) {
curQueryParams = href
.split('?')[1]
@@ -1204,7 +1204,7 @@
return pre;
}, {});
- const { orderNumber = undefined, day = undefined } = curQueryParams;
+ const { orderNumber = undefined, day = undefined, tab = undefined } = curQueryParams;
// 日历传值
if (day) {
@@ -1233,6 +1233,14 @@
find && (find.query = {});
});
}
+ if (tab) {
+ const isTabValid = this.filteredTabs.some(t => t.name === tab);
+ if (isTabValid) {
+ this.activeTab = tab;
+ this.handleTabChangeAfterJump();
+ isTabProcessed = true;
+ }
+ }
}
this.fetchTabCounts(); // 新增:初始化时获取 tab 数据
@@ -2033,7 +2041,6 @@
handleTabChange(tab) {
this.activeTab = tab.props?.name || tab.name;
-
const isReview = this.findObject(this.option.column, 'isReview');
// 根据条件切换显隐
isReview.hide = !['all', 'completed', 'myTickets'].includes(this.activeTab);
@@ -2043,7 +2050,15 @@
this.fetchTableData();
this.fetchTabCounts(); // 切换 tab 时重新获取数据
},
-
+ //新增 跳转后触发的Tab切换
+handleTabChangeAfterJump() {
+ const isReview = this.findObject(this.option.column, 'isReview');
+ isReview.hide = !['all', 'completed', 'myTickets'].includes(this.activeTab);
+ this.handleReset();
+ this.page.currentPage = 1;
+ this.fetchTableData();
+ this.fetchTabCounts();
+ },
handleSearch() {
this.page.currentPage = 1;
this.fetchTableData();
--
Gitblit v1.9.3