From 077feba634b75aee3c1fc8e561b2d2aeb95e3305 Mon Sep 17 00:00:00 2001
From: y505174330 <505174330@qq.com>
Date: 星期六, 18 五月 2024 15:37:00 +0800
Subject: [PATCH] 1

---
 src/pages/territory/territory.vue |   24 +++++++-----------------
 1 files changed, 7 insertions(+), 17 deletions(-)

diff --git a/src/pages/territory/territory.vue b/src/pages/territory/territory.vue
index 1252f05..d359b3d 100644
--- a/src/pages/territory/territory.vue
+++ b/src/pages/territory/territory.vue
@@ -4,6 +4,7 @@
     <headNav
       :idIndex="idIndex"
       text="涓尰鍦板煙鍖昏氨"
+      style="z-index:999"
     />
     <view
       class="flex flex-center"
@@ -165,8 +166,6 @@
         type="text"
       >鏌ョ湅鏇村>></el-button>
     </el-card>
-    <!-- echarts鍦板浘 -->
-    <!-- <view id="main" style="width: 100vw; position: relative"></view> -->
     <div id="map"></div>
     <!-- 鏈濅唬 -->
     <view
@@ -404,18 +403,10 @@
     showCard(info) {
       console.log(info);
       console.log(this.markerList);
-      const item = this.markerList.find((f) => f.id == info.id);
-      console.log(item, "12312");
-      this.currentMark = {
-        name: item?.WEAK_NAME[0]?.content1,
-        nikeName: item?.ALIAS[0]?.content2,
-        nativePlace: item?.content1,
-        barnch: item?.MEDICAL_BRANCH[0]?.content1,
-        medical: item?.MEDICAL_EXPERTISE[0]?.content1,
-      };
-      console.log(this.currentMark);
       console.log(this.map);
-      this.isEchTrue = true;
+      const item = this.markerList.find((f) => f.id == info.id);
+      var latlng = L.latLng(item.yCoord, item.xCoord);
+      this.map.setView(latlng, 10);
     },
     getDataList() {
       getRetrieval({ keyword: this.keyword, dynasty: "" }).then((res) => {
@@ -443,14 +434,13 @@
           id: item.id,
         }));
         this.markerList = markerList;
-        console.log(markerList, "markerList");
       });
     },
     //鍒濆鍖栧湴鍥�
     initMap(markerList) {
       var map = L.map("map", {
-        attributionControl: false,
         preferCanvas: true,
+        attributionControl: false,
       }).setView([39.91667, 116.41667], 3);
 
       L.tileLayer
@@ -466,7 +456,7 @@
         iconAnchor: [24, 41], //  鍥炬爣灏嗗搴旀爣璁扮偣鐨勪綅缃� 杩欎釜鏄噸鐐癸紝 銆愬��1锛屽��2銆戯紝鍊�1锛氫负鍥炬爣鍧愭爣绗竴涓��(鍗�32)鐨勪竴鍗婏紝鍊�2锛氫负鍥炬爣鍧愭爣绗簩涓��(鍗�52)
         popupAnchor: [1, -24], // 璇ョ偣鏄浉瀵逛簬iconAnchor寮瑰嚭淇℃伅鐨勪綅缃�  杩欎釜鏄垜鎵嬪姩璋冨嚭鏉ョ殑锛屾枃妗i粯璁ゅ師濮嬪�兼槸[-1锛�-76]锛屾垜鏄幓涓�鍗婂�硷紝鍙栦竴鍗婂�艰皟鍑烘潵鐨�
       });
-
+      this.map = map;
       if (markerList.length) {
         for (let i = 0; i < markerList.length; i++) {
           const item = markerList[i];
@@ -648,6 +638,6 @@
   width: 100%;
   margin: 0 auto;
   font-size: 14px !important;
-  z-index: -1 !important;
+  /* z-index: -1 !important; */
 }
 </style>

--
Gitblit v1.9.1