From 8ae325c7cbe1e4a0e8adf35aff06497baef319ab Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 26 十月 2026 14:02:38 +0800
Subject: [PATCH] feat(mes): 完善工艺路线产出配置功能

---
 src/views/hrm/attendance/rule/modules/location-map-picker.vue |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/src/views/hrm/attendance/rule/modules/location-map-picker.vue b/src/views/hrm/attendance/rule/modules/location-map-picker.vue
index b6856de..9524273 100644
--- a/src/views/hrm/attendance/rule/modules/location-map-picker.vue
+++ b/src/views/hrm/attendance/rule/modules/location-map-picker.vue
@@ -50,6 +50,10 @@
 const env = (import.meta as any).env ?? {};
 const baiduMapKey = String(env.VITE_BAIDU_MAP_KEY ?? '').trim();
 const hasMapConfig = computed(() => Boolean(baiduMapKey));
+// 娴忚鍣ㄤ粎鍦ㄥ畨鍏ㄤ笂涓嬫枃锛圚TTPS 鎴� localhost锛夋斁寮�瀹氫綅鑳藉姏锛孒TTP 璁块棶涓嬫寜閽偣浜嗗繀鐒跺け璐�
+const canUseBrowserLocation = computed(
+  () => Boolean(navigator.geolocation) && window.isSecureContext,
+);
 
 function outOfChina(longitude: number, latitude: number) {
   return longitude < 72.004 || longitude > 137.8347 || latitude < 0.8293 || latitude > 55.8271;
@@ -324,8 +328,14 @@
         placeholder="杈撳叆鐪併�佸競銆佸尯鍜屽叿浣撳湴鐐癸紝渚嬪锛氫箤椴佹湪榻愬競鏂伴珮鍔涘巶鍖�"
         @search="handleSearch"
       />
-      <a-button @click="handleCurrentLocation">瀹氫綅鍒板綋鍓嶄綅缃�</a-button>
+      <a-button v-if="canUseBrowserLocation" @click="handleCurrentLocation">瀹氫綅鍒板綋鍓嶄綅缃�</a-button>
     </div>
+    <p
+      v-if="!disabled && !canUseBrowserLocation"
+      class="mb-2 text-xs text-gray-500"
+    >
+      褰撳墠閫氳繃 HTTP 璁块棶锛屾祻瑙堝櫒涓嶅厑璁哥綉椤佃幏鍙栦綅缃�傝鐢ㄣ�屾悳绱㈠湴鍧�銆嶆垨鐩存帴鐐瑰嚮鍦板浘閫夌偣锛涘闇�缃戦〉瀹氫綅璇锋敼鐢� HTTPS 璁块棶銆�
+    </p>
     <div ref="mapContainer" class="h-[360px] w-full overflow-hidden rounded border border-gray-200"></div>
     <div class="mt-2 flex flex-wrap justify-between gap-2 text-xs text-gray-500">
       <span>{{ disabled ? '鎵撳崱浣嶇疆鍙婂厑璁歌寖鍥�' : '鐐瑰嚮鍦板浘閫夋嫨鎵撳崱涓績鐐癸紱钃濊壊鍦嗗湀琛ㄧず鍏佽鎵撳崱鑼冨洿' }}</span>

--
Gitblit v1.9.3