From 5965c857d575f5b4ebc6e73345c992f4f5def4a3 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 19 三月 2025 15:25:21 +0800
Subject: [PATCH] 优化

---
 admin/src/views/operation/components/AMap.vue |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/admin/src/views/operation/components/AMap.vue b/admin/src/views/operation/components/AMap.vue
index 52da152..5627175 100644
--- a/admin/src/views/operation/components/AMap.vue
+++ b/admin/src/views/operation/components/AMap.vue
@@ -1,6 +1,6 @@
 <template>
   <GlobalWindow title="缁樺埗杩愯惀鍖哄煙" :visible.sync="isShowModal" :confirm-working="isWorking" @close="close"
-    @confirm="confirm" width="1000px">
+    @confirm="confirm" width="100%">
     <div class="map_title">缁樺埗锛氶紶鏍囧乏閿偣鍑诲強绉诲姩鍗冲彲缁樺埗鍥惧舰锛岀粯鍒惰繃绋嬩腑鎸変笅esc閿彲涓柇璇ヨ繃绋�</div>
     <div class="map_title">榧犳爣宸﹂敭鍙屽嚮鍗冲彲缁撴潫褰撳墠澶氳竟褰㈢粯鍒讹紝澶氳竟褰細鑷姩闂悎锛�</div>
     <div class="map_wrap">
@@ -52,11 +52,11 @@
       //     maximumAge: 0 // 绂佺敤缂撳瓨
       //   }
       // )
-      console.log('-----')
+      console.log('-----', this.row)
 
       map = new TMap.Map("containera", {
-        zoom: 16, // 璁剧疆鍦板浘缂╂斁绾у埆
-        center: new TMap.LatLng(31.722763, 117.385480) // 璁剧疆鍦板浘涓績鐐瑰潗鏍�
+        zoom: this.polygons.length > 0 ? 20 : 16, // 璁剧疆鍦板浘缂╂斁绾у埆
+        center: this.polygons.length > 0 ? new TMap.LatLng(this.polygons[0].lat, this.polygons[0].lng) : new TMap.LatLng(31.722763, 117.385480) // 璁剧疆鍦板浘涓績鐐瑰潗鏍�
       })
       var tempList = []
       if (this.polygons.length > 0) {
@@ -157,4 +157,4 @@
     z-index: 99999999999;
   }
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.3