From a57caa72a54efe9de3fe26a6c36d3e8038267377 Mon Sep 17 00:00:00 2001
From: guonan <guonan201020@163.com>
Date: 星期四, 17 七月 2025 09:09:49 +0800
Subject: [PATCH] 修改x按钮

---
 src/components/monifangzhen/schemeCard.vue |   63 +++++++++++++++++++++++++++++--
 1 files changed, 59 insertions(+), 4 deletions(-)

diff --git a/src/components/monifangzhen/schemeCard.vue b/src/components/monifangzhen/schemeCard.vue
index 0447eeb..b3d1b9d 100644
--- a/src/components/monifangzhen/schemeCard.vue
+++ b/src/components/monifangzhen/schemeCard.vue
@@ -184,13 +184,68 @@
     ? mergedPageData
     : mergedPageData.filter((device) => device.deviceName.includes("瀛欒儭娌�"));
 
+  // 瀛欒儭娌熻澶囩粡绾害鏄犲皠
+  const deviceMapping = {
+    鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸ご鏍戝簳涓嬩笢娌熸偿浣嶈5007: {
+      lon: 116.598891,
+      lat: 40.554979,
+    },
+    鎬�鏌斿尯鐞夌拑搴欓晣瀛欒儭娌熸潙涓婂彴瀛愭渤涓滃崡娌熸偿浣嶈5006: {
+      lon: 116.593215,
+      lat: 40.554399,
+    },
+  };
+
+  let displayedData = filteredPageData;
+
+  if (!areaName.includes("鍖�")) {
+    // 娣诲姞 lon 鍜� lan 瀛楁
+    displayedData = filteredPageData.map((device) => {
+      const mapping = deviceMapping[device.deviceName];
+      return {
+        ...device,
+        ...(mapping && { lon: mapping.lon, lat: mapping.lat }), // 濡傛灉 mapping 瀛樺湪锛屾墠娣诲姞
+      };
+    });
+
+    // 娣诲姞棰濆鐨勪袱涓偣浣�
+    const extraPoint1 = {
+      deviceName: "寮矡1",
+      longitude: 116.597836,
+      latitude: 40.564962,
+      // height: 530.14,
+      type: "娉ヤ綅璁�",
+      lon: 116.597836,
+      lat: 40.564962,
+      dictDeviceType: "1437295811",
+      deviceId: "custom_extraPoint1", // 鎵嬪姩鍔犱竴涓敮涓� ID
+    };
+
+    const extraPoint2 = {
+      deviceName: "寮矡2",
+      longitude: 116.591571,
+      latitude: 40.573093,
+      // height: 483.89,
+      type: "娉ヤ綅璁�",
+      lon: 116.591571,
+      lat: 40.573093,
+      dictDeviceType: "1437295811",
+      deviceId: "custom_extraPoint2", // 鎵嬪姩鍔犱竴涓敮涓� ID
+    };
+
+    displayedData = [...displayedData, extraPoint1, extraPoint2];
+    // displayedData = [...displayedData, extraPoint1];
+  }
+
   console.log(
-    filteredPageData,
-    areaName.includes("鍖�") ? "鍏ㄩ儴娉ヤ綅璁¤澶囧垪琛�" : "瀛欒儭娌熸偿浣嶈璁惧鍒楄〃"
+    displayedData,
+    areaName.includes("鍖�")
+      ? "鍏ㄩ儴娉ヤ綅璁¤澶囧垪琛�"
+      : "瀛欒儭娌熸偿浣嶈 + 棰濆鐐逛綅鍒楄〃"
   );
 
   // 7. 鍒涘缓鐐�
-  filteredPageData.forEach((item) => {
+  displayedData.forEach((item) => {
     // 鏍规嵁闇�姹傚彲澧炲垹
     item.type = getDictName(deviceDictList, item.dictDeviceType);
     item.name = item.deviceName;
@@ -266,7 +321,7 @@
         return; // 闃绘鍚庣画鎿嶄綔
       } else {
         simStore.rePlayList = res.data;
-        console.log(simStore.rePlayList, "lisi");
+        console.log(simStore.rePlayList, "瀹炴椂妯℃嫙鍘嗗彶鍥炴斁鍒楄〃");
       }
       // 浣跨敤 nextTick 纭繚 DOM 鏇存柊鍚庡啀鎵ц鍚庣画鎿嶄綔
       nextTick(() => {

--
Gitblit v1.9.3