From ea4b23402d2bce8be6f66ed0dd823546f05218e3 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Tue, 15 Jul 2025 17:24:20 +0800
Subject: [PATCH] feat: 没有地址显示经纬度

---
 src/views/tickets/ticket.vue |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/views/tickets/ticket.vue b/src/views/tickets/ticket.vue
index 7551c9e..923e618 100644
--- a/src/views/tickets/ticket.vue
+++ b/src/views/tickets/ticket.vue
@@ -510,6 +510,7 @@
 import { ElMessageBox, ElLoading } from 'element-plus'
 import { calculateDefaultRange } from '@/utils/util'
 import { gcj02ToWgs84, wgs84ToGcj02 } from '@/utils/coordinateTransformation'
+import _ from 'lodash'
 import {
   getList,
   createTicket,
@@ -899,7 +900,7 @@
         { label: '关联任务', value: this.currentDetail.job_name || '/' },
         { label: '任务发起人', value: this.currentDetail.creator },
         { label: '当前状态', value: this.mapStatus(this.currentDetail.status) },
-        { label: '事件地址', value: this.currentDetail.address }, // 包含经纬度信息
+        { label: '事件地址', value: this.currentDetail.address || this.currentDetail.latAndLon }, // 包含经纬度信息
         { label: '关联算法', value: this.currentDetail.aiType },
         { label: '发起单位', value: this.currentDetail.department },
         { label: '发起任务时间', value: this.currentDetail.startTime },
@@ -1577,8 +1578,8 @@
           })
         }
         this.currentDetail.status = row.status
-       
-        
+
+
       } catch (error) {
         if (this.activeTab === 'myTickets') {
           const statusArr = this.workType === 1 ? ['3', '4'] : this.fixedStatuses
@@ -1591,8 +1592,13 @@
           this.stepInfos = []
         }
       }
+      console.log(detailData,'detailDatadetailDatadetailData');
+      this.currentDetail = {
+        ...detailData,
+        address:null,
+        latAndLon: _.round(detailData.location[0],6) + ',' + _.round(detailData.location[1],6)
+      }
 
-      this.currentDetail = detailData
        console.log('this.currentDetail',this.currentDetail);
       this.detailVisible = true
       this.$nextTick(() => {

--
Gitblit v1.9.3