From 786fb5b1d3326bae09525db46668594d5e66736c Mon Sep 17 00:00:00 2001
From: xiebin <vip_xiaobin810@163.com>
Date: Sun, 20 Apr 2025 13:31:27 +0800
Subject: [PATCH] 事件工单跳转

---
 src/views/tickets/ticket.vue |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/src/views/tickets/ticket.vue b/src/views/tickets/ticket.vue
index d776488..8ad1c98 100644
--- a/src/views/tickets/ticket.vue
+++ b/src/views/tickets/ticket.vue
@@ -545,7 +545,6 @@
         algorithm: [], // 关联算法改为数组
         location: [],  // 将存储为[经度, 纬度, 地址]格式
         address: '',
-        content: '',
         photos: [],
         content: '', // 新增字段,用于存储后端返回的 content
       },
@@ -605,12 +604,14 @@
       reviewDialogVisible: false, // 新增:审核对话框可见性
       currentReviewImage: '', // 新增:当前审核图片
       currentImageIndex: 1, // 新增:当前图片索引
+      isShowInfo: false,
     };
   },
   created() {
     let orderNumber = new URLSearchParams(window.location.search).get('orderNumber');
     if (orderNumber) {
       this.filters.keyword = orderNumber;
+      this.isShowInfo = true;
     }
     this.loadAMapScripts();
     this.fetchDropdownData();
@@ -622,6 +623,9 @@
     this.fetchTableData();
   },
   computed: {
+    firstRowData() {
+      return this.tableData.length > 0 ? this.tableData[0] : null;
+    },
     availableHandlers() {
       return this.form.department ? (this.departmentUsers[this.form.department] || []) : [];
     },
@@ -977,6 +981,11 @@
         // 更新总数显示
         this.page.total = total || 0;
 
+        // 是否弹出详情页
+        if (this.isShowInfo) {
+          this.handleViewDetail(this.firstRowData)
+          this.isShowInfo = false; // 生效一次
+        }
         await this.fetchTabCounts();
       } catch (error) {
         this.$message.error(error.message || "获取数据失败");
@@ -1248,6 +1257,7 @@
     },
 
     async handleViewDetail(row) {
+
       // 先设置workType,直接从row读取
       this.workType = row.work_type !== undefined ? Number(row.work_type) : 0;
 

--
Gitblit v1.9.3