From 5b2bc4884c75a76df569f34330d2267a7f3ed9ad Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Tue, 24 Jun 2025 15:56:12 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

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

diff --git a/src/views/tickets/ticket.vue b/src/views/tickets/ticket.vue
index cf827b8..6bf9848 100644
--- a/src/views/tickets/ticket.vue
+++ b/src/views/tickets/ticket.vue
@@ -74,7 +74,7 @@
     </el-tabs>
 
     <!-- 新建工单对话框 -->
-    <el-dialog v-model="dialogVisible" title="新建工单" width="70%" :close-on-click-modal="false" @close="resetForm">
+    <el-dialog v-model="dialogVisible" v-if="dialogVisible" title="新建工单" width="70%" :close-on-click-modal="false" @close="resetForm">
       <el-form :model="form" :rules="rules" ref="form" label-width="90px" class="create-ticket-form">
         <div class="form-section">
           <el-row :gutter="16">
@@ -1351,14 +1351,10 @@
 
     handleLocationChange (val) {
       let locationValue = val.value
-      console.log('handleLocationChange', locationValue)
       if (locationValue && locationValue.length >= 2) {
         // 兼容第三项为地址
-        this.form.location = [
-          Number(locationValue[0]),
-          Number(locationValue[1]),
-          locationValue[2] || '',
-        ]
+        const [lng, lat] = gcj02ToWgs84(locationValue[0], locationValue[1])
+        this.form.location = [Number(lng), Number(lat), locationValue[2] || '',]
         this.form.address = locationValue[2] || ''
       } else {
         this.form.location = []
@@ -1471,6 +1467,8 @@
 
     handleAdd () {
       this.dialogVisible = true
+      this.mapParams.center = null
+      this.form.location = []
     },
 
     resetForm () {

--
Gitblit v1.9.3