From b6ab34b586ee40b552fa64815148f58935e789ea Mon Sep 17 00:00:00 2001
From: guonan <guonan201020@163.com>
Date: 星期二, 15 七月 2025 14:15:01 +0800
Subject: [PATCH] 泥位计

---
 src/utils/map.js                           |    4 +-
 src/store/simAPI.js                        |    1 
 src/components/tools/Message.vue           |    9 +++-
 src/components/monifangzhen/schemeCard.vue |   61 +++++++++++++++++++++++++++++-
 4 files changed, 67 insertions(+), 8 deletions(-)

diff --git a/src/components/monifangzhen/schemeCard.vue b/src/components/monifangzhen/schemeCard.vue
index 0447eeb..ed91fdf 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;
diff --git a/src/components/tools/Message.vue b/src/components/tools/Message.vue
index 22a2491..7e30130 100644
--- a/src/components/tools/Message.vue
+++ b/src/components/tools/Message.vue
@@ -95,7 +95,7 @@
           "geom",
           "id",
           "serviceName",
-          "updateTime",
+          // "updateTime",
           "updateUser",
           "createUser",
           "bak",
@@ -105,6 +105,11 @@
 
       if (key === "createTime" && typeof value === "number") {
         formattedData.push({ name: "鍒涘缓鏃堕棿锛�", value: formatDate(value) });
+        continue;
+      }
+
+      if (key === "updateTime" && typeof value === "number") {
+        formattedData.push({ name: "缁撴潫鏃堕棿锛�", value: formatDate(value) });
         continue;
       }
 
@@ -179,7 +184,7 @@
 
           addField("total", "闄嶉洦鎬婚噺锛坢m锛�");
           addField("duration", "闄嶉洦鏃堕暱(h)");
-          addField("intensity", "闄嶉洦寮哄害锛坢m/灏忔椂锛�");
+          addField("intensity", "闄嶉洦寮哄害锛坢m/h");
           addField("prediction", "闄嶉洦鍦烘");
           addField("model", "闄嶉洦妯″紡");
           addField("history", "鍘嗗彶闄嶉洦");
diff --git a/src/store/simAPI.js b/src/store/simAPI.js
index e2a54b2..d8e332c 100644
--- a/src/store/simAPI.js
+++ b/src/store/simAPI.js
@@ -88,7 +88,6 @@
                     mode: forms.mode,
                     gauges: forms.gauges,
                     rainfalls: forms.rainFallList,
-                    // intensityUnit: forms.intensityUnit
                     intensityUnit: forms.intensityUnit || 'mm/15min'
                 })
             }
diff --git a/src/utils/map.js b/src/utils/map.js
index ffc1db0..e915fc4 100644
--- a/src/utils/map.js
+++ b/src/utils/map.js
@@ -203,8 +203,8 @@
       if (entity && entity.attrs && !simStore.openDia && entity.attrs.type && entity.attrs.type == '娉ヤ綅璁�') {
         let obj = {
           deviceName: entity.attrs.deviceName,
-          latitude: entity.attrs.latitude,
-          longitude: entity.attrs.longitude
+          latitude: entity.attrs.lat,
+          longitude: entity.attrs.lon
         }
         simStore.selectNWJ = obj
         showDeviceDetail.value = false;

--
Gitblit v1.9.3