From 5f85b6b812370f640fcfbc62ab1401191eba3a18 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Tue, 15 Jul 2025 17:24:33 +0800
Subject: [PATCH] Merge branch 'dev' into test

---
 src/permission.js            |   14 +++++++-------
 src/views/tickets/ticket.vue |   14 ++++++++++----
 2 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/src/permission.js b/src/permission.js
index 5272458..c91ba32 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -19,6 +19,8 @@
 const lockPage = '/lock' //锁屏页
 const urlParams = getUrlParams(window.location.href)
 const adminUrl = import.meta.env.VITE_APP_DASHBOARD_URL
+const env = import.meta.env.VITE_APP_ENV
+
 function findRouteByPath (routes, targetPath) {
   // 遍历数组中的每个路由对象
   for (const route of routes) {
@@ -39,7 +41,6 @@
   // 遍历完所有路由都没找到,返回null
   return null
 }
-
 router.beforeEach((to, from, next) => {
   const meta = to.meta || {}
   const isMenu = meta.menu === undefined ? to.query.menu : meta.menu
@@ -93,10 +94,10 @@
     } else {
       const systemToken = store.getters.token || urlParams?.token
       if (systemToken === 0) {
-        // store.dispatch('FedLogOut').then(() => {
-        //   next({ path: '/login' })
-        // })
-        store.dispatch('FedLogOut').then(() =>  window.location.replace(`${adminUrl}#/login`));
+        store.dispatch('FedLogOut').then(() => {
+          next({ path: '/login' })
+        })
+        // store.dispatch('FedLogOut').then(() =>  window.location.replace(`${adminUrl}#/login`));
       } else {
         const meta = to.meta || {}
         const query = to.query || {}
@@ -121,8 +122,7 @@
     if (meta.isAuth === false) {
       next()
     } else {
-      // next('/login')
-      window.location.replace(`${adminUrl}#/login`)
+      env === 'development' ? next('/login') : window.location.replace(`${adminUrl}#/login`)
     }
   }
 })
diff --git a/src/views/tickets/ticket.vue b/src/views/tickets/ticket.vue
index fa4abff..0a36838 100644
--- a/src/views/tickets/ticket.vue
+++ b/src/views/tickets/ticket.vue
@@ -521,6 +521,7 @@
 import { ElMessageBox, ElLoading } from 'element-plus'
 import { calculateDefaultRange } from '@/utils/util'
 import { gcj02ToWgs84, wgs84ToGcj02 } from '@/utils/coordinateTransformation'
+import _ from 'lodash'
 import {
   getList,
   createTicket,
@@ -910,7 +911,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 },
@@ -1601,8 +1602,8 @@
           })
         }
         this.currentDetail.status = row.status
-       
-        
+
+
       } catch (error) {
         if (this.activeTab === 'myTickets') {
           const statusArr = this.workType === 1 ? ['3', '4'] : this.fixedStatuses
@@ -1615,8 +1616,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