From edba1eb33a06bfb9b64e9d6d2e3de8bc49eca333 Mon Sep 17 00:00:00 2001
From: lixuliang <lixuliang_hd@126.com>
Date: 星期三, 13 三月 2024 10:47:52 +0800
Subject: [PATCH] 20240313

---
 src/utils/map2.js |   76 +++++++++++++++++++++++---------------
 1 files changed, 46 insertions(+), 30 deletions(-)

diff --git a/src/utils/map2.js b/src/utils/map2.js
index 30f1293..88b586d 100644
--- a/src/utils/map2.js
+++ b/src/utils/map2.js
@@ -2382,41 +2382,57 @@
                 let properties = feature.getProperties().features[0].values_;
                 for (const propertyNames in properties) {
                     if (propertyNames.indexOf("鐩戞帶鍚�") !== -1) {
-                        // objdata = {
-                        //     POITYPE: "SPJK",
-                        //     name: properties["JK鍚嶇О"]._value,
-                        //     type: properties["JK绫诲瀷"]._value,
-                        //     function: properties["鍔熻兘"]._value,
-                        //     area: properties["鎵�鍦ㄥ尯"]._value,
-                        //     number: properties["JK缂栧彿"]._value,
-                        //     code: properties["JK鍐呯爜"]._value,
-                        //     lon: lon,
-                        //     lat: lat,
-                        // }
-                        Message({
-                            message: '杩炴帴鐘舵�佹煡璇腑',
+                        const infoM = Message({
+                            message: '璇ョ偣浣嶈棰戠洃鎺ф煡璇腑锛岃绋嶅悗',
                             type: 'info',
-                            offset: 60,
+                            offset: 75,
                             center: true,
-                            duration: 1000,
+                            duration: 0,
                         });
-                        layerOpen(properties["JK鍚嶇О"], {
-                            width: "100%",
-                            height: "40%",
-                            // offset: [offsetTop + "px", "380px"],
-                            url: "../../static/video/video.html?code=" + properties["JK鍐呯爜"],
-                            fn: {
-                                success: (layero, index) => {
-                                    SmartEarthPopupData.layerContainer = layero;
-                                },
-                                end: () => {
+                        axios
+                            .get(
+                                // 璇锋眰鍦ㄧ嚎鐘舵��
+                                window.gisBaseUrl + "BEApi/getCameraDetails?cameraIndexCode=" +
+                                properties["JK鍐呯爜"]
+                            ).then(res => {
+                                if (res.data.data.status == 1) {
+                                    infoM.close();
+                                    Message({
+                                        message: '瑙嗛鐩戞帶鍦ㄧ嚎涓�',
+                                        type: 'success',
+                                        offset: 75,
+                                        center: true,
+                                        duration: 2000,
+                                    });
+                                    layerOpen(properties["JK鍚嶇О"], {
+                                        width: "100%",
+                                        height: "40%",
+                                        // offset: [offsetTop + "px", "380px"],
+                                        url: "../../static/video/video.html?code=" + properties["JK鍐呯爜"],
+                                        fn: {
+                                            success: (layero, index) => {
+                                                SmartEarthPopupData.layerContainer = layero;
+                                            },
+                                            end: () => {
 
-                                },
-                                cancel: () => {
+                                            },
+                                            cancel: () => {
 
-                                },
-                            },
-                        });
+                                            },
+                                        },
+                                    });
+                                } else {
+                                    infoM.close();
+                                    Message({
+                                        message: '璇ョ偣浣嶈棰戠洃鎺х绾夸腑',
+                                        type: 'errer',
+                                        offset: 75,
+                                        center: true,
+                                        duration: 2000,
+                                    });
+                                    return
+                                }
+                            })
                         return
                     } else if (propertyNames.indexOf("閮ㄤ欢鍚嶇О") !== -1) {
                         objdata = {

--
Gitblit v1.9.3